cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get mmc2 to see any sd card

dkal
Associate III

I have an stm32mp153aab board with two sd card connections, they are identical except obviously one is connected to sdmmc1 pins and one to sdmmc2 pins.  I have checked schematics and pinmux and everything looks good.  sdmmc1 comes up in both uboot and linux.  sdmmc2 doesn't come up at all.  The card detect works but thats it.  The device tree is identical for the two sdmmcs other than the card detect gpios and I have tried different cards.  I'd appreciate any help on things to try.

 

Do you have to have it in the uboot device tree for it to work in linux?  And I have the mmc driven by hclk6 at the moment if that makes any difference.

2 REPLIES 2
dkal
Associate III

Ok it was a really dumb issue, the lock switch on the card adapter was on but now I have an issue where it will not continue booting from mmc1 if there is something in mmc2.

I get:  mmc0: error -95 whilst initializing SD card

and then

mmc0: Card stuck being busy!

If I take the second card out, it is all fine.   If I allow linux to boot and then put the card in, it will die as well.

dkal
Associate III

I am able to see the card in sdmmc2 in uboot and list/cat etc.  I'm thinking it has to be a device tree thing but nothing I am trying is helping

 

&sdmmc2 {

pinctrl-names = "default", "opendrain", "sleep";

pinctrl-0 = <&sdmmc2_pins_mx>;

pinctrl-1 = <&sdmmc2_opendrain_pins_mx>;

pinctrl-2 = <&sdmmc2_sleep_pins_mx>;

cd-gpios = <&gpioa 15 (GPIO_ACTIVE_LOW)>;

wp-gpios = <&gpioc 7 (GPIO_ACTIVE_HIGH)>;

bus-width = <4>;

vmmc-supply = <&vdd_sd>;

vqmmc-supply = <&sd_switch>;

st,sig-dir;

st,use-ckin;

st,neg-edge;

sd-uhs-sdr12;

sd-uhs-sdr25;

sd-uhs-sdr50;

sd-uhs-ddr50;

status = "okay";

};