cancel
Showing results for 
Search instead for 
Did you mean: 

mmc-spi error on STM32MP135-DK

OPetr.2
Associate II

We are using STM32MP135-DK and we connect to SPI5 an SD Card Adapter.

We modified the device tree as follows to use the mmc-spi-slot driver:

 

&spi5{
    pinctrl-names = "default", "sleep";
    pinctrl-0 = <&spi5_pins_mx>;
    pinctrl-1 = <&spi5_sleep_pins_mx>;
    status = "okay";

    /* USER CODE BEGIN spi5 */
     spisdcard@0 {
        compatible = "mmc-spi-slot";
        reg = <0>;
        gpios = <&gpiog 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
        voltage-ranges = <3300 3300>;
        spi-max-frequency = <2400000>;
        status = "okay";
        disable-wp;
      };
    /* USER CODE END spi5 */
};

 
but we get this error on startup:
 
OPetr2_0-1692712733832.png

Could you help me to find what is wrong? We checked all the wiring and it is correct.

 
 

 

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @OPetr.2 ,

 

Can you please share the node spi5_pins_mx ? 

Olivier 

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Olivier GALLIEN,  the spi5_pins_mx node in device tree is as follow:

   spi5_pins_mx: spi5_mx-0 {
        pins {
            pinmux = <STM32_PINMUX('A', 8, AF5)>, /* SPI5_MISO */
<STM32_PINMUX('H', 3, AF5)>, /* SPI5_MOSI */
<STM32_PINMUX('H', 7, AF6)>, /* SPI5_SCK */
<STM32_PINMUX('H', 11, AF1)>; /* SPI5_NSS */
            bias-disable;
            drive-push-pull;
            slew-rate = <2>;
        };
    };