174 Commits

Author SHA1 Message Date
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
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
armando 2b582796d3 feat(mmu): s31 support 2026-04-01 11:49:22 +08: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
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 4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +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
morris 796e85f0f6 refactor(tests): add missing sdkconfig files in the driver test 2026-01-04 22:36:04 +08:00
morris 29560e6102 refactor(gdma): skip the null buffer in mount pre-check 2025-12-22 22:02: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
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
C.S.M 07519fac25 fix(spi_flash): Cleanup jira tickets 2025-12-12 17:53:01 +08:00
wanckl 13e1ae57e1 refactor(driver_spi): clean spi soc caps 2025-12-12 11:29:42 +08:00
C.S.M f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
armando 1bebcab852 fix(ci): fixed spi_flash bld ci 2025-12-08 10:54:55 +08:00
Adam Múdry cb98f7b5ef Merge branch 'feat/spi_flash_bdl_support' into 'master'
feat(bdl): Add support for spi_flash

Closes IDF-12752

See merge request espressif/esp-idf!42127
2025-12-05 10:29:39 +01:00
Adam Múdry cf95a64365 feat(bdl): Add support for spi_flash 2025-12-04 16:16:28 +01:00
C.S.M 958a4bffc8 feat(esp32s31): Add soc register from t~z and manually headers 2025-11-20 11:58:03 +08:00
C.S.M a90c93541c feat(esp32s31): Introduce new target esp32s31 2025-11-17 14:48:55 +08:00
Marius Vikhammer cd741e995f test(system): restructured system build test test-apps 2025-10-27 09:25:07 +08:00
C.S.M c81cf3bdf6 refactor(spi_flash): Remove spi_flash rom driver patch config option 2025-10-22 10:37:19 +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 cd41b6a640 refactor: remove unnecessary driver dependencies from build rules 2025-10-11 14:02:29 +08:00
Peter Dragun 800f141f94 Merge branch 'feat/esptool_v5' into 'master'
Update esptool to v5: replace deprecated commands, documentation updates and cleanup

Closes IDF-12564

See merge request espressif/esp-idf!41176
2025-10-01 14:36:26 +08:00
Peter Dragun e3198fff3c feat: Update esptool to v5 2025-09-30 15:28:55 +02:00
Chen Chen a4710cc206 refactor(driver): remove redundant driver dependencies
now the driver component only contains legacy code for i2c, twai and
touch sensor
2025-09-30 15:47:45 +08:00
C.S.M b145ede835 refactor(mspi): Make mspi hal layer independent 2025-09-26 14:57:54 +08:00
armando 00022a379a change: remove deprecated items 2025-09-15 10:52:28 +08:00
Marek Fiala 9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Sudeep Mohanty 26c19928a9 feat(freertos): Place FreeRTOS in flash by default
The following updates have been made in this commit:
- The commit places FreeRTOS code in flash memory by default.
- CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH has been removed.
- CONFIG_FREERTOS_IN_IRAM is unhidden and can be used to restore the
  previous memory placement.
- A test has been added for users to conduct performance impact testing
  based on memory placement configurations.
2025-08-07 19:56:30 +08:00
harshal.patil 60ff4bca9b refactor(esp_system): Update all references of the memory protection configs 2025-08-04 11:43:01 +05:30
Marius Vikhammer 4065fb20f3 Merge branch 'feature/esp_test_utils_component' into 'master'
change(test_utils): moved test_utils out of unit-test-app project

See merge request espressif/esp-idf!40678
2025-08-01 11:04:37 +08:00
C.S.M b765ad43cf feat(spi_flash): Add flash suspend support on esp32h21, esp32h4 2025-07-21 19:24:00 +08:00
C.S.M 50aee21d33 feat(spi_flash): Add basic support for esp32h4 2025-07-21 19:24:00 +08:00
C.S.M bc9fa040da feat(spi_flash): support spi_flash on esp32h21 2025-07-21 19:24:00 +08:00
Marius Vikhammer bf84ab652a change(test_utils): moved test_utils component to tools/test_apps/components/ 2025-07-21 14:05:50 +08:00
Sudeep Mohanty c8f68c72a7 Merge branch 'feat/remove_global_cmake_vars' into 'master'
change(esptool_py): Make esptool_py component idempotent in the build

Closes IDF-13073

See merge request espressif/esp-idf!39589
2025-07-17 17:13:49 +02:00
Sudeep Mohanty c29f473a78 refactor(esptool_py): Remove elf variable dependencies
This commit updates all test_apps that have dependency on the elf
variable. Such test_apps now fetch the executable target from the build
properties.
2025-07-10 11:26:28 +02:00
Fu Hanxi a5257dcc39 ci: apply idf-ci pytest plugin
Removed

- target markers. Now must use target as parametrization in esp-idf
- host test markers. Now will be automatically added with linux target and qemu marker
2025-07-09 10:33:28 +02:00
Xiao Xufeng 83ca12c8e0 fix(esp_flash): fixed issue of escaping boundary check
Also patched corresponding ROM functions
2025-06-24 15:30:11 +08:00
Xiao Xufeng 477af3b4a8 ci(mmap): enable mmap and XIP related cases for c5 2025-04-11 11:02:11 +08:00
wanckl 8994f8fe70 feat(spi_flash): add support gpspi ext_flash 2025-04-03 11:27:13 +08:00
Chen Ji Chang c3a3cc8657 Merge branch 'feat/h4_enable_ci_build' into 'master'
feat(esp32h4): enable ESP32H4 ci build

Closes IDF-12332

See merge request espressif/esp-idf!37921
2025-03-31 23:49:48 +08:00
Song Ruo Jing b38ac5ad82 feat(uart): add uart_detect_bitrate_bps API for data line bitrate measurement
Closes https://github.com/espressif/esp-idf/issues/14721
2025-03-28 15:03:19 +08:00