Skip to content

Commit 10cf245

Browse files
ydamigosnashif
authored andcommitted
boards/arm/olimexino_stm32: Add SDHC support
Add SDHC support over SPI2 port. Signed-off-by: Yannis Damigos <[email protected]>
1 parent 6c1af0e commit 10cf245

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

boards/arm/olimexino_stm32/dts_fixup.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* are modified to handle the generated information, or the mapping of
44
* generated data matches the driver definitions.
55
*/
6-
#define DT_USB_DC_STM32_DISCONN_GPIO_PORT_NAME DT_ST_STM32_USB_40005C00_DISCONNECT_GPIOS_CONTROLLER
6+
#define DT_USB_DC_STM32_DISCONN_GPIO_PORT_NAME DT_ST_STM32_USB_40005C00_DISCONNECT_GPIOS_CONTROLLER
77
#define DT_USB_DC_STM32_DISCONN_PIN DT_ST_STM32_USB_40005C00_DISCONNECT_GPIOS_PIN
88
#define DT_USB_DC_STM32_DISCONN_PIN_LEVEL DT_ST_STM32_USB_40005C00_DISCONNECT_GPIOS_FLAGS
9+
10+
#define DT_DISK_SDHC0_BUS_ADDRESS DT_ST_STM32_SPI_40003800_ZEPHYR_MMC_SPI_SLOT_0_BASE_ADDRESS
11+
#define DT_DISK_SDHC0_BUS_NAME DT_ST_STM32_SPI_40003800_ZEPHYR_MMC_SPI_SLOT_0_BUS_NAME
12+
#define DT_DISK_SDHC0_CS_GPIOS_CONTROLLER DT_ST_STM32_SPI_40003800_CS_GPIOS_CONTROLLER
13+
#define DT_DISK_SDHC0_CS_GPIOS_PIN DT_ST_STM32_SPI_40003800_CS_GPIOS_PIN

boards/arm/olimexino_stm32/olimexino_stm32.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ uext_serial: &usart1 {};
7878

7979
&spi2 {
8080
status = "ok";
81+
cs-gpios = <&gpiod 2 0>;
82+
83+
sdhc0: sdhc@0 {
84+
compatible = "zephyr,mmc-spi-slot";
85+
reg = <0>;
86+
status = "ok";
87+
label = "SDHC0";
88+
spi-max-frequency = <24000000>;
89+
};
8190
};
8291

8392
&usb {

0 commit comments

Comments
 (0)