Device Tree Customizations - i.MX6 and Ixora

Dear Community,

I have an Apalis i.MX6 board on Ixora. Now I want to play around with building U-Boot/TorizonCore with custom device tree.

In regards with this, I want to ask you if there is anything on the Ixora carrier board (like GPIO-connected LEDs, I2C, SPI devices) that is not part of the stock Toradex device tree and which I can use to validate my experiments?

Greetings @vmetodiev,

Not quite sure if I understood your request. Are you just looking to play around in the device tree?

By default our device tree makes use of as many peripherals as are available without conflict. You can enable extra GPIOs/SPI/etc beyond the default configuration, but in turn you must usually disable something else to free up additional pins for new purposes.

Best Regards,

Hi @jeremias.tx ,

Yes, exactly, I want to play around with the device tree only for educational purposes.
But I don’t know where to start from.

Hello @vmetodiev,

Here is great documentation about changing the pin functionalities in the Linux Device Tree: Pin Multiplexing - Changing Pin Functionalities in the Linux Device Tree | Toradex Developer Center

If you follow this, you will understand how to create a Device Tree Overlay to change the default functionality of a pin and set it to GPIO functionality. I think this would be a good starting point for you. Please let me know if that helps :slight_smile:

1 Like

Dear @vmetodiev,

Have you been able to make some progress with the device tree customizations?

Hi @rudhi.tx,

Could you please provide me the most up-to-date guide that explains the process of obtaining the DT files on TorizonCore 6. When following this one, I end up with:

$ torizoncore-builder dt checkout
The TorizonCore Builder team is re-evaluating the device tree and device tree overlays workflow, and the dt checkout command is currently not supported on TorizonCore 6. Learn how to clone the device trees and overlays repositories on Device Tree Overlays on Torizon | Toradex Developer Center.

The actual section you want to be looking at is here: Device Tree Overlays on Torizon | Toradex Developer Center

Specifically look at the “INFO” block in this section of the article and start reading from there. In summary for TorizonCore 6 you need to manually git clone the related device tree sources rather than relying on dt checkout.

Best Regards,

Hi @jeremias.tx, @rudhi.tx,

I am still struggling with this…

My build file is the following ($ cat tcbuild.yaml | grep -v ‘#’):

       version: "6.1.0"
       release: quarterly
       machine: apalis-imx6
       distro: torizon-upstream-rt
       variant: torizon-core-docker
       build-number: "1"

        - linux/include/
      custom: linux/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts
          - device-trees/overlays/apalis-imx6_atmel-mxt_overlay.dtsi

    local: output_directory

And the output I get from the build tool is:

torizoncore-builder --verbose build
2023-05-19 11:43:03,226 - - INFO - Building image as per configuration file 'tcbuild.yaml'...
2023-05-19 11:43:03,226 - - DEBUG - Substitutions (enabled): {}
2023-05-19 11:43:03,307 - - WARNING - 
=> Parsing errors found:
2023-05-19 11:43:03,307 - - WARNING - tcbuild.yaml: {'easy-installer': {'toradex-feed': {'version': '6.1.0', 'release': 'quarterly', 'machine': 'apalis-imx6', 'distro': 'torizon-upstream-rt', 'variant': 'torizon-core-docker', 'build-number': '1'}}, 'customization': {'device-tree': {'include-dirs': ['linux/include/'], 'custom': 'linux/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts', 'overlays': {'add': ['device-trees/overlays/apalis-imx6_atmel-mxt_overlay.dtsi']}}}} is not valid under any of the given schemas, while parsing /input

The tcbuild.yaml file passes YAML validation without any errors. The paths of the additional files and directories are valid as well:

$ ls -lart linux/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts | awk '{ print $9 }'
ls -lart device-trees/overlays/apalis-imx6_atmel-mxt_overlay.dtsi | awk '{ print $9 }'
$ ls -lart linux/include/ | awk '{ print $9 }'


Any ideas what I am missing?

The issue is that you have the entire customization section indented by 2 spaces. This is suppose to be it’s own top-level property, but since you have it indented the parser is interpreting it as part of the input section which is incorrect.

Best Regards,

1 Like

Yes… my fault. Thank you, @jeremias.tx!

Glad I could help!

1 Like