AnsweredAssumed Answered

Card Detect not working in Kernel 4.1.15

Question asked by Guillermo Moreno on Apr 21, 2016
Latest reply on Apr 24, 2016 by Guillermo Moreno

Hello,

I'm testing the new kernel and I can't get cd-gpios working, the same device tree works well with kernel 3.14.52

 

This is the relevant fragment of the DT:

 

Declared inside the pinhog:

 

+MX6QDL_PAD_GPIO_4__GPIO1_IO04    0x80000000 /* SD2 CD*/
+MX6QDL_PAD_EIM_D20__GPIO3_IO20  0x80000000 /* SD3 CD*/
+MX6QDL_PAD_EIM_D21__GPIO3_IO21  0x80000000 /* SD4 CD*/

 

+&usdhc3 {

+ pinctrl-names = "default", "state_100mhz", "state_200mhz";

+ pinctrl-0 = <&pinctrl_usdhc3>;

+ pinctrl-1 = <&pinctrl_usdhc3_100mhz>;

+ pinctrl-2 = <&pinctrl_usdhc3_200mhz>;

+ cd-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;

+ vmmc-supply = <&reg_sd3_vmmc>;

+ vqmmc-1-8-v = <1>;

+ bus-width = <4>;

+ keep-power-in-suspend;

+ enable-sdio-wakeup;

+ status = "okay";

+};

+

+&usdhc4 {

+ pinctrl-names = "default", "state_100mhz", "state_200mhz";

+ pinctrl-0 = <&pinctrl_usdhc4>;

+ pinctrl-1 = <&pinctrl_usdhc4_100mhz>;

+ pinctrl-2 = <&pinctrl_usdhc4_200mhz>;

+ cd-gpios = <&gpio3 21 GPIO_ACTIVE_LOW>;

+ vmmc-supply = <&reg_sd4_vmmc>;

+ vqmmc-1-8-v = <1>;

+ bus-width = <4>;

+ keep-power-in-suspend;

+ enable-sdio-wakeup;

+ status = "okay";

+};

 

The device tree compiles and if I use "broken-cd"  the card is mounted properly

Outcomes