Skip to contentSkip to conversation

usb: ehci-mx6: Add i.MX95 OTG support

PATCH RESEND Superseded Tim Harvey 2 participants 2 messages Jul 9, 2025 – Jul 21, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH RESEND 1/1 usb: ehci-mx6: Add i.MX95 OTG support

When the usb node is defined dr_mode="otg" ehci_usb_phy_mode() is called to determine the mode from status registers.

The IMX95RM does not currently define the USBNC STATUS register but it is assumed to be an omission as the first three registers are defined. It has been expirimentally verified that the USBNC_PHY_STATUS register at offset 0x23C bit4 (USBNC_PHYSTATUS_ID_DIG) reads 0 when USB_ID is GND and 1 when floating.

Add imx95 to the list of SoC's that determine role based on the USBNC_PHY_STATUS register.

Fixes 801b5fafd35d "(usb: ehci-mx6: Add i.MX95 support")
---
 drivers/usb/host/ehci-mx6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-mx6.c +1 -1
index a8748cef7ad2..f979ff8dde1e 100644
@@ -537,7 +537,7 @@ static int ehci_usb_phy_mode(struct udevice *dev)
 			plat->init_type = USB_INIT_DEVICE;
 		else
 			plat->init_type = USB_INIT_HOST;
-	} else if (is_mx7() || is_imx8mm() || is_imx8mn() || is_imx93()) {
+	} else if (is_mx7() || is_imx8mm() || is_imx8mn() || is_imx93() || is_imx95()) {
 		phy_status = (void __iomem *)(addr +
 					      USBNC_PHY_STATUS_OFFSET);
 		val = readl(phy_status);
Signature · 1 line
2.25.1
#1 lore raw

Hi Tim,

I tend to replace is_imx93() || is_imx95() with is_imx9() because this driver works for iMX91, iMX93 and iMX95.

Best Regards,
Alice Guo

Quoted 45 lines

-----邮件原件-----
发件人: Tim Harvey <[email protected]>
发送时间: 2025年7月9日 23:23
收件人: [email protected]
抄送: Marek Vasut <[email protected]>; Fabio Estevam <[email protected]>; Alice Guo (OSS) <[email protected]>; dl-uboot-imx <[email protected]>; Peng Fan <[email protected]>; Stefano Babic <[email protected]>; Ye Li <[email protected]>; Tom Rini <[email protected]>; [email protected]
主题: [RESEND PATCH] usb: ehci-mx6: Add i.MX95 OTG support

When the usb node is defined dr_mode="otg" ehci_usb_phy_mode() is called to determine the mode from status registers.

The IMX95RM does not currently define the USBNC STATUS register but it is assumed to be an omission as the first three registers are defined. It has been expirimentally verified that the USBNC_PHY_STATUS register at offset 0x23C bit4 (USBNC_PHYSTATUS_ID_DIG) reads 0 when USB_ID is GND and 1 when floating.

Add imx95 to the list of SoC's that determine role based on the USBNC_PHY_STATUS register.

Fixes 801b5fafd35d "(usb: ehci-mx6: Add i.MX95 support")
---
 drivers/usb/host/ehci-mx6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-mx6.c index renamed from drivers/usb/host/ehci-mx6.c +0 -0

a8748cef7ad2..f979ff8dde1e 100644

drivers/usb/host/ehci-mx6.c +2 -2
@@ -537,7 +537,7 @@ static int ehci_usb_phy_mode(struct udevice *dev)
 			plat->init_type = USB_INIT_DEVICE;
 		else
 			plat->init_type = USB_INIT_HOST;
-	} else if (is_mx7() || is_imx8mm() || is_imx8mn() || is_imx93()) {
+	} else if (is_mx7() || is_imx8mm() || is_imx8mn() || is_imx93() ||
+is_imx95()) {
 		phy_status = (void __iomem *)(addr +
 					      USBNC_PHY_STATUS_OFFSET);
 		val = readl(phy_status);
--

2.25.1