]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
phy-sun4i-usb: Swap check for disconnect threshold
authorHans de Goede <hdegoede@redhat.com>
Sat, 13 Jun 2015 12:37:47 +0000 (14:37 +0200)
committerKishon Vijay Abraham I <kishon@ti.com>
Sat, 25 Jul 2015 10:15:47 +0000 (15:45 +0530)
commit2846469631393a1cf150f17a99b8ca2b5772b255
tree9f47e448829ebc709310b49ba15e2098f1df6696
parent1a52abe6821da728b41187c6676b6ab7294e6e2c
phy-sun4i-usb: Swap check for disconnect threshold

Before this commit the code for determining the disconnect threshold was
checking for "allwinner,sun4i-a10-usb-phy" or "allwinner,sun6i-a31-usb-phy"
assuming that those where the exception and then newer SoCs would use a
disconnect threshold of 2 like sun7i does. But it turns out that newer
SoCs 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 as currently we only support
sun4i - sun7i.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-sun4i-usb.c