mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
change(sdmmc): enable UHS-1 support in test_app, swap slots on P4 EV board
This commit is contained in:
parent
b8de3dfb35
commit
a03cbdba2e
@ -33,6 +33,7 @@ typedef struct {
|
||||
bool is_emmc; /*< True if this slot is connected to eMMC */
|
||||
int bus_width; /*< SD interface width (1, 4 or 8) */
|
||||
int max_freq_khz; /*< Max frequency (kHz) of SD interface, supported by the board */
|
||||
bool uhs1_supported; /*< Whether UHS-I mode is supported */
|
||||
gpio_num_t clk; /*< CLK pin number */
|
||||
gpio_num_t cmd_mosi; /*< CMD pin number (SD mode) or MOSI (SPI mode) */
|
||||
gpio_num_t d0_miso; /*< D0 pin number (SD mode) or MISO (SPI mode) */
|
||||
|
@ -34,6 +34,9 @@ void sdmmc_test_board_get_config_sdmmc(int slot_index, sdmmc_host_t *out_host_co
|
||||
if (slot->max_freq_khz > 0) {
|
||||
out_host_config->max_freq_khz = slot->max_freq_khz;
|
||||
}
|
||||
if (slot->uhs1_supported) {
|
||||
out_host_config->flags |= SDMMC_HOST_FLAG_UHS1;
|
||||
}
|
||||
|
||||
#if SOC_SDMMC_USE_GPIO_MATRIX
|
||||
out_slot_config->clk = slot->clk;
|
||||
|
@ -323,12 +323,10 @@ static const sdmmc_test_board_info_t s_board_info = {
|
||||
static const sdmmc_test_board_info_t s_board_info = {
|
||||
.name = "ESP32-P4 Function EV Board",
|
||||
.slot = {
|
||||
{
|
||||
.slot_exists = false
|
||||
},
|
||||
{
|
||||
.slot_exists = true,
|
||||
.bus_width = 4,
|
||||
.uhs1_supported = true,
|
||||
.clk = 43,
|
||||
.cmd_mosi = 44,
|
||||
.d0_miso = 39,
|
||||
@ -342,6 +340,9 @@ static const sdmmc_test_board_info_t s_board_info = {
|
||||
.cd = GPIO_NUM_NC,
|
||||
.wp = GPIO_NUM_NC,
|
||||
.unused_pin = 54,
|
||||
},
|
||||
{
|
||||
.slot_exists = false,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -58,6 +58,7 @@ void sdmmc_test_sd_begin(int slot, int width, int freq_khz, int ddr, sdmmc_card_
|
||||
}
|
||||
|
||||
config.max_freq_khz = freq_khz;
|
||||
bool slot_is_uhs1 = config.flags & SDMMC_HOST_FLAG_UHS1;
|
||||
|
||||
if (width == 1) {
|
||||
config.flags = SDMMC_HOST_FLAG_1BIT;
|
||||
@ -78,6 +79,10 @@ void sdmmc_test_sd_begin(int slot, int width, int freq_khz, int ddr, sdmmc_card_
|
||||
config.flags |= SDMMC_HOST_FLAG_DDR;
|
||||
}
|
||||
|
||||
if (slot_is_uhs1) {
|
||||
config.flags |= SDMMC_HOST_FLAG_UHS1;
|
||||
}
|
||||
|
||||
#if SOC_SDMMC_IO_POWER_EXTERNAL
|
||||
#define SDMMC_PWR_LDO_CHANNEL 4
|
||||
sd_pwr_ctrl_ldo_config_t ldo_config = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user