On Mon, Jul 28, 2025 at 11:04 AM Tim Harvey <thar...@gateworks.com> wrote: > > On Wed, Jul 23, 2025 at 7:34 PM Peng Fan <peng....@oss.nxp.com> wrote: > > > > Hi Tim, > > > > On Mon, Jul 21, 2025 at 11:02:05AM -0700, Tim Harvey wrote: > > >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. > > > > Just a question, does your board use USB2.0 port for SDP? And any public > > patches ready for that? > > > > Hi Peng, > > Yes, I am using the USB2.0 interface for SDP. Aside from this patch > the usb2 nodes need to be added to the dt (usbphynop, usb2, usbmisc > which are already in kernel but not yet in uboot dts/upstream). > > However, unlike SDP on the USB3.0 interface which I was able to get > working, I was getting stuck somewhere between the ATF and U-Boot > proper on USB2.0. I can no longer boot software on my imx95_19x19_evk > after the changes merged for B0 so I'm unable to test and compare > notes at the moment. > > Best Regards, > > Tim > >
Hi Peng, Just to follow-up here I have been able to get imx95 to boot via SDP on imx95-19x19's USB2 with the following: 1. the patch in this thread 2. the env-is-nowhere patch from João Paulo Gonçalves: https://www.mail-archive.com/u-boot@lists.denx.de/msg550594.html 3. adding the usb2/reg_usb_vbus/usbphynop to imx95-19x19-evk-u-boot.dtsi 4. the following changes to defconfig: --- a/configs/imx95.config +++ b/configs/imx95.config @@ -129,6 +129,8 @@ CONFIG_DM_MDIO=y CONFIG_MII=y CONFIG_FSL_ENETC=y CONFIG_PCIE_ECAM_GENERIC=y +CONFIG_SPL_PHY=y +CONFIG_SPL_NOP_PHY=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX_SCMI=y @@ -146,16 +148,17 @@ CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_NXP_FSPI=y CONFIG_USB=y -CONFIG_SPL_DM_USB_GADGET=y +CONFIG_SPL_USB_HOST=y +CONFIG_USB_EHCI_HCD=y -CONFIG_USB_DWC3=y -CONFIG_SPL_USB_DWC3_GENERIC=y CONFIG_USB_GADGET=y CONFIG_SPL_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="FSL" CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9 CONFIG_USB_GADGET_PRODUCT_NUM=0x0152 +CONFIG_CI_UDC=y CONFIG_SDP_LOADADDR=0x90400000 +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_USB_FUNCTION_SDP=y CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_ULP_WATCHDOG=y CONFIG_LZO=y Note that I had to disable DWC3 and I think that's because it uses dm for gadget mode and CI_UDC does not support that and thus duplicates functions. This was needed to bring up a custom board that runs USB3 to a HUB and USB2 to a Type-C connector. Fabio, I'm not sure if you were needing more reviews for this one or if you were just waiting for a follow-up to Peng's question. Best Regards, Tim