Using USB Interfaces

There are 3 USB connectors on the STM32MP1-BSB boards.

The USB connectors J10 (USB-C on STM32MP1-BSB) are used to provide power and expose two STM32MP1 UART interfaces. This connector should be used to power the board and access Linux console.

The USB OTG connectors P5 (microUSB on STM32MP1-BSB) can be used to attach any USB devices to the board and also to attach the board to a host computer.

When a USB device is attached to the P5 connector, it gets detected by Linux, with the following indication on the console:

[ 141.393565] usb 1-1: new high-speed USB device number 2 using dwc2 [ 141.648555] usb-storage 1-1:1.0: USB Mass Storage device detected [ 141.665662] scsi host0: usb-storage 1-1:1.0 [ 141.983715] usbcore: registered new interface driver uas [ 142.714634] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 3.0 0000 PQ: 0 ANSI: 4 [ 142.723277] sd 0:0:0:0: [sda] 242155521 512-byte logical blocks: (124 GB/115 GiB) [ 142.731089] sd 0:0:0:0: Attached scsi generic sg0 type 0 [ 142.735059] sd 0:0:0:0: [sda] Write Protect is off [ 142.740286] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 142.763396] sda: sda1 [ 142.766947] sd 0:0:0:0: [sda] Attached SCSI removable disk

When the board is attached to a host computer via the P5 connector, the board exposes a USB Ethernet gadget. On the host it appears as a new Ethernet interface. For instance, with a Linux host:

$ dmesg ... [658174.725268] usb 1-3: Product: STM32MP1 [658174.725271] usb 1-3: Manufacturer: STMicroelectronics [658174.725272] usb 1-3: SerialNumber: 003800273438511638333630 [658174.754739] cdc_ncm 1-3:1.0: MAC-Address: f4:ed:78:27:02:77 [658174.755137] cdc_ncm 1-3:1.0 eth0: register 'cdc_ncm' at usb-0000:00:0c.0-3, CDC NCM, f4:ed:78:27:02:77 [658174.777391] cdc_ncm 1-3:1.0 enxf4ed78270277: renamed from eth0 [658174.834081] IPv6: ADDRCONF(NETDEV_CHANGE): enxf4ed78270277: link becomes ready

This USB Ethernet interface on the host can be used to connect to the board using the SSH protocol. The IP address of the board at the USB Ethernet is always The following screenshot shows how to connect to the board from the host via ssh:

$ ssh root@ root@stm32mp15-som:~#

The P4 USB-A connector on the STM32MP1-BSB is used to attach any USB devices to the board. E.g., when a USB Flash is attached to the board, the system detects it as follows: