iMX8MM: Disable SD/MMC interface (usdhc2) but cd-gpio is still there

Hello,

we made a custom carrier board with our own device tree (imx8mm-verdin-wifi-LP-11828-03.dts (5.6 KB), decompiled.txt (78.7 KB)) for a Verdin iMX8MM on BSP6.0.
Since we don’t use the SD/MMC interace (usdhc2: mmc@30b50000) I leave the node in ‘disabled’ state.

But when the system is started I get the following

$ gpioinfo 1
[...]
        line  12:  "SODIMM_84"         "cd"   input   active-low [used]
        line  13:  "SODIMM_78"       unused   input  active-high
        line  14:  "SODIMM_74"       unused   input  active-high
        line  15:  "SODIMM_80"       unused   input  active-high
        line  16:  "SODIMM_82"       unused   input  active-high
        line  17:  "SODIMM_70"       unused   input  active-high
        line  18:  "SODIMM_72"       unused   input  active-high

[...]

$ cat /proc/interrupts
[...]
115:   33145059          0          0          0  gpio-mxc  12 Edge      30b50000.mmc cd
[...]

Although the node usdhc2 is disabled, the gpio for card detection (imx8mm-verdin.dtsi, line 789) is still used as interrupt input.

I have no idea where this function is defined. How can I disable it?

Best regards,
Markus

I have successfully disabled the interrupt input by adding

&usdhc2 {
	/delete-property/ cd-gpios;
};

to my imx8mm-verdin-wifi-LP-11828-03.dts.

But it is still a mystery to me why the input is active at all, although the status “disabled” is set for the parent node &usdhc2.

Best regards,
Markus

Hi @Mowlwurf,

I looked into this.

As I understand adding something like this to your device tree did not work right?

&usdhc2 {
	status = "disabled";
};

Best Regards
Kevin

Hi @kevin.tx,

that is right.
The node usdhc2 (or mmc@30b50000) is already disabled in freescale/imx8mm.dtsi. Please see the decompiled device tree from the start post (link) at line 1724.

Best regards,
Markus