I have successfully made device tree overlays for the iMX7 in the past (With your help!), for example:
Now I am trying to do the same thing with a Colibri iMX8 DualX 1GB. The overlay file I am trying to use to disable the SD card interface and liberate SODIMM 190 to be a GPIO is shown below. This is based on my iMX7 overlay with some updates based on studying the iMX8 documentation.
Thanks for the report. I could reproduce the issue on my side. I’m talking with the development team to check what we should do in this case, I will let you know about any news.
Can you please share the version of your torizoncore-builder?
$ torizoncore-builder --version
Despite that, were you able to make your overlay work? For example, instead of using TorizonCore Builder, you can copy the dtbo file manually to your image (by using SCP for example) and activate your overlay.
I had torizoncode-builder 3.6.0 installed when I wrote this post. I installed the early access version which reports as version 3.6.0+early-access. That allowed torizon-core-builder to run successfully and generate a dtbo file which it then deployed. However, my iMX8 module is no longer able to boot. That probably means that the tools are working now but there is something wrong with my overlay file. Are you able to help me with that?
The output from the tool is:
$ torizoncore-builder dto deploy --remote-host 192.168.86.32 --remote-username torizon --rem
ote-password xxxx --force --reboot HeartbeatLed.dts
Downloading image from: https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/dunfell-5.x.y/release/17/colibri-imx8x/torizon/torizon-core-docker/oedeploy/torizon-core-docker-colibri-imx8x-Tezi_5.7.0+build.17.tar
The download may take some time. Please wait...
Unpacking Toradex Easy Installer image.
Copying Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision ec744fac1d0a556c00400d205850fb443dc688efa478f2d8c60303430dcac227 from local repository...
1135 metadata, 12775 content objects imported; 530.9 MB content written
Unpacked OSTree from Toradex Easy Installer image:
Commit checksum: ec744fac1d0a556c00400d205850fb443dc688efa478f2d8c60303430dcac227
TorizonCore Version: 5.7.0+build.17
'device-trees' directory already exists
warning: --force was used, bypassing checking overlays against the device tree.
'HeartbeatLed.dts' compiles successfully.
Overlay HeartbeatLed.dtbo successfully applied.
Applying changes from STORAGE/dt.
Commit e3a4fa6a291f8501697ad21982fcb8e222c3bd9045870c9bb4cf53639bd76a22 has been generated for changes and is ready to be deployed.
Pulling OSTree with ref dto_deploy (checksum e3a4fa6a291f8501697ad21982fcb8e222c3bd9045870c9bb4cf53639bd76a22) from local archive repository...
Starting http server to serve OSTree.
OSTree server listening on "localhost:45791".
Starting OSTree pull on the device...
Deploying new OSTree on the device...
Deploying successfully finished.
Device reboot initiated...
And the output from the module on the debug port while booting is:
U-Boot 2020.04-5.7.0+git.33bb8e968332 (Jan 01 1970 - 00:00:00 +0000)
CPU: NXP i.MX8QXP RevC A35 at 1200 MHz at 42C
DRAM: 1022 MiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
Model: Toradex Colibri iMX8 DualX 1GB V1.0D, Serial# 07203057
- SCFW 216a2c2e, SECO-FW c9de51c0, IMX-MKIMAGE 6a315dbc, ATF 2fa8c63
- U-Boot 2020.04-5.7.0+git.33bb8e968332
flash target is MMC:0
Net: eth0: ethernet@5b040000 [PRIME]
Saving Environment to MMC... Writing to MMC(0)... OK
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
973 bytes read in 9 ms (105.5 KiB/s)
## Executing script at 83200000
5085 bytes read in 20 ms (248 KiB/s)
126514 bytes read in 32 ms (3.8 MiB/s)
130 bytes read in 26 ms (4.9 KiB/s)
Applying Overlay: colibri-imx8x_parallel-rgb_overlay.dtbo
1498 bytes read in 33 ms (43.9 KiB/s)
Applying Overlay: colibri-imx8x_ad7879_overlay.dtbo
403 bytes read in 32 ms (11.7 KiB/s)
Applying Overlay: display-vga_overlay.dtbo
831 bytes read in 34 ms (23.4 KiB/s)
Applying Overlay: HeartbeatLed.dtbo
677 bytes read in 35 ms (18.6 KiB/s)
12192077 bytes read in 291 ms (40 MiB/s)
Uncompressed size: 30659072 = 0x1D3D200
9179928 bytes read in 224 ms (39.1 MiB/s)
## Flattened Device Tree blob at 83100000
Booting using the fdt blob at 0x83100000
Loading Ramdisk to bcdab000, end bd66c318 ... OK
Loading Device Tree to 00000000bcd69000, end 00000000bcdaafff ... OK
Starting kernel ...
But the module is unresponsive after sending that debug output.
I like that more modern style of overlay, it’s definitely easier to read. But I had the same result when I tested it: the kernel wouldn’t start. I also tried the intermediate version, where you split my file into two sections. That one wouldn’t compile and gave the following message. I think we can ignore this and just focus on the new style file. Error: HeartbeatLed.dts:10.1-2 syntax error
My overlay is designed to disable the SD card interface and then convert one of the pins into a GPIO. I tried using just the part of the file which disables the SD card. This short file compiles and the kernel does boot when this is installed. That must mean that the part of my file which causes the problem is the second section which enabled SODIM 190 as a GPIO. Can you help me with that?
Checking the overlay and the imx8x-colibri.dtsi file, we need to add the other pinctrl’s as well, otherwise, the kernel won’t boot. These pinctrl’s are responsible to enable other crucial parts of the board.
That worked! I now have control of that GPIO pin. I also see what I did wrong after I compared my first file with your last version, and by looking at imx8x-colibri.dtsi. So I think I learned something which will give me a better chance of getting my next device tree overlay file to work on my own. Thanks for your detailed and specific help.