Hello
I really helpful tool that could help you modifying the dtb, is the i.mx pinmux tool.
This tool can throw you the .dts file only by selecting the pin that you are willing to use.
For example, configuring the PIN E18 of the i.MX6SX as GPIO2_IO16, throws you this C code configuration.
/dts-v1/;
#include "skeleton.dtsi"
#include "imx6sx-pinfunc.h"
/ {
model = "Freescale i.MX 6SoloX User Board";
compatible = "fsl,imx6sx-board", "fsl,imx6sx";
soc {
#address-cells = <1>;
#size-cells = <1>;
iomuxc: iomuxc@020e0000 {
compatible = "fsl,imx6sx-iomuxc";
reg = <0x020e0000 0x4000>;
};
};
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&BOARD_InitPins>;
imx6sx-board {
BOARD_InitPins: BOARD_InitPinsgrp {
fsl,pins = <
MX6SX_PAD_KEY_ROW1__GPIO2_IO_16 0x000010B0
>;
};
};
};
Hope this can solve your problem.
Best regards,
Diego.