1000 Commits

Author SHA1 Message Date
Tomas Rohlinek
ff1099f39b Merge branch 'feat/refactor_stdio_vfs' into 'master'
feat(storage/stdio): refactor stdio vfs

Closes IDF-15109

See merge request espressif/esp-idf!44351
2026-05-27 11:36:05 +02:00
nilesh.kale
36fdf38ad4 fix: cleanup xts_aes_reg.h dependency for H21, C61 and H4 2026-05-20 09:29:20 +05:30
nilesh.kale
cae147af08 feat: enable flash encryption for ESP32-H4 2026-05-20 09:29:20 +05:30
Konstantin Kondrashov
485ab9aa29 Merge branch 'feature/recovery_bootloader_support' into 'master'
feat(bootloader): Support recovery bootloader for ESP32P4

Closes IDF-15653 and IDF-13165

See merge request espressif/esp-idf!48215
2026-05-12 23:24:40 +03:00
Chen Jichang
3c3b9a6a4e ci(esp32h4): disable tests which cannot pass 2026-05-11 16:48:58 +08:00
Konstantin Kondrashov
dd9a0a9a93 fix(test_apps): Increase CONFIG_PARTITION_TABLE_OFFSET to 0x9000
Fix some test apps that have a partition table offset of 0x8000,
which left no room for the bootloader for some chips.
2026-05-08 16:45:14 +03:00
Jiang Jiang Jian
39f0ef3528 Merge branch 'feat/support_s31_sleep_features' into 'master'
feat(esp_hw_support): support esp32s31 lowpower features

Closes IDF-5660, IDF-14643, IDF-14645, IDF-14647, IDF-14648, IDF-14784, PM-708, and PM-714

See merge request espressif/esp-idf!47216
2026-05-07 19:22:58 +08:00
wuzhenghui
7c10126309 feat(esp_hw_support): isolate all digital io to suppress pad leakage on TOP pd sleep 2026-05-07 08:39:56 +08:00
C.S.M
589c25931c fix(spi_flash): Fix flash hpm build failure,
Closes https://github.com/espressif/esp-idf/issues/18535
2026-05-06 14:57:19 +08:00
Armando (Dou Yiwen)
9501efde96 Merge branch 'feat/mmu_configurable_page_size_s31' into 'master'
mmu: supported configurable page size on s31

See merge request espressif/esp-idf!47193
2026-04-21 03:31:16 +00:00
Chen Ji Chang
83e7b11716 Merge branch 'feat/lcd_use_apll_clock' into 'master'
refactor(clk_tree): use general api to enable the clk

Closes IDF-11478 and IDF-12972

See merge request espressif/esp-idf!35952
2026-04-20 22:12:01 +08:00
armando
8fc4f9c108 feat(cache): added cache invalidate all 2026-04-20 16:58:29 +08:00
Xorlent
51d059232b Fix output bit range in bitscrambler documentation
Destination bit range incorrect in `Sub-instructions` example
2026-04-17 17:20:28 +08:00
Chen Jichang
6e206dd173 refactor(clk_tree): use general api to enable the clk 2026-04-16 20:03:06 +08:00
wanckl
64704886b7 refactor(driver_spi): remove some SPI_LL_xxx SOC_xxx macros 2026-04-10 13:59:20 +08:00
C.S.M
152b5ccb4c ci(esp32s31): Add ci target test for esp32s31 2026-04-03 11:38:45 +08:00
Tomáš Rohlínek
e041542092 test(mspi_test): relax Unity heap leak threshold for lazy stdio 2026-04-01 15:32:55 +02:00
armando
2b582796d3 feat(mmu): s31 support 2026-04-01 11:49:22 +08:00
armando
ebbd9cdb59 feat(psram): support psram device driver 2026-03-31 13:56:43 +08:00
hebinglin
474d89b4c2 fix(clk): update H21 ECO1 to use 64MHz clock for mspi 2026-03-25 15:38:49 +08:00
Guillaume Souchere
5415465164 feat(esp_hw_support): Add esp_cpu.h support for linux builds 2026-03-17 07:49:36 +01:00
Wu Zheng Hui
261683e6b0 Merge branch 'fix/fix_sleep_exception_in_spi_flash_rom_impl' into 'master'
fix(esp_hw_support): fix sleep exception in spi flash rom impl

Closes IDF-15423

See merge request espressif/esp-idf!46409
2026-03-11 10:30:08 +08:00
wuzhenghui
c59c3a2c8d fix(esp_rom): sync spi_flash_disable/enable_cache patches to rom implementation 2026-03-09 21:21:24 +08:00
armando
701aa00998 fix(mmap): added 24bit addr check 2026-03-09 17:23:37 +08:00
Song Ruo Jing
c1695b4533 fix(flash): flash erase operation may fail to raise PMS exception 2026-03-03 17:41:07 +08:00
Antonio Almeida
e09e5d658f docs(spi_flash): Fix redundant phrasing in esp_flash_get_size
Fixed redundant wording in esp_flash_get_size .
2026-02-28 10:43:56 +01:00
Chen Ji Chang
7a8a5d8852 Merge branch 'test/parlio_flash_enc_test' into 'master'
test(parlio,rmt,lcd): add virtual flash encryption test

Closes IDF-15064, IDF-15065, and IDF-15069

See merge request espressif/esp-idf!45006
2026-02-06 19:26:22 +08:00
Chen Jichang
b8c527a87c refactor(flash_enc): move esp_flash_encryption_enabled() to efuse component 2026-02-05 11:42:08 +08:00
C.S.M
879d74e298 fix(spi_flash): Fix esp32p4 120m flash suspend failed 2026-02-04 11:42:35 +08:00
Xiao Xufeng
933fb3a717 fix(spi_flash): add suspend related code back 2026-01-29 14:31:27 +08:00
Michael (XIAO Xufeng)
5984b29af5 Merge branch 'refactor/spi_flash_private' into 'master'
refactor(spi_flash): reorganize header files, improve encapsulation and simplify ROM implementation

See merge request espressif/esp-idf!44347
2026-01-28 17:39:51 +08:00
Igor Udot
f4cb052666 Merge branch 'ci/base_components' into 'master'
ci: use common_components in depends_components

See merge request espressif/esp-idf!45070
2026-01-26 09:08:11 +08:00
morris
0469db2f83 refactor(rcc): unify the usage of clock control macros for peripherals
- Removed conditional definitions for various RCC_ATOMIC macros across
multiple files, replacing them with a unified PERIPH_RCC_ATOMIC() macro.
- Updated instances where specific RCC_ATOMIC macros were used to ensure
consistent usage of PERIPH_RCC_ATOMIC().
- Deleted unused uart_share_hw_ctrl.h file as its functionality is now
integrated into the new structure.
2026-01-23 18:28:13 +08:00
igor.udot
4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
Xiao Xufeng
261f552762 fix(spi_flash): fixed overboundary check skipping of erase and write_encrypted 2026-01-23 03:38:54 +08:00
Xiao Xufeng
49cc819738 refactor(spi_flash): not patching api_funcs on C3 and S3 2026-01-23 03:38:54 +08:00
Xiao Xufeng
8dbf23630a 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-23 03:38:54 +08:00
Xiao Xufeng
758cf6e1a3 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-23 03:38:54 +08:00
Song Ruo Jing
fc4f07abd6 feat(mspi): support 120MHz flash and psram for esp32c61 2026-01-21 14:38:04 +08:00
morris
36a6bfe3a6 feat(soc): make flash encryption depends on SOC_FLASH_ENC_SUPPORTED 2026-01-14 16:04:28 +08:00
morris
dad6e2b020 Merge branch 'feat/support_clk_tree_on_h4mp' into 'master'
feat(clk): support clk tree on h4mp

Closes IDF-13632

See merge request espressif/esp-idf!43962
2026-01-07 15:21:04 +08:00
morris
796e85f0f6 refactor(tests): add missing sdkconfig files in the driver test 2026-01-04 22:36:04 +08:00
Song Ruo Jing
215c9993bf fix(clk): update H4 to use 64MHz clock for mspi
And add pll clock ref count
2026-01-04 14:07:01 +08:00
armando
f8135a43cb fix(cache): fixed cache sync ops concurrent call issue
Closes https://github.com/espressif/esp-idf/issues/18023
2025-12-24 01:12:47 +00:00
morris
29560e6102 refactor(gdma): skip the null buffer in mount pre-check 2025-12-22 22:02:28 +08:00
wuzhenghui
353075ca30 change(esp_hw_support): reject sleep request if task stack in PSRAM 2025-12-19 10:27:28 +08:00
Xiao Xufeng
230ee88d99 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-16 17:42:44 +08:00
Mahavir Jain
c4fda6cb2f fix(spi_flash): limit CPU clock to 160MHz for encrypted flash writes 2025-12-16 17:41:25 +08:00
morris
291554cd09 refactor(global): remove completed todos in the codebase 2025-12-15 22:40:15 +08:00
Wan Lei
a633083633 Merge branch 'fix/spi_clean_soc_caps' into 'master'
refactor(driver_spi): clean spi soc caps

See merge request espressif/esp-idf!44083
2025-12-15 20:48:21 +08:00