Imx6q apalis output pin not working

Hi, I’m working with imx6q apalis board. I use more gpio (input output), most of these works, but there is one doesen’t (184. pin, GPIO1_10, SD2_CLK ).
-I tried with export from sys/class/gpio, and request the gpio from C-code.
-I write 1 to value (after set direction to out), i can read 1 but the pin always is low. With sys/kernel/debug/gpio i checked the pin config, it is output in high state, but the pin is low. From C-code same problem, i can write and read it but pin is always low.

Config in dtsi:
pinctrl_door_open: gpio_door_open {
fsl,pins = <MX6QDL_PAD_SD2_CLK__GPIO1_IO10 PAD_CTRL_NO /* Apalis GPIO1_10 */ >; };

All of other functions of this pin are disabled.

Thanks,
Bence

This is the config in dtsi:

pinctrl_door_open: gpio_door_open { fsl,pins = <MX6QDL_PAD_SD2_CLK__GPIO1_IO10		PAD_CTRL_NO	/* Apalis GPIO1_10	 */ >; };

The pin you are trying to use as GPIO is already pin multiplexed for the SD card interface on Apalis here and used here.

Is the concerned SD card interface disabled?

I disabled all SD interface. I can use it for input, but if I write out to direction the pin always 0.

I found an possible cause. In imx6 datasheet I found NVCC_GPIO and NVCC_SD2 power group. All of those gpio which connecting to NVCC_GPIO power is wokring fine, but which connecting to NVCC_SD2 don’t. (for expample GPIO1_IO09 (NVCC_GPIO) is working but GPIO1_IO10, GPIO1_IO11, GPIO1_IO12 (NVCC_SD2) )

Is it possible to NVCC_SD2 power group isn’t configured fine? If it is possible how can I confugere that?

Thanks
Bence

I tried using the GPIO1_IO10 as GPIO with the following changes on 3.14.52 kernel

diff --git a/arch/arm/boot/dts/imx6qdl-apalis-eval.dtsi b/arch/arm/boot/dts/imx6qdl-apalis-eval.dtsi
index 2ac2a9f..78b4833 100644
--- a/arch/arm/boot/dts/imx6qdl-apalis-eval.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis-eval.dtsi
@@ -305,7 +305,8 @@
        pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2
                     &pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4
                     &pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6
-                    &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8>;
+                    &pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8
+                    &pinctrl_apalis_gpio9>;
 };
 
 &lcd {
@@ -400,7 +401,7 @@
 
 /* SD1 */
 &usdhc2 {
-       status = "okay";
+       status = "disabled";
 };
 
 &vdac {
diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
index 7cd124f..73655ed 100644
--- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi
@@ -611,6 +611,12 @@
                                MX6QDL_PAD_GPIO_4__GPIO1_IO04           PAD_CTRL_HYS_PU /* Power Button */
                                >;
                };
+
+               pinctrl_apalis_gpio9: apalis_gpio9 {
+                       fsl,pins = <
+                               MX6QDL_PAD_SD2_CLK__GPIO1_IO10          PAD_CTRL_HYS_PU
+                       >;
+               };
        };
 
        hdmi {

With this change GPIO1_IO10 viz. MXM3_184 works properly with both as an input and output correctly. Can you share your exact changes to the kernel by providing the diff of the source tree?

Thanks!!!

It solved my problem ! In imx6qdl-apalis-eval.dtsi I didn’t put pinctrl_apalis_gpion line. It was the problem!

Thank you very much again!
Have a nice day

Bence