No USB with CM4 module

Charles Steinkuehler charles at steinkuehler.net
Fri Mar 24 13:01:16 CET 2023


I use U-Boot with the CM4 and had to apply a minor patch to get USB 
working.  I also have a patch which copies some of the firmware modified 
device-tree into a U-Boot loaded device tree you may find helpful:

https://github.com/cdsteinkuehler/br2rauc/tree/master/patches/uboot

I also got a list of all the things the closed-source firmware is doing 
behind the scenes before loading the "kernel" (whether that's Linux or 
U-Boot) which might be of interest:

https://forums.raspberrypi.com/viewtopic.php?p=1974233#p1974233

On 3/14/2023 9:17 AM, Mario Lombardo wrote:
> Dear u-boot list members,
> 
> I just experience issues with the RPi CM4 Module and U-Boot.
> 
> I try to migrate a linux (Raspi Bullseye) from direct loading to use 
> U-Boot as loader. When I load the CM4 direct using the PI-loader 
> (config.txt), everything works. But when I change the kernel to 
> “u-boot.bin” in the config.txt, no USB is working at all (neither within 
> U-Boot nor within Linux).
> 
> U-Boot> version
> U-Boot 2022.10 (Mar 14 2023 - 14:47:34 +0100)
> 
> arm-linux-gnueabihf-gcc (Debian 10.2.1-6) 10.2.1 20210110
> GNU ld (GNU Binutils for Debian) 2.35.2
> U-Boot> usb start
> starting USB…
> No working controllers found
> U-Boot>
> 
> The U-Boot is compiled as rpi_4_32b_defconfig with DWC2 enabled:
> […]
> CONFIG_USB_DWC2=y
> CONFIG_USB_DWC2_BUFFER_SIZE=64
> […]
> 
> Now when I start Linux as follows:
> 
> fdt addr ${fdt_addr}
> fdt get value bootargs /chosen bootargs
> setexpr bootargs sub "console=ttyAMA0" "console=ttyS0" “$bootargs”
> fatload mmc 0:1 ${kernel_addr_r} “kernel7l.img”
> bootz ${kernel_addr_r} - ${fdt_addr}
> 
> I´m able to login using the serial console. But I can not any USB Device:
> 
> pi:~# lsusb
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> The Device Tree seems to be identical to the version without U-Boot:
> 
> pi:~# dtc -I fs -O dts /sys/firmware/devicetree/base/soc/usb at 7e980000/ -f
> /dts-v1/;
> 
> / {
>          power-domains = <0x13 0x06>;
>          compatible = "brcm,bcm2835-usb”;
>          clocks = <0x19>;
>          clock-names = “otg”;
>          phy-names = "usb2-phy”;
>          g-rx-fifo-size = <0x22e>;
>          status = “okay”;
>          #address-cells = <0x01>;
>          interrupts = <0x00 0x49 0x04 0x00 0x28 0x04>;
>          #size-cells = <0x00>;
>          phandle = <0xb7>;
>          phys = <0x1a>;
>          reg = <0x7e980000 0x10000 0x7e00b200 0x200>;
>          dr_mode = “host”;
>          g-tx-fifo-size = <0x200 0x200 0x200 0x200 0x200 0x100 0x100>;
>          interrupt-names = "usb\0soft”;
>          g-np-tx-fifo-size = <0x20>;
>          name = “usb”;
> };
> 
> However I cannot see any USB Devices using U-Boot.
> 
> Any ideas? What is U-Boot doing different during boot compared to the 
> default boot process?
> 
> Thank you very much.
> 
> Mario

-- 
Charles Steinkuehler
charles at steinkuehler.net


More information about the U-Boot mailing list