USB 2.0 ports not working on the Compute Module 4? Check your overlays!

Out of the box, to conserve power, the new Raspberry Pi Compute Module 4 doesn't enable its built-in USB 2.0 ports.

Compute Module 4 IO Board USB 2.0 ports are disabled by default

You might notice that if you plug something into one of the USB 2 ports on the IO Board and don't see it using lsusb -t. In fact, you see nothing, by default, if you run lsusb -t.

To enable the USB 2.0 ports on the Compute Module 4, you need to edit the boot config file (/boot/config.txt) and add:


Then reboot the Pi. Now you should be able to use the built-in USB 2.0 ports!


Also note this is documented in the CM4 datasheet section 2.4


I rolled my own IO board for the CM4 and was convinced I'd done something wrong when the USB didn't work. I finally stumbled upon the line in the datasheet that mentions this. I kinda feel like this should be on by default....

Doesn't work in the config.txt that's in the NOOBS SD. Works with the Raspbian image though. Probably related to existence of a ...cm4...dtb file in the Raspbian FAT partition.

That was really frustrating for a while there.

Thanks.. I was wondering why I couldn't get my CM4 to USB boot.. Seems that USB needs to be enabled.. Which means the IO board can't boot from USB without having a boot partition on the SD/NVM card.

I've taken a copy of the Ubuntu 20.04 LTE boot partition on the a 500MB SD boot partition and then that boots of the Usb volume labeled writable. However it then gets stuff waiting for dev to complete so show knows what the next problem is..

Once step forwards..

In Ubuntu 20.04 image there is a line to uncoment in /boot/firmware/config.txt as explained by the comment above it.

Hello Sir, Which line I need to uncomment since the file says -> Please DO NOT modify this file; if you need to modify the boot config, the "usercfg.txt" file is the place to include user changes

Just a comment to keep someone else from falling into the same pit I did. I added this line to config.txt by connecting it via J11 and letting boot as a USB storage device. Once I could see it in Windows I edited config.txt. But no matter what the USB mouse and keyboard would never work. Finally I realized I still had power applied to J11 via the microusb cable. I recall from the schematic this flips a switch that re-routes the USB signals from the HUB and instead to J11. Unpluged from J11 and all if FINE! Only 20 minutes lost on this. :-) Not unusual for unfamiliar hardware. Lesson learned. Hope this helps someone else not waste 20 min or more.

Disable USB by default - what a stupid idea...

thanks for enlightening us JG :)

Ditto - Thank you so much I would have spent days figuring that out, assuming something was wrong with the board. Of all things...

I did all this and it still did not work - no matter how many times I unplugged / replugged, unplugged all the other devices in my Mac (and PC and Debian) system, the rpiboot would never recognize the CM4's on-board SSD.

I was using hobby cable jumpers; I switched to the standard PC board jumper plug.
I was using not-so-great microUSB cables, I switched to a high-quality one - eureka - it mounted and I was able to edit the boot config.txt on my Mac, and now USB 2 works.

So if anyone is frustrated after following the above instructions, make sure you have a tight jumper and good quality microUSB cable.

Thanks so much for this guide - now it's time to get to work!

Is there actually a way to boot off an USB MSD connected to the USB ports on the CM4 IO board if the CM4 has eMMC?

I tried changing the boot order in the bootloader but I think I've ending up with a chicken and egg situation where you cant boot off an USB MSD if the USB ports are disabled because it needs to load config.txt to enable the USB ports. The documentation even says you want to be able to do USB MSD boot if the onboard eMMC is corrupted but it doesn't address having to enable the USB ports. I think the only other option would be using a USB card in the PCIe slot.

Mine too i wasted time search for a power or other issue that didn't exist
thanks you for this post


I was setting this up to run ocotpi with some custom hardware additions.
I was closed to giving up getting the webcam going.

You saved the project.


Thank you! this saved me a lot of time.
I actually bought a raspberry PI, Compute Module 4 (CM4) and a Compute Module 4 PoE (B) from WaveShare

I was struggling to figure out why I couldn't get the USB to work!!! finally after hours of setting up SSH and VNC and updating and troubleshooting drivers.... I found this.

Hi I'm not sure if this is related but I'm trying to run Oracle Linux 8.4 on my CM4 with 4GB RAM and 32GB eMMC. I have flashed the eMMC with the image and at boot I get a list of things not starting including USB and then just get a U-Boot> prompt but from here I'm unable to do anything because I have no keyboard. I have updated the config.txt with the above dtoverlay line but still nothing. If anyone else has been able to get Oracle Linux on a CM4 I would greatly appreciate any assistance. I am very new and green when it comes to all things Linux and Raspberry Pi.

This is the dumbest default ever. I know there is a reason, but even knowing it, working with multiple CM4 modules it causes headaches. FSUSB42 soldered wrong? Oh no, it's just that damn USB isn't enabled yet...

Thanks Jeff !!!
Note , how I lost USB access :
When booting the CM4 with EMMC ( i have the 8/32/wifi versions )
the FIRST time before an OS is loaded on the emmc
YOU MUST edit the flashed emmc /boot/config.txt before you reboot !!
Method tested : which crashed without editing before reboot
1. I load an SD card with Manjaro-pi and put it in a thumb drive adapter.
2. Boot to Manjaro-pi , update OS, install RPI-imager, and download distributions that can be flashed onto the emmc ( or any RPI or CM4
3. If you do the following you will have access to your usb and are able to have an overclocked device
NOTE : I installed a waveshare heatsink/fan combo on all my CM4's

Mount your emmc storage :

sda 119.1G Generic STORAGE DEVICE disk
├─sda1 213.6M part vfat 4EDD-A307 /boot
└─sda2 118.8G part ext4 d1684ccb-e8af-4276-8262-57c7ab0fa08e /
mmcblk0 29.1G disk
├─mmcblk0p1 213.6M part vfat 4EDD-A307 /tmp/mmcblk0p1
└─mmcblk0p2 5.8G part ext4 d1684ccb-e8af-4276-8262-57c7ab0fa08e
mmcblk0boot0 4M disk
mmcblk0boot1 4M disk
zram0 11.4G disk [SWAP]
[10:55:14:Fri Oct 29:~]

Edit your emmc config.txt ( this is my basic configuration adding the overclock and usb )

[11:01:37:Fri Oct 29:/tmp/mmcblk0p1]
[root@triplr-pi-test:]$cat config.txt
# See /boot/overlays/README for all available options

initramfs initramfs-linux.img followkernel

#enable sound

#enable vc4

# enable usb CM4

# enable overclock CM4 WARNING Heatsink and or fan required
#uncomment to overclock the arm. 700 MHz is the default.

# gpu settings and overclock

[11:01:44:Fri Oct 29:/tmp/mmcblk0p1]

Then reboot your device.
I had to fix my first emmc by doing the windows bootloader access described by Jeff. What a pain RPI foundation.

Happy flashing

I've everything else working on 64 bit Pi OS including nvme, but could not figure out why the kernel wasnt picking up the USB devices. Now USB is working fine on my CM4. Awesome.

By some strange reason I still don't get it to work.

I also had to add this before the USB ports came alive:


I'm running OpenWrt 21.02.1: