I couldn't find any ready to be used GPIO pins on MCIMX6SX-SDB, so I decided to break out some pins from SD2 connector which I am not currently using. What changes to the device tree do I need to make in order to use SD2_CMD, SD2_CLK, SD2_DATA0, SD2_DATA1, SD2_DATA2, SD2_DATA3 as GPIO?
I have already removed these sections from imx6sx-sdb.dtsi:
&usdhc2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usdhc2>;
non-removable;
no-1-8-v;
keep-power-in-suspend;
wakeup-source;
status = "okay";
};
pinctrl_usdhc2: usdhc2grp {
fsl,pins = <
MX6SX_PAD_SD2_CMD__USDHC2_CMD 0x17059
MX6SX_PAD_SD2_CLK__USDHC2_CLK 0x10059
MX6SX_PAD_SD2_DATA0__USDHC2_DATA0 0x17059
MX6SX_PAD_SD2_DATA1__USDHC2_DATA1 0x17059
MX6SX_PAD_SD2_DATA2__USDHC2_DATA2 0x17059
MX6SX_PAD_SD2_DATA3__USDHC2_DATA3 0x17059
>;
};
I suppose now I need to add the definitions for the following pads:
- MX6SX_PAD_SD2_CMD__GPIO6_IO_7
- MX6SX_PAD_SD2_CLK__GPIO6_IO_6
- MX6SX_PAD_SD2_DATA0__GPIO6_IO_8
- MX6SX_PAD_SD2_DATA1__GPIO6_IO_9
- MX6SX_PAD_SD2_DATA2__GPIO6_IO_10
- MX6SX_PAD_SD2_DATA3__GPIO6_IO_11
But I'm not quite sure exactly how to do it. Could you please point me in the right direction?