QUESTION FOR CHATBOT - no assistance needed

This is my current overlay file,

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 */

/dts-v1/;
/plugin/;

/ {
    fragment@0 {
        target = <&iomuxc>;
        __overlay__ {
            pinctrl-0 = <&pinctrl_my_pins>;
        };
    };

	fragment@1 {
		target-path = "/soc/pin-controller@30330000";
		__overlay__ {
			pinctrl_my_pins: my_pins {
				fsl,pins = <
					MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20 0x1c0,  /* SODIMM_19 */
					MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x1c0,  /* SODIMM_21 */
					MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x1c0   /* SODIMM_256 */
				>;
			};
		};
	};

    /* Disable HDMI hot-plug detection for SODIMM_19 */
    fragment@2 {
        target = <&hdmi_connector>;
        __overlay__ {
            status = "disabled";
        };
    };

    /* Disable LVDS bridge control for SODIMM_21 */
    fragment@3 {
        target = <&lvds_ti_sn65dsi84>;
        __overlay__ {
            status = "disabled";
        };
    };

    /* Disable power management for SODIMM_256 */
    fragment@4 {
        target = <&reg_force_sleep_moci>;
        __overlay__ {
            status = "disabled";
        };
    };
};

but i am getting this error:

> Adding device-tree overlay 'device-trees/overlays/verdin-imx8mp_aevex-gpio-19-21-256-overlay.dts'
Error: device-trees/overlays/verdin-imx8mp_aevex-gpio-19-21-256-overlay.dts:22.21-22 syntax error
FATAL ERROR: Unable to parse input tree
error: cannot apply device-trees/overlays/verdin-imx8mp_aevex-gpio-19-21-256-overlay.dts.

when I remove fragment@1 and end up with this:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 */

/dts-v1/;
/plugin/;

/ {
    fragment@0 {
        target = <&iomuxc>;
        __overlay__ {
            pinctrl-0 = <&pinctrl_my_pins>;
        };
    };



    /* Disable HDMI hot-plug detection for SODIMM_19 */
    fragment@1 {
        target = <&hdmi_connector>;
        __overlay__ {
            status = "disabled";
        };
    };

    /* Disable LVDS bridge control for SODIMM_21 */
    fragment@2 {
        target = <&lvds_ti_sn65dsi84>;
        __overlay__ {
            status = "disabled";
        };
    };

    /* Disable power management for SODIMM_256 */
    fragment@3 {
        target = <&reg_force_sleep_moci>;
        __overlay__ {
            status = "disabled";
        };
    };
};

the device tree works. what is wrong about my syntax?
I am on imx8mp
and believe i am using linux\arch\arm64\boot\dts\freescale\imx8mp-verdin.dtsi

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


The error you’re encountering is likely due to a syntax issue in the fsl,pins property within fragment@1. Specifically, the way the pin configurations are written might be causing the Device Tree Compiler (DTC) to fail parsing the input tree.

Let’s take a closer look at the problematic section:

fragment@1 {
    target-path = "/soc/pin-controller@30330000";
    __overlay__ {
        pinctrl_my_pins: my_pins {
            fsl,pins = <
                MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20 0x1c0,  /* SODIMM_19 */
                MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x1c0,  /* SODIMM_21 */
                MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x1c0   /* SODIMM_256 */
            >;
        };
    };
};

The issue might be with the comma at the end of the second line within the fsl,pins property. In Device Tree syntax, the comma is not required and might be causing the syntax error.

Try removing the comma and see if it resolves the issue:

fragment@1 {
    target-path = "/soc/pin-controller@30330000";
    __overlay__ {
        pinctrl_my_pins: my_pins {
            fsl,pins = <
                MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20 0x1c0  /* SODIMM_19 */
                MX8MP_IOMUXC_SAI3_RXFS__GPIO4_IO28 0x1c0  /* SODIMM_21 */
                MX8MP_IOMUXC_SAI3_RXC__GPIO4_IO29 0x1c0   /* SODIMM_256 */
            >;
        };
    };
};

If the issue persists, ensure that the target-path and the node names are correct and match the actual paths and names in your base device tree files. Additionally, verify that the MX8MP_IOMUXC_* macros are correctly defined and available in your include files.

If you continue to face issues, please provide more details about the exact error message and the context in which you’re applying the overlay.

Please, also check if these links can help you solve your problem:

Device tree overlay builds, but the image won't boot back.

This is the rest of the output from the output. does this help you help me figure it out? it was not an issue with the comma’s

Building image as per configuration file 'tcbuild.yaml'...

=>> Handling input section
Unpacking Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision 292cc94fc27388437be86ed2913c127950423af507f68024443c018a2ff060d8 from local repository...
1048 metadata, 9451 content objects imported; 577.6 MB content written
0 metadata, 0 content objects imported; 0 bytes content written
Unpacked OSTree from Toradex Easy Installer image:
  Commit checksum: 292cc94fc27388437be86ed2913c127950423af507f68024443c018a2ff060d8
  TorizonCore Version: 6.8.0-devel-202408+build.25

=>> Handling customization section

=> Setting splash screen
splash screen merged to initramfs

=> Handling device-tree subsection

=> Selecting custom device-tree 'linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-dev.dts'
'imx8mp-verdin-nonwifi-dev.dts' compiles successfully.
warning: removing currently applied device tree overlays
Device tree imx8mp-verdin-nonwifi-dev.dtb successfully applied.

=> Adding device-tree overlay 'device-trees/overlays/verdin-imx8mp_aevex-gpio-19-21-256-overlay.dts'
Error: device-trees/overlays/verdin-imx8mp_aevex-gpio-19-21-256-overlay.dts:22.7-8 syntax error
FATAL ERROR: Unable to parse input tree
error: cannot apply device-trees/overlays/verdin-imx8mp_aevex-gpio-19-21-256-overlay.dts.

Pin declaration should be done like this:

pinctrl_ecspi1: ecspi1grp {
	fsl,pins =
		<MX8MP_IOMUXC_ECSPI1_MISO__ECSPI1_MISO		0x1c4>,	/* SODIMM 198 */
		<MX8MP_IOMUXC_ECSPI1_MOSI__ECSPI1_MOSI		0x4>,	/* SODIMM 200 */
		<MX8MP_IOMUXC_ECSPI1_SCLK__ECSPI1_SCLK		0x4>,	/* SODIMM 196 */
		<MX8MP_IOMUXC_ECSPI1_SS0__GPIO5_IO09		0x1c4>;	/* SODIMM 202 */
};

Or like this:

pinctrl_gpios_ext_yavia: gpiosextyaviagrp {
	fsl,pins = <
		MX8MP_IOMUXC_NAND_CE1_B__GPIO3_IO02	0x106	/* SODIMM 64 */
		MX8MP_IOMUXC_NAND_DQS__GPIO3_IO14  	0x106	/* SODIMM 66 */
	>;
};

please check for more examples:
https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi?h=toradex_6.6-2.0.x-imx#n952

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8mp-verdin-yavia.dtsi?h=toradex_6.6-2.0.x-imx#n210

Hi @kyle_wuz_here ,

Is your issue resolved? Is s,o please tick the Solution box
image

I am not sure because I am currently trying to determine if my Device tree is being deployed correctly or not.

I have custom device tree, which I am calling in the tcbuild.yaml as such

  device-tree:
    # >> Directories where to look for include files.
    include-dirs:
      - device-trees/include/
      - linux/include/
      - linux/arch/arm64/boot/dts/freescale/
    # >> Custom device tree source:
    custom: linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-dev-custom.dts

This file exists and looks like this:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2022 Toradex
 *  Changes to import the custom imx8mp-verdin-custom.dtsi file.
 */

/dts-v1/;

#include "imx8mp-verdin-custom.dtsi"
#include "imx8mp-verdin-nonwifi.dtsi"
#include "imx8mp-verdin-dev.dtsi"

/ {
	model = "Toradex Verdin iMX8M Plus on Verdin Development Board";
	compatible = "toradex,verdin-imx8mp-nonwifi-dev-custom",
		     "toradex,verdin-imx8mp-nonwifi",
		     "toradex,verdin-imx8mp",
		     "fsl,imx8mp";
};

BUT when I deploy it, by running these commands

rm -rf output_directory/
torizoncore-builder build
torizoncore-builder images unpack output_directory/
 torizoncore-builder deploy -**<remote information here>**

and I take a look at the sudo tdx-info -dt command, I see this:

Device tree enabled:      imx8mp-verdin-nonwifi-dev.dtb
Compatible string:        toradex,verdin-imx8mp-nonwifi-dev-customtoradex,verdin-imx8mp-nonwifitoradex,verdin-imx8mpfsl,imx8mp

So now I am purplexed… It says the Device tree that is enabled is the not custom one, but the compatible string being read showing that it is the same from my custom .dts file. I am unsure if the device tree is enabled or not, so I do not know if my modifications took or not.

Extra notes:

  1. I have also confirmed that the unpack command hash matches the hash from this command
sudo ostree admin status
  1. ./arch/arm64/boot/dts/freescale/imx8mp-verdin-nonwifi-dev-aevex.dtb exists already, as I have modified the Makefile then ran this:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs

So now I am purplexed… It says the Device tree that is enabled is the not custom one, but the compatible string being read showing that it is the same from my custom .dts file. I am unsure if the device tree is enabled or not, so I do not know if my modifications took or not.

I checked and the way tdx-info gets the device tree is by reading the U- boot environment variables. This would not reflect the way TorizonCore Builder modifies which device tree is enabled, since it does not touch the U-Boot environment. I would say then this is more tdx-info being wrong on this detail.

Considering the compatible string reflects your custom device tree and the OSTree hash matches as you said. I would say that your custom device tree is the one being enabled here. If you made obvious changes to the hardware configuration in your device tree then it should also be relatively easy to tell as well compared to our default device tree.

Best Regards,
Jeremias