Verdin iMX8M Mini Unable to parse input tree

Hi,

I’m experiencing a syntax error every time I try to add my custom device tree to my image.

| DTC arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dahlia.dtb
| Error: /home/ruben/oe-core/build/tmp/work-shared/verdin-imx8mm/kernel-source/arch/arm64/boot/dts/freescale/imx8mm.dtsi:16.1-2 syntax error
| FATAL ERROR: Unable to parse input tree
| make[2]: *** [scripts/Makefile.lib:285: arch/arm64/boot/dts/freescale/imx8mm-verdin-wifi-dahlia.dtb] Error 1
| make[1]: *** [/home/ruben/oe-core/build/tmp/work-shared/verdin-imx8mm/kernel-source/Makefile:1270: freescale/imx8mm-verdin-wifi-dahlia.dtb] Error 2
| make: *** [/home/ruben/oe-core/build/tmp/work-shared/verdin-imx8mm/kernel-source/Makefile:179: sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of ‘/home/ruben/oe-core/build/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/5.4.161+gitAUTOINC+7cb929ebe2-r0/temp/run.do_compile.765982’ failed with exit code 1

This is my log output and my device tree is

// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*

  • Copyright 2020-2021 Toradex
    */

#include “imx8mm-verdin.dtsi”
#include “imx8mm-verdin-wifi.dtsi”
#include “imx8mm-verdin-dahlia.dtsi”

/ {
model = “Toradex Verdin iMX8M Mini WB on Dahlia Board”;
compatible = “toradex,verdin-imx8mm-wifi-dahlia”,
“toradex,verdin-imx8mm-wifi”,
“toradex,verdin-imx8mm”,
“fsl,imx8mm”;

};

&uart2 { /* console */
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_uart2>;
status = “okay”;
};

&uart3 {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MM_CLK_UART3>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
/*
fsl,uart-has-rtscts;
*/
status = “okay”;
};

Why I keep getting the syntax error, can anyone help me? Thank you!

Regards,
Ruben

Greetings @rubencz,

It’s not clear from what you provided what the issue is. Have you tried compiling your device tree standalone outside of OE/Yocto?

Also what changes did you make to the device tree? Have you tried reverting your changes one by one until you found the change that causes the error?

For the future if you share code could you please share the source file itself. Or at least format the code so it’s easier to read here on the community.

Best Regards,
Jeremias

No I didn’t compile it outside of the OE/Yocto.

So, we used to use a iMX8M Mini Evaluation kit from NXP and now we are migrating everything to the Verdin iMX8M Mini, so I wanted to do all the changes that we did on the imx8mm-evk.dts to the imx8mm-verdin-wifi-dahlia.dts . Going change one by one I get errors when I try to apply any display ( TM050JVHC09 - Capacitive Touch Controller 720(RGB) x1680) changes, like:

&i2c2 {
	clock-frequency = <400000>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_i2c2>;
	status = "okay";

	touch@41 {
		compatible = "tchip,ilitek";
		reg = <0x41>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c2_synaptics_dsx_io>;
		interrupt-parent = <&gpio1>;
		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
		touch,irq-gpio = <&gpio1 9 0x02>;
		touch,reset-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
	};
};

I tried to apply the patch directly to the imx8mm-verdin.dtsi file
0001-add-custom-display.patch (1.4 KB)
imx8mm-verdin.dtsi (33.8 KB)
imx8mm-verdin.dtsi.orig (33.3 KB)

this is our current .dts used on the iMX8M Mini evk from NXP:
imx8mm-evk.dts (28.8 KB)

Ok and you get a syntax error when you try to compile this? If you compile this standalone does it point to any specific line as the issue?

Looking at your modified imx8mm-verdin.dtsi. One thing I notice is that the pinctrl group for your capacitive touch, pinctrl_i2c2_synaptics_dsx_io. Did you define this anywhere? I don’t see it amongst all the other pinctrl nodes.

Best Regards,
Jeremias

Hi Jeremias,

I didn’t define it anymore, my mistake! After I changed the pinctrl_i2c2_synaptics_dsx_io to pinctrl_gpio8 I was able to compile the device tree. Thank you so much, I have two last question:

  • With this edit on the dtsi file, the changes are going to work on the Verdin dev board? Or I need to create a .dts file?

Glad I could help, also glad that was the only issue with the device tree it seems.

As for your question, this change you’re making should affect the verdin dev board device tree. You’re changing the imx8mm-verdin.dtsi file which is a dtsi file. Meaning this gets included in other device tree files. If you follow the chain of includes in the source code you’ll see this gets included in the device tree for the dev board and our dahlia board.

Best Regards,
Jeremias

1 Like