2023-08-22 07:17 AM
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 */
};
Could you help me to find what is wrong? We checked all the wiring and it is correct.
2023-09-04 05:57 AM
Hi @OPetr.2 ,
Can you please share the node spi5_pins_mx ?
Olivier
2023-09-05 06:35 AM
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>;
};
};