From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Date: Mon, 01 Jun 2015 19:09:29 +0100 Subject: [U-Boot] [PATCH] sunxi: usb_phy: Swap check for disconnect threshold In-Reply-To: <1433170911-13559-1-git-send-email-hdegoede@redhat.com> References: <1433170911-13559-1-git-send-email-hdegoede@redhat.com> Message-ID: <1433182169.5748.282.camel@hellion.org.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, 2015-06-01 at 17:01 +0200, Hans de Goede wrote: > Before this commit the code for determining the disconnect threshold was > checking for sun4i or sun6i assuming that those where the exception and > that newer SoCs use a disconnect threshold of 2 like sun7i does. > > But it turns out that newer SoCs actually use a disconnect threshold of 3 > and sun5i and sun7i are the exceptions, so check for those instead. > > Here are the settings from the various Allwinner SDK sources: > sun4i-a10: USBC_Phy_Write(usbc_no, 0x2a, 3, 2); > sun5i-a13: USBC_Phy_Write(usbc_no, 0x2a, 2, 2); > sun6i-a31: USBC_Phy_Write(usbc_no, 0x2a, 3, 2); > sun7i-a20: USBC_Phy_Write(usbc_no, 0x2a, 2, 2); > sun8i-a23: USBC_Phy_Write(usbc_no, 0x2a, 3, 2); > sun8i-h3: USBC_Phy_Write(usbc_no, 0x2a, 3, 2); > sun9i-a80: USBC_Phy_Write(usbc_no, 0x2a, 3, 2); > > Note this commit makes no functional changes for sun4i - sun7i, and > changes the disconnect threshold for sun8i to match what Allwinner uses. > > Signed-off-by: Hans de Goede Acked-by: Ian Campbell