Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions boards/arduino/giga_r1/arduino_giga_r1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
aliases {
sdhc0 = &sdhc;
};

leds {
compatible = "gpio-leds";
red_led: led_0 {
Expand Down Expand Up @@ -42,3 +46,26 @@
&mailbox {
status = "okay";
};

sdhc: &sdmmc1 {
compatible = "st,stm32-sdio";
interrupts = <49 0>;
interrupt-names = "event";
pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9
&sdmmc1_d2_pc10 &sdmmc1_d3_pc11
&sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>;
pinctrl-names = "default";
sdhi-on-gpios = <&gpiob 10 GPIO_ACTIVE_HIGH>;
min-bus-freq = <DT_FREQ_K(400)>;
max-bus-freq = <DT_FREQ_M(208)>;
hw-flow-control;
bus-width = <4>;
status = "okay";

wifi: airoc-wifi {
status = "okay";
compatible = "infineon,airoc-wifi";
wifi-reg-on-gpios = <&gpiob 10 GPIO_ACTIVE_HIGH>;
wifi-host-wake-gpios = <&gpioi 8 GPIO_ACTIVE_HIGH>;
};
};
27 changes: 27 additions & 0 deletions boards/arduino/nicla_vision/arduino_nicla_vision.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
*/

/ {
aliases {
sdhc0 = &sdhc;
};

leds {
compatible = "gpio-leds";
red_led: led_0 {
Expand All @@ -31,3 +35,26 @@
&mailbox {
status = "okay";
};

sdhc: &sdmmc2 {
compatible = "st,stm32-sdio";
interrupts = <124 0>;
interrupt-names = "event";
pinctrl-0 = <&sdmmc2_d0_pb14 &sdmmc2_d1_pb15
&sdmmc2_d2_pg11 &sdmmc2_d3_pb4
&sdmmc2_ck_pd6 &sdmmc2_cmd_pd7>;
pinctrl-names = "default";
sdhi-on-gpios = <&gpiog 4 GPIO_ACTIVE_HIGH>;
min-bus-freq = <DT_FREQ_K(400)>;
max-bus-freq = <DT_FREQ_M(208)>;
hw-flow-control;
bus-width = <4>;
status = "okay";

wifi: airoc-wifi {
status = "okay";
compatible = "infineon,airoc-wifi";
wifi-reg-on-gpios = <&gpiog 4 GPIO_ACTIVE_HIGH>;
wifi-host-wake-gpios = <&gpiod 15 GPIO_ACTIVE_HIGH>;
};
};
24 changes: 24 additions & 0 deletions boards/arduino/portenta_h7/arduino_portenta_h7-common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
led0 = &red_led;
led1 = &green_led;
led2 = &blue_led;
sdhc0 = &sdhc;
};
};

Expand Down Expand Up @@ -239,6 +240,29 @@ zephyr_i2c: &i2c1 {
};
};

sdhc: &sdmmc1 {
compatible = "st,stm32-sdio";
pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9
&sdmmc1_d2_pc10 &sdmmc1_d3_pc11
&sdmmc1_ck_pc12 &sdmmc1_cmd_pd2>;
pinctrl-names = "default";
sdhi-on-gpios = <&gpioj 1 GPIO_ACTIVE_HIGH>;
interrupts = <49 0>;
interrupt-names = "event";
min-bus-freq = <DT_FREQ_K(400)>;
max-bus-freq = <DT_FREQ_M(208)>;
hw-flow-control;
bus-width = <4>;
status = "okay";

wifi: airoc-wifi {
status = "okay";
compatible = "infineon,airoc-wifi";
wifi-reg-on-gpios = <&gpioj 1 GPIO_ACTIVE_HIGH>;
wifi-host-wake-gpios = <&gpioj 5 GPIO_ACTIVE_HIGH>;
};
};

zephyr_udc0: &usbotg_hs {
pinctrl-0 = < &usb_otg_hs_ulpi_d0_pa3
&usb_otg_hs_ulpi_ck_pa5
Expand Down
1 change: 1 addition & 0 deletions drivers/sdhc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ zephyr_library_sources_ifdef(CONFIG_SDHC_RENESAS_RA sdhc_renesas_ra.c)
zephyr_library_sources_ifdef(CONFIG_SDHC_MAX32 sdhc_max32.c)
zephyr_library_sources_ifdef(CONFIG_SDHC_AMBIQ sdhc_ambiq.c)
zephyr_library_sources_ifdef(CONFIG_XLNX_SDHC xlnx_sdhc.c)
zephyr_library_sources_ifdef(CONFIG_SDHC_STM32_SDIO sdhc_stm32.c)
endif()
1 change: 1 addition & 0 deletions drivers/sdhc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ source "drivers/sdhc/Kconfig.renesas_ra"
source "drivers/sdhc/Kconfig.max32"
source "drivers/sdhc/Kconfig.ambiq"
source "drivers/sdhc/Kconfig.xlnx"
source "drivers/sdhc/Kconfig.stm32"

config SDHC_INIT_PRIORITY
int "SDHC driver init priority"
Expand Down
21 changes: 21 additions & 0 deletions drivers/sdhc/Kconfig.stm32
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2025 EXALT Technologies.
# SPDX-License-Identifier: Apache-2.0

config SDHC_STM32_SDIO
bool "STM32 SDMMC driver support for SDIO"
depends on DT_HAS_ST_STM32_SDIO_ENABLED
select USE_STM32_HAL_SDIO
select USE_STM32_LL_SDMMC
select SDHC_SUPPORTS_NATIVE_MODE
imply CACHE_MANAGEMENT if !SDHC_STM32_POLLING_SUPPORT && DCACHE
default y
help
Enable support for SDMMC on STM32 platforms for SDIO devices.

config SDHC_BUFFER_ALIGNMENT
default 32

config SDHC_STM32_POLLING_SUPPORT
bool "STM32 SDHC Polling driver support"
help
Enables support for SDHC Polling mode on STM32 microcontrollers.
Loading