Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1205250
| From | Kishon Vijay Abraham I <kishon@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 05/19] phy-sun4i-usb: Swap check for disconnect threshold |
| Date | 2015-08-11 18:10 +0200 |
| Message-ID | <pWkhI-1Fq-29@gated-at.bofh.it> (permalink) |
| References | <pWk82-1c5-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Hans de Goede <hdegoede@redhat.com> 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index a6ea2e6..50ecab9 100644 --- a/drivers/phy/phy-sun4i-usb.c +++ b/drivers/phy/phy-sun4i-usb.c @@ -447,11 +447,11 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev) else data->num_phys = 3; - if (of_device_is_compatible(np, "allwinner,sun4i-a10-usb-phy") || - of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy")) - data->disc_thresh = 3; - else + if (of_device_is_compatible(np, "allwinner,sun5i-a13-usb-phy") || + of_device_is_compatible(np, "allwinner,sun7i-a20-usb-phy")) data->disc_thresh = 2; + else + data->disc_thresh = 3; if (of_device_is_compatible(np, "allwinner,sun6i-a31-usb-phy")) dedicated_clocks = true; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/19] phy: for 4.3 Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:00 +0200 [PATCH 09/19] phy-sun4i-usb: Add support for monitoring vbus via a power-supply Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:10 +0200 [PATCH 11/19] phy: berlin: Do not use sata name in usb phy driver Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:10 +0200 [PATCH 03/19] phy-sun4i-usb: Add id and vbus detection support for the otg phy (phy0) Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:10 +0200 [PATCH 13/19] phy: Drop owner assignment from i2c_driver Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:10 +0200 [PATCH 05/19] phy-sun4i-usb: Swap check for disconnect threshold Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:10 +0200 [PATCH 01/19] phy: add lpc18xx usb otg phy driver Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:10 +0200 [PATCH 07/19] phy-sun4i-usb: Add support for the usb-phys on the sun8i-a33 SoC Kishon Vijay Abraham I <kishon@ti.com> - 2015-08-11 18:10 +0200 Re: [GIT PULL 00/19] phy: for 4.3 Greg KH <gregkh@linuxfoundation.org> - 2015-08-15 02:00 +0200
csiph-web