* [PATCH] usb: ehci-mx6: move phy setup before register access
@ 2023-04-28 18:50 Tim Harvey
2023-05-02 12:47 ` sbabic
0 siblings, 1 reply; 2+ messages in thread
From: Tim Harvey @ 2023-04-28 18:50 UTC (permalink / raw)
To: Marek Vasut, u-boot; +Cc: Fabio Estevam, Adam Ford, Tim Harvey
For the CONFIG_PHY case, move the PHY setup before the register access.
This avoids a hang when updating the imx8mm.dtsi which moves the
USB OTG power-domains to the PHY.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Fabio Estevam <festevam@denx.de>
---
drivers/usb/host/ehci-mx6.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 91633f013a55..fae20838c60a 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -703,6 +703,10 @@ static int ehci_usb_probe(struct udevice *dev)
usb_internal_phy_clock_gate(priv->phy_addr, 1);
usb_phy_enable(ehci, priv->phy_addr);
#endif
+#else
+ ret = generic_setup_phy(dev, &priv->phy, 0);
+ if (ret)
+ goto err_regulator;
#endif
#if CONFIG_IS_ENABLED(DM_REGULATOR)
@@ -725,12 +729,6 @@ static int ehci_usb_probe(struct udevice *dev)
mdelay(10);
-#if defined(CONFIG_PHY)
- ret = generic_setup_phy(dev, &priv->phy, 0);
- if (ret)
- goto err_regulator;
-#endif
-
hccr = (struct ehci_hccr *)((uintptr_t)&ehci->caplength);
hcor = (struct ehci_hcor *)((uintptr_t)hccr +
HC_LENGTH(ehci_readl(&(hccr)->cr_capbase)));
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] usb: ehci-mx6: move phy setup before register access
2023-04-28 18:50 [PATCH] usb: ehci-mx6: move phy setup before register access Tim Harvey
@ 2023-05-02 12:47 ` sbabic
0 siblings, 0 replies; 2+ messages in thread
From: sbabic @ 2023-05-02 12:47 UTC (permalink / raw)
To: Tim Harvey, u-boot
> For the CONFIG_PHY case, move the PHY setup before the register access.
> This avoids a hang when updating the imx8mm.dtsi which moves the
> USB OTG power-domains to the PHY.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> Tested-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-02 12:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28 18:50 [PATCH] usb: ehci-mx6: move phy setup before register access Tim Harvey
2023-05-02 12:47 ` sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox