diff options
author | Jonathan Bakker <xc-racer2@live.ca> | 2020-04-25 10:36:33 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-01 13:14:44 +0200 |
commit | 82d16c23518f9c3c275bf2557cd057b0e3f14ce1 (patch) | |
tree | b06f305eda464757e09a817d7268ab345e4462b0 | |
parent | da95fdc3c756d48dc2a9ae2d32a191646b9c9813 (diff) | |
download | linux-stable-82d16c23518f9c3c275bf2557cd057b0e3f14ce1.tar.gz linux-stable-82d16c23518f9c3c275bf2557cd057b0e3f14ce1.tar.bz2 linux-stable-82d16c23518f9c3c275bf2557cd057b0e3f14ce1.zip |
phy: samsung: s5pv210-usb2: Add delay after reset
[ Upstream commit 05942b8c36c7eb5d3fc5e375d4b0d0c49562e85d ]
The USB phy takes some time to reset, so make sure we give it to it. The
delay length was taken from the 4x12 phy driver.
This manifested in issues with the DWC2 driver since commit fe369e1826b3
("usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.")
where the endianness check would read the DWC ID as 0 due to the phy still
resetting, resulting in the wrong endian mode being chosen.
Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Link: https://lore.kernel.org/r/BN6PR04MB06605D52502816E500683553A3D10@BN6PR04MB0660.namprd04.prod.outlook.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/phy/samsung/phy-s5pv210-usb2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/phy/samsung/phy-s5pv210-usb2.c b/drivers/phy/samsung/phy-s5pv210-usb2.c index f6f72339bbc3..bb7fdf491c1c 100644 --- a/drivers/phy/samsung/phy-s5pv210-usb2.c +++ b/drivers/phy/samsung/phy-s5pv210-usb2.c @@ -142,6 +142,10 @@ static void s5pv210_phy_pwr(struct samsung_usb2_phy_instance *inst, bool on) udelay(10); rst &= ~rstbits; writel(rst, drv->reg_phy + S5PV210_UPHYRST); + /* The following delay is necessary for the reset sequence to be + * completed + */ + udelay(80); } else { pwr = readl(drv->reg_phy + S5PV210_UPHYPWR); pwr |= phypwr; |