Commit Graph

3239 Commits

Author SHA1 Message Date
wuzhenghui
a0803ddd01 fix(esp_hw_support): restore brownout after deep sleep rejection on ESP32-S2
ESP32-S2 disables the brownout detector before deep sleep; if sleep is
rejected, re-init it so BOD is not left disabled (PM-519).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-04 20:18:44 +08:00
Jiang Jiang Jian
4b2669edde Merge branch 'feat/pm_components_ram_optimize' into 'master'
feat(pm): pm components ram optimize

Closes PM-840

See merge request espressif/esp-idf!51672
2026-09-04 10:32:26 +08:00
Jiang Jiang Jian
73114d5a84 Merge branch 'bugfix/fix_wifi_wakeup_failed_from_modem_state' into 'master'
fix(wifi): fix wifi wakeup failed from modem state

Closes PM-860

See merge request espressif/esp-idf!52143
2026-09-02 17:28:01 +08:00
Mahavir Jain
a3192567d5 Merge branch 'feat/cpu_region_protection_h4' into 'master'
Memory region protection for ESP32-H4

Closes IDF-12588

See merge request espressif/esp-idf!47070
2026-08-31 17:41:52 +05:30
Mahavir Jain
d3fe62cee4 Merge branch 'feat/tee_sec_stg_non_det_sign' into 'master'
change(esp_tee): Force non-deterministic ECDSA signing for TEE secure storage keys

Closes IDF-15937 and IDF-15939

See merge request espressif/esp-idf!50355
2026-08-31 16:07:52 +05:30
wuzhenghui
a9dee592d6 feat(esp_hw_support): use dynamic memory allocation for retention module instances 2026-08-31 16:08:43 +08:00
wuzhenghui
3c2a0cb4f6 change(esp_hw_support): optimize pmu_sleep RAM cost 2026-08-31 15:26:22 +08:00
wuzhenghui
14e25a8abc change(esp_hw_support): optimize sleep_phy retention static RAM cost 2026-08-31 15:26:22 +08:00
wuzhenghui
11c590c053 change(esp_hw_support): optimize retention driver RAM cost 2026-08-31 15:26:18 +08:00
Chen Jichang
3e32f8bb54 feat(esp32h4): update rom.ld files for esp32h4 eco2 2026-08-28 15:31:08 +08:00
Laukik Hase
4812dbd2d8 feat(esp_tee): Use CTR-DRBG for assisting random number generation in TEE
- For ESP-TEE, fault-assert in `esp_random()` if the RNG is held in a
  freeze state
2026-08-28 10:20:54 +05:30
sibeibei
378590ccff fix(wifi): fix wifi wakeup failed from modem state 2026-08-27 16:54:18 +08:00
Roland Dobai
099dc69d3f Merge branch 'fix/esp_mspi_align_psram_buildv2' into 'master'
fix(esp_hw_support): Exclude MSPI alignment helper from bootloader

See merge request espressif/esp-idf!51919
2026-08-26 13:56:49 +02:00
harshal.patil
53c9439161 change(esp_hw_support): rework ESP32-H4 region protection to the application-owned layout
The bootloader programs only unlocked PMA entries (no PMP), so the layout is
not a bootloader<->application ABI; the application resets all entries, programs
them in ascending order from IRAM, and locks everything. Verified on ESP32-H4 v0.1.
2026-08-25 10:40:28 +05:30
harshal.patil
a7f4dbf35a fix(soc): make SOC_RAM_ICACHE1_HIGH an exclusive bound on ESP32-H4
Every other SOC_*_HIGH macro in soc.h is an exclusive region end;
SOC_RAM_ICACHE1_HIGH was the inclusive last byte (0x40867fff). This
also made the reclaimed ICache1 heap region in single core mode
(components/heap/port/esp32h4/memory_layout.c, sized as HIGH - LOW)
one byte short. Change the value to the exclusive end 0x40868000 and
drop the +1 compensation at the SOC_HP_RAM_HIGH definition.
2026-08-25 10:40:28 +05:30
harshal.patil
07debe6edc feat(esp_hw_support): Memory region protection for ESP32-H4 2026-08-25 10:40:28 +05:30
Armando (Dou Yiwen)
b532be2707 Merge branch 'fix/fix_mpll_cali_flow_s31' into 'master'
mpll: improved mpll calibration flow on s31

See merge request espressif/esp-idf!51928
2026-08-25 02:48:14 +00:00
Marius Vikhammer
c931510149 Merge branch 'fix/psram_dependency' into 'master'
fix(build_system): cleaned up esp_psram dependencies

See merge request espressif/esp-idf!51934
2026-08-25 10:39:01 +08:00
wuzhenghui
ab48e180ac fix(spi_flash): integrate branch prediction control during cache operations 2026-08-24 13:27:04 +08:00
Marius Vikhammer
532b433246 fix(build_system): cleaned up esp_psram dependencies
Also moved mspi_mb functionality to esp_hw_support together with
other mspi functionality
2026-08-24 11:12:17 +08:00
Armando (Dou Yiwen)
9726078b55 fix(mpll): improved mpll calibration flow on esp32s31
Signed-off-by: Armando (Dou Yiwen) <douyiwen@espressif.com>
2026-08-24 09:34:36 +08:00
morris
1c13ed9bf3 Merge branch 'fix/esp_idf_h4_pmu_icg_mapping' into 'master'
fix(esp_hw_support): pmu_icg_mapping define mistake

See merge request espressif/esp-idf!51905
2026-08-21 11:49:03 +08:00
Jiang Jiang Jian
9ad859a1e4 Merge branch 'fix/esp32s31_cpu_clk_src_dependency' into 'master'
fix(esp_hw_support): fix esp32s31 cpu clk src dependency

Closes BT-4455

See merge request espressif/esp-idf!51572
2026-08-20 20:53:03 +08:00
Sudeep Mohanty
0a252a985d fix(esp_hw_support): Exclude MSPI alignment helper from bootloader
esp_mspi_align.c resolves PSRAM encryption state through esp_psram, a
dependency esp_hw_support declares only outside the no-OS builds. Nothing
in the bootloader calls the helper, so drop the source there rather than
keep one whose dependency cannot be satisfied. ESP-TEE still builds it,
as its mbedtls port calls into it.
2026-08-20 14:01:19 +02:00
hebinglin
27fe024e30 fix(esp_hw_support): pmu_icg_mapping define mistake 2026-08-20 17:23:26 +08:00
wuzhenghui
a3b62bc3c4 fix(esp_hw_support): fix ESP32-S31 CPU/DFS clk_tree refcount and keep clock source during DFS 2026-08-20 16:00:52 +08:00
Marius Vikhammer
844a03718a Merge branch 'feat/c5_eco4_newlib_support' into 'master'
change(esp_libc): use C5 ECO4 ROM newlib functions

See merge request espressif/esp-idf!50280
2026-08-20 15:10:47 +08:00
morris
fe465ae1fe Merge branch 'fix/psram-ecc-mspi-dma-align' into 'master'
fix(mspi): handle PSRAM ECC DMA alignment across MSPI users

Closes IDF-15850, IDF-15910, and IDF-15700

See merge request espressif/esp-idf!49987
2026-08-20 11:51:46 +08:00
Mahavir Jain
53076b8aad Merge branch 'feat/enable_dpu_region_protection_for_esp32s31' into 'master'
feat: enable cpu region protection for esp32s31

Closes IDF-15238

See merge request espressif/esp-idf!49270
2026-08-19 19:13:11 +05:30
Jiang Jiang Jian
8c301616f8 Merge branch 'fix/fix_esp32p4_missing_pvt_clock' into 'master'
fix(esp_hw_support): fix esp32p4 PVT clock lost

See merge request espressif/esp-idf!51756
2026-08-19 16:12:21 +08:00
harshal.patil
01b86f1269 change(esp_hw_support): harden the ESP32-S31 PSRAM region permissions
Both PSRAM layouts were mapped as a single RWX window, so everything in external
RAM - the heap included - was executable.

PSRAM used as data only is now RW, and under XIP-from-PSRAM it is split per
section as ESP32-P4 does: .text RX, .rodata read-only, and the MMU-page
alignment gaps and the reclaimed heap RW, so neither is executable.

Both describe the layout that esp_psram_init() produces, and the entries are
locked, so - again as on ESP32-P4 - they are only narrowed when
CONFIG_SPIRAM_PRE_CONFIGURE_MEMORY_PROTECTION says that layout applies. Without
it the application owns the region and PSRAM stays RWX.

The per-section entries cost one PMP entry more than the 16 available, so the CPU
subsystem and peripheral windows are chained as TOR entries, taking one entry
instead of three.

soc.h is corrected against the S31 bus address map: the peripheral window base
was 1 MB too low, and the LP peripheral top, derived from a register base plus a
size rather than from the map, was 16 KB short. SOC_NON_CACHEABLE_OFFSET_FLASH
is added.
2026-08-19 09:39:52 +05:30
Jiang Jiang Jian
2247886aef Merge branch 'fix/fix_esp32s31_stuck_in_phy_disable' into 'master'
fix(esp_hw_support): fix esp32s31 stuck in phy_disable if mdoem module is not initialized

Closes PM-839

See merge request espressif/esp-idf!51773
2026-08-18 15:10:51 +08:00
Mahavir Jain
50d1fb0773 fix(esp_hw_support): run ESP32-P4 PMA programming from IRAM
The bootloader locks PMA entries on core 0 only (PMA is per-hart), so
core 1 applies its PMA configuration with effective writes. Executing
that from flash momentarily makes the flash aperture non-cacheable
while reprogramming its entry, which executes ciphertext with flash
encryption enabled (illegal instruction -> CPU lockup).
2026-08-17 19:23:58 +05:30
Mahavir Jain
a03ec273f0 fix(esp_hw_support): fix ESP32-S31 CPU lockup with flash encryption during PMA setup
Run esp_cpu_configure_invalid_regions() from IRAM: it reprograms the PMA
entry that keeps the flash aperture cacheable, so an instruction fetched
from flash inside the reprogramming window bypasses the cache and, with
flash encryption enabled, executes ciphertext (illegal instruction ->
CPU lockup).

Also move the PSRAM PMA entry to index 7 so that the application layout
matches the entry earlier bootloaders programmed and locked, keeping the
full layout effective under such bootloaders.
2026-08-17 19:23:58 +05:30
Mahavir Jain
3ee34cdac5 change(esp_hw_support): drop the frozen PMP entry layout for ESP32-S31
Freezing PMP entry indices as a bootloader<->application ABI (pmp_layout.h)
is only needed on targets where an already-shipped bootloader locks PMP
entries (C5, C6, C61, H2, P4). No such bootloader has ever shipped for
ESP32-S31 and, per the v6.2 PMP ownership policy, the bootloader never
configures or locks any PMP entry on this target - so there is no ABI to
freeze. Program all entries by plain index (as on ESP32-H4/H21) and state
that the application-owned layout is not an ABI.
2026-08-17 19:23:58 +05:30
nilesh.kale
b5891edb9b feat: enable cpu region protection for esp32s31 2026-08-17 19:23:58 +05:30
Chen Jichang
e008f5a627 refactor(gdma): increase performance and optimize api 2026-08-17 17:02:06 +08:00
Chen Jichang
2b8029c775 feat(mspi): split dma and mspi alignment 2026-08-17 16:49:27 +08:00
cjin
5533d153f5 feat(sleep): applied regi2c conflict process at regdma rf 2026-08-14 16:29:55 +08:00
wuzhenghui
5a144634d7 fix(esp_hw_support): fix esp32s31 stuck in phy_disable if mdoem module is not initialized 2026-08-14 12:22:51 +08:00
wuzhenghui
2c4ad9caad fix(esp_hw_support): fix esp32p4 PVT clock lost 2026-08-14 11:24:56 +08:00
Krzysztof Budzynski
157f40b58b Merge branch 'docs/update_get_started_s31' into 'master'
docs: Update Get Started for ESP32-S31

Closes IDF-15368

See merge request espressif/esp-idf!51543
2026-08-13 14:19:16 +08:00
luweike
7fbedd2b61 docs: Update Get Started for ESP32-S31 2026-08-12 15:00:06 +08:00
Armando (Dou Yiwen)
346a36ada1 feat(flash): p4 flash 120MHz is no longer experimental feature
Signed-off-by: Armando (Dou Yiwen) <douyiwen@espressif.com>
2026-08-12 13:54:44 +08:00
Armando (Dou Yiwen)
81acd9c18f fix(mpll): fix mpll calibration fail bug 2026-08-11 17:57:55 +08:00
Wu Zheng Hui
234c68ba93 Merge branch 'feat/support_esp32s31_xtal_fosc_force_pu' into 'master'
feat: update XTAL sleep FPU parameters to save power

Closes PM-824 and IDF-15576

See merge request espressif/esp-idf!51100
2026-08-10 15:37:00 +08:00
Sudeep Mohanty
b89de9bbaf Merge branch 'feat/improve_freertos_crit_section_perf' into 'master'
feat(freertos): Speed up multi-core critical section entry and exit

Closes IDFGH-18060

See merge request espressif/esp-idf!51531
2026-08-07 13:17:28 +02:00
Song Ruo Jing
4ecd3e2287 Merge branch 'bugfix/uart_extra_current_consumption_in_sleep' into 'master'
fix(uart): reduce current consumption in sleep mode

See merge request espressif/esp-idf!50416
2026-08-07 19:07:26 +08:00
Sudeep Mohanty
9ab3da0da8 feat(freertos): speed up SMP critical section enter and exit
The critical section port already disables interrupts and reads the core id for
the whole section, but spinlock_acquire()/spinlock_release() then disabled
interrupts again to the same level and re-read the core id register.

Add spinlock_acquire_impl()/spinlock_release_impl(), which take a caller-supplied
owner id and skip interrupt management, and reuse them from
spinlock_acquire()/spinlock_release() to avoid duplicated code. The Xtensa and
RISC-V ports now read the core id once and call the impl variants, removing one
core id read and one interrupt mask/restore per critical section enter and exit.

Closes https://github.com/espressif/esp-idf/issues/18908
2026-08-06 12:43:28 +02:00
Mahavir Jain
2495e37a48 Merge branch 'feat/pma_pmp_lock_policy' into 'master'
Stop locking PMP in the bootloader and freeze the entry layout

See merge request espressif/esp-idf!50326
2026-08-06 11:31:39 +05:30