Driver Commands

The tables below provide a summary of driver commands for the Apalis i.MX 8QM Ixora.

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 QNX OS Utilities Reference. In some cases, the driver or command is specific to this BSP, in which cases, you'll find the information in the chapter BSP-specific Drivers and Utilities.

ADC

Device ADC
Command for ADC0 (/dev/adc0) adc-imx8 -p /dev/adc0 -a 0x5A880000 -o chnum=4
Command for ADC1 (/dev/adc1) adc-imx8 -p /dev/adc1 -a 0x5A890000 -o chnum=4
Required binaries adc-imx8
Required libraries N/A
Source location $BSP_ROOT_DIR/src/hardware/support/adc/resmgr

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

CAN

Device FlexCAN
Command

devcan-flexcan -b250K can0

devcan-flexcan -b250K can1

Required binaries devcan-flexcan, canctl
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so
Source location $BSP_ROOT_DIR/src/hardware/can/mx7x

For more information about this driver, see devcan-flexcan in the chapter BSP-specific Drivers and Utilities 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 libc.so.6, libgcc_s.so.1, libsecpol.so
configuration files dvfs_imx8qm.conf, dvfs_pwrtbl_imx8qm.conf
Source location $BSP_ROOT_DIR/src/hardware/dvfsmgr/aarch64/imx8x.le
In addition to the dvfsmgr-* options described in the QNX OS Utilities Reference, you can also use the following option 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.

GPIO

Device GPIO
Command gpio-imx8x
Required binaries gpio-imx8x
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so
Source location $BSP_ROOT_DIR/src/hardware/support/gpio-imx/

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

I2C

Device I2C
Command

i2c-lpi2c -v -I0

i2c-lpi2c -v -I1

i2c-lpi2c -v -I2

Required binaries i2c-lpi2c
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so
Source location $BSP_ROOT_DIR/src/hardware/i2c/imx8

For more information about this driver, see i2c-lpi2c in the chapter BSP-specific Drivers and Utilities 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, if_up, pfctl, netstat
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 more information about this driver, see devs-ffec.so in the chapter BSP-specific Drivers and Utilities of this guide.

For information about io-sock, see QNX SDP 8.0 High-Performance Networking Stack User's Guide.

Note:
There must be a filesystem on the device for dhcpcd to generate an IP address and for generating SSH keys. If no persistent filesystem is is present then a RAM file system will be created at /dev/fs9p0.

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, libc.so.6, libgcc_s.so.1, libsecpol.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
Source location Binary 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)

Device Real-time clock
Command rtc-imx8x m41t00 /dev/i2c1
Required binaries rtc-imx8x
Required libraries N/A
Source location $BSP_ROOT_DIR/src/utils/r/rtc

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

SD/MMC

Device SD/MMC
Commands for the onboard eMMC

devb-sdmmc-mx8x cam cache,quiet blk memory="sysram&below4G:sysram",maxio=256,cache=4m disk name=emmc sdio idx=0,emmc,bw=8,verbose=1

waitfor /dev/emmc0

Command for the 8-bit microSD slot (X10)

devb-sdmmc-mx8x cam pnp,cache,quiet blk memory="sysram&below4G:sysram",maxio=256,cache=4m disk name=sd sdio idx=1,bw=4,bs=cd=0x5D0A0000^9^617,verbose=1

waitfor /dev/sd0

Required binaries devb-sdmmc-mx8x
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so cam-disk.so, io-blk.so, libcam.so
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 UART1 (X22) devc-sermx8 -e -F -S -u 1 -c80000000 0x5A070000,258
Command for UART2 (X21) devc-sermx8 -e -F -S -u 2 -c80000000 0x5A090000,260
Command for UART3 (X21) devc-sermx8 -e -F -S -u 3 -c80000000 0x5A060000,257
Command for UART4 (X27) devc-sermx8 -e -F -S -u 4 -c80000000 0x5A080000,259
Required binaries devc-sermx8
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so
Source location $BSP_ROOT_DIR/src/hardware/devc/sermx8

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

SPI

Device SPI
Command for Starting SPI master driver spi-imx8lpspi
Required binaries spi-imx8lpspi
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so libdma-edma.so
Configuration files spi.conf (Update the configuration file for DMA, as required)
Source location $BSP_ROOT_DIR/src/hardware/spi/imx8lpspi

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

Startup

Device Startup
Command startup-imx8x-qm-apalis -W -D 8250.0x5A070000^0.115200 -K 8250.0x5A070000^0.115200
Required binaries startup-imx8x-qm-apalis
Required libraries libstartup.a
Source location $BSP_ROOT_DIR/src/hardware/startup/boards/imx8x (common), $BSP_ROOT_DIR/src/hardware/startup/boards/imx8x/qm/apalis (board-specific)

In additional to the common options available for the startup-* command as described in the QNX OS Utilities Reference in the QNX SDP 8.0 documentation, this driver supports these options:

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

System Controller (SC)

Utility System Controller (SC)
Command sc-imx8
Required binaries sc-imx8
Required libraries libnxp_imx8_sci.so, libc.so.6, libgcc_s.so.1, libsecpol.so
Source location $BSP_ROOT_DIR/src/hardware/support/imx8/sc-imx8

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

USB host controller (io-usb-otg stack)

Device USB host controller
Command for xHCI USBH4 (X8) io-usb-otg -d imx8-xhci ioport=0x5B130000,irq=303 -d ehci-mx28 ioport=0x5B0D0100,irq=299,no_stream,phy=0x5B100000 -d apalis-hsic-ehci-mx28 ioport=0x5B0E0100,irq=300,no_stream
Required binaries io-usb-otg, usb, devb-umass
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so libusbdi.so, libusbdi.so, devu-hcd-imx8-xhci.so, devu-hcd-ehci-mx28.so, devu-hcd-apalis-hsic-ehci-mx28.so,
Source location Binary 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.

Example of xHCI controller:
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
                
Example of starting USB Type-C port manager:
tcpm-imx8qm &
Note:
You can't run the devu-hcd-ehci-mx28.so driver as a host controller and device controller (devu-dcd-usbumass-mx8-ci.so, devu-dcd-usbser-mx8-ci.so) at the same time. For example, if you've run the devu-hcd-ehci-mx28.so host controller and want to run a device controller instead, you must first slay the io-usb-otg instance associated with the host controller (e.g., /dev/otg/io-usb-otg path) before you start the device controller.

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 chapter BSP-specific Drivers and Utilities.

Note:
The driver devu-hcd-apalis-hsic-ehci-mx28.so has the same options and specifications as devu-hcd-ehci-mx28.so. Therefore, refer to devu-hcd-ehci-mx28.so for more information.

USB device controller (io-usb-otg stack)

Device USB device controller
Command for Mass storage device io-usb-otg -d dcd-usbumass-mx8-ci ioport=0x5B0D0000,irq=299 -n /dev/otg/io-usb-otg
Command for Serial device io-usb-otg -d dcd-usbser-mx8-ci ioport=0x5B0D0000,irq=299 -n /dev/otg/io-usb-otg
Required binaries io-usb-otg, , usb
Required libraries libc.so.6, libgcc_s.so.1, libsecpol.so devu-dcd-usbumass-mx8-ci.so, devu-dcd-usbser-mx8-ci.so, libusbdci.so
Source location Binary only
Example for a ChipIdea device as serial over USB:
#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
               
Example for a ChipIdea device as a mass storage device:
#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
                
Note:
  • 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:

  1. Modify the buildfile so that startup launches with the -W option:

    startup-imx8x-qm-apalis -W
  2. Launch the watchdog timer utility early on in the boot script:

    wdtkick-sc-imx8 -t 5000
Device Watchdog timer
Commands wdtkick-sc-imx8

wdtkick-sc-imx8 -t 5000

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

For more information about this driver, see wdtkick-sc-imx8 in the chapter BSP-specific Drivers and Utilities of this guide.

Page updated: