Reviewed-by: Alice Guo <alice....@nxp.com>

Best Regards,
Alice Guo

> -----邮件原件-----
> 发件人: Tim Harvey <thar...@gateworks.com>
> 发送时间: 2025年7月22日 2:02
> 收件人: Marek Vasut <ma...@denx.de>; Fabio Estevam <feste...@denx.de>;
> Alice Guo (OSS) <alice....@oss.nxp.com>; dl-uboot-imx <uboot-...@nxp.com>;
> Peng Fan <peng....@nxp.com>; Stefano Babic <sba...@nabladev.com>; Ye Li
> <ye...@nxp.com>
> 抄送: u-boot@lists.denx.de; thar...@gateworks.com
> 主题: [PATCH v2] 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.
> 
> Use is_imx9() as this driver works for i.MX91, i.MX93 and i.MX95 and all of 
> these
> determine the role based on the USBNC_PHY_STATUS register.
> 
> Fixes: 801b5fafd35d "(usb: ehci-mx6: Add i.MX95 support")
> Signed-off-by: Tim Harvey <thar...@gateworks.com>
> ---
> v2: use is_imx9 as suggested by Alice and update commit log
> ---
>  drivers/usb/host/ehci-mx6.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index
> a8748cef7ad..25907f22612 100644
> --- a/drivers/usb/host/ehci-mx6.c
> +++ b/drivers/usb/host/ehci-mx6.c
> @@ -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_imx9()) {
>               phy_status = (void __iomem *)(addr +
>                                             USBNC_PHY_STATUS_OFFSET);
>               val = readl(phy_status);
> --
> 2.34.1

Reply via email to