diff --git a/components/esp_driver_sdio/CMakeLists.txt b/components/esp_driver_sdio/CMakeLists.txt index 2aff8668ce..4220961411 100644 --- a/components/esp_driver_sdio/CMakeLists.txt +++ b/components/esp_driver_sdio/CMakeLists.txt @@ -17,5 +17,6 @@ endif() idf_component_register(SRCS ${srcs} INCLUDE_DIRS ${public_include} + REQUIRES esp_hal_sd PRIV_REQUIRES "${priv_requires}" ) diff --git a/components/esp_driver_sdio/src/sdio_slave.c b/components/esp_driver_sdio/src/sdio_slave.c index cf55e7aef9..1418bb2c2e 100644 --- a/components/esp_driver_sdio/src/sdio_slave.c +++ b/components/esp_driver_sdio/src/sdio_slave.c @@ -79,7 +79,7 @@ The driver of FIFOs works as below: #include "soc/soc_memory_layout.h" #include "soc/soc_caps.h" -#include "soc/sdio_slave_periph.h" +#include "hal/sdio_slave_periph.h" #include "esp_cpu.h" #include "esp_intr_alloc.h" #include "esp_log.h" diff --git a/components/esp_driver_sdmmc/CMakeLists.txt b/components/esp_driver_sdmmc/CMakeLists.txt index 31fdbf3710..ac60845eba 100644 --- a/components/esp_driver_sdmmc/CMakeLists.txt +++ b/components/esp_driver_sdmmc/CMakeLists.txt @@ -17,7 +17,7 @@ if(${target} STREQUAL "linux") set(priv_requires esp_timer) else() set(requires esp_driver_sd_intf sdmmc) - set(priv_requires esp_timer esp_pm esp_mm esp_driver_gpio) + set(priv_requires esp_timer esp_pm esp_mm esp_driver_gpio esp_hal_sd) endif() idf_component_register(SRCS ${srcs} diff --git a/components/esp_driver_sdmmc/legacy/src/sdmmc_internal.h b/components/esp_driver_sdmmc/legacy/src/sdmmc_internal.h index 1e5d380130..83a5cf31a8 100644 --- a/components/esp_driver_sdmmc/legacy/src/sdmmc_internal.h +++ b/components/esp_driver_sdmmc/legacy/src/sdmmc_internal.h @@ -11,7 +11,7 @@ #include "esp_err.h" #include "freertos/FreeRTOS.h" #include "freertos/queue.h" -#include "soc/sdmmc_periph.h" +#include "hal/sdmmc_periph.h" #include "esp_private/sd_host_private.h" esp_err_t sdmmc_host_reset(void); diff --git a/components/esp_driver_sdmmc/src/sd_host_sdmmc.c b/components/esp_driver_sdmmc/src/sd_host_sdmmc.c index 7c8ac279ce..84860d080e 100644 --- a/components/esp_driver_sdmmc/src/sd_host_sdmmc.c +++ b/components/esp_driver_sdmmc/src/sd_host_sdmmc.c @@ -16,7 +16,7 @@ #include "esp_memory_utils.h" #include "soc/chip_revision.h" #include "soc/sdmmc_pins.h" -#include "soc/sdmmc_periph.h" +#include "hal/sdmmc_periph.h" #include "soc/soc_caps.h" #include "hal/efuse_hal.h" #include "hal/sd_types.h" diff --git a/components/esp_hal_sd/CMakeLists.txt b/components/esp_hal_sd/CMakeLists.txt new file mode 100644 index 0000000000..75ef30707d --- /dev/null +++ b/components/esp_hal_sd/CMakeLists.txt @@ -0,0 +1,25 @@ +idf_build_get_property(target IDF_TARGET) +if(${target} STREQUAL "linux") + return() # This component is not supported by the POSIX/Linux simulator +endif() + +set(srcs) +set(public_include "include") + +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include") + list(APPEND public_include "${target}/include") +endif() + +if(CONFIG_SOC_SDMMC_HOST_SUPPORTED) + list(APPEND srcs "sdmmc_hal.c") + list(APPEND srcs "${target}/sdmmc_periph.c") +endif() + +if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED) + list(APPEND srcs "sdio_slave_hal.c") + list(APPEND srcs "${target}/sdio_slave_periph.c") +endif() + +idf_component_register(SRCS ${srcs} + INCLUDE_DIRS ${public_include} + REQUIRES soc hal) diff --git a/components/esp_hal_sd/README.md b/components/esp_hal_sd/README.md new file mode 100644 index 0000000000..83f5fc5c5d --- /dev/null +++ b/components/esp_hal_sd/README.md @@ -0,0 +1,13 @@ +# `esp_hal_sd` + +⚠️ This HAL component is still under heavy development at the moment, so we don't guarantee the stability and backward-compatibility among versions. + +The `esp_hal_sd` component provides a **Hardware Abstraction Layer** for +- SDMMC Host Controller +- SDIO Slave Controller + +for all targets supported by ESP-IDF. + +In a broad sense, the HAL layer consists of two sub-layers: HAL (upper) and Low-Level(bottom). The HAL layer defines the steps and data that is required to operate a peripheral (e.g. initialization, parameter settings). The low-level is a translation layer above the register files under the `soc` component, it only covers general conceptions to register configurations. + +The functions in this file mainly provide hardware abstraction for IDF peripheral drivers. For advanced developers, the HAL layer functions can also be directly used to assist in implementing their own drivers. However, it needs to be mentioned again that the interfaces here do not guarantee stability. diff --git a/components/hal/esp32/include/hal/sdio_slave_ll.h b/components/esp_hal_sd/esp32/include/hal/sdio_slave_ll.h similarity index 100% rename from components/hal/esp32/include/hal/sdio_slave_ll.h rename to components/esp_hal_sd/esp32/include/hal/sdio_slave_ll.h diff --git a/components/hal/esp32/include/hal/sdmmc_ll.h b/components/esp_hal_sd/esp32/include/hal/sdmmc_ll.h similarity index 99% rename from components/hal/esp32/include/hal/sdmmc_ll.h rename to components/esp_hal_sd/esp32/include/hal/sdmmc_ll.h index 46ca405084..1d58d4db5e 100644 --- a/components/hal/esp32/include/hal/sdmmc_ll.h +++ b/components/esp_hal_sd/esp32/include/hal/sdmmc_ll.h @@ -94,7 +94,6 @@ typedef enum { SDMMC_LL_DELAY_PHASE_3, } sdmmc_ll_delay_phase_t; - /*--------------------------------------------------------------- Clock & Reset ---------------------------------------------------------------*/ @@ -442,11 +441,11 @@ static inline void sdmmc_ll_enable_ddr_mode(sdmmc_dev_t *hw, uint32_t slot, bool { uint32_t ddr_reg_val = HAL_FORCE_READ_U32_REG_FIELD(hw->uhs, ddr); if (en) { - ddr_reg_val|= BIT(slot); + ddr_reg_val |= BIT(slot); HAL_FORCE_MODIFY_U32_REG_FIELD(hw->uhs, ddr, ddr_reg_val); hw->emmc_ddr_reg |= BIT(slot); } else { - ddr_reg_val&= ~BIT(slot); + ddr_reg_val &= ~BIT(slot); HAL_FORCE_MODIFY_U32_REG_FIELD(hw->uhs, ddr, ddr_reg_val); hw->emmc_ddr_reg &= ~BIT(slot); } diff --git a/components/soc/esp32/include/soc/sdio_slave_pins.h b/components/esp_hal_sd/esp32/include/soc/sdio_slave_pins.h similarity index 94% rename from components/soc/esp32/include/soc/sdio_slave_pins.h rename to components/esp_hal_sd/esp32/include/soc/sdio_slave_pins.h index 55fdd887bb..a0631867eb 100644 --- a/components/soc/esp32/include/soc/sdio_slave_pins.h +++ b/components/esp_hal_sd/esp32/include/soc/sdio_slave_pins.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/components/soc/esp32/include/soc/sdmmc_pins.h b/components/esp_hal_sd/esp32/include/soc/sdmmc_pins.h similarity index 51% rename from components/soc/esp32/include/soc/sdmmc_pins.h rename to components/esp_hal_sd/esp32/include/soc/sdmmc_pins.h index d1959e3e52..478ea79ead 100644 --- a/components/soc/esp32/include/soc/sdmmc_pins.h +++ b/components/esp_hal_sd/esp32/include/soc/sdmmc_pins.h @@ -1,19 +1,10 @@ -// Copyright 2015-2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +/* + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef _SOC_SDMMC_PINS_H_ -#define _SOC_SDMMC_PINS_H_ +#pragma once #define SDMMC_SLOT0_IOMUX_PIN_NUM_CLK 6 #define SDMMC_SLOT0_IOMUX_PIN_NUM_CMD 11 @@ -34,5 +25,3 @@ #define SDMMC_SLOT1_IOMUX_PIN_NUM_D2 12 #define SDMMC_SLOT1_IOMUX_PIN_NUM_D3 13 #define SDMMC_SLOT1_FUNC 4 - -#endif /* _SOC_SDMMC_PINS_H_ */ diff --git a/components/soc/esp32/sdio_slave_periph.c b/components/esp_hal_sd/esp32/sdio_slave_periph.c similarity index 91% rename from components/soc/esp32/sdio_slave_periph.c rename to components/esp_hal_sd/esp32/sdio_slave_periph.c index 1e9fe450d0..5ea98b61af 100644 --- a/components/soc/esp32/sdio_slave_periph.c +++ b/components/esp_hal_sd/esp32/sdio_slave_periph.c @@ -1,11 +1,11 @@ /* * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #include -#include "soc/sdio_slave_periph.h" +#include "hal/sdio_slave_periph.h" #include "soc/sdio_slave_pins.h" /** diff --git a/components/soc/esp32/sdmmc_periph.c b/components/esp_hal_sd/esp32/sdmmc_periph.c similarity index 92% rename from components/soc/esp32/sdmmc_periph.c rename to components/esp_hal_sd/esp32/sdmmc_periph.c index d236fc40af..4ef8cc08e0 100644 --- a/components/soc/esp32/sdmmc_periph.c +++ b/components/esp_hal_sd/esp32/sdmmc_periph.c @@ -1,10 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/sdmmc_periph.h" +#include "hal/sdmmc_periph.h" #include "soc/sdmmc_pins.h" const sdmmc_slot_info_t sdmmc_slot_info[SOC_SDMMC_NUM_SLOTS] = { diff --git a/components/hal/esp32c5/include/hal/sdio_slave_ll.h b/components/esp_hal_sd/esp32c5/include/hal/sdio_slave_ll.h similarity index 100% rename from components/hal/esp32c5/include/hal/sdio_slave_ll.h rename to components/esp_hal_sd/esp32c5/include/hal/sdio_slave_ll.h diff --git a/components/soc/esp32c5/include/soc/sdio_slave_pins.h b/components/esp_hal_sd/esp32c5/include/soc/sdio_slave_pins.h similarity index 90% rename from components/soc/esp32c5/include/soc/sdio_slave_pins.h rename to components/esp_hal_sd/esp32c5/include/soc/sdio_slave_pins.h index f0fb51afbe..bef7baa967 100644 --- a/components/soc/esp32c5/include/soc/sdio_slave_pins.h +++ b/components/esp_hal_sd/esp32c5/include/soc/sdio_slave_pins.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/components/soc/esp32c61/sdio_slave_periph.c b/components/esp_hal_sd/esp32c5/sdio_slave_periph.c similarity index 87% rename from components/soc/esp32c61/sdio_slave_periph.c rename to components/esp_hal_sd/esp32c5/sdio_slave_periph.c index 790a326611..d537d54a9b 100644 --- a/components/soc/esp32c61/sdio_slave_periph.c +++ b/components/esp_hal_sd/esp32c5/sdio_slave_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #include -#include "soc/sdio_slave_periph.h" +#include "hal/sdio_slave_periph.h" #include "soc/sdio_slave_pins.h" const sdio_slave_slot_info_t sdio_slave_slot_info[1] = { diff --git a/components/hal/esp32c6/include/hal/sdio_slave_ll.h b/components/esp_hal_sd/esp32c6/include/hal/sdio_slave_ll.h similarity index 100% rename from components/hal/esp32c6/include/hal/sdio_slave_ll.h rename to components/esp_hal_sd/esp32c6/include/hal/sdio_slave_ll.h diff --git a/components/soc/esp32c6/include/soc/sdio_slave_pins.h b/components/esp_hal_sd/esp32c6/include/soc/sdio_slave_pins.h similarity index 90% rename from components/soc/esp32c6/include/soc/sdio_slave_pins.h rename to components/esp_hal_sd/esp32c6/include/soc/sdio_slave_pins.h index a98b163842..2e3cc8ff2b 100644 --- a/components/soc/esp32c6/include/soc/sdio_slave_pins.h +++ b/components/esp_hal_sd/esp32c6/include/soc/sdio_slave_pins.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/components/soc/esp32c6/sdio_slave_periph.c b/components/esp_hal_sd/esp32c6/sdio_slave_periph.c similarity index 87% rename from components/soc/esp32c6/sdio_slave_periph.c rename to components/esp_hal_sd/esp32c6/sdio_slave_periph.c index bfb0556f69..76a378f55a 100644 --- a/components/soc/esp32c6/sdio_slave_periph.c +++ b/components/esp_hal_sd/esp32c6/sdio_slave_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #include -#include "soc/sdio_slave_periph.h" +#include "hal/sdio_slave_periph.h" #include "soc/sdio_slave_pins.h" const sdio_slave_slot_info_t sdio_slave_slot_info[1] = { diff --git a/components/hal/esp32c61/include/hal/sdio_slave_ll.h b/components/esp_hal_sd/esp32c61/include/hal/sdio_slave_ll.h similarity index 99% rename from components/hal/esp32c61/include/hal/sdio_slave_ll.h rename to components/esp_hal_sd/esp32c61/include/hal/sdio_slave_ll.h index f11023260b..f3d045f1e1 100644 --- a/components/hal/esp32c61/include/hal/sdio_slave_ll.h +++ b/components/esp_hal_sd/esp32c61/include/hal/sdio_slave_ll.h @@ -40,7 +40,6 @@ extern "C" { /// Get the mask of the interrupt status. #define sdio_slave_ll_intr_status_mask (0xff | SDIO_SLC0_RX_DONE_INT_ST | SDIO_SLC0_RX_EOF_INT_ST | SDIO_SLC0_TX_DONE_INT_ST) - /* * SLC2 DMA Desc struct, aka sdio_slave_ll_desc_t * diff --git a/components/soc/esp32c61/include/soc/sdio_slave_pins.h b/components/esp_hal_sd/esp32c61/include/soc/sdio_slave_pins.h similarity index 90% rename from components/soc/esp32c61/include/soc/sdio_slave_pins.h rename to components/esp_hal_sd/esp32c61/include/soc/sdio_slave_pins.h index 330e246950..d177e91355 100644 --- a/components/soc/esp32c61/include/soc/sdio_slave_pins.h +++ b/components/esp_hal_sd/esp32c61/include/soc/sdio_slave_pins.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/components/soc/esp32c5/sdio_slave_periph.c b/components/esp_hal_sd/esp32c61/sdio_slave_periph.c similarity index 87% rename from components/soc/esp32c5/sdio_slave_periph.c rename to components/esp_hal_sd/esp32c61/sdio_slave_periph.c index 790a326611..d537d54a9b 100644 --- a/components/soc/esp32c5/sdio_slave_periph.c +++ b/components/esp_hal_sd/esp32c61/sdio_slave_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #include -#include "soc/sdio_slave_periph.h" +#include "hal/sdio_slave_periph.h" #include "soc/sdio_slave_pins.h" const sdio_slave_slot_info_t sdio_slave_slot_info[1] = { diff --git a/components/hal/esp32p4/include/hal/sdmmc_ll.h b/components/esp_hal_sd/esp32p4/include/hal/sdmmc_ll.h similarity index 97% rename from components/hal/esp32p4/include/hal/sdmmc_ll.h rename to components/esp_hal_sd/esp32p4/include/hal/sdmmc_ll.h index d1881617d8..009a514124 100644 --- a/components/hal/esp32p4/include/hal/sdmmc_ll.h +++ b/components/esp_hal_sd/esp32p4/include/hal/sdmmc_ll.h @@ -26,7 +26,6 @@ #include "soc/lp_clkrst_struct.h" #include "soc/pmu_reg.h" - #ifdef __cplusplus extern "C" { #endif @@ -286,8 +285,8 @@ static inline uint32_t sdmmc_ll_get_clock_div(sdmmc_dev_t *hw) { uint32_t div = 0; if (HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_clk_edge_h == 0 && - HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_clk_edge_n == 0 && - HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_clk_edge_l == 0) { + HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_clk_edge_n == 0 && + HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_clk_edge_l == 0) { div = 1; } else { div = HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_clk_edge_l + 1; @@ -333,18 +332,18 @@ static inline void sdmmc_ll_set_din_delay_phase(sdmmc_dev_t *hw, sdmmc_ll_delay_ { if (mode == SDMMC_LL_SPEED_MODE_LS) { switch (phase) { - case SDMMC_LL_DELAY_PHASE_1: - HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x1; - break; - case SDMMC_LL_DELAY_PHASE_2: - HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x2; - break; - case SDMMC_LL_DELAY_PHASE_3: - HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x3; - break; - default: - HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x0; - break; + case SDMMC_LL_DELAY_PHASE_1: + HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x1; + break; + case SDMMC_LL_DELAY_PHASE_2: + HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x2; + break; + case SDMMC_LL_DELAY_PHASE_3: + HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x3; + break; + default: + HP_SYS_CLKRST.peri_clk_ctrl02.reg_sdio_ls_sam_clk_edge_sel = 0x0; + break; } } else { SDMMC.dll_clk_conf.dll_cclk_in_sam_phase = (phase << 3); diff --git a/components/soc/esp32p4/include/soc/sdmmc_pins.h b/components/esp_hal_sd/esp32p4/include/soc/sdmmc_pins.h similarity index 81% rename from components/soc/esp32p4/include/soc/sdmmc_pins.h rename to components/esp_hal_sd/esp32p4/include/soc/sdmmc_pins.h index 0f859cf3ab..464da51b22 100644 --- a/components/soc/esp32p4/include/soc/sdmmc_pins.h +++ b/components/esp_hal_sd/esp32p4/include/soc/sdmmc_pins.h @@ -1,7 +1,7 @@ -/** - * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD +/* + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/components/soc/esp32p4/sdmmc_periph.c b/components/esp_hal_sd/esp32p4/sdmmc_periph.c similarity index 93% rename from components/soc/esp32p4/sdmmc_periph.c rename to components/esp_hal_sd/esp32p4/sdmmc_periph.c index 75aef4f3be..bff08991a5 100644 --- a/components/soc/esp32p4/sdmmc_periph.c +++ b/components/esp_hal_sd/esp32p4/sdmmc_periph.c @@ -1,10 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/sdmmc_periph.h" +#include "hal/sdmmc_periph.h" #include "soc/sdmmc_pins.h" const sdmmc_slot_info_t sdmmc_slot_info[SOC_SDMMC_NUM_SLOTS] = { diff --git a/components/hal/esp32s3/include/hal/sdmmc_ll.h b/components/esp_hal_sd/esp32s3/include/hal/sdmmc_ll.h similarity index 97% rename from components/hal/esp32s3/include/hal/sdmmc_ll.h rename to components/esp_hal_sd/esp32s3/include/hal/sdmmc_ll.h index 02cdd22cf6..f3b1282886 100644 --- a/components/hal/esp32s3/include/hal/sdmmc_ll.h +++ b/components/esp_hal_sd/esp32s3/include/hal/sdmmc_ll.h @@ -248,18 +248,18 @@ static inline void sdmmc_ll_set_din_delay_phase(sdmmc_dev_t *hw, sdmmc_ll_delay_ { (void)mode; switch (phase) { - case SDMMC_LL_DELAY_PHASE_1: - hw->clock.phase_din = 0x1; - break; - case SDMMC_LL_DELAY_PHASE_2: - hw->clock.phase_din = 0x4; - break; - case SDMMC_LL_DELAY_PHASE_3: - hw->clock.phase_din = 0x6; - break; - default: - hw->clock.phase_din = 0x0; - break; + case SDMMC_LL_DELAY_PHASE_1: + hw->clock.phase_din = 0x1; + break; + case SDMMC_LL_DELAY_PHASE_2: + hw->clock.phase_din = 0x4; + break; + case SDMMC_LL_DELAY_PHASE_3: + hw->clock.phase_din = 0x6; + break; + default: + hw->clock.phase_din = 0x0; + break; } } @@ -505,11 +505,11 @@ static inline void sdmmc_ll_enable_ddr_mode(sdmmc_dev_t *hw, uint32_t slot, bool { uint32_t ddr_reg_val = HAL_FORCE_READ_U32_REG_FIELD(hw->uhs, ddr); if (en) { - ddr_reg_val|= BIT(slot); + ddr_reg_val |= BIT(slot); HAL_FORCE_MODIFY_U32_REG_FIELD(hw->uhs, ddr, ddr_reg_val); hw->emmc_ddr_reg |= BIT(slot); } else { - ddr_reg_val&= ~BIT(slot); + ddr_reg_val &= ~BIT(slot); HAL_FORCE_MODIFY_U32_REG_FIELD(hw->uhs, ddr, ddr_reg_val); hw->emmc_ddr_reg &= ~BIT(slot); } @@ -767,7 +767,6 @@ static inline void sdmmc_ll_enable_global_interrupt(sdmmc_dev_t *hw, bool en) hw->ctrl.int_enable = (uint32_t)en; } - /** * @brief Enable / disable busy clear interrupt * diff --git a/components/esp_hal_sd/esp32s3/include/soc/sdmmc_pins.h b/components/esp_hal_sd/esp32s3/include/soc/sdmmc_pins.h new file mode 100644 index 0000000000..197df32167 --- /dev/null +++ b/components/esp_hal_sd/esp32s3/include/soc/sdmmc_pins.h @@ -0,0 +1,11 @@ +/* + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#pragma once + +/* SDMMC pins on ESP32-S3 are configurable through GPIO matrix. + * This file is kept for compatibility only. + */ diff --git a/components/soc/esp32s3/sdmmc_periph.c b/components/esp_hal_sd/esp32s3/sdmmc_periph.c similarity index 92% rename from components/soc/esp32s3/sdmmc_periph.c rename to components/esp_hal_sd/esp32s3/sdmmc_periph.c index 9dc973c3b8..2b492ae155 100644 --- a/components/soc/esp32s3/sdmmc_periph.c +++ b/components/esp_hal_sd/esp32s3/sdmmc_periph.c @@ -1,10 +1,10 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/sdmmc_periph.h" +#include "hal/sdmmc_periph.h" #include "soc/sdmmc_pins.h" const sdmmc_slot_info_t sdmmc_slot_info[SOC_SDMMC_NUM_SLOTS] = { diff --git a/components/hal/include/hal/sd_types.h b/components/esp_hal_sd/include/hal/sd_types.h similarity index 96% rename from components/hal/include/hal/sd_types.h rename to components/esp_hal_sd/include/hal/sd_types.h index c9b8323fba..9db26b1e5e 100644 --- a/components/hal/include/hal/sd_types.h +++ b/components/esp_hal_sd/include/hal/sd_types.h @@ -21,18 +21,18 @@ typedef enum { SD_BUS_WIDTH_8_BIT = 8, ///< 8 bit } sd_bus_width_t; - /** - * @brief SD mode - */ - typedef enum { +/** + * @brief SD mode + */ +typedef enum { SD_MODE_NORMAL, ///< Normal SD mode SD_MODE_UHS1, ///< UHS-I SD mode } sd_mode_t; - /** - * @brief SD sampling mode - */ - typedef enum { +/** + * @brief SD sampling mode + */ +typedef enum { SD_SAMPLING_MODE_SDR = 1, ///< Single data rate mode SD_SAMPLING_MODE_DDR, ///< Double data rate mode } sd_sampling_mode_t; diff --git a/components/hal/include/hal/sdio_slave_hal.h b/components/esp_hal_sd/include/hal/sdio_slave_hal.h similarity index 99% rename from components/hal/include/hal/sdio_slave_hal.h rename to components/esp_hal_sd/include/hal/sdio_slave_hal.h index 94588c26af..c1ea957bbb 100644 --- a/components/hal/include/hal/sdio_slave_hal.h +++ b/components/esp_hal_sd/include/hal/sdio_slave_hal.h @@ -156,7 +156,6 @@ extern "C" { /// Space used for each sending descriptor. Should initialize the sendbuf according to this size. #define SDIO_SLAVE_SEND_DESC_SIZE sizeof(sdio_slave_hal_send_desc_t) - /// Status of the sending part typedef enum { STATE_IDLE = 1, @@ -191,7 +190,6 @@ typedef sdio_slave_ll_desc_t sdio_slave_hal_recv_desc_t; #define sdio_slave_hal_recv_desc_s sdio_slave_ll_desc_s typedef STAILQ_HEAD(recv_stailq_head_s, sdio_slave_hal_recv_desc_s) sdio_slave_hal_recv_stailq_t; - /** HAL context structure. Call `sdio_slave_hal_init` to initialize it and * configure required members before actually use the HAL. */ @@ -370,7 +368,6 @@ esp_err_t sdio_slave_hal_send_flush_next_buffer(sdio_slave_context_t *hal, void */ esp_err_t sdio_slave_hal_send_reset_counter(sdio_slave_context_t *hal); - /*--------------------------------------------------------------------------- * Receive *--------------------------------------------------------------------------*/ @@ -468,7 +465,6 @@ void sdio_slave_hal_recv_reset_counter(sdio_slave_context_t *hal); */ void sdio_slave_hal_recv_flush_one_buffer(sdio_slave_context_t *hal); - /*--------------------------------------------------------------------------- * Host *--------------------------------------------------------------------------*/ @@ -506,7 +502,6 @@ void sdio_slave_hal_hostint_send(sdio_slave_context_t *hal, const sdio_slave_hos */ void sdio_slave_hal_hostint_clear(sdio_slave_context_t *hal, const sdio_slave_hostint_t *mask); - /** * Fetch the interrupt (host send to slave) status bits and clear all of them. * @param hal Context of the HAL layer. diff --git a/components/soc/include/soc/sdio_slave_periph.h b/components/esp_hal_sd/include/hal/sdio_slave_periph.h similarity index 94% rename from components/soc/include/soc/sdio_slave_periph.h rename to components/esp_hal_sd/include/hal/sdio_slave_periph.h index 25e47da2bd..086202c5fe 100644 --- a/components/soc/include/soc/sdio_slave_periph.h +++ b/components/esp_hal_sd/include/hal/sdio_slave_periph.h @@ -1,7 +1,7 @@ /* * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once diff --git a/components/hal/include/hal/sdio_slave_types.h b/components/esp_hal_sd/include/hal/sdio_slave_types.h similarity index 99% rename from components/hal/include/hal/sdio_slave_types.h rename to components/esp_hal_sd/include/hal/sdio_slave_types.h index 6268d86212..930fda9d9c 100644 --- a/components/hal/include/hal/sdio_slave_types.h +++ b/components/esp_hal_sd/include/hal/sdio_slave_types.h @@ -25,7 +25,6 @@ typedef enum { SDIO_SLAVE_HOSTINT_SEND_NEW_PACKET = BIT(23), ///< New packet available } sdio_slave_hostint_t; - /// Timing of SDIO slave typedef enum { SDIO_SLAVE_TIMING_PSEND_PSAMPLE = 0,/**< Send at posedge, and sample at posedge. Default value for HS mode. diff --git a/components/hal/include/hal/sdmmc_hal.h b/components/esp_hal_sd/include/hal/sdmmc_hal.h similarity index 99% rename from components/hal/include/hal/sdmmc_hal.h rename to components/esp_hal_sd/include/hal/sdmmc_hal.h index fec1d9ebb2..4f3c36c8cf 100644 --- a/components/hal/include/hal/sdmmc_hal.h +++ b/components/esp_hal_sd/include/hal/sdmmc_hal.h @@ -34,7 +34,6 @@ typedef struct { */ void sdmmc_hal_init(sdmmc_hal_context_t *hal); - #ifdef __cplusplus } #endif diff --git a/components/soc/include/soc/sdmmc_periph.h b/components/esp_hal_sd/include/hal/sdmmc_periph.h similarity index 76% rename from components/soc/include/soc/sdmmc_periph.h rename to components/esp_hal_sd/include/hal/sdmmc_periph.h index 71d34ab8b2..518aef9b74 100644 --- a/components/soc/include/soc/sdmmc_periph.h +++ b/components/esp_hal_sd/include/hal/sdmmc_periph.h @@ -1,14 +1,13 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include //include soc related (generated) definitions #include "soc/soc_caps.h" -#include "soc/gpio_num.h" #if SOC_SDMMC_HOST_SUPPORTED #include "soc/sdmmc_reg.h" #include "soc/sdmmc_struct.h" @@ -41,20 +40,20 @@ extern const sdmmc_slot_info_t sdmmc_slot_info[SOC_SDMMC_NUM_SLOTS]; */ typedef union { struct { - gpio_num_t cd; - gpio_num_t wp; - gpio_num_t clk; - gpio_num_t cmd; - gpio_num_t d0; - gpio_num_t d1; - gpio_num_t d2; - gpio_num_t d3; - gpio_num_t d4; - gpio_num_t d5; - gpio_num_t d6; - gpio_num_t d7; + int cd; + int wp; + int clk; + int cmd; + int d0; + int d1; + int d2; + int d3; + int d4; + int d5; + int d6; + int d7; }; - gpio_num_t val[12]; // for iteration, num of entries in struct + int val[12]; // for iteration, num of entries in struct } sdmmc_slot_io_info_t; /** GPIO pin numbers of SD bus signals, one structure per slot */ diff --git a/components/hal/sdio_slave_hal.c b/components/esp_hal_sd/sdio_slave_hal.c similarity index 96% rename from components/hal/sdio_slave_hal.c rename to components/esp_hal_sd/sdio_slave_hal.c index 091d17b1b0..25829f397e 100644 --- a/components/hal/sdio_slave_hal.c +++ b/components/esp_hal_sd/sdio_slave_hal.c @@ -17,7 +17,6 @@ #include "hal/log.h" #include "esp_attr.h" - #define SDIO_SLAVE_CHECK(res, str, ret_val) do { if(!(res)){\ HAL_LOGE(TAG, "%s", str);\ return ret_val;\ @@ -60,20 +59,20 @@ static inline uint8_t* sdio_ringbuf_offset_ptr(sdio_ringbuf_t *buf, sdio_ringbuf { uint8_t *buf_ptr; switch (ptr) { - case RINGBUF_WRITE_PTR: - buf_ptr = buf->write_ptr; - break; - case RINGBUF_READ_PTR: - buf_ptr = buf->read_ptr; - break; - case RINGBUF_FREE_PTR: - buf_ptr = buf->free_ptr; - break; - default: - abort(); + case RINGBUF_WRITE_PTR: + buf_ptr = buf->write_ptr; + break; + case RINGBUF_READ_PTR: + buf_ptr = buf->read_ptr; + break; + case RINGBUF_FREE_PTR: + buf_ptr = buf->free_ptr; + break; + default: + abort(); } - uint8_t *offset_ptr=buf_ptr+offset; + uint8_t *offset_ptr = buf_ptr + offset; if (offset_ptr >= buf->data + buf->size) { offset_ptr -= buf->size; } @@ -87,7 +86,9 @@ static esp_err_t sdio_ringbuf_send(sdio_ringbuf_t *buf, esp_err_t (*copy_callbac if (copy_callback) { err = (*copy_callback)(get_ptr, arg); } - if (err != ESP_OK) return err; + if (err != ESP_OK) { + return err; + } buf->write_ptr = get_ptr; return ESP_OK; @@ -98,8 +99,12 @@ static esp_err_t sdio_ringbuf_send(sdio_ringbuf_t *buf, esp_err_t (*copy_callbac static inline esp_err_t sdio_ringbuf_recv(sdio_ringbuf_t *buf, sdio_slave_hal_send_desc_t **start, sdio_slave_hal_send_desc_t **end, ringbuf_get_all_t get_all) { HAL_ASSERT(buf->free_ptr == buf->read_ptr); //must return before recv again - if (start == NULL && end == NULL) return ESP_ERR_INVALID_ARG; // must have a output - if (buf->read_ptr == buf->write_ptr) return ESP_ERR_NOT_FOUND; // no data + if (start == NULL && end == NULL) { + return ESP_ERR_INVALID_ARG; // must have a output + } + if (buf->read_ptr == buf->write_ptr) { + return ESP_ERR_NOT_FOUND; // no data + } uint8_t *get_start = sdio_ringbuf_offset_ptr(buf, RINGBUF_READ_PTR, SDIO_SLAVE_SEND_DESC_SIZE); @@ -123,7 +128,7 @@ static inline int sdio_ringbuf_return(sdio_ringbuf_t* buf, uint8_t *ptr) HAL_ASSERT(sdio_ringbuf_offset_ptr(buf, RINGBUF_FREE_PTR, SDIO_SLAVE_SEND_DESC_SIZE) == ptr); size_t size = (buf->read_ptr + buf->size - buf->free_ptr) % buf->size; size_t count = size / SDIO_SLAVE_SEND_DESC_SIZE; - HAL_ASSERT(count * SDIO_SLAVE_SEND_DESC_SIZE==size); + HAL_ASSERT(count * SDIO_SLAVE_SEND_DESC_SIZE == size); buf->free_ptr = buf->read_ptr; return count; } @@ -184,7 +189,9 @@ static esp_err_t init_send_queue(sdio_slave_context_t *hal) //no copy for the first descriptor ret = sdio_ringbuf_send(buf, NULL, NULL); - if (ret != ESP_OK) return ret; + if (ret != ESP_OK) { + return ret; + } //loop in the ringbuf to link all the desc one after another as a ring for (int i = 0; i < hal->send_queue_size + 1; i++) { @@ -192,7 +199,9 @@ static esp_err_t init_send_queue(sdio_slave_context_t *hal) HAL_ASSERT(rcv_res == ESP_OK); ret = sdio_ringbuf_send(buf, link_desc_to_last, last); - if (ret != ESP_OK) return ret; + if (ret != ESP_OK) { + return ret; + } sdio_ringbuf_return(buf, (uint8_t *) last); } @@ -212,7 +221,6 @@ void sdio_slave_hal_set_ioready(sdio_slave_context_t *hal, bool ready) sdio_slave_ll_set_ioready(hal->hinf, ready); //set IO ready to 1 to allow host to use } - /*--------------------------------------------------------------------------- * Send * @@ -268,7 +276,7 @@ static void send_isr_invoker_enable(const sdio_slave_context_t *hal) sdio_slave_ll_send_reset(hal->slc); sdio_slave_ll_send_start(hal->slc, &start_desc); //wait for rx_done - while(!sdio_slave_ll_send_invoker_ready(hal->slc)); + while (!sdio_slave_ll_send_invoker_ready(hal->slc)); sdio_slave_ll_send_stop(hal->slc); sdio_slave_ll_send_hostint_clr(hal->host); } @@ -371,7 +379,7 @@ esp_err_t sdio_slave_hal_send_reset_counter(sdio_slave_context_t* hal) hal->tail_pkt_len = 0; sdio_slave_hal_send_desc_t *desc = hal->in_flight_head; - while(desc != NULL) { + while (desc != NULL) { hal->tail_pkt_len += desc->dma_desc.length; desc->pkt_len = hal->tail_pkt_len; desc = SEND_DESC_NEXT(desc); @@ -379,7 +387,7 @@ esp_err_t sdio_slave_hal_send_reset_counter(sdio_slave_context_t* hal) // in theory the desc should be the one right next to the last of in_flight_head, // but the link of last is NULL, so get the desc from the ringbuf directly. desc = (sdio_slave_hal_send_desc_t*)sdio_ringbuf_peek_front(&(hal->send_desc_queue)); - while(desc != NULL) { + while (desc != NULL) { hal->tail_pkt_len += desc->dma_desc.length; desc->pkt_len = hal->tail_pkt_len; desc = SEND_DESC_NEXT(desc); @@ -460,7 +468,6 @@ esp_err_t sdio_slave_hal_send_get_next_finished_arg(sdio_slave_context_t *hal, v return ret; } - esp_err_t sdio_slave_hal_send_flush_next_buffer(sdio_slave_context_t *hal, void **out_arg, uint32_t *out_return_cnt) { esp_err_t ret = ESP_OK; @@ -532,7 +539,7 @@ esp_err_t sdio_slave_hal_send_queue(sdio_slave_context_t* hal, uint8_t *addr, si .buf = addr, .owner = 1, // in stream mode, the eof is only appended (in ISR) when new packet is ready to be sent - .eof = (hal->sending_mode == SDIO_SLAVE_SEND_PACKET), + .eof = (hal->sending_mode == SDIO_SLAVE_SEND_PACKET), }, .arg = arg, .pkt_len = hal->tail_pkt_len, @@ -551,7 +558,7 @@ static sdio_slave_ll_desc_t* recv_get_first_empty_buf(sdio_slave_context_t* hal) { sdio_slave_hal_recv_stailq_t *const queue = &(hal->recv_link_list); sdio_slave_ll_desc_t *desc = STAILQ_FIRST(queue); - while(desc && desc->owner == 0) { + while (desc && desc->owner == 0) { desc = STAILQ_NEXT(desc, qe); } return desc; @@ -569,7 +576,9 @@ void sdio_slave_hal_recv_stop(sdio_slave_context_t* hal) bool sdio_slave_hal_recv_has_next_item(sdio_slave_context_t* hal) { - if (hal->recv_cur_ret == NULL || hal->recv_cur_ret->owner != 0) return false; + if (hal->recv_cur_ret == NULL || hal->recv_cur_ret->owner != 0) { + return false; + } // This may cause the ``cur_ret`` pointer to be NULL, indicating the list is empty, // in this case the ``tx_done`` should happen no longer until new desc is appended. diff --git a/components/hal/sdmmc_hal.c b/components/esp_hal_sd/sdmmc_hal.c similarity index 99% rename from components/hal/sdmmc_hal.c rename to components/esp_hal_sd/sdmmc_hal.c index 2d1a237bb3..0eb76f82d1 100644 --- a/components/hal/sdmmc_hal.c +++ b/components/esp_hal_sd/sdmmc_hal.c @@ -9,7 +9,6 @@ #include "hal/sdmmc_ll.h" #include "soc/soc_caps.h" - void sdmmc_hal_init(sdmmc_hal_context_t *hal) { hal->dev = SDMMC_LL_GET_HW(0); diff --git a/components/hal/CMakeLists.txt b/components/hal/CMakeLists.txt index 5f6f540f08..527c24b457 100644 --- a/components/hal/CMakeLists.txt +++ b/components/hal/CMakeLists.txt @@ -40,10 +40,6 @@ if(NOT esp_tee_build AND NOT BOOTLOADER_BUILD) list(APPEND srcs "systimer_hal.c") endif() - if(CONFIG_SOC_SDMMC_HOST_SUPPORTED) - list(APPEND srcs "sdmmc_hal.c") - endif() - if(CONFIG_SOC_ETM_SUPPORTED) list(APPEND srcs "etm_hal.c" "${target}/etm_periph.c") endif() @@ -51,10 +47,6 @@ if(NOT esp_tee_build AND NOT BOOTLOADER_BUILD) if(CONFIG_SOC_MODEM_CLOCK_IS_INDEPENDENT AND CONFIG_SOC_MODEM_CLOCK_SUPPORTED) list(APPEND srcs "${target}/modem_clock_hal.c") endif() - - if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED) - list(APPEND srcs "sdio_slave_hal.c") - endif() endif() idf_component_register(SRCS ${srcs} diff --git a/components/sdmmc/CMakeLists.txt b/components/sdmmc/CMakeLists.txt index 9a4606cc57..037e5e2c94 100644 --- a/components/sdmmc/CMakeLists.txt +++ b/components/sdmmc/CMakeLists.txt @@ -22,5 +22,5 @@ endif() idf_component_register(SRCS ${srcs} INCLUDE_DIRS include - REQUIRES esp_blockdev - PRIV_REQUIRES soc esp_timer esp_mm) + REQUIRES esp_blockdev esp_hal_sd + PRIV_REQUIRES esp_timer esp_mm) diff --git a/components/soc/CMakeLists.txt b/components/soc/CMakeLists.txt index d809080315..e316be13d3 100644 --- a/components/soc/CMakeLists.txt +++ b/components/soc/CMakeLists.txt @@ -70,15 +70,6 @@ if(CONFIG_SOC_MPI_SUPPORTED) list(APPEND srcs "${target_folder}/mpi_periph.c") endif() -if(CONFIG_SOC_SDMMC_HOST_SUPPORTED) - list(APPEND srcs "${target_folder}/sdmmc_periph.c") -endif() - - -if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED) - list(APPEND srcs "${target_folder}/sdio_slave_periph.c") -endif() - if(CONFIG_SOC_PAU_SUPPORTED AND CONFIG_SOC_LIGHT_SLEEP_SUPPORTED AND CONFIG_SOC_PM_SUPPORT_TOP_PD) list(APPEND srcs "${target_folder}/system_retention_periph.c") endif() diff --git a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in index 93e8a2a3af..0f216170b0 100644 --- a/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32s3/include/soc/Kconfig.soc_caps.in @@ -1155,10 +1155,6 @@ config SOC_SDMMC_DATA_WIDTH_MAX int default 8 -config SOC_SDMMC_SUPPORT_XTAL_CLOCK - bool - default y - config SOC_SDMMC_DELAY_PHASE_NUM int default 4 diff --git a/components/soc/esp32s3/include/soc/sdmmc_pins.h b/components/soc/esp32s3/include/soc/sdmmc_pins.h deleted file mode 100644 index 107bbf94ad..0000000000 --- a/components/soc/esp32s3/include/soc/sdmmc_pins.h +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma once - -/* SDMMC pins on ESP32-S3 are configurable through GPIO matrix. - * This file is kept for compatibility only. - */ diff --git a/components/soc/esp32s3/include/soc/soc_caps.h b/components/soc/esp32s3/include/soc/soc_caps.h index dd3c80978d..25150aa44d 100644 --- a/components/soc/esp32s3/include/soc/soc_caps.h +++ b/components/soc/esp32s3/include/soc/soc_caps.h @@ -481,8 +481,6 @@ #define SOC_SDMMC_USE_GPIO_MATRIX 1 #define SOC_SDMMC_NUM_SLOTS 2 #define SOC_SDMMC_DATA_WIDTH_MAX 8 -/* Indicates that there is an option to use XTAL clock instead of PLL for SDMMC */ -#define SOC_SDMMC_SUPPORT_XTAL_CLOCK 1 /* Supported host clock delay phase number */ #define SOC_SDMMC_DELAY_PHASE_NUM 4 diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 95cede89b8..540d4c0cb0 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -189,6 +189,8 @@ INPUT = \ $(PROJECT_PATH)/components/esp_hal_mspi/include/hal/spi_flash_types.h \ $(PROJECT_PATH)/components/esp_hal_pcnt/include/hal/pcnt_types.h \ $(PROJECT_PATH)/components/esp_hal_rmt/include/hal/rmt_types.h \ + $(PROJECT_PATH)/components/esp_hal_sd/include/hal/sdio_slave_types.h \ + $(PROJECT_PATH)/components/esp_hal_sd/include/hal/sd_types.h \ $(PROJECT_PATH)/components/esp_hal_twai/include/hal/twai_types.h \ $(PROJECT_PATH)/components/esp_hal_uart/include/hal/uart_types.h \ $(PROJECT_PATH)/components/esp_hal_uart/include/hal/uhci_types.h \ @@ -276,10 +278,8 @@ INPUT = \ $(PROJECT_PATH)/components/freertos/FreeRTOS-Kernel/include/freertos/task.h \ $(PROJECT_PATH)/components/freertos/FreeRTOS-Kernel/include/freertos/timers.h \ $(PROJECT_PATH)/components/hal/include/hal/color_types.h \ - $(PROJECT_PATH)/components/hal/include/hal/sdio_slave_types.h \ $(PROJECT_PATH)/components/hal/include/hal/efuse_hal.h \ $(PROJECT_PATH)/components/hal/include/hal/lp_core_types.h \ - $(PROJECT_PATH)/components/hal/include/hal/sd_types.h \ $(PROJECT_PATH)/components/heap/include/esp_heap_caps_init.h \ $(PROJECT_PATH)/components/heap/include/esp_heap_caps.h \ $(PROJECT_PATH)/components/heap/include/esp_heap_task_info.h \ diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index ce09389524..86b5dd6f42 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -484,7 +484,6 @@ components/soc/esp32/include/soc/fe_reg.h components/soc/esp32/include/soc/flash_encryption_reg.h components/soc/esp32/include/soc/gpio_sig_map.h components/soc/esp32/include/soc/reset_reasons.h -components/soc/esp32/include/soc/sdmmc_pins.h components/soc/esp32/include/soc/soc_ulp.h components/soc/esp32s2/include/soc/fe_reg.h components/soc/esp32s2/include/soc/memprot_defs.h