ERROR (duplicate_label)

Hi community, I want to customize the device tree, modifying the imx6ull-colibri-wifi-eval-v3.dtsi file.

I want to use SODIMM 19 and SODIMM 21 pins as GPIO, those pins are configured on uart5 node.

I customized the imx6ull-colibri-wifi-eval-v3.dtsi file like this:

// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
 * Copyright 2018 Toradex AG
 */

/dts-v1/;

#include "imx6ull-colibri-wifi.dtsi"
#include "imx6ull-colibri-eval-v3.dtsi"

/ {
        model = "Toradex Colibri iMX6ULL 512MB on Colibri Evaluation Board V3";
        compatible = "toradex,colibri-imx6ull-wifi-eval", "fsl,imx6ull";
};

&uart5{
        status = "disabled";
};


&iomuxc {
	imx6ull-colibri{

		pinctrl_gpio1: gpio1grp { 
			fsl,pins = <
				MX6UL_PAD_GPIO1_IO04__GPIO1_IO04        0x1b0b1  /* SODIMM 19 */
				MX6UL_PAD_GPIO1_IO05__GPIO1_IO05    	0x1b0b1 /* SODIMM 21 */
			>;
		};
	};
};

But when I compile, return the error:

** DTC arch/arm/boot/dts/imx6ull-colibri-wifi-eval-v3.dtb
arch/arm/boot/dts/imx6ull-colibri-wifi-eval-v3.dts:24.27-29.5: ERROR (duplicate_label): /soc/bus@2000000/pinctrl@20e0000/imx6ull-colibri/gpio1grp: Duplicate label ‘pinctrl_gpio1’ on /soc/bus@2000000/pinctrl@20e0000/imx6ull-colibri/gpio1grp and /soc/bus@2000000/pinctrl@20e0000/gpio1grp
ERROR: Input tree has errors, aborting (use -f to force output)
make[1]: *** [scripts/Makefile.lib:406: arch/arm/boot/dts/imx6ull-colibri-wifi-eval-v3.dtb] Error 2
make: *** [Makefile:1471: imx6ull-colibri-wifi-eval-v3.dtb] Error 2**

I understand that the label is duplicate but, How can I´ll make to modify these pines?

I was able to solve it by changing the name of the label.
But, is there another way to use the same label and overwrite it?

Hi @facundo.n.r !

I would recommend the same :slight_smile:
I think doing this is the easiest way.

IIRC, you could reuse/repurpose the label like this below. &pinctrl_gpio1 here is not inside any node. No node is its parent and it is a sibling of the / node.

/ {
...
};

&pinctrl_gpio1 { 
	fsl,pins = <
		MX6UL_PAD_GPIO1_IO04__GPIO1_IO04        0x1b0b1  /* SODIMM 19 */
		MX6UL_PAD_GPIO1_IO05__GPIO1_IO05    	0x1b0b1 /* SODIMM 21 */
	>;
};

(I didn’t try, but AFAIK, should work.)

BTW, instead of modifying, I think it is a better idea to create your own files and keep them in your own repository. Of course, you can (should :wink: ) start with the source from Toradex, but you copy them to your own repository with your own names :slight_smile:

Best regards,