Driver Commands
The tables below provide a summary of driver commands for the i.MX8QM MEK.
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. 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.
CAN
Device | FlexCAN |
Command | devcan-flexcan -h -b250K can0 devcan-flexcan -h -b250K can1 devcan-flexcan -h -b250K can2 |
Required binaries | devcan-flexcan, canctl |
Required libraries | libsecpol.so, libc.so.6, libgcc_s.so.1 |
Source location | $BSP_ROOT_DIR/src/hardware/can/mx7x |
For more information about this driver, see devcan-flexcan
in the BSP-specific Drivers and Utilities
chapter of this
guide.
DVFS resource manager
Utility | dvfsmgr |
Command | dvfsmgr-imx8x -c /etc/dvfs/config/imx8/dvfs_imx8qm.conf -o /etc/dvfs/config/imx8/dvfs_pwrtbl_imx8qm.conf -v |
Required binaries | dvfsmgr-imx8x, dvfs_client |
Required libraries | libsecpol.so, libc.so.6, libgcc_s.so.1 |
configuration files | dvfs_imx8qm.conf, dvfs_pwrtbl_imx8qm.conf |
Source location | $BSP_ROOT_DIR/src/hardware/dvfsmgr/aarch64/imx8x.le |
dvfsmgr-*options described in the QNX OS Utilities Reference of the QNX SDP 8.0 documentation, you can also use the following options with this command:
- -o path_cfg_pwrtable
- DVFS config Power Table file path. The default is /etc/system/config/dvfs_pwrtbl.conf, but set this to /etc/dvfs/config/imx8/dvfs_pwrtbl_imx8qm.conf for this BSP.
- -U uid[:gid]
- Change to the specified user ID (uid). The uid can be a username from the user database or a numeric user ID. With a numeric uid, a numeric group ID (gid) can optionally be specified. If a numeric gid is not given with a numeric uid, a default group of 0 (root) is used.
Also included with the BSP is the dvfs_client, which you can run to interact with
the DVFS manager. For more information, see the dvfs_client
section in the
Utilities Reference of the QNX SDP 8.0 documentation.
Graphics
Device | Graphics |
Command | screen -c /usr/lib/graphics/iMX8QM/graphics.conf |
Required binaries | screen and several other binaries. For more
information, see the Using the Screen Graphics Subsystemchapter in this guide. |
Required libraries | For more information, see the Using the Screen Graphics Subsystemchapter in this guide. |
Required configuration files | graphics.conf; for its location in your
QNX SDP 8.0 installation, see
the Using the Screen Graphics Subsystemchapter in this guide. |
Source location | N/A |
I2C (10 interfaces)
Device | I2C |
Command |
i2c-lpi2c -v -I0 --u 0 i2c-lpi2c -v -I1 --u 1 i2c-lpi2c -v -I4 --u 4 i2c-lpi2c -v -t500 -I6 --u 6 i2c-lpi2c -v -t500 -I8 --u 8 i2c-lpi2c -v -I9 --u 9 i2c-lpi2c -v -I10 --u 10 i2c-lpi2c -v -I11 --u 11 i2c-lpi2c -v -I13 --u 13 i2c-lpi2c -v -I16 --u 16 |
Required binaries | i2c-lpi2c |
Required libraries | libsecpol.so, libc.so.6, libgcc_s.so.1 |
Source location | $BSP_ROOT_DIR/src/hardware/i2c/lpi2c |
For more information about this driver, see i2c-lpi2c
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 ffec -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, pfctl, if_up, random |
Required libraries | devs-ffec.so, devs-em.so, devs-ix.so, devs-re.so, devs-axe.so, devs-axge.so, devs-cdce.so, devs-smsc.so libsocket.so, libsecpol.so, libedit.so, libexpat.so, libxo.so, libfdt.so, librpc.so, libjail.so, mods-phy.so, mods-pci.so, mods-usb.so, mods-fdt.so, mods-phy_fdt.so, libgcc_s.so.1, libc.so.6, qcrypto-openssl-3.so, libtracelog.so, libqcrypto |
Source location | Binary only |
For information about the devs-ffec.so driver, see the devs-ffec.so
section in the BSP-specific Drivers and Utilities
chapter of this guide.
For information about io-sock , see QNX SDP 8.0 High-Performance Networking Stack User's Guide.
Octal xSPI NOR flash
Device | xSPI NOR FLash |
Command | devf-nxp-fspi |
Required binaries | devf-nxp-fspi, flashctl |
Required libraries | libsecpol.so, libgcc_s.so.1, libc.so.6 |
Source location | $BSP_ROOT_DIR/src/hardware/flash/boards/nxp-fspi |
For more information about this driver, see devf-nxp-fspi
in the BSP-specific Drivers and Utilities
chapter of this
guide.
PCI Server
Device | PCI |
Command | pci-server --bus-scan-limit=10 -c |
Required binaries | pci-server, pci-tool |
Required libraries | pci_hw-nxp-imx8-cpu.so, libpci.so, pci_server-buscfg-generic.so, pci_debug2.so, pci_slog2.so, pci_strings.so, pci_cap-0x01.so, pci_cap-0x05.so, pci_cap-0x10.so, pci_cap-0x11.so, libsecpol.so, libc.so.6, libgcc_s.so.1 |
Configuration files | /etc/system/config/pci/pci_hw-imx8-cpu.conf |
Environment variables | PCI_HW_MODULE,
PCI_HW_CONFIG_FILE, PCI_DEBUG_MODULE, PCI_BASE_VERBOSITY, PCI_SLOG_MODULE, PCI_BKWD_COMPAT_MODULE, PCI_MODULE_BLACKLIST, For more information about the environment,
see the |
Source location | Prebuilt only |
For more information about this driver, see the pci-server
section in the QNX OS Utilities Reference guide of the QNX SDP 8.0 documentation.
Real-time clock (RTC)
Utility | Real-time clock |
Command | rtc-imx8x hw or rtc-imx8x -s hw |
Required binaries | rtc-imx8x |
Required libraries | libsecpol.so, libc.so.6, libgcc_s.so.1 |
Source location | $BSP_ROOT_DIR/src/utils/r/rtc |
For more information about this driver, see rtc-imx8x
in
the BSP-specific Drivers and Utilities
chapter of this guide.
SATA (AHCI)
Device | SATA |
Command | devb-ahci-mx8x cam cache,quiet blk ra=64k:2048k,memory="sysram&below4G:sysram",maxio=256,cache=8m ahci ioport=0x5F020000,irq=120,verbose=1 |
Command when SMMUMAN is running | devb-ahci-mx8x cam cache,quiet,bounce,smmu=on blk ra=64k:2048k,memory="sysram&below4G:sysram",maxio=256,cache=8m ahci ioport=0x5F020000,irq=120,verbose=1 |
Required binaries | devb-ahci-mx8x, smmuman (if SMMUMAN is running) |
Required libraries | libcam.so, cam-disk.so, io-blk.so, fs-qnx6.so, libsecpol.so, libc.so.6, libgcc_s.so.1, smmu-armsmmu.so (if SMMUMAN is running), smmu-cfg-imx8.so (if SMMUMAN is running) |
Source location | Prebuilt only |
For more information about this driver, see devb-ahci-mx8x
in the BSP-specific Drivers and Utilities
chapter of this guide.
SD/MMC
Device | SD/MMC |
Command (SD card driver, without SMMUMAN support) |
devb-sdmmc-mx8x cam pnp,cache blk ra=64k:2048k,memory="sysram&below4G:sysram",maxio=256,cache=4m disk name=sd sdio idx=1,bs=vdd1_8:cd=0x5D0D0000^22^726,verbose=1 waitfor /dev/sd0 3 |
Command (SD card driver on the NXP baseboard, without SMMUMAN support) |
devb-sdmmc-mx8x cam pnp,cache,quiet blk ra=64k:2048k,memory="sysram&below4G:sysram",maxio=256,cache=4m disk name=sd@1 sdio idx=2,bs=vdd1_8:cd=0x5D0C0000^12^684,verbose=1 waitfor /dev/sd1 3 |
Command (eMMC, which uses SD0 controller, without SMMUMAN support) |
devb-sdmmc-mx8x cam cache,quiet blk ra=64k:2048k,memory="sysram&below4G:sysram",maxio=256,cache=4m disk name=emmc sdio idx=0,emmc,bw=8,verbose=1 waitfor /dev/emmc0 3 |
Command (SD memory card driver, with SMMUMAN support) |
devb-sdmmc-mx8x cam pnp,cache,bounce,smmu=on blk ra=64k:2048k,memory="sysram&below4G:sysram",maxio=256,cache=4m disk name=sd sdio idx=1,bs=vdd1_8:cd=0x5D0D0000^22^726,verbose=1 waitfor /dev/sd0 3 |
Command (SD card driver on NXP baseboard, with SMMUMAN support) |
devb-sdmmc-mx8x cam pnp,cache,quiet,bounce,smmu=on blk ra=64k:2048k,memory="sysram&below4G:sysram",maxio=256,cache=4m disk name=sd@1 sdio idx=2,bs=vdd1_8:cd=0x5D0C0000^12^684,verbose=1 waitfor /dev/sd1 3 |
Command (eMMC, which uses SD0 controller, with SMMUMAN support) |
devb-sdmmc-mx8x cam cache,bounce,smmu=on blk ra=64k:2048k,memory="sysram&elow4G:sysram",maxio=256,cache=4m disk name=emmc sdio idx=0,emmc,bw=8,verbose=1 waitfor /dev/emmc0 3 |
Required binaries | devb-sdmmc-mx8x, smmuman (if SMMUMAN is running) |
Required libraries | libcam.so, io-blk.so, cam-disk.so, libsecpol.so, libc.so.6, libgcc_s.so.1, smmu-armsmmu.so (if SMMUMAN is running), smmu-cfg-imx8.so (if SMMUMAN is running) |
Source location | $BSP_ROOT_DIR/src/hardware/devb/sdmmc |
For more information about this driver, see devb-sdmmc-mx8x
in the chapter BSP-specific Drivers and Utilities
of this guide.
Serial
Device | Serial |
Command for LPUART0 (USB connected to RS232 bridge) | devc-sermx8 -e -F -S -u1 -c80000000 0x5A060000,257 |
Command for LPUART1 | devc-sermx8 -F -S -u2 -c80000000 0x5A070000,258 |
Command for LPUART2 |
devc-sermx8 -e -F -S –u3 –c80000000 0x5A080000,259 |
Command for LPUART0 when SMMUMAN is running |
devc-sermx8 -d -o smmu=on -e -F -S -u1 -c80000000 0x5A060000,257 |
Command for LPUART1 when SMMUMAN is running |
devc-sermx8 -d -o smmu=on -m -F -S -u2 -c80000000 0x5A070000,258 |
Command for LPUART2 when SMMUMAN is running |
devc-sermx8 -d -o smmu=on -m -F -S -u3 -c80000000 0x5A080000,259 |
Required binaries | devc-sermx8, smmuman (if SMMUMAN is running) |
Required libraries | libsecpol.so, libc.so.6, libgcc_s.so.1, smmu-armsmmu.so (if SMMUMAN is running), smmu-cfg-imx8.so (if SMMUMAN is running) |
Source location | $BSP_ROOT_DIR/src/hardware/devc/sermx8 |
For more information about this driver, see devc-sermx8
in
the BSP-specific Drivers and Utilities
chapter of this guide.
SMMU Manager
Device | Memory Management |
Command | smmuman @/etc/imx8.smmu |
Required binaries | smmuman |
Required libraries | smmu-armsmmu.so, libc.so.6, libgcc_s.so.1, smmu-cfg-imx8.so |
Required Configuration file | /etc/imx8.smmu |
Source location | libsecpol.so, libc.so.6, libgcc_s.so.1 |
It's recommended that you start SMMU Manager (SMMUMAN) before you start any drivers that use SMMU. Some drivers may not start until SMMU Manager has been started. You can enable SMMU Manager support for a driver using an option. SMMUMAN refers to providing DMA containment and memory-management support. For most drivers, you use the smmu option to enable SMMUMAN. In other cases, the smmu is specified with the -o option. To see whether your driver provides SMMU Manager support, see the documentation for the driver either in this guide or the QNX SDP 8.0 documentation.
For more information about the SMMU Manager, see the SMMUMAN User's Guide in the QNX SDP 8.0 documentation.
SPI
Device | SPI |
Command for Starting SPI master driver | spi-imx8lpspi |
Required binaries | spi-imx8lpspi, smmuman (if SMMUMAN is running) |
Required libraries | libdma-edma.so,libsecpol.so, libc.so.6, libgcc_s.so.1, smmu-armsmmu.so (if SMMUMAN is running), smmu-cfg-imx8.so (if SMMUMAN is running) |
Configuration files | spi.conf (Update the configuration file for DMA, SMMUMAN as required) |
Source location | $BSP_ROOT_DIR/src/hardware/spi/imx8lpspi |
For more information about this driver, see spi-imx8lpspi
in the BSP-specific Drivers and Utilities
chapter of this
guide.
Startup
Device | Startup |
Command | startup-imx8x-qm-cpu-mek -s -u reg -W |
Required binaries | startup-imx8x-qm-cpu-mek |
Required libraries | N/A |
Source location | $BSP_ROOT_DIR/src/hardware/startup/boards/imx (common) $BSP_ROOT_DIR/src/hardware/startup/boards/imx/imx8x/qm/cpu-mek (i.MX8QM MEK specific) |
These are the options that you can use with this command:
- -s
- Enable SATA PHY initialization.
- -W
- Enable watchdog timer support. Ensure that you start the watchdog driver after when you enable this option.
System Controller (SC)
Utility | System Controller (SC) |
Command | sc-imx8 |
Required binaries | sc-imx8 |
Required libraries | N/A |
Source location | $BSP_ROOT_DIR/src/hardware/support/sc-imx8 |
For more information about this driver, see sc-imx8
in the
BSP-specific Drivers and Utilities
chapter of this guide.
USB host controller (io-usb-otg stack)
Device | USB host controller |
Commands |
XHCI: io-usb-otg -d hcd-imx8-xhci ioport=0x5B130000,irq=303 EHCI: io-usb-otg -d hcd-ehci-mx28 ioport=0x5B0D0100,irq=299,no_stream,phy=0x5B100000 -n /dev/otg/io-usb-otg Both xHCI and eHCI: io-usb-otg -d hcd-ehci-mx28 ioport=0x5B0D0100,irq=299,no_stream,phy=0x5B100000 -d hcd-imx8-xhci ioport=0x5B130000,irq=303 |
Commands when SMMUMAN is running |
XHCI: io-usb-otg -s smmu=on -d hcd-imx8-xhci ioport=0x5B130000,irq=303 EHCI: io-usb-otg -s smmu=on -d hcd-ehci-mx28 ioport=0x5B0D0100,irq=299,no_stream,phy=0x5B100000 -n /dev/otg/io-usb-otg Both xHCI and eHCI: io-usb-otg -s smmu=on -d hcd-ehci-mx28 ioport=0x5B0D0100,irq=299,no_stream,phy=0x5B100000 -d hcd-imx8-xhci ioport=0x5B130000,irq=303 |
Required binaries | io-usb-otg, devb-umass, usb, tcpm-imx8qm, smmuman (if SMMUMAN is running) |
Required libraries | libusbdi.so, devu-hcd-ehci-mx28.so, devu-hcd-imx8-xhci.so, libc.so.6, libgcc_s.so.1, libusbdci.so, smmu-armsmmu.so (if SMMUMAN is running), smmu-cfg-imx8.so (if SMMUMAN is running) |
Source location | Prebuilt only |
You must run the tcpm-imx8qm utility after you run the devu-hcd-imx8-xhci driver. For information about the tcpm-imx8qm utility, see the NXP documentation.
io-usb-otg -d hcd-imx8-xhci ioport=0x5B130000,irq=303
waitfor /dev/usb/io-usb-otg
waitfor /dev/usb/devu-hcd-imx8-xhci.so
tcpm-imx8qm&
devb-umass cam pnp
Example of eHCI controller:
io-usb-otg -d hcd-ehci-mx28 ioport=0x5B0D0100,irq=299,
no_stream,phy=0x5B100000 -n /dev/otg/io-usb-otg
waitfor /dev/otg/io-usb-otg
waitfor /dev/otg/devu-ehci.so
devb-umass cam pnp umass path=/dev/otg/io-usb-otg
tcpm-imx8qm &
For more information about the devu-imx8-xhci.so or devu-hcd-ehci-mx28.so drivers, see devu-hcd-imx8-xhci.so
and devu-hcd-ehci-mx28.so
, respectively, in the BSP-specific Drivers and Utilities
chapter.
USB device controller (io-usb-otg stack)
Device | USB device controller |
Command (Mass storage device) | io-usb-otg -d dcd-usbumass-mx8-ci ioport=0x5B0D0000,irq=299 -n /dev/otg/io-usb-otg |
Command (Serial) | io-usb-otg -d dcd-usbser-mx8-ci ioport=0x5B0D0000,irq=299 -n /dev/otg/io-usb-otg |
Command (Mass storage device) when SMMUMAN is running | io-usb-otg -s smmu=on -d dcd-usbumass-mx8-ci ioport=0x5B0D0000,irq=299 -n /dev/otg/io-usb-otg |
Command (Serial) when SMMUMAN is running | io-usb-otg -s smmu=on -d dcd-usbser-mx8-ci ioport=0x5B0D0000,irq=299 -n /dev/otg/io-usb-otg |
Required binaries | io-usb-otg, usb, ulink_ctrl, smmuman (if SMMUMAN is running) |
Required libraries | devu-dcd-usbumass-mx8-ci.so, devu-dcd-usbser-mx8-ci.so, libusbdci.so, libc.so.6, libgcc_s.so.1, libusbdci.so, smmu-armsmmu.so (if SMMUMAN is running), smmu-cfg-imx8.so (if SMMUMAN is running) |
Source location | Prebuilt only |
#Start USB device stack
io-usb-otg -d dcd-usbser-mx8-ci ioport=0x5B0D0000,irq=299 -n /dev/otg/io-usb-otg
waitfor /dev/otg/io-usb-otg
waitfor /dev/otg/devu-dcd-usbser-mx8-ci.so
#Start the USB CDC-ACM function driver and enable USB soft connect
devc-serusb_dcd -e -v -F -s -d iface_list=0,unit=1,path=/dev/otg/io-usb-otg
waitfor /dev/serusb1
ulink_ctrl -l 1 -s /dev/otg/io-usb-otg
#Create Mass storage (USB stick):
devb-ram ram capacity=262144 disk name=ramdisk blk cache=512k
waitfor /dev/ramdisk0
fdisk /dev/ramdisk0 add -t 12
mount -e /dev/ramdisk0
waitfor /dev/ramdisk0t12
mkdosfs /dev/ramdisk0t12
mount -t dos /dev/ramdisk0t12 /ramdisk
#Start the USB device stack
io-usb-otg -d dcd-usbumass-mx8-ci ioport=0x5B0D0000,irq=299
-n /dev/otg/io-usb-otg
waitfor /dev/otg/io-usb-otg
waitfor /dev/otg/devu-dcd-usbumass-mx8-ci.so
#Start the mass storage function driver and enable USB soft connect
devu-umass_client-block -l lun=0,fname=/dev/ramdisk0t12 -s /dev/otg/io-usb-otg
ulink_ctrl -l 1 -s /dev/otg/io-usb-otg
- In the example above, you only need to specify a different manager name (-n option) for the io-usb-otg command when it's the second instance. This is because the first instance of the io-usb-otg command is using the default path already. Alternatively, you can start multiple devices using one io-usb-otg command.
- You can't run the devu-hcd-ehci-mx28.so driver as a host controller and device controller (dcd-usbumass-mx8-ci, usb-dcd-usbser.mx8-ci) at the same time. For example, if you've run the dcd-usbumass-mx8-ci device controller and want to run a host controller instead, you must first slay the io-usb-otg instance associated with the device controller (e.g., /dev/otg/io-usb-otg path) before you start the host controller.
For more information about the devu-dcd-usbser-mx8-ci.so or dcd-usbumass-mx8-ci.so drivers, see, devu-dcd-usbser-mx8-ci.so
and devu-dcd-usbumass-mx8-ci.so
, respectively in the BSP-specific Drivers and Utilities
chapter.
Watchdog
To enable the watchdog:
Modify the buildfile so that startup launches with the -W option:
startup-imx8x-qm-cpu-mek -s -u reg -WLaunch the watchdog timer utility early on in the boot script:
wdtkick-sc-imx8 -t 5000 -p 2
Device | Watchdog timer |
Commands | wdtkick-sc-imx8
wdtkick-sc-imx8 -t 5000 -p 2 |
Required binaries | wdtkick-sc-imx8 |
Required libraries | libsecpol.so, libc.so.6, libgcc_s.so.1 |
Source location | $BSP_ROOT_DIR/src/hardware/support/wdtkick-sc/imx8 |
For more information about this driver, see wdtkick-sc-imx8
in the BSP-specific Drivers and Utilities
chapter of this guide.