Skip to content

Commit 6c968ce

Browse files
committed
Merge branch 'feature/p4_eco5_real_chip' into 'master'
p4: p4 eco5 real chip Closes IDF-13574 and IDF-13410 See merge request espressif/esp-idf!41396
2 parents 5d98c90 + 179d00a commit 6c968ce

File tree

262 files changed

+150
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+150
-59
lines changed

Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ mainmenu "Espressif IoT Development Framework Configuration"
123123
bool
124124
default "y" if IDF_TARGET="esp32p4"
125125
select IDF_TARGET_ARCH_RISCV
126-
select IDF_ENV_FPGA if ESP32P4_REV_MIN_200
127-
select IDF_ENV_BRINGUP if ESP32P4_REV_MIN_200
128126

129127
config IDF_TARGET_ESP32H2
130128
bool

components/bootloader/Kconfig.projbuild

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ menu "Bootloader config"
4343
int
4444
default 64 if IDF_TARGET_ESP32H2
4545
default 48 if IDF_TARGET_ESP32H21 || IDF_TARGET_ESP32H4
46-
default 90 if IDF_TARGET_ESP32P4
46+
default 90 if IDF_TARGET_ESP32P4 && ESP32P4_SELECTS_REV_LESS_V3
47+
default 100 if IDF_TARGET_ESP32P4 && !ESP32P4_SELECTS_REV_LESS_V3
4748
default 80
4849
help
4950
The CPU clock frequency to be at least raised to in 2nd bootloader. Invisible for users.

components/bootloader/subproject/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ idf_build_set_property(__OUTPUT_SDKCONFIG 0)
6969
set(LD_DEFAULT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/main/ld/${IDF_TARGET}")
7070
idf_build_set_property(BOOTLOADER_LINKER_SCRIPT "${LD_DEFAULT_PATH}/bootloader.rom.ld" APPEND)
7171
project(bootloader)
72-
if(CONFIG_ESP32P4_REV_MIN_200)
73-
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.rev2.ld")
72+
if(CONFIG_ESP32P4_REV_MIN_300)
73+
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.rev3.ld")
7474
else()
7575
target_linker_script("__idf_main" INTERFACE "${LD_DEFAULT_PATH}/bootloader.ld")
7676
endif()

components/bootloader_support/bootloader_flash/src/bootloader_flash_config_esp32p4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ static void bootloader_spi_flash_resume(void)
224224

225225
esp_err_t bootloader_init_spi_flash(void)
226226
{
227+
bootloader_init_mspi_clock();
227228
bootloader_init_flash_configure();
228229

229230
#if CONFIG_BOOTLOADER_FLASH_DC_AWARE

components/bootloader_support/src/esp_image_format.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ static esp_err_t verify_image_header(uint32_t src_addr, const esp_image_header_t
386386
}
387387

388388
#ifdef BOOTLOADER_BUILD
389-
#if CONFIG_IDF_TARGET_ESP32P4 && !CONFIG_ESP32P4_SELECTS_REV_LESS_V2
389+
#if CONFIG_IDF_TARGET_ESP32P4 && !CONFIG_ESP32P4_SELECTS_REV_LESS_V3
390390
#define ROM_STACK_START (SOC_ROM_STACK_START_REV2)
391391
#else
392392
#define ROM_STACK_START (SOC_ROM_STACK_START)

components/esp_hw_support/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ menu "Hardware Settings"
255255
config ESP_BRINGUP_BYPASS_CPU_CLK_SETTING
256256
bool
257257
default y if !SOC_CLK_TREE_SUPPORTED
258-
default y if ESP32P4_REV_MIN_200 # TODO: IDF-13574
259258
default n
260259
help
261260
This option is only used for new chip bringup, when
@@ -265,7 +264,6 @@ menu "Hardware Settings"
265264
config ESP_BRINGUP_BYPASS_RANDOM_SETTING
266265
bool
267266
default y if !SOC_RNG_SUPPORTED
268-
default y if ESP32P4_REV_MIN_200 # TODO: IDF-13574
269267
default n
270268
help
271269
This option is only used for new chip bringup, when

components/esp_hw_support/port/esp32p4/Kconfig.hw_support

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
comment "NOTE! Support of ESP32-P4 rev. <2.0 and >=2.0 is mutually exclusive"
1+
comment "NOTE! Support of ESP32-P4 rev. <3.0 and >=3.0 is mutually exclusive"
22
comment "Read the help text of the option below for explanation"
33

4-
config ESP32P4_SELECTS_REV_LESS_V2
5-
bool "Select ESP32-P4 revisions <2.0 (No >=2.x Support)"
4+
config ESP32P4_SELECTS_REV_LESS_V3
5+
bool "Select ESP32-P4 revisions <3.0 (No >=3.x Support)"
66
default y
77
help
88
Select this option to support ESP32-P4 revisions 0.x and 1.x.
9-
Revision 2.0 and revisions less than 2.0 have huge hardware difference.
10-
Revisions higher than 2.0 (included) is not compatible with 0.x and 1.x.
9+
Revisions higher than 3.0 (included) and revisions less than 3.0
10+
have huge hardware difference.
11+
Revisions higher than 3.0 (included) is not compatible with 0.x and 1.x.
1112

1213
choice ESP32P4_REV_MIN
1314
prompt "Minimum Supported ESP32-P4 Revision"
@@ -21,26 +22,26 @@ choice ESP32P4_REV_MIN
2122
this will also help to reduce binary size.
2223

2324
config ESP32P4_REV_MIN_0
24-
depends on ESP32P4_SELECTS_REV_LESS_V2
25+
depends on ESP32P4_SELECTS_REV_LESS_V3
2526
bool "Rev v0.0"
2627
config ESP32P4_REV_MIN_1
27-
depends on ESP32P4_SELECTS_REV_LESS_V2
28+
depends on ESP32P4_SELECTS_REV_LESS_V3
2829
bool "Rev v0.1"
2930
config ESP32P4_REV_MIN_100
30-
depends on ESP32P4_SELECTS_REV_LESS_V2
31+
depends on ESP32P4_SELECTS_REV_LESS_V3
3132
bool "Rev v1.0"
32-
config ESP32P4_REV_MIN_200
33-
bool "Rev v2.0"
34-
depends on !ESP32P4_SELECTS_REV_LESS_V2
35-
select ESPTOOLPY_NO_STUB if (IDF_ENV_FPGA || IDF_ENV_BRINGUP)
33+
config ESP32P4_REV_MIN_300
34+
bool "Rev v3.0"
35+
depends on !ESP32P4_SELECTS_REV_LESS_V3
36+
select ESPTOOLPY_NO_STUB # TODO: IDF-13911
3637
endchoice
3738

3839
config ESP32P4_REV_MIN_FULL
3940
int
4041
default 0 if ESP32P4_REV_MIN_0
4142
default 1 if ESP32P4_REV_MIN_1
4243
default 100 if ESP32P4_REV_MIN_100
43-
default 0 if ESP32P4_REV_MIN_200 # TODO: IDF-13410. To be updated to 200 when chip efuse is burnt
44+
default 300 if ESP32P4_REV_MIN_300
4445

4546
config ESP_REV_MIN_FULL
4647
int
@@ -50,15 +51,19 @@ config ESP_REV_MIN_FULL
5051
# MAX Revision
5152
#
5253

53-
comment "Maximum Supported ESP32-P4 Revision (Rev v2.99)"
54+
comment "Maximum Supported ESP32-P4 Revision (Rev v1.99)"
55+
depends on ESP32P4_SELECTS_REV_LESS_V3
56+
comment "Maximum Supported ESP32-P4 Revision (Rev v3.99)"
57+
depends on !ESP32P4_SELECTS_REV_LESS_V3
5458
# Maximum revision that IDF supports.
5559
# It can not be changed by user.
5660
# Only Espressif can change it when a new version will be supported in IDF.
5761
# Supports all chips starting from ESP32P4_REV_MIN_FULL to ESP32P4_REV_MAX_FULL
5862

5963
config ESP32P4_REV_MAX_FULL
6064
int
61-
default 199 #TODO: IDF-13574
65+
default 399 if !ESP32P4_SELECTS_REV_LESS_V3
66+
default 199 if ESP32P4_SELECTS_REV_LESS_V3
6267
# keep in sync the "Maximum Supported Revision" description with this value
6368

6469
config ESP_REV_MAX_FULL
@@ -78,6 +83,6 @@ config ESP_EFUSE_BLOCK_REV_MIN_FULL
7883

7984
config ESP_EFUSE_BLOCK_REV_MAX_FULL
8085
int
81-
default 99
86+
default 199
8287
comment "Maximum Supported ESP32-P4 eFuse Block Revision (eFuse Block Rev v0.99)"
8388
# The revision in the comment must correspond to the default value of ESP_EFUSE_BLOCK_REV_MAX_FULL

components/esp_hw_support/port/esp32p4/pmu_param.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ uint32_t get_act_hp_dbias(void)
336336
uint32_t hp_cali_dbias = HP_CALI_ACTIVE_DBIAS_DEFAULT;
337337
uint32_t blk_version = efuse_hal_blk_version();
338338
uint32_t hp_cali_dbias_efuse = 0;
339-
if (blk_version >= 2) {
339+
if (blk_version >= 2 && blk_version < 100) {
340340
hp_cali_dbias_efuse = efuse_ll_get_active_hp_dbias();
341341
}
342342
if (hp_cali_dbias_efuse > 0) {
@@ -357,7 +357,7 @@ uint32_t get_act_lp_dbias(void)
357357
uint32_t lp_cali_dbias = LP_CALI_ACTIVE_DBIAS_DEFAULT;
358358
uint32_t blk_version = efuse_hal_blk_version();
359359
uint32_t lp_cali_dbias_efuse = 0;
360-
if (blk_version >= 2) {
360+
if (blk_version >= 2 && blk_version < 100) {
361361
lp_cali_dbias_efuse = efuse_ll_get_active_lp_dbias();
362362
}
363363
if (lp_cali_dbias_efuse > 0) {

components/esp_hw_support/port/esp32p4/pmu_pvt.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static uint8_t get_lp_hp_gap(void)
3333
int8_t lp_hp_gap = 0;
3434
uint32_t blk_version = efuse_hal_blk_version();
3535
uint8_t lp_hp_gap_efuse = 0;
36-
if (blk_version >= 2) {
36+
if (blk_version >= 2 && blk_version < 100) {
3737
lp_hp_gap_efuse = efuse_ll_get_dbias_vol_gap();
3838
bool gap_flag = lp_hp_gap_efuse >> 4;
3939
uint8_t gap_abs_value = lp_hp_gap_efuse & 0xf;
@@ -77,7 +77,7 @@ static uint32_t pvt_get_lp_dbias(void)
7777
void pvt_auto_dbias_init(void)
7878
{
7979
uint32_t blk_version = efuse_hal_blk_version();
80-
if (blk_version >= 2) {
80+
if (blk_version >= 2 && blk_version < 100) {
8181
SET_PERI_REG_MASK(HP_SYS_CLKRST_REF_CLK_CTRL2_REG, HP_SYS_CLKRST_REG_REF_160M_CLK_EN);
8282
SET_PERI_REG_MASK(HP_SYS_CLKRST_SOC_CLK_CTRL1_REG, HP_SYS_CLKRST_REG_PVT_SYS_CLK_EN);
8383
/*config for dbias func*/
@@ -120,7 +120,7 @@ void pvt_auto_dbias_init(void)
120120
void pvt_func_enable(bool enable)
121121
{
122122
uint32_t blk_version = efuse_hal_blk_version();
123-
if (blk_version >= 2){
123+
if (blk_version >= 2 && blk_version < 100){
124124

125125
if (enable) {
126126
SET_PERI_REG_MASK(HP_SYS_CLKRST_REF_CLK_CTRL2_REG, HP_SYS_CLKRST_REG_REF_160M_CLK_EN);

0 commit comments

Comments
 (0)