Driver Commands
The tables below provide a summary of driver commands for the Raspberry Pi 4 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.
- 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-bcm2711 -p0xfe804000 |
Required binaries | i2c-bcm2711 |
Required libraries | libsecpol.so, libc.so, libgcc_s.so |
Source location | $BSP_ROOT_DIR/src/hardware/i2c/bcm2711 |
For information about this driver, see the i2c-bcm2711
section
in the BSP-specific Drivers and Utilities
chapter of this guide.
Network
Device | Ethernet |
Command |
io-sock -m phy -m fdt -m phy_fdt -d genet -m pci -d em -d ix -d re -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-genet.so, devs-em.so, devs-ix.so, devs-axge.so, devs-axe.so, mods-pci.so, mods-phy, mods-usb.so, mods-fdt.so, mods-phy_fdt.so, libsocket.so, libsecpol.so and so on |
Source location | Binary only |
For more information about devs-genet.so,
see devs-genet.so
in the BSP-specific Drivers and Utilities
chapter of this guide.
PCI Server
Device | PCI |
Command | pci-server -c --bus-scan-limit=1 |
Required binaries | pci-server |
Required libraries | pci_hw-bcm2711-rpi4.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-bcm2711 mem name=below1G sdio addr=0xfe340000,irq=158,bs=bmstr_base=0xc0000000 disk name=sd |
Required binaries | devb-sdmmc-bcm2711 |
Required libraries | libcam.so, io-blk.so, cam-disk.so, libsecpol.so, libc.so, libgcc_s.so, |
Source location | $BSP_ROOT_DIR/src/hardware/devb/sdmmc |
devb-sdmmc-bcm2711 sdio addr=0xfe340000,irq=158,bs=bmstr_base=0xc0000000 disk name=sd
waitfor /dev/sd0 3
mount -t dos /dev/sd0t12 /fs/sd
Serial
Device | Serial |
Command for MINI-UART (USB connected to RS-232 bridge for console) | devc-serminiuart -b115200 -c500000000 -e -F -u1 0xfe215000,125 |
Required binaries | devc-serminiuart |
Required libraries | libsecpol.so, libc.so, libgcc_s.so |
Source location | $BSP_ROOT_DIR/src/hardware/devc |
For more information about the serial drivers, see the
devc-serminiuart
section in the BSP-specific Drivers and Utilities
chapter of this guide.
SPI
Device | SPI |
Command | spi-bcm2711 |
Required binaries | spi-bcm2711 |
Required binaries | libsecpol.so, libc.so, libgcc_s.so.1 |
Required config file | /etc/system/config/spi/spi.conf |
Source location | $BSP_ROOT_DIR/src/hardware/spi/bcm2711 |
For more information about this driver, see the
spi-bcm2711
section in the BSP-specific Drivers and Utilities
chapter of this guide.
Startup
Device | Startup |
Command | startup-bcm2711-rpi4 -v -D miniuart -W 2500 -u reg |
Required binaries | startup-bcm2711-rpi4 |
Required libraries | N/A |
Source location | $BSP_ROOT_DIR/src/hardware/startup/boards/bcm2711
(common) $BSP_ROOT_DIR/src/hardware/startup/boards/bcm2711/rpi4 (Raspberry PI 4 board) |
In addition to the startup-*
options described in the
Utilities Reference, you can also use the following
option with this command:
- -u [ reg | arg ]
- Add a flattened device tree (FDT) to the asinfo (Address Space Information)
section of the system page.
Specify reg or arg, depending on how the FDT address is passed:
- reg — Populate asinfo using an FDT blob. The address of the FDT blob is in the x0 register.
- arg — The address of the FDT blob is passed by arguments in memory.
- -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)
USB host controller and OTG controller; host mode uses io-usb-otg stack.
Device | USB host controller |
Command | XHCI: io-usb-otg -t memory=below1G -d bcm2711-xhci pindex=0,memory=below1G |
Required binaries | io-usb-otg, usb, devb-umass |
Required libraries | devu-hcd-bcm2711-xhci.so, libsecpol.so, libc.so, libgcc_s.so.1 |
Source location | Prebuilt only |
io-usb-otg -t memory=below1G -d bcm2711-xhci pindex=0,memory=below1G
waitfor /dev/usb/io-usb-otg 4
waitfor /dev/usb/devu-hcd-bcm2711-xhci.so 4 4
devb-umass cam pnp mem name=below1G 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, 12specifies a FAT32 filesystem (i.e., mount -t dos /dev/umass0t12 /fs/usb0).
For more information about the devu-hcd-bcm2711-xhci.so driver, see the devu-hcd-bcm2711-xhci.so
section in the BSP-specific Drivers and Utilities
chapter.
Watchdog
To enable the watchdog:
Launch startup with the -W option, with an optional parameter for timeout:
startup-bcm2711-rpi4 -v -D miniuart -W 2500Launch the watchdog timer utility early on in the boot script:
wdtkick -W0x24:0x5A028E4C -W0x1c:0x5A000020To 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:0x5A01000A -W0x1c:0x5A000020 |
Required binaries | wdtkick |
Required libraries | libc.so, libgcc_s.so |
Source location | $BSP_ROOT_DIR/src/hardware/support/wdtkick |