Device tree overlays
The pins on the 40-pin header can be plain GPIO or a bus such as I²C, UART or SPI. Which function is active is decided at boot by a device tree overlay that U-Boot applies on top of the base device tree. Mo OS ships one overlay per function and one boot entry per overlay, so enabling a bus means selecting a different boot entry and rebooting. No kernel build or dtc run is needed.
This page was tested on Mo62A image V1.1.0 (built 2026-08-19), with Debian 13 (Trixie) and Linux 6.12.35.
Boot entries and overlays
Each entry in extlinux/extlinux.conf on the BOOT partition loads the base device tree ti/k3-am62a7-mo-62a.dtb plus the overlay named in its fdtoverlays line. The overlay files are ti/k3-am62a7-mo-62a-NAME.dtbo; the table shows the NAME part. The entries supplied with the image:
| Boot entry | Overlay | Linux device | Header pins |
|---|---|---|---|
microSD-default | cam-imx219 | CSI camera | Unreserved signal pins are GPIO; pins 27/28 are camera I²C; power/ground are not GPIO |
microSD-i2c0 | exp-i2c0 | /dev/i2c-0 | 3 (SDA), 5 (SCL) — WKUP_I2C0 |
microSD-uart5 | exp-uart5 | /dev/ttyS3 | 8 (TXD), 10 (RXD) — UART5 |
microSD-spi0 | exp-spi0 | SPI0 bus | 19 (MOSI), 21 (MISO), 23 (CLK), 24 (CS0), 26 (CS1) |
microSD-ehrpwm0 | exp-ehrpwm0 | EHRPWM0 at 23000000.pwm | 33 (EHRPWM0_A), 32 (EHRPWM0_B) |
microSD-audio | exp-audio | WM8960 card | 3, 5 (I²C control); 12, 35, 38, 40 (I²S) |
Only microSD-default loads the camera overlay. The peripheral entries boot without the CSI camera, and pins 27 and 28 stay reserved for the camera I²C bus in every entry; do not drive them as GPIO. A combined overlay, k3-am62a7-mo-62a-exp-periph.dtbo, is also present in BOOT/ti/ and enables all of the buses above at once, but it has no boot entry of its own; see Add your own entry.
The pin numbers, signal names and GPIO line numbers are in Hardware interfaces.
Select an entry
Switch the default entry from Mo OS and reboot:
bootcfg list
sudo bootcfg switch microSD-uart5
bootcfg switch asks for confirmation and reboots immediately. After the reboot, confirm the active entry and that the peripheral node is enabled in the live device tree. UART5 is serial@2850000; its status reads disabled in the default entry and okay in microSD-uart5:
bootcfg show
tr -d '\0' < /proc/device-tree/bus@f0000/serial@2850000/status; echo
ls -l /dev/ttyS3
To return to the camera and all-GPIO configuration, run sudo bootcfg switch microSD-default.
Use bootcfg for normal entry selection. Older images may expose a numbered U-Boot menu on the debug UART, but the current supplied configuration selects its default directly; do not rely on an interactive menu being displayed.
Add your own entry
The boot configuration is a text file. To add an entry, for example one that loads both the camera and the I²C overlay, copy an existing block in /boot/firmware/extlinux/extlinux.conf, give it a new label and list the overlays separated by spaces:
label microSD-cam-i2c0
append console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 root=/dev/mmcblk1p3 rw rootfstype=ext4 rootwait loglevel=7
kernel /Image
fdt /ti/k3-am62a7-mo-62a.dtb
fdtoverlays /ti/k3-am62a7-mo-62a-cam-imx219.dtbo /ti/k3-am62a7-mo-62a-exp-i2c0.dtbo
Then select it with sudo bootcfg switch microSD-cam-i2c0. Keep the append, kernel and fdt lines identical to the supplied entries, and combine only overlays that use different pins. Overlays that claim the same pins, such as exp-i2c0 and exp-audio, cannot be loaded together.
A typing error in extlinux.conf can stop the board from booting. Keep the original entries in the file, and remember that bootcfg switch leaves a copy in extlinux.conf.bak. If the board no longer boots, mount the BOOT partition on a computer and restore the file.
Build a custom overlay
The overlay sources (.dtso) and the base device tree live in the Mo62A repository under board-support/ti-linux-kernel-6.12.35+git-ti-rt/arch/arm64/boot/dts/ti/. Build them with the kernel's make linux-dtbs target, copy the resulting .dtbo into BOOT/ti/ and reference it from a boot entry. See Build from source and the SDK README for known overlay issues.
Troubleshooting
| Symptom | What to check |
|---|---|
| No bus device after switching | Run bootcfg show to confirm the entry took effect; the switch only applies after the reboot it performs. |
| The camera stopped working | The current entry is not microSD-default, which is the only supplied entry with the camera overlay. Switch back or add an entry that lists both overlays. |
No boot after editing extlinux.conf | Shut down, mount the card's BOOT partition on a computer, and restore the saved configuration. Do not assume this image displays a recovery menu. |
| I²C bus numbers changed | With exp-i2c0 or exp-audio, WKUP_I2C0 becomes /dev/i2c-0 and the on-board buses move up by one. Address buses by their function, not by a fixed number. |
Related pages
- Storage & boot: the
BOOTpartition andbootcfg. - Hardware interfaces: header pinout and GPIO line numbers.
- GPIO & peripherals: using the buses from your programs.