回复: imx95 SDP support?

Alice Guo (OSS) alice.guo at oss.nxp.com
Thu Jul 3 13:24:02 CEST 2025


Hi Tim,

I do not know the reason for the problems you met and will try to enable imx95 SDP recently. USB 2.0 can also be used.

Best Regards,
Alice Guo

> -----邮件原件-----
> 发件人: Tim Harvey <tharvey at gateworks.com>
> 发送时间: 2025年7月3日 9:16
> 收件人: Alice Guo (OSS) <alice.guo at oss.nxp.com>
> 抄送: u-boot <u-boot at lists.denx.de>; Fabio Estevam <festevam at gmail.com>
> 主题: Re: imx95 SDP support?
> 
> On Tue, Jul 1, 2025 at 8:42 PM Alice Guo (OSS) <alice.guo at oss.nxp.com> wrote:
> >
> > Hi Tim,
> >
> > i.MX95 BOOTROM is on M33 so that cannot call boot ROM API.
> >
> 
> Hi Alice,
> 
> This makes sense - I forgot that the BOOTROM for the imx95 is on the M33.
> 
> > The difference between imx8mm BOOTROM and imx8mp/mn BOOTROMv2 is
> that
> > BOOTROMv2 can call ROM API to load and imx8mm BOOTROM has no such
> > function. No need to add USB support to imx8mp and imx8mn SPL.
> >
> > When you add USB support to i.MX95 SPL, have you increased the size of
> > i.MX95 SPL? i.MX95 SDP uses USB3 which driver is in drivers/usb/dwc3/.
> > Configure USB to gadget. The USB phy driver uses
> > drivers/phy/phy-imx8mq-usb.c. i.MX95 has tca mux so that it is needed to add
> code in the USB phy driver.
> 
> When I add USB, SPL_USB_GADGET, and SPL_USB_DWC3_GENERIC the build
> fails:
> aarch64-linux-ld.bfd: u-boot-spl section `.data_save' will not fit in region `.sram'
> aarch64-linux-ld.bfd: region `.sram' overflowed by 8936 bytes
> make[2]: *** [scripts/Makefile.xpl:542: spl/u-boot-spl] Error 1
> make[1]: *** [/home/tharvey/catalina/uboot/Makefile:2127:
> spl/u-boot-spl] Error 2
> make: *** [Makefile:186: sub-make] Error 2
> 
> There's no default SPL_SIZE_LIMIT set so the size here would be a linker config
> somewhere.
> 
> I can disable MMC support to shrink things down enough however.
> 
> I see the TCA configuration you are referring to in Linux [1] but that's all about
> USB 3.0 pairs and SDP just requires USB 2.0 so I doubt that's needed. Regardless
> I've attempted to implement it in case that's an issue.
> 
> If allow PHY_IMX8MQ_USB to be built for IMX95 I can get to the following with
> some debugging added:
> Normal Boot
> spl_boot_device
> get_boot_device
> get_boot_device boot_type=14 boot_instance=3 get_boot_device
> BT_DEV_TYPE_USB boot_dev=17 spl_board_boot_device 17
> spl_board_boot_device USB_BOOT (usb3.0: J8 Type-C USB) Trying to boot from
> USB SDP dwc3_glue_probe usb at 4c010010 dwc3_generic_peripheral_probe
> usb at 4c100000 dwc3_generic_probe usb at 4c100000 imx8mq_usb_phy_probe
> phy at 4c1f0040 tca_blk_init 0x4c1fc000 spl_sdp_load_image calling
> board_usb_init spl_sdp_load_image calling g_dnl_clear_detach
> spl_sdp_load_image calling g_dnl_register
> sdp_add: cdev: 93203dd0 gadget: 932002b0 gadget->ep0: 93200dc0
> spl_sdp_load_image calling sdp_init
> SDP: initialize...
> dwc3_gadget_interrupt link change
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> dwc3_gadget_interrupt erratic error
> ^^^ it spins here without ever getting out of the init phase
> 
> Any idea what might be missing here?
> 
> For the board I'm working on I really want to get SDP working on the
> USB2 interface which on the imx95-19x19-evk routes to the Type-A connector so
> I've done the following:
> - add usb2 nodes to imx95.dtsi and imx95-19x19-evk.dtsi
> - add imx95 support to ehci-mx6 ehci_usb_phy_mode() (I'm assuming the
> USBNC_PHY_STATUS register is the same as the IMX8MM although its missing
> from the IMX95 RM)
> - enable SPL_USB_GADGET, SPL_USB_SDP_SUPPORT, USB_EHCI_MX7, CI_UDC,
> SPL_NOP_PHY, SDP_LOADADDR
> - work around the fact that get_boot_device returns QSPI_BOOT when booted
> from the USB2
> 
> This gets me a bit further than the USB3 controller path:
> Normal Boot
> spl_boot_device
> get_boot_device
> get_boot_device boot_type=14 boot_instance=1 get_boot_device
> BT_DEV_TYPE_USB boot_dev=15 spl_board_boot_device 15
> spl_board_boot_device (usb2.0: J7 Type-A USB) Trying to boot from USB SDP
> udc_device_get_by_index index=0 drivers/usb/gadget/ci_udc.c
> usb_gadget_register_driver ehci_usb_of_to_plat usb at 4c200000
> ehci_usb_probe usb at 4c200000 ehci_usb_probe usb at 4c200000 ret=0
> usb_gadget_register_driver usb_setup_ehci_gadget ret=0
> sdp_add: cdev: 93200790 gadget: 2049b928 gadget->ep0: 2049b9c8
> SDP: initialize...
> sdp_set_alt: intf: 0 alt: 0
> sdp_start_ep: ep:2049ba30 req:93200ad0
> sdp_start_ep: ep:2049ba98 req:93200bd0
> w_value: 0x0000 len: 0x0000
> req_type: 0x20 ctrl->bRequest: 0x0a sdp->state: 0
> w_value: 0x2200 len: 0x004c
> req_type: 0x00 ctrl->bRequest: 0x06 sdp->state: 0 sdp_init complete
> SDP: handle requests...
> ^^^ at this point SPL SDP enumerates on the host and I use 'uuu flash.bin' again
> to load U-Boot proper
> sdp_rx_command_complete: command: 0404, addr: 00000000, cnt: 931840
> Downloading file of size 931840 to 0x90400000... done Report 3: HAB security
> ep1in-bulk complete --> 0, 5/5 Report 4: Status ep1in-bulk complete --> 0, 65/65
> sdp_rx_command_complete: command: 0b0b, addr: 00000000, cnt: 0 Report 3:
> HAB security ep1in-bulk complete --> 0, 5/5 Jumping to header at 0x90400000
> Header Tag is not an IMX image Found header at 0x90400000
> sdp_load_read: sector 0, count 400, buf 93202b90
> sdp_load_read: sector 2000, count 8800, buf ff000000
> sdp_load_read: sector a800, count d9000, buf 90200000
> NOTICE:  BL31: v2.10.0  (release):lf-6.6.52-2.2.0
> NOTICE:  BL31: Built : 16:06:15, Dec 27 2024 ^^^ hangs here at the end of the
> ATF
> 
> Any ideas what this one could be?
> 
> Best Regards,
> 
> Tim
> 
> >
> > Best Regards,
> > Alice Guo
> >
> > > -----邮件原件-----
> > > 发件人: Tim Harvey <tharvey at gateworks.com>
> > > 发送时间: 2025年7月2日 3:50
> > > 收件人: Alice Guo (OSS) <alice.guo at oss.nxp.com>
> > > 抄送: u-boot <u-boot at lists.denx.de>; Fabio Estevam
> > > <festevam at gmail.com>
> > > 主题: Re: imx95 SDP support?
> > >
> > > On Tue, Jul 1, 2025 at 6:07 AM Alice Guo (OSS) <alice.guo at oss.nxp.com>
> wrote:
> > > >
> > > > Hi Tim,
> > > >
> > > > i.MX95 needs to enable USB gadget in SPL to load the U-Boot
> > > > proper. It cannot
> > > use boot ROM API.
> > > >
> > >
> > > Hi Alice,
> > >
> > > This is unfortunate - is the ROM API not going to be usable for the
> > > imx95 or is support code simply not written yet? I don't really
> > > understand the difference for example between the imx8mm BOOTROM
> and
> > > the imx8mp/mn
> > > BOOTROMv2 where BOOTROMv2 can use the for SDP which greatly reduces
> > > the SPL footprint.
> > >
> > > Have you been able to configure U-Boot SPL for imx95 SDP? I am
> > > overflowing .sram codespace when I try to add 'either' support for
> > > the
> > > USB2.0 controller or the USB3.0 controller.
> > >
> > > Best Regards,
> > >
> > > Tim
> > >
> > >
> > > > Best Regards,
> > > > Alice Guo
> > > >
> > > > > -----邮件原件-----
> > > > > 发件人: Tim Harvey <tharvey at gateworks.com>
> > > > > 发送时间: 2025年7月1日 8:07
> > > > > 收件人: u-boot <u-boot at lists.denx.de>; Alice Guo (OSS)
> > > > > <alice.guo at oss.nxp.com>; Fabio Estevam <festevam at gmail.com>
> > > > > 主题: imx95 SDP support?
> > > > >
> > > > > Hi Alice,
> > > > >
> > > > > I'm wondering if you have any notes regarding U-Boot SPL SDP
> > > > > support for the imx95?
> > > > >
> > > > > The SPL boots over SDP just fine but I'm interested in getting
> > > > > to the next step where the SPL provides SDP support to load U-Boot
> propper.
> > > > > I'm not clear if the imx95 uses a similar bootrom to as the imx8
> > > > > and
> > > > > imx93 or if this is done over scmi.
> > > > >
> > > > > Best Regards,
> > > > >
> > > > > Tim


More information about the U-Boot mailing list