AnsweredAssumed Answered

IMX6 dual GPIO Configuration

Question asked by mariyapradeep on Dec 1, 2016
Latest reply on Dec 5, 2016 by Biyong Sun

Hi,
I am using imx6 dual wandboard. I wanted to configure some pins as GPIO. I tested by using LEDS. By default in dts file 8 pins are configured as GPIO of which 2 pins MX6QDL_PAD_EIM_DA12__GPIO3_IO12 and MX6QDL_PAD_GPIO_18__GPIO7_IO13 are not getting configured properly. For the other 6 pins the leds blinks as I toggle using /sys/class/gpio, but on reading the value am getting some garbage values. With reference to this post: http://forums.wandboard.org/viewtopic.php?f=8&t=893 made some changes in imx6qdl.dtsi to the end.

 

&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <
&pinctrl_hog_1
&wes_gpios
>;

imx6qdl-wandboard {
wes_gpios: hoggrp-2 {
fsl,pins = <
MX6QDL_PAD_EIM_DA12__GPIO3_IO12 0x4001b0b0 /* GPIO3_12 EDM pin 255 */
MX6QDL_PAD_EIM_D27__GPIO3_IO27 0x4001b0b0 /* GPIO3_27 EDM pin 258 */
MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0x4001b0b0 /* GPIO6_31 EDM pin 260 */
MX6QDL_PAD_ENET_RX_ER__GPIO1_IO24 0x4001b0b0 /* GPIO1_24 EDM pin 262 */
MX6QDL_PAD_SD3_RST__GPIO7_IO08 0x4001b0b0 /* GPIO7_8 EDM pin 264 */
MX6QDL_PAD_EIM_D26__GPIO3_IO26 0x4001b0b0 /* GPIO3_26 EDM pin 259 */
MX6QDL_PAD_GPIO_18__GPIO7_IO13 0x4001b0b0 /* GPIO7_13 */
MX6QDL_PAD_GPIO_19__GPIO4_IO05 0x4001b0b0 /* GPIO4_5 EDM pin 263 */
>;
};
};
};

but still the 2 pins MX6QDL_PAD_EIM_DA12__GPIO3_IO12 and MX6QDL_PAD_GPIO_18__GPIO7_IO13 are not working as intended, I tried to access pin MX6QDL_PAD_EIM_DA12__GPIO3_IO12
via user space here is the log:

 

~# echo 76 > /sys/class/gpio/export
~# echo "out" > /sys/class/gpio/gpio76/direction
~# echo 1 > /sys/class/gpio/gpio76/value
~# cat /sys/class/gpio/gpio76/value
4096

 

I'm having similar issue with MX6QDL_PAD_GPIO_18__GPIO7_IO13 also. Can anyone tell me why this value is coming?
Is there anything more I need to do to get it configured as GPIO?

 

Thanks in advance

Outcomes