diff --git a/boards/espressif/esp_wrover_kit/esp_wrover_kit-pinctrl.dtsi b/boards/espressif/esp_wrover_kit/esp_wrover_kit-pinctrl.dtsi index 07ef6d2cda..aee93f0eb6 100644 --- a/boards/espressif/esp_wrover_kit/esp_wrover_kit-pinctrl.dtsi +++ b/boards/espressif/esp_wrover_kit/esp_wrover_kit-pinctrl.dtsi @@ -64,4 +64,11 @@ }; }; + sdhc0_default: sdhc0_default { + group1 { + pinmux = ; + bias-pull-up; + output-high; + }; + }; }; diff --git a/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.dts b/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.dts index 3709a13b47..ac0bacd604 100644 --- a/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.dts +++ b/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.dts @@ -25,6 +25,7 @@ uart-0 = &uart0; i2c-0 = &i2c0; watchdog0 = &wdt0; + sdhc0 = &sdhc1; }; chosen { @@ -34,6 +35,7 @@ zephyr,flash = &flash0; zephyr,code-partition = &slot0_partition; zephyr,display = &ili9341; + zephyr,sdhc = &sdhc1; }; leds { @@ -187,6 +189,30 @@ status = "okay"; }; +&sdhc { + sdhc1: sdhc@1 { + status = "okay"; + + pinctrl-0 = <&sdhc0_default>; + pinctrl-names = "default"; + power-delay-ms = <100>; + max-bus-freq = <52000000>; + bus-width = <4>; + + clk-pin = <14>; + cmd-pin = <15>; + d0-pin = <2>; + d1-pin = <4>; + d2-pin = <12>; + d3-pin = <13>; + + mmc { + compatible = "zephyr,sdmmc-disk"; + status = "okay"; + }; + }; +}; + &flash0 { status = "okay"; partitions { diff --git a/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.yaml b/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.yaml index 80c6a5d398..ecec50611c 100644 --- a/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.yaml +++ b/boards/espressif/esp_wrover_kit/esp_wrover_kit_procpu.yaml @@ -13,6 +13,7 @@ supported: - uart - nvs - pwm + - sdhc - spi - counter - entropy diff --git a/samples/subsys/fs/fs_sample/boards/esp_wrover_kit_procpu.conf b/samples/subsys/fs/fs_sample/boards/esp_wrover_kit_procpu.conf deleted file mode 100644 index 83ac43fc39..0000000000 --- a/samples/subsys/fs/fs_sample/boards/esp_wrover_kit_procpu.conf +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_SPI=y -CONFIG_DISK_DRIVER_SDMMC=y diff --git a/samples/subsys/fs/fs_sample/boards/esp_wrover_kit_procpu.overlay b/samples/subsys/fs/fs_sample/boards/esp_wrover_kit_procpu.overlay deleted file mode 100644 index 68cbe2013b..0000000000 --- a/samples/subsys/fs/fs_sample/boards/esp_wrover_kit_procpu.overlay +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -&pinctrl { - - spim2_default: spim2_default { - group1 { - pinmux = , - , - ; - }; - }; - -}; - -&spi2 { - status = "okay"; - pinctrl-0 = <&spim2_default>; - pinctrl-names = "default"; - cs-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - - sdhc0: sdhc@0 { - compatible = "zephyr,sdhc-spi-slot"; - reg = <0>; - status = "okay"; - spi-max-frequency = <400000>; - mmc { - compatible = "zephyr,sdmmc-disk"; - status = "okay"; - }; - }; -};