🛠 Deux ports USB 3.0 simultanés : le CM5 fait du stockage rapide, pas sur une carte CM4
Objectives
The first in the Compute Module range: the CM5 exposes 2 USB 3.0 SuperSpeed ports (5 Gb/s simultaneous) + 1 USB 2.0 High-Speed port. Engineers repurposed the CM4's MIPI CAM0/DSI0 ports into USB3 pairs — hence a major compatibility pitfall: these ports do not work on a motherboard designed for the CM4. This tutorial: inventory the actual speeds, enable the USB 2.0 port in host mode, and measure two simultaneous copies.
Hardware
- 1 × CM5 on a CM5IO Board (2 × USB 3.0 Type-A + 1 × USB 2.0 Type-C slave)
- 2 × USB 3.0 flash drives or SSDs, preferably independently powered
- 27 W power supply (SSDs draw from the 5 V/5 A budget)
sudo apt install -y usbutils smartmontools
Complete code
# 1) Inventaire des vitesses de liaison
lsusb -t | grep -E '5000M|480M|xhci|dwc'
# 2) Activer le port USB 2.0 High-Speed en hôte (contrôleur dwc2)
echo 'dtoverlay=dwc2,dr_mode=host' | sudo tee -a /boot/firmware/config.txt
sudo reboot
# 3) Monter deux SSD et mesurer le débit simultané
sudo mkdir -p /mnt/s1 /mnt/s2
sudo mount /dev/sda1 /mnt/s1 && sudo mount /dev/sdb1 /mnt/s2
( dd if=/dev/zero of=/mnt/s1/t.bin bs=1M count=2000 oflag=direct status=none & \
dd if=/dev/zero of=/mnt/s2/t.bin bs=1M count=2000 oflag=direct status=none; wait )
lsusb -t # recontrôler que les deux SSD restent bien en 5000M
Expected verification
lsusb -t lists the two SSDs on 5000M buses (and any keyboard at 480M on the dwc2 controller); the two dd copies complete without UAS errors; the total approaches the capacities of two simultaneous SuperSpeed links. The USB 2.0 Type-C port becomes usable in host mode after applying the dwc2 overlay.
Common errors
- Plugging USB3 peripherals into a CM4 motherboard: the datasheet is explicit, USB 3.0 "will not work when a CM5 is plugged into a board designed for the CM4" — the MIPI pairs do not exist on the CM4 side.
- Wanting USB 2.0 OTG: not officially documented ("some users have managed it"); the supported path is fixed-role host (tie USB_OTG_ID low) with
dr_mode=host. - Unpowered hub: two SSDs on a bus-powered hub will drop the link to 480M or fail the mount.
- Looking for 4 USB ports like on the Pi 5: two USB 2.0 ports from the Pi 5 were removed due to lack of signal space — the CM5 has 1 × USB 2.0 + 2 × USB 3.0, no more.
Other tutorials for this board
- Alimenter un CM5 comme il faut : USB-C PD 5 V / 5 A et bouton d'alimentation
- La première RTC des Compute Modules : câbler et vérifier la VBAT du CM5
- Accès distant sans VPN : enregistrer un CM5 dans Raspberry Pi Connect
- GPIO du CM5 côté RP1 : force de conduite, budget 50 mA et broches pièges
- Refroidir le CM5 : ventilateur PWM sur le connecteur JST-SH et tachymétrie
- Démarrer le CM5 sur un SSD NVMe dans le socket M.2 de la CM5IO
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash