Driver Commands

QNX Board Support Packages8.0BSP User's GuideRaspberry Pi 5raspberrypi.orgBroadcomARM

The tables below provide a summary of driver commands for the Raspberry Pi 5 board.

Some of the drivers are commented out in the buildfile. To use these drivers on the target hardware, you may need to uncomment them in the buildfile, rebuild the image, and then load the image onto the board.

The order that the drivers are started in the provided buildfile is one way to start them. The order that you start the drivers is completely customizable and is often specific to your system requirements. For example, if you need an audible sound to play immediately, you must start the audio driver earlier than other drivers. It's important to recognize that the order you choose impacts the boot time.

Note:
Some drivers depend on other drivers, so it's sometimes necessary to start them in a specific order.
  • For more information on best practices for building an embedded system and optimizing boot times for your system, see the Building Embedded Systems and the Boot Optimization guides in the QNX Software Development Platform 8.0 documentation.
  • For more information about the drivers and commands listed here, see the QNX OS Utilities Reference. This chapter provides information about BSP-specific options for any of the commands and drivers that aren't described in the Utilities Reference. In some cases, the driver or command is specific to this BSP, in which case, you'll find the information in the BSP-specific Drivers and Utilities chapter.

Inter-integrated Circuit (I2C)

Device I2C
Command i2c-dwc-rpi5 -p0x1f00074000 -c200000000 -q0xa8 --u1
Required binaries i2c-dwc-rpi5, gpio-rp1
Required libraries libsecpol.so, libc.so.6, libgcc_s.so.1
Source location $BSP_ROOT_DIR/src/hardware/i2c/dwc

For information about this driver, see the i2c-dwc-rpi5 section in the BSP-specific Drivers and Utilities chapter of this guide.

Network

Device Ethernet
Command

io-sock -m phy -m fdt -d cgem -m usb -d axe -d axge -d cdce -d smsc

Required binaries io-sock, dhcpcd, dhcpcd-run-hooks, ifconfig, if_up, pfctl, ping, netstat
Required libraries devs-cgem.so, devs-em.so, devs-ix.so, devs-axge.so, devs-axe.so, mods-phy, mods-fdt.so, mods-phy_fdt.so, libsocket.so, libslog2.so, libsecpol.so, libz.so, ldqnx-64.so, libc.so.6, libgcc_s.so.1, libfdt.so, libpci.so
Source location Binary only

For more information about the devs-cgem.so driver, see the devs-cgem.so section in the QNX OS Utilities Reference guide of the QNX Software Development Platform 8.0 documentation.

PCI Server

Device PCI
Command pci-server --bus-scan-limit=3 -c
Required binaries pci-server
Required libraries pci_hw-bcm2712-rpi5.so, pci_server-buscfg-generic.so, pci_debug2.so, pci_slog2.so, pci_cap-0x01.so, pci_cap-0x05.so, pci_cap-0x10.so, pci_cap-0x11.so
Source location Binary only

SD/MMC

Device SD/MMC
Command (microSD driver on CPU board)

devb-sdmmc-bcm2712 sdio addr=0x1000fff000,irq=305 disk name=sd

Required binaries devb-sdmmc-bcm2712
Required libraries libcam.so, io-blk.so, cam-disk.so, libsecpol.so, libc.so.6, libgcc_s.so.1 libslog2.so, libfsnotify.so,
Source location $BSP_ROOT_DIR/src/hardware/devb/sdmmc
Example of mounting a DOS partition on the microSD card to the /fs/sd directory:
 devb-sdmmc-bcm2712 sdio addr=0x1000fff000,irq=305 disk name=sd waitfor /dev/sd0
 mount -t dos /dev/sd0t12 /fs/sd

Serial

Device Serial
Command for UART (Raspberry Pi debug probe)

devc-serpl011-rpi5 -b115200 -c44236800 -e -F -u10 -D 0x107d001000^2,153

Required binaries devc-serpl011-rpi5, gpio-rp1
Required libraries libsecpol.so, libc.so.6, libgcc_s.so.1
Source location $BSP_ROOT_DIR/src/hardware/devc

For more information about the serial drivers, see the devc-serpl011-rpi5 section in the BSP-specific Drivers and Utilities chapter of this guide.

SPI

Device SPI
Command spi-dwc -c /etc/system/config/spi/spi.conf
Required binaries spi-dwc, gpio-rp1
Required libraries libsecpol.so, libslog2.so, libc.so.6, libgcc_s.so.1
Required config file /etc/system/config/spi/spi.conf
Source location $BSP_ROOT_DIR/src/hardware/spi/dwc

For more information about this driver, see the spi-dwc section in the BSP-specific Drivers and Utilities chapter of this guide.

Startup

Device Startup
Command startup-bcm2712-rpi5 -v -u reg -a -W 5000
Required binaries startup-bcm2712-rpi5
Required libraries N/A
Source location $BSP_ROOT_DIR/src/hardware/startup/boards/bcm/bcm2712 (common)

$BSP_ROOT_DIR/src/hardware/startup/boards/bcm/bcm2712/rpi5 (Raspberry PI 5 board)

In addition to the startup-* options described in the Utilities Reference, you can also use the following option with this command:

-W
Enable watchdog timer support. Ensure that you start the watchdog driver after when you use this option.

USB OTG host controller (io-usb-otg stack)

CAUTION:
It is mandatory to run the pci-server before starting this driver since the USB driver on this board is dependent on PCI bus being functional.

USB host controller and OTG controller; host mode uses io-usb-otg stack.

Device USB host controller
Command

XHCI: io-usb-otg -v -d dwc3-xhci ioport=0x1f00200000, irq=0xbf , iosize=0x100000, bmstr=0x1000000000, ioport=0x1f00300000, irq=0xc4, iosize=0x100000 , bmstr=0x1000000000

Required binaries io-usb-otg, usb, devb-umass, gpio-rp1
Required libraries devu-hcd-dwc3-xhci.so, libsecpol.so, libpci.so, libm.so, libc.so.6, libgcc_s.so.1
Source location Prebuilt only
Example of xHCI controller:
 io-usb-otg -v -d dwc3-xhci ioport=0x1f00200000,irq=0xbf,iosize=0x100000, bmstr=0x1000000000, ioport=0x1f00300000, irq=0xc4, iosize=0x100000,bmstr=0x1000000000
 waitfor /dev/usb/io-usb-otg 10
 devb-umass cam pnp dos disk name=umass
When a mass storage device is plugged in, devb-umass creates a resource manager under /dev/hdXtY where X represents the partition number and Y represents the partition type. For example, if you use a mass storage with one FAT32 partition (MBR), it creates two resource manager paths, which are /dev/umass0 and /dev/umass0t12. You would mount the second resource manager, where in this example, 12 specifies a FAT32 filesystem (i.e., mount -t dos /dev/umass0t12 /fs/usb0).

For more information about the devu-hcd-dwc3-xhci.so driver, see the devu-hcd-dwc3-xhci.so section in the BSP-specific Drivers and Utilities chapter.

Watchdog

To enable the watchdog:

  1. Launch startup with the -W option, with an optional parameter for timeout:

    startup-bcm2712-rpi5 -v -u reg -a -W 5000
  2. Launch the watchdog timer utility early on in the boot script:

    wdtkick -W0x24:0x5A028E4C -W0x1c:0x5A000020
  3. To adjust the watchdog timeout value of the PM_WDOG register, use the formula:

    register_val = ((timeout_in_ms * 67) | 0x5a000000)

    For example, use 0x5A028E4C for 2500 ms timeout value:

    ((2500 * 67) | 0x5a000000) = 0x28E4C | 0x5a000000 = 0x5A028E4C
Device Watchdog timer
Commands

wdtkick -W0x24:0x5A028E4C -W0x1c:0x5A000020

Required binaries wdtkick
Required libraries libc.so.6, libgcc_s.so.1
Source location $BSP_ROOT_DIR/src/hardware/support/wdtkick

Wireless (WiFi)

There are a couple of ways to add WiFi support in this BSP:

  1. Rebuild BSP by modifying .build file in $BSP_ROOT_DIR/images directory to startup additional io-sock instance with wifi driver, for example:
    io-sock -o prefix=/wifi -o config=/etc/io-sock.conf -d qwdi_dhd_sdio-2_11-rpi5
  2. Rebuild BSP by modifying .build file in $BSP_ROOT_DIR/images directory to startup io-sock instance with wifi driver, for example:
    io-sock -m phy -m fdt -d cgem -o config=/etc/io-sock.conf -d qwdi_dhd_sdio-2_11-rpi5
Device Wifi driver
Commands with second io-sock
io-sock -o prefix=/wifi -o config=/etc/io-sock.conf -d qwdi_dhd_sdio-2_11-rpi5
SOCK=/wifi dhcpcd -bqq
SOCK=/wifi /proc/boot/.ssh-server.sh
SOCK=/wifi wpa_supplicant -D qwdi -i bcm0 -c /tmp/wpa_supplicant.conf &
SOCK=/wifi ifconfig
Commands
io-sock -m phy -m fdt -d cgem -o config=/etc/io-sock.conf -d qwdi_dhd_sdio-2_11-rpi5
dhcpcd -bqq
/proc/boot/.ssh-server.sh
wpa_supplicant -D qwdi -i bcm0 -c /tmp/wpa_supplicant.conf &
ifconfig
Required binaries firmware.bin, firmware.clm_blob, nvram.txt wpa_supplicant.conf
Required libraries devs-qwdi_dhd_sdio-2_11-rpi5.so, libsocket.so
Source location Prebuilt only
Example of /tmp/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
network={
    # the SSID of a public Wi-Fi networks
    ssid="open_ssid_example"
    key_mgmt=NONE
}
Page updated: