Commit Graph

1690 Commits

Author SHA1 Message Date
armando
45ec3b962b fix(spm): rename scp (scratchpad) to spm (scratchpad memory) 2026-03-18 09:49:59 +08:00
armando
1b85ad5081 change(mem): deprecated tcm and added scp memory utils 2026-03-18 09:49:59 +08:00
Jiang Jiang Jian
cd2a4df5fa Merge branch 'fix/disable_pvt_for_esp32c5_v6.0' into 'release/v6.0'
feat(esp32c5): disable PVT feature for esp32c5 (v6.0)

See merge request espressif/esp-idf!45702
2026-02-12 15:47:21 +08:00
Alexey Lapshin
8c0c59ffc8 fix(panic): fix _bss_end alignment for esp32s2 and esp32s3 2026-02-06 18:44:23 +07:00
Xiao Xufeng
3d263e7304 fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption
This reverts commit 7145fc9558.
2026-02-06 11:48:27 +08:00
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
c101c91019 Merge branch 'feature/support_pvt_auto_dbias_c5_c61_p4_c6' into 'release/v6.0'
feat(pvt): support pvt auto dbiast on c5/c61/c6/p4 (from eco5)_v6.0

See merge request espressif/esp-idf!45385
2026-02-01 20:08:23 +08:00
yanzihan@espressif.com
d0b1371e34 feat(esp_hw_support): use pvt to auto control digital ldo and rtc ldo for esp32c5 2026-02-01 13:24:49 +08:00
hebinglin
732de6bfe0 change(esp_system): replace temp_skip_ci with soc_filtered_targets for esp32c5 2026-02-01 11:59:16 +08:00
hebinglin
21a6537e08 change(esp_driver): set cases with toppd check only run in esp32c5eco3 rather than eco2 2026-02-01 11:59:16 +08:00
hebinglin
dbcc949b1c change(esp_hw_support): remove sleep_mmu_retention related flow for esp32c5 eco1 2026-02-01 11:59:16 +08:00
hebinglin
f4bc4ea6f9 revert(unit-test): filter top domain power down check for some sleep test cases
This reverts commit c6c2948a99.
2026-02-01 11:59:16 +08:00
morris
da14c42596 Merge branch 'fix/esp32_flash_cache_crash_v6.0' into 'release/v6.0'
fix(hw_support): Fix crash when reconfiguring flash from 40 to 80 MHz on ESP32 (v6.0)

See merge request espressif/esp-idf!44898
2026-02-01 10:20:19 +08:00
Song Ruo Jing
89da3742b8 refactor(clk): split clock HAL into separate component 2026-01-31 22:32:37 +08:00
Mahavir Jain
78464dfab7 Merge branch 'refactor/create_esp_hal_security_v6.0' into 'release/v6.0'
refactor: Created esp_hal_security component (v6.0)

See merge request espressif/esp-idf!45349
2026-01-31 10:28:48 +05:30
Mahavir Jain
ee2da28726 Merge branch 'feat/esp_tee_backports_v6.0' into 'release/v6.0'
feat(esp_tee): Feature/fixes backports to `release/v6.0`

See merge request espressif/esp-idf!45095
2026-01-31 10:27:34 +05:30
Aditya Patwardhan
4d3cfefc2e refactor(esp_hal_security): Updated esp_hal_security build and includes 2026-01-30 17:12:54 +05:30
morris
799e366cee Merge branch 'feat/esp_driver_dma_v6.0' into 'release/v6.0'
feat(dma): graduate the dma driver from esp_hw_support to esp_driver_dma (v6.0)

See merge request espressif/esp-idf!45387
2026-01-30 12:40:39 +08:00
Jiang Jiang Jian
d3e1887bbc Merge branch 'fix/p4_min_rev_usage_v6.0' into 'release/v6.0'
P4: fix wrong rev_min usage in rom and other places (v6.0)

See merge request espressif/esp-idf!45223
2026-01-30 10:50:51 +08:00
morris
db750dc1a0 feat(dma): graduate the dma driver from esp_hw_support to esp_driver_dma 2026-01-29 14:41:14 +08:00
Laukik Hase
421246323a feat(esp_tee): Add support for the RISC-V H/W stack guard mechanism 2026-01-29 11:49:14 +05:30
Jiang Jiang Jian
b18f302fe6 Merge branch 'feat/freq_change_enc_write_c5' into 'release/v6.0'
Revert "fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption" (v6.0)

See merge request espressif/esp-idf!45166
2026-01-29 10:19:51 +08:00
Xiao Xufeng
3411286544 refactor(spi_flash): reorganize header files and improve API encapsulation
This commit reorganizes SPI flash header files to better reflect their
visibility and intended usage:

1. Rename `esp_flash_port/` to `esp_flash_chips/`:
   - Better reflects that these headers are for chip driver implementations
   - All chip driver headers moved to `esp_flash_chips/` directory
   - Added README.md explaining semi-public nature of these headers

2. Move internal headers to `esp_private/`:
   - `esp_flash_internal.h` -> `esp_private/esp_flash_internal.h`
   - `memspi_host_driver.h` -> `esp_private/memspi_host_driver.h`

3. Move chip driver related headers to `esp_flash_chips/`:
   - `esp_private/esp_flash_types.h` -> `esp_flash_chips/esp_flash_types.h`
   - `spi_flash/spi_flash_defs.h` -> `esp_flash_chips/spi_flash_defs.h`
   - `spi_flash_override.h` -> `esp_flash_chips/spi_flash_override.h`
   - All `spi_flash_chip_*.h` headers moved to `esp_flash_chips/`

4. Code improvements:
   - Remove unused includes (e.g., `spi_flash_override.h` from `cache_utils.c`)
   - Use public API `esp_flash_get_size()` instead of direct member access
   - Add `esp_flash_is_quad_mode` to linker.lf for IRAM placement

5. Documentation updates:
   - Add README.md in `esp_flash_chips/` explaining semi-public headers
   - Update programming guide with warnings about internal headers
   - Update both English and Chinese documentation

6. Update all references across the codebase:
   - Update includes in `spi_flash` component
   - Update `bootloader_support`, `app_update`, `esp_tee`, `espcoredump`
   - Update example projects

Breaking changes:
- Headers moved to new locations require include path updates
- `custom_flash_driver` example temporarily disabled until external
  components are updated
2026-01-29 03:28:30 +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
Xiao Xufeng
79f7427729 fix(esp32p4): fix efuse, encryption and other rev_min usage 2026-01-28 21:46:00 +08:00
Xiao Xufeng
29587bb50a fix(esp32p4): fix rom and ld misuse min_rev 2026-01-28 21:42:03 +08:00
Jiang Jiang Jian
b34e8b03b9 Merge branch 'fix/fix_secure_boot_fast_wake_feature_v6.0' into 'release/v6.0'
fix(esp_system): fix ROM secure boot fast wake feature (v6.0)

See merge request espressif/esp-idf!44951
2026-01-28 17:50:30 +08:00
Jiang Jiang Jian
ea33171ec8 Merge branch 'feat/support_configurable_behavior_for_sleep_console_v6.0' into 'release/v6.0'
feat(esp_hw_support): Support configurable console uart behavior before sleep (v6.0)

See merge request espressif/esp-idf!44949
2026-01-28 17:50:23 +08:00
Xiao Xufeng
32e4e83f84 Revert "fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption"
This reverts commit cca0ac8c56.
2026-01-15 23:44:05 +08:00
Xiao Xufeng
206274d298 refactor(startup): make flash_init_state static 2026-01-13 18:01:32 +08:00
Mattias Schäffersmann
5faff98cc5 fix(hw_support): Fix crash when reconfiguring flash from 40 to 80 MHz
Reading from the flash while it is being reconfigured leads to data
corruption and a crash when the reconfiguration code is located in flash.
This is only an issue if a device has a bootloader that runs with 40 MHz
flash and an application flashed via OTA that runs with 80 MHz flash.
If bootloader and application run with the same flash speed, the
reconfiguration is basically a no-op and no data corruption occurs.
Fix reconfiguration by placing the code back into IRAM.

Issue introduced in: 7549d08

Closes: https://github.com/espressif/esp-idf/pull/17905
2026-01-13 18:01:32 +08:00
Jiang Jiang Jian
12d0df2537 Merge branch 'bugfix/fix_pvt_after_sleep_v6.0' into 'release/v6.0'
fix(pvt): fix pvt retention bug,replace pvt_retention with pvt_init

See merge request espressif/esp-idf!44927
2026-01-12 15:38:56 +08:00
zlq
1d41de96d8 fix(pvt): fix pvt retention bug,replace pvt_retention with pvt_init 2026-01-09 15:44:53 +08:00
wuzhenghui
c17787722c docs(esp_system): add detailed RTC memory layout documentation 2026-01-09 11:15:15 +08:00
wuzhenghui
9a20ef85f5 fix(esp_system): fix rom secure boot fast wake feature for c5/c6/h2/h21 2026-01-09 11:15:12 +08:00
wuzhenghui
a7f002c37e feat(esp_hw_support): add test case for esp_sleep_set_uart_handling 2026-01-09 11:09:03 +08:00
Jiang Jiang Jian
8afaa70921 Merge branch 'bugfix/c5_add_freq_restriction_again_v6.0' into 'release/v6.0'
fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption (v6.0)

See merge request espressif/esp-idf!44499
2026-01-09 10:21:02 +08:00
Jiang Jiang Jian
8d0fc97530 Merge branch 'bugfix/idfgh-16634_v6.0' into 'release/v6.0'
backport v6.0: remove the configurable constraint for sleep memory usage optimization option

See merge request espressif/esp-idf!44754
2026-01-08 13:49:39 +08:00
Song Ruo Jing
ce475d901d refactor(uart): split UART HAL into separate component 2026-01-04 16:02:57 +08:00
Li Shuai
0335029a7b fix(ld): fix cannot move location counter backwards (from 3fc88000 to 3fc87fff) 2026-01-04 10:44:33 +08:00
Marius Vikhammer
da1829ed25 fix(system): removed the exe flag from psram memory for esp32
extern_ram_seg segment was marked as RWX in the linker script
even though we cannot run code from PSRAM on ESP32.

This is a link-time check, and actual CPU RWX permissions are
controlled seperately so this has no practical implications,
but it could mistakenly be remarked upon during security scans
or checks by customers.
2025-12-29 16:39:01 +08:00
Xiao Xufeng
cca0ac8c56 fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption
This reverts commit 7145fc9558.
2025-12-24 02:31:42 +08:00
Mahavir Jain
7da79a653c Merge branch 'feature/mbedtls_psa_migration_v6.0' into 'release/v6.0'
feat(mbedtls): PSA Migration to release v6.0

See merge request espressif/esp-idf!43323
2025-12-21 13:52:48 +05:30
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
Jiang Jiang Jian
ac1e81f980 Merge branch 'fix/esp32p4_eco5_multicore_wfi_autoclock_gating_v6.0' into 'release/v6.0'
fix(esp_hw_support): enable core1 auto clock gating for esp32p4 rev3+ multicore (v6.0)

See merge request espressif/esp-idf!44255
2025-12-21 15:22:15 +08:00
Ashish Sharma
f306dbea84 feat(mbedtls): migrates ESP-TEE with PSA APIs 2025-12-19 07:28:33 +08:00
Xiao Xufeng
469953bd04 Revert "fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption"
This reverts commit 3c5d2e6b58.
2025-12-17 01:21:46 +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
Chen Chen
1b015d22eb refactor(esp_system): clear dependency on hal components 2025-12-16 09:11:59 +08:00
Samuel Obuch
5908c9574c fix(esp_hw_support): enable core1 auto clock gating for esp32p4 rev3+ multicore 2025-12-15 14:47:54 +01:00