boards: esp32: SDHC support for esp_wrover_kit

Configuration files to enable SDHC in esp_wrover_kit

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
This commit is contained in:
Raffael Rostagno 2024-02-26 16:17:10 -03:00 committed by Carles Cufí
parent f4a6fd1f3f
commit 1dc2ca873d
5 changed files with 34 additions and 37 deletions

View file

@ -64,4 +64,11 @@
}; };
}; };
sdhc0_default: sdhc0_default {
group1 {
pinmux = <SDHC0_CD_GPIO21>;
bias-pull-up;
output-high;
};
};
}; };

View file

@ -25,6 +25,7 @@
uart-0 = &uart0; uart-0 = &uart0;
i2c-0 = &i2c0; i2c-0 = &i2c0;
watchdog0 = &wdt0; watchdog0 = &wdt0;
sdhc0 = &sdhc1;
}; };
chosen { chosen {
@ -34,6 +35,7 @@
zephyr,flash = &flash0; zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition; zephyr,code-partition = &slot0_partition;
zephyr,display = &ili9341; zephyr,display = &ili9341;
zephyr,sdhc = &sdhc1;
}; };
leds { leds {
@ -187,6 +189,30 @@
status = "okay"; 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 { &flash0 {
status = "okay"; status = "okay";
partitions { partitions {

View file

@ -13,6 +13,7 @@ supported:
- uart - uart
- nvs - nvs
- pwm - pwm
- sdhc
- spi - spi
- counter - counter
- entropy - entropy

View file

@ -1,2 +0,0 @@
CONFIG_SPI=y
CONFIG_DISK_DRIVER_SDMMC=y

View file

@ -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 = <SPIM2_MISO_GPIO2>,
<SPIM2_MOSI_GPIO15>,
<SPIM2_SCLK_GPIO14>;
};
};
};
&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";
};
};
};