kconfig: introduced CONFIG_IDF_ENV_BRINGUP for new chip bringup usage

This commit is contained in:
Armando 2023-06-20 16:04:41 +08:00 committed by Armando (Dou Yiwen)
parent 360f551f48
commit c448597f24
20 changed files with 90 additions and 4 deletions

16
Kconfig
View File

@ -11,9 +11,23 @@ mainmenu "Espressif IoT Development Framework Configuration"
default "y" default "y"
config IDF_ENV_FPGA config IDF_ENV_FPGA
# This option is for internal use only
bool bool
option env="IDF_ENV_FPGA" option env="IDF_ENV_FPGA"
help
- This option is for internal use only.
- Enabling this option will help enable all FPGA support so as to
run ESP-IDF on an FPGA. This can help reproduce some issues that
only happens on FPGA condition, or when you have to burn some
efuses multiple times.
config IDF_ENV_BRINGUP
bool
default "y" if IDF_TARGET_ESP32P4
help
- This option is ONLY used when doing new chip bringup.
- This option will only enable necessary hw / sw settings for running
a hello_world application.
config IDF_CI_BUILD config IDF_CI_BUILD
bool bool

View File

@ -429,6 +429,7 @@ menu "Bootloader config"
config BOOTLOADER_FLASH_XMC_SUPPORT config BOOTLOADER_FLASH_XMC_SUPPORT
bool "Enable the support for flash chips of XMC (READ HELP FIRST)" bool "Enable the support for flash chips of XMC (READ HELP FIRST)"
default y default y
depends on !IDF_ENV_BRINGUP
help help
Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow. Perform the startup flow recommended by XMC. Please consult XMC for the details of this flow.
XMC chips will be forbidden to be used, when this option is disabled. XMC chips will be forbidden to be used, when this option is disabled.

View File

@ -275,4 +275,15 @@ menu "Hardware Settings"
default 3 if ESP_CRYPTO_DPA_PROTECTION_LEVEL_HIGH default 3 if ESP_CRYPTO_DPA_PROTECTION_LEVEL_HIGH
endmenu endmenu
# Invisible bringup bypass options for esp_hw_support component
config ESP_BRINGUP_BYPASS_CPU_CLK_SETTING
bool
default y if !SOC_CLK_TREE_SUPPORTED
default n
help
This option is only used for new chip bringup, when
clock support isn't done yet. So with this option,
we use xtal on FPGA as the clock source.
endmenu endmenu

View File

@ -12,7 +12,7 @@ endif()
set(srcs "esp_err.c") set(srcs "esp_err.c")
if(CONFIG_IDF_ENV_FPGA) if(CONFIG_IDF_ENV_FPGA OR CONFIG_ESP_BRINGUP_BYPASS_CPU_CLK_SETTING)
list(APPEND srcs "fpga_overrides.c") list(APPEND srcs "fpga_overrides.c")
endif() endif()
@ -86,7 +86,7 @@ else()
include(${CMAKE_CURRENT_LIST_DIR}/ld/ld.cmake) include(${CMAKE_CURRENT_LIST_DIR}/ld/ld.cmake)
endif() endif()
if(CONFIG_IDF_ENV_FPGA) if(CONFIG_IDF_ENV_FPGA OR CONFIG_ESP_BRINGUP_BYPASS_CPU_CLK_SETTING)
# Forces the linker to include fpga stubs from this component # Forces the linker to include fpga stubs from this component
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u esp_common_include_fpga_overrides") target_link_libraries(${COMPONENT_LIB} INTERFACE "-u esp_common_include_fpga_overrides")
endif() endif()

View File

@ -0,0 +1,25 @@
# TODO: IDF-7526 , Check all this file to update the frequency
choice ESP_DEFAULT_CPU_FREQ_MHZ
prompt "CPU frequency"
default ESP_DEFAULT_CPU_FREQ_MHZ_40 if IDF_ENV_FPGA || ESP_BRINGUP_BYPASS_CPU_CLK_SETTING
default ESP_DEFAULT_CPU_FREQ_MHZ_160
help
CPU frequency to be set on application startup.
config ESP_DEFAULT_CPU_FREQ_MHZ_40
bool "40 MHz"
depends on IDF_ENV_FPGA || ESP_BRINGUP_BYPASS_CPU_CLK_SETTING
config ESP_DEFAULT_CPU_FREQ_MHZ_80
bool "80 MHz"
config ESP_DEFAULT_CPU_FREQ_MHZ_120
bool "120 MHz"
config ESP_DEFAULT_CPU_FREQ_MHZ_160
bool "160 MHz"
endchoice
config ESP_DEFAULT_CPU_FREQ_MHZ
int
default 40 if ESP_DEFAULT_CPU_FREQ_MHZ_40
default 80 if ESP_DEFAULT_CPU_FREQ_MHZ_80
default 120 if ESP_DEFAULT_CPU_FREQ_MHZ_120
default 160 if ESP_DEFAULT_CPU_FREQ_MHZ_160

View File

@ -3,7 +3,7 @@ menu "Serial flasher config"
config ESPTOOLPY_NO_STUB config ESPTOOLPY_NO_STUB
bool "Disable download stub" bool "Disable download stub"
default "y" if IDF_ENV_FPGA default "y" if IDF_ENV_FPGA || IDF_ENV_BRINGUP
default "n" default "n"
help help

View File

@ -147,6 +147,10 @@ config SOC_ULP_FSM_SUPPORTED
bool bool
default y default y
config SOC_CLK_TREE_SUPPORTED
bool
default y
config SOC_DPORT_WORKAROUND_DIS_INTERRUPT_LVL config SOC_DPORT_WORKAROUND_DIS_INTERRUPT_LVL
int int
default 5 default 5

View File

@ -96,6 +96,7 @@
#define SOC_TOUCH_SENSOR_SUPPORTED 1 #define SOC_TOUCH_SENSOR_SUPPORTED 1
#define SOC_BOD_SUPPORTED 1 #define SOC_BOD_SUPPORTED 1
#define SOC_ULP_FSM_SUPPORTED 1 #define SOC_ULP_FSM_SUPPORTED 1
#define SOC_CLK_TREE_SUPPORTED 1
#if SOC_CAPS_ECO_VER < 200 #if SOC_CAPS_ECO_VER < 200
#define SOC_DPORT_WORKAROUND 1 #define SOC_DPORT_WORKAROUND 1

View File

@ -87,6 +87,10 @@ config SOC_BOD_SUPPORTED
bool bool
default y default y
config SOC_CLK_TREE_SUPPORTED
bool
default y
config SOC_XTAL_SUPPORT_26M config SOC_XTAL_SUPPORT_26M
bool bool
default y default y

View File

@ -46,6 +46,7 @@
#define SOC_SECURE_BOOT_SUPPORTED 1 #define SOC_SECURE_BOOT_SUPPORTED 1
#define SOC_SYSTIMER_SUPPORTED 1 #define SOC_SYSTIMER_SUPPORTED 1
#define SOC_BOD_SUPPORTED 1 #define SOC_BOD_SUPPORTED 1
#define SOC_CLK_TREE_SUPPORTED 1
/*-------------------------- XTAL CAPS ---------------------------------------*/ /*-------------------------- XTAL CAPS ---------------------------------------*/
#define SOC_XTAL_SUPPORT_26M 1 #define SOC_XTAL_SUPPORT_26M 1

View File

@ -139,6 +139,10 @@ config SOC_BOD_SUPPORTED
bool bool
default y default y
config SOC_CLK_TREE_SUPPORTED
bool
default y
config SOC_XTAL_SUPPORT_40M config SOC_XTAL_SUPPORT_40M
bool bool
default y default y

View File

@ -62,6 +62,7 @@
#define SOC_SECURE_BOOT_SUPPORTED 1 #define SOC_SECURE_BOOT_SUPPORTED 1
#define SOC_MEMPROT_SUPPORTED 1 #define SOC_MEMPROT_SUPPORTED 1
#define SOC_BOD_SUPPORTED 1 #define SOC_BOD_SUPPORTED 1
#define SOC_CLK_TREE_SUPPORTED 1
/*-------------------------- XTAL CAPS ---------------------------------------*/ /*-------------------------- XTAL CAPS ---------------------------------------*/
#define SOC_XTAL_SUPPORT_40M 1 #define SOC_XTAL_SUPPORT_40M 1

View File

@ -191,6 +191,10 @@ config SOC_LP_I2C_SUPPORTED
bool bool
default y default y
config SOC_CLK_TREE_SUPPORTED
bool
default y
config SOC_XTAL_SUPPORT_40M config SOC_XTAL_SUPPORT_40M
bool bool
default y default y

View File

@ -72,6 +72,7 @@
#define SOC_LP_AON_SUPPORTED 1 #define SOC_LP_AON_SUPPORTED 1
#define SOC_LP_PERIPHERALS_SUPPORTED 1 #define SOC_LP_PERIPHERALS_SUPPORTED 1
#define SOC_LP_I2C_SUPPORTED 1 #define SOC_LP_I2C_SUPPORTED 1
#define SOC_CLK_TREE_SUPPORTED 1
/*-------------------------- XTAL CAPS ---------------------------------------*/ /*-------------------------- XTAL CAPS ---------------------------------------*/
#define SOC_XTAL_SUPPORT_40M 1 #define SOC_XTAL_SUPPORT_40M 1

View File

@ -167,6 +167,10 @@ config SOC_PMU_SUPPORTED
bool bool
default y default y
config SOC_CLK_TREE_SUPPORTED
bool
default y
config SOC_XTAL_SUPPORT_32M config SOC_XTAL_SUPPORT_32M
bool bool
default y default y

View File

@ -67,6 +67,7 @@
#define SOC_BOD_SUPPORTED 1 #define SOC_BOD_SUPPORTED 1
#define SOC_APM_SUPPORTED 1 #define SOC_APM_SUPPORTED 1
#define SOC_PMU_SUPPORTED 1 #define SOC_PMU_SUPPORTED 1
#define SOC_CLK_TREE_SUPPORTED 1
/*-------------------------- XTAL CAPS ---------------------------------------*/ /*-------------------------- XTAL CAPS ---------------------------------------*/
#define SOC_XTAL_SUPPORT_32M 1 #define SOC_XTAL_SUPPORT_32M 1

View File

@ -171,6 +171,10 @@ config SOC_BOD_SUPPORTED
bool bool
default y default y
config SOC_CLK_TREE_SUPPORTED
bool
default y
config SOC_XTAL_SUPPORT_40M config SOC_XTAL_SUPPORT_40M
bool bool
default y default y

View File

@ -81,6 +81,7 @@
#define SOC_MEMPROT_SUPPORTED 1 #define SOC_MEMPROT_SUPPORTED 1
#define SOC_TOUCH_SENSOR_SUPPORTED 1 #define SOC_TOUCH_SENSOR_SUPPORTED 1
#define SOC_BOD_SUPPORTED 1 #define SOC_BOD_SUPPORTED 1
#define SOC_CLK_TREE_SUPPORTED 1
/*-------------------------- XTAL CAPS ---------------------------------------*/ /*-------------------------- XTAL CAPS ---------------------------------------*/
#define SOC_XTAL_SUPPORT_40M 1 #define SOC_XTAL_SUPPORT_40M 1

View File

@ -207,6 +207,10 @@ config SOC_BOD_SUPPORTED
bool bool
default y default y
config SOC_CLK_TREE_SUPPORTED
bool
default y
config SOC_XTAL_SUPPORT_40M config SOC_XTAL_SUPPORT_40M
bool bool
default y default y

View File

@ -71,6 +71,7 @@
#define SOC_MEMPROT_SUPPORTED 1 #define SOC_MEMPROT_SUPPORTED 1
#define SOC_TOUCH_SENSOR_SUPPORTED 1 #define SOC_TOUCH_SENSOR_SUPPORTED 1
#define SOC_BOD_SUPPORTED 1 #define SOC_BOD_SUPPORTED 1
#define SOC_CLK_TREE_SUPPORTED 1
/*-------------------------- XTAL CAPS ---------------------------------------*/ /*-------------------------- XTAL CAPS ---------------------------------------*/
#define SOC_XTAL_SUPPORT_40M 1 #define SOC_XTAL_SUPPORT_40M 1