Pin multiplexing


I’m working on pin multiplexing for a few days. I customized IOMUX in .dts file and then i compiled it for creation .dtb file. What should i do next for creating a new image with my new pins?

Hello @ogusis01 ,
Do you want to create a new Yocto image or a new TorizonCore image?

Best regards,

I’m trying to create new Yocto image.

Either, is it possible to change the pin functionalities of an already existing image(e.g. tdx-reference-multimedi-image, tdx-minimal-image) in yocto by changing only the dts file it uses?

Hi @ogusis01 ,

Which carrier board are you using?

I assume you were following this article here right?

There’s also an article leading through the whole process of building one of our reference images.

Does this help?

Best Regards

Hi again. I’m using BSP 5.0 reference image on my colibri imx6. I’m trying to configure my pins with device tree overlay. The steps I followed are listed below.

  1. Write a .dts file.
    2)Compile it to .dtbo.
    3)Copy this .dtbo file to “/boot/overlays” directory in Colibri imx6
    4)Write "fdt_file=dtboname.dtbo
    5)sync and reboot
    As a result, I get the following error during boot
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX6 DualLite 512MB IT V1.1Z, Serial# 10885648
Net:   eth0: ethernet@2188000
Hit any key to stop autoboot:  0 
MMC: no card present
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
5752 bytes read in 13 ms (431.6 KiB/s)
## Executing script at 17000000
Loading DeviceTree: imx6dl-colibri-eval-v3.dtb
63342 bytes read in 19 ms (3.2 MiB/s)
47 bytes read in 10 ms (3.9 KiB/s)
Applying Overlay: imx6dl-colibri-my-carrier-v3.dtbo
914 bytes read in 25 ms (35.2 KiB/s)
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
8516096 bytes read in 302 ms (26.9 MiB/s)
Bootargs: enable_wait_mode=off galcore.contiguousSize=50331648 root=PARTUUID=f5b9b830-02 ro rootwait fec_mac=00:14:2d:a6:1a:10 consoleblank=0 no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 fbmem=8M
ERROR: Did not find a cmdline Flattened Device Tree

Starting kernel ...

Dts file that i wrote is in below


#include <imx6dl-pinfunc.h>

/ {
    compatible = "toradex,colibri-imx6dl";

&iomuxc {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_my_pins>;  
        pinctrl_my_pins: my_muxgrp {
            fsl,pins = <
			MX6QDL_PAD_SD4_DAT4__GPIO2_IO12 0x1b0b0
			MX6QDL_PAD_SD4_DAT7__GPIO2_IO15 0x1b0b0
&genericPeripheral {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_my_pins>; 
    status = "okay";

&uart2 {
	status = "disabled";

Can you help me find where I went wrong?

Hi @ogusis01!

Yes. It is possible. Please check the Custom meta layers, recipes and images in Yocto Project (hello-world examples) | Toradex Developer Center article for the device tree example.

This kind of structure on a device tree file is meant to customize an already existing node that must be defined somewhere else. As we do not have a node labeled genericPeripheral anywhere on our set of device tree files for Colibri iMX6DL, your overlay will fail to be applied.

I would recommend you study more about device trees to understand how they work (which can be quite tough to understand).

The following references will help you with this task:

(above link was already shared by @kevin.tx)

An a nice Application Note from NXP about Device Tree files:

Best regards,

Hi @henrique.tx
Thanks for your answer.

Can I add pin to pinctrl defined under dtsi file with device tree overlay?

Hi @ogusis01 !

Yes, you can.

But it works like a complete “do-over”. You need to copy the pinctrl content, paste it into your device tree overlay and then add/remove/modify the pins you want.

Best regards,