I’m using Torizon on a Colibri iMX6DL. SODIMM pin 190 is not available as a GPIO in the default device tree, but I need to use it as a GPIO to support a custom carrier board. I wrote a device tree overlay a while ago which does enable pin 190 as a GPIO but I just discovered that a side-effect of my device tree overlay is that UART_B and UART_C stop working. There must be something wrong with either my device tree overlay source code, or with the way I am deploying it onto the device. Can you review my file and my method?
The problem happens the same way with Torizon 6.7.0, 6.8.0 and 7.0.0. I’ll document the steps with 7.0.0 here as that is currently the most recent release. The reply from tdx-info
on my module is:
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.53-7.0.0-00029-g68da80fb0462 #1-Torizon SMP PREEMPT Mon Jun 17 16:49:11 UTC 2024
Kernel command line: enable_wait_mode=off galcore.contiguousSize=50331648 root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/be872468b7b697020ed89215ad325489e49742b825240eef396819058c8d8f10/0
Distro name: NAME="Torizon OS Upstream"
Distro version: VERSION_ID=7.0.0-build.1
Hostname: colibri-imx6-10634753
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Colibri iMX6DL/S on Colibri Evaluation Board V3
Toradex version: 0015 V1.1A
Serial number: 10634753
Processor arch: armv7l
------------------------------------------------------------
The source code for my device tree overlay is in a file I called HeartbeatLed.dts
. It disables the SD card interface and adds pin 190 as a GPIO:
/dts-v1/;
/plugin/;
#include "linux/arch/arm/boot/dts/nxp/imx/imx6dl-pinfunc.h"
/ {
compatible = "toradex,colibri_imx6dl";
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_test>;
colibri-imx6dl {
pinctrl_test: gpiomuxgrp {
fsl,pins = <
MX6QDL_PAD_SD1_CMD__GPIO1_IO18 0x1b0b0 /* SODIMM 190 */
>;
};
};
};
&usdhc1 {
status = "disabled";
};
I added a tcbuild.yaml
file to refer to my device tree overlay:
input:
easy-installer:
local: torizon-docker-colibri-imx6-Tezi_7.0.0+build.1.tar
customization:
device-tree:
include-dirs:
- linux/include/
custom: linux/arch/arm/boot/dts/nxp/imx/imx6dl-colibri-eval-v3.dts
overlays:
add:
- HeartbeatLed.dts
output:
easy-installer:
local: torizon-docker-colibri-imx6-Tezi_7.0.0.CUSTOM
I downloaded the TEZI image to match my module using these commands:
wget https://tezi.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/scarthgap-7.x.y/release/1/colibri-imx6/torizon-upstream/torizon-docker/oedeploy/torizon-docker-colibri-imx6-Tezi_7.0.0+build.1.tar
torizoncore-builder images unpack torizon-docker-colibri-imx6-Tezi_7.0.0+build.1.tar
Then I cloned the kernel source code using these commands:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
cd linux
git checkout tags/v6.6.53
cd ..
git clone -b master git://git.toradex.com/device-tree-overlays.git device-trees
Then I built and deployed my device tree overlay using these commands:
torizoncore-builder build
torizoncore-builder images unpack torizon-docker-colibri-imx6-Tezi_7.0.0.CUSTOM
torizoncore-builder deploy --remote-host 192.168.86.47 --remote-username torizon --remote-password xxxx --reboot
These commands did all appear to succeed normally and the result was that I did get access to pin 190 as a GPIO. But when the module boots the output from UART_A includes multiple error messages like this:
imx6dl-pinctrl 20e0000.pinctrl: invalid function pinctrl in map table
And although pin 190 works as intended, UART_B and UART_C no longer work.