Commit Graph
263 Commits
Author SHA1 Message Date
Jiang Jiang Jian 31056d5db9 Merge branch 'refactor/spi_flash_private_v6.0' into 'release/v6.0'
refactor(spi_flash): reorganize header files, improve encapsulation and simplify ROM implementation (v6.0)

See merge request espressif/esp-idf!45488
2026-02-02 10:57:34 +08:00
Jiang Jiang Jian d0f992c02f Merge branch 'fix/make_deepsleep_gpio_wakeup_usable_for_pd_top_lightsleep_v6.0' into 'release/v6.0'
change(esp_hw_support): deepsleep gpio wakeup API renaming to support PD_TOP lightsleep wakeup (v6.0)

See merge request espressif/esp-idf!45416
2026-02-02 10:48:40 +08:00
morris 88a2632a27 Merge branch 'feat/support_parlio_on_esp32h4_v6.0' into 'release/v6.0'
feat(parlio): support parlio on esp32h4 (v6.0)

See merge request espressif/esp-idf!44178
2026-02-02 09:50:59 +08:00
wuzhenghui 85601ccb69 change(soc): rename peripheral powerdowned sleep wakeable IO soc_caps
rename SOC_GPIO_DEEP_SLEEP_WAKE_VALID_GPIO_MASK to SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_MASK
rename SOC_GPIO_DEEP_SLEEP_WAKE_SUPPORTED_PIN_CNT to SOC_GPIO_HP_PERIPH_PD_SLEEP_WAKEABLE_PIN_CNT
rename SOC_GPIO_SUPPORT_DEEPSLEEP_WAKEUP to SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP
2026-02-01 12:16:20 +08:00
wuzhenghui 2d8c6ed6b4 change(esp_hal_rtc_timer): unify lp_timer/rtc_timer naming to RTC_TIMER 2026-01-31 22:31:34 +08:00
Xiao Xufeng 170061e971 refactor(spi_flash): move internal types to private headers and refactor initialization
This commit refactors the SPI flash component to improve encapsulation and
modularity by moving internal types and functions to private headers, and
reorganizing initialization code.

Key changes:

1. Move PSRAM frequency constraint macro from soc_caps.h to mspi_ll.h
   - Rename SOC_SPI_MEM_PSRAM_FREQ_AXI_CONSTRAINED to
     MSPI_TIMING_LL_PSRAM_FREQ_AXI_CONSTRAINED
   - Move macro definition to chip-specific mspi_ll.h files (C5, C61, H4, P4, S31)
   - Update usage in clk_utils.c and esp_flash_spi_init.c
   - Remove old macro from all soc_caps.h files

2. Move internal types to private headers
   - Move esp_flash_t structure to esp_private/esp_flash_types.h
   - Move esp_flash_os_functions_t to esp_private/spi_flash_os.h
   - Update all internal files to include private headers
   - Keep forward declarations in public esp_flash.h

3. Move chip driver header to internal directory
   - Move spi_flash_chip_driver.h to esp_flash_port/spi_flash_chip_driver.h
   - Update all references to use new path
   - Add esp_private/esp_flash_types.h include to the moved header

4. Refactor initialization functions
   - Move init_flash from esp_system/startup_funcs.c to
     spi_flash/esp_flash_spi_init.c
   - Create new init_pm_flash_freq_limit function in startup_funcs.c
     to call esp_pm_flash_freq_limit_init() conditionally
   - Update system_init_fn.txt with new function locations

5. Improve API encapsulation
   - Replace direct access to esp_flash_t->size in
     esp_partition_register_external() with esp_flash_get_size() API
   - Move esp_flash_is_quad_mode from inline function to regular function
     in esp_flash_api.c

6. Update component dependencies
   - Add esp_driver_gpio to spi_flash component PRIV_REQUIRES
   - Remove unused includes and clean up header dependencies

These changes improve code organization by clearly separating public APIs
from internal implementation details, making the codebase more maintainable
and reducing the risk of breaking changes to internal structures.
2026-01-29 03:28:30 +08:00
Chen Chen b7e82de9d8 refactor(i2c): cleanup I2C definitions in soc_caps.h 2026-01-13 17:29:23 +08:00
Chen Jichang 954a7619a2 feat(parlio): support parlio on esp32h4 2026-01-13 17:07:28 +08:00
liuning 9c9f884f3a bugfix(wifi): fix incomplete phy initialization due to absence of bb clocks at coexistence scenarios 2026-01-09 16:53:20 +08:00
Song Ruo Jing 6eec16cf66 refactor(uart): clean up uart soc_caps 2026-01-04 16:02:57 +08:00
Song Ruo Jing a0c91ea082 refactor(uart): remove soc/uart_channel.h 2026-01-04 16:02:57 +08:00
Song Ruo Jing ce475d901d refactor(uart): split UART HAL into separate component 2026-01-04 16:02:57 +08:00
Song Ruo Jing 6ca90bd14a refactor(ledc): split ledc hal into a separate component 2025-12-25 17:23:27 +08:00
Jiang Jiang Jian 9b74192f14 Merge branch 'fix/update_breakpoint_nums_on_c5_h4_v6.0' into 'release/v6.0'
fix(soc): update breakpoint nums on c5 and h4 (v6.0)

See merge request espressif/esp-idf!44355
2025-12-21 15:30:36 +08:00
Jiang Jiang Jian f409428bf3 Merge branch 'bugfix/esp32c5_encrypted_flash_write_v6.0' into 'release/v6.0'
fix(spi_flash): Add CPU frequency switching during flash encrypted write (v6.0)

See merge request espressif/esp-idf!44304
2025-12-21 15:28:33 +08:00
Chen Jichang 23f1428356 fix(soc): update breakpoint nums on c5 and h4 2025-12-18 11:21:48 +08:00
Chen Jichang 10c473fbbd feat(hal): graudate the RMT hal driver into a new component 2025-12-17 22:31:25 +08:00
morris 311bec8f82 Merge branch 'fix/spi_edma_and_hal_component_6.0' into 'release/v6.0'
feat(driver_spi): split esp_hal_gpspi and support master driver edma (v6.0)

See merge request espressif/esp-idf!44222
2025-12-17 14:54:05 +08:00
Xiao Xufeng ae7124abe3 feat(spi_flash): implement dynamic CPU frequency switching workaround for encrypted writes
This commit implements a workaround that allows ESP32-C5 to run at 240MHz CPU frequency
normally, while automatically reducing CPU frequency during encrypted flash writes to
ensure correct operation. The frequency limit is chip revision dependent:
- v1.2 and above: limited to 160MHz during encrypted writes
- v1.0 and below: limited to 80MHz during encrypted writes

Key implementation details:
- Frequency limiting is triggered automatically when esp_flash_write_encrypted() is called
- Uses start() flags (ESP_FLASH_START_FLAG_LIMIT_CPU_FREQ) to integrate with OS layer
- Works with both PM enabled and disabled configurations
- Frequency is automatically restored after encrypted write completes
- For ESP32-C5 with 120MHz flash, Flash clock and timing registers are adjusted when
  CPU frequency is reduced to 80MHz
- SPI1 timing registers are configured during frequency switching since encrypted writes
  use SPI1 and must work correctly at reduced CPU frequencies

Code improvements:
- Use SOC_MSPI_FREQ_AXI_CONSTRAINED capability macro instead of hardcoded chip checks
- Control workaround via Kconfig (CONFIG_PM_WORKAROUND_FREQ_LIMIT_ENABLED) instead of
  hardcoded macros
- Add comprehensive test cases covering various PM configurations and edge cases

This workaround enables ESP32-C5 applications to benefit from 240MHz CPU performance
while maintaining reliable encrypted flash write functionality.
2025-12-17 01:21:45 +08:00
wanckl d12f941787 feat(driver_spi): split spi hal component 2025-12-16 20:38:09 +08:00
Chen Chen 1b015d22eb refactor(esp_system): clear dependency on hal components 2025-12-16 09:11:59 +08:00
morris 11ce7a9011 refactor(soc): remove soc_caps_full.h 2025-12-11 10:29:01 +08:00
laokaiyao b8824d2d1a refactor(parlio): refactor of the private parlio caps 2025-12-11 10:26:07 +08:00
laokaiyao 73ebd544fd refactor(i2s): refactor of the private i2s caps 2025-12-11 10:25:42 +08:00
laokaiyao fd918efe43 feat(hal): graudate the I2S hal driver into a new component 2025-12-11 10:25:40 +08:00
morris 37c614d626 feat(twai): graduate the hal drivers into esp_hal_twai component 2025-12-10 13:56:47 +08:00
Song Ruo Jing 4d3a9b0157 refactor(esp_hal_gpio): move some caps definitions to esp_hal_gpio 2025-12-08 14:33:26 +08:00
Song Ruo Jing 62899cbba6 refactor(gpio): split GPIO HAL into separate component
cleaned up some includes in GPIO peripheral files
2025-12-08 14:33:26 +08:00
morris 69a76c5170 refactor(hal_dma): move bitscrambler from hal component
because bitscrambler can't live without DMA, it's highly binded with the
GDMA peripheral.
2025-11-27 16:06:52 +08:00
morris 72159c2361 Merge branch 'feat/esp_hal_pcnt_v6.0' into 'release/v6.0'
feat(hal): graudate the PCNT hal driver into a new component (v6.0)

See merge request espressif/esp-idf!43444
2025-11-24 22:35:51 +08:00
Jiang Jiang Jian ee4be1af57 Merge branch 'feat/flash_enc_using_key_manager_v6.0' into 'release/v6.0'
Support Flash Encryption using Key Manager (v6.0)

See merge request espressif/esp-idf!43459
2025-11-24 10:35:48 +08:00
Alexey Gerenkov d8e47c5e43 Merge branch 'feature/dynamic_flags_in_toolchain_cmake_v6.0' into 'release/v6.0'
feat(build): propagate compiler flags from files to toolchain.cmake (v6.0)

See merge request espressif/esp-idf!43499
2025-11-21 16:19:34 +08:00
morris 29fc0f8726 Merge branch 'feat/dedic_gpio_esp32h4_v6.0' into 'release/v6.0'
feat(gpio): support fast gpio driver on esp32h4 (v6.0)

See merge request espressif/esp-idf!43541
2025-11-21 14:40:03 +08:00
Chen Jichang c84773f307 feat(hal): graudate the PCNT hal driver into a new component 2025-11-21 11:22:41 +08:00
morris 8242e6914b Merge branch 'feature/ledc_etm_support_v6.0' into 'release/v6.0'
feat(ledc): add ETM support for LEDC peripheral (v6.0)

See merge request espressif/esp-idf!43401
2025-11-21 10:38:11 +08:00
morris 7f0f043e63 Merge branch 'refactor/gpio_rom_func_rename_v6.0' into 'release/v6.0'
refactor(rom/gpio): add 'rom_' prefix to GPIO ROM functions (v6.0)

See merge request espressif/esp-idf!43400
2025-11-20 21:35:13 +08:00
morris ca892b17b9 feat(gpio): support fast gpio driver on esp32h4 2025-11-20 15:50:58 +08:00
harshal.patil 172f904e23 feat(bootloader_support): Support FE XTS-AES-256 using Key Manager for ESP32-C5 2025-11-20 11:37:07 +05:30
Chen Chen efbddafbf0 Merge branch 'release/v6.0' into 'feat/mcpwm_support_h4_v6.0'
# Conflicts:
#   docs/docs_not_updated/esp32h4.txt
2025-11-19 17:14:21 +08:00
Chen Chen cb48f80f52 feat(mcpwm): support mcpwm on esp32h4 2025-11-19 17:13:12 +08:00
Song Ruo Jing c1209fc2ac refactor(gpio): remove some useless macros from io_mux_reg.h 2025-11-19 12:17:52 +08:00
Alexey Lapshin 5f9e3bffe2 feat(build): add COMPILER_ENABLE_RISCV_ZCMP option
Applicable for chips affected by interrupt issue:
  - ESP32C5
  - ESP32C61
  - ESP32H4

For all other chips that support the ZCMP extension without issues,
it will be enabled unconditionally.
2025-11-19 01:12:40 +07:00
morris a5a355d17f refactor(etm): move etm_periph.c to hal component 2025-11-16 22:13:30 +08:00
Song Ruo Jing 68f9d729cf feat(ledc): add ETM support for LEDC peripheral
Closes https://github.com/espressif/esp-idf/issues/11855
2025-11-14 20:58:17 +08:00
morris 4e9742433c Merge branch 'refactor/make_usb_hal_independent_backport_v6.0' into 'release/v6.0'
refactor(usb): Make usb hal layer independent (backport v6.0)

See merge request espressif/esp-idf!43249
2025-11-13 10:20:10 +08:00
Tomas Rezucha d44f7e92b5 refactor(usb): Make usb hal layer independent 2025-11-11 09:58:19 +01:00
hebinglin 585c8302b1 fix(esp_hw_support): resolved setting mie to disable interrupts failed in sleep flow 2025-11-04 21:09:32 +08:00
morris 2de3be7300 feat(dma): graduate the dma driver into a single component 2025-10-19 22:06:46 +08:00
morris e8de5b5a95 refactor(gptimer): clean up SOC capabilities for GPTIMER and Timer Group
- Remove GPTIMER and TIMG related definitions from soc_caps_full.h files
- Move timer peripheral definitions to appropriate HAL layer files
- Update references across components to use proper HAL abstractions
- Consolidate timer group and GPTIMER capabilities organization
- Ensure consistent timer configuration across all ESP32 variants

This refactoring improves the separation of concerns between SOC
capabilities and HAL implementations for timer-related functionality.
2025-10-14 11:44:38 +08:00
morris 56c3dc4755 feat(wdt): graduate watch dog hal driver into a new component: esp_hal_wdt 2025-10-14 11:44:32 +08:00