Merge branch 'change/mspi_timing_tuning_dir' into 'master'

mspi: added mspi_timing_tuning directory

Closes IDF-11702

See merge request espressif/esp-idf!35299
This commit is contained in:
Armando (Dou Yiwen)
2024-12-04 11:33:28 +08:00
23 changed files with 49 additions and 28 deletions

View File

@@ -125,15 +125,15 @@ if(NOT non_os_build)
endif() endif()
if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP) if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
list(APPEND srcs "mspi_timing_tuning.c") list(APPEND srcs "mspi_timing_tuning/mspi_timing_tuning.c")
if(CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_MSPI_DELAY) if(CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_MSPI_DELAY)
list(APPEND srcs "mspi_timing_by_mspi_delay.c") list(APPEND srcs "mspi_timing_tuning/mspi_timing_by_mspi_delay.c")
endif() endif()
if(CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_DQS) if(CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_DQS)
list(APPEND srcs "mspi_timing_by_dqs.c") list(APPEND srcs "mspi_timing_tuning/mspi_timing_by_dqs.c")
endif() endif()
if(CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_FLASH_DELAY) if(CONFIG_SOC_MEMSPI_TIMING_TUNING_BY_FLASH_DELAY)
list(APPEND srcs "mspi_timing_by_flash_delay.c") list(APPEND srcs "mspi_timing_tuning/mspi_timing_by_flash_delay.c")
endif() endif()
endif() endif()
@@ -153,17 +153,21 @@ else()
endif() endif()
set(public_include_dirs "include" "include/soc" "include/soc/${target}" set(public_include_dirs "include" "include/soc" "include/soc/${target}"
"dma/include" "ldo/include" "debug_probe/include") "dma/include" "ldo/include" "debug_probe/include"
"mspi_timing_tuning/include")
idf_component_register(SRCS ${srcs} idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${public_include_dirs} INCLUDE_DIRS ${public_include_dirs}
PRIV_INCLUDE_DIRS port/include include/esp_private PRIV_INCLUDE_DIRS port/include include/esp_private
REQUIRES ${requires} REQUIRES ${requires}
PRIV_REQUIRES "${priv_requires}" PRIV_REQUIRES "${priv_requires}"
LDFRAGMENTS linker.lf dma/linker.lf ldo/linker.lf) LDFRAGMENTS linker.lf dma/linker.lf ldo/linker.lf mspi_timing_tuning/linker.lf)
idf_build_get_property(target IDF_TARGET) idf_build_get_property(target IDF_TARGET)
add_subdirectory(port/${target}) add_subdirectory(port/${target})
if(CONFIG_SOC_SPI_MEM_SUPPORT_TIMING_TUNING)
add_subdirectory(mspi_timing_tuning/port/${target})
endif()
add_subdirectory(lowpower) add_subdirectory(lowpower)
if(CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND OR CONFIG_PM_SLP_DISABLE_GPIO) if(CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND OR CONFIG_PM_SLP_DISABLE_GPIO)

View File

@@ -35,17 +35,6 @@ entries:
periph_ctrl: wifi_module_disable (noflash) periph_ctrl: wifi_module_disable (noflash)
if SOC_SYSTIMER_SUPPORTED = y: if SOC_SYSTIMER_SUPPORTED = y:
systimer (noflash) systimer (noflash)
if APP_BUILD_TYPE_PURE_RAM_APP = n:
mspi_timing_tuning (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_MSPI_DELAY = y:
mspi_timing_by_mspi_delay (noflash)
mspi_timing_config (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_DQS = y:
mspi_timing_by_dqs (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_FLASH_DELAY = y:
mspi_timing_by_flash_delay (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_DQS = y || SOC_MEMSPI_TIMING_TUNING_BY_FLASH_DELAY = y:
mspi_timing_config (noflash)
if SOC_ADC_SHARED_POWER = y: if SOC_ADC_SHARED_POWER = y:
if ADC_ONESHOT_CTRL_FUNC_IN_IRAM = y: if ADC_ONESHOT_CTRL_FUNC_IN_IRAM = y:
sar_periph_ctrl (noflash) sar_periph_ctrl (noflash)

View File

@@ -21,7 +21,7 @@ extern "C" {
typedef enum { typedef enum {
MSPI_TIMING_SPEED_MODE_LOW_PERF, /*!< Low performance speed mode, this mode is safe for all the scenarios, MSPI_TIMING_SPEED_MODE_LOW_PERF, /*!< Low performance speed mode, this mode is safe for all the scenarios,
unless the MSPI attached devices (Flash, PSRAM) are powered down. unless the MSPI attached devices (Flash, PSRAM) are powered down.
As a tradeoff, the performance of the MSPI (devices) are swithed to a very low speed */ As a tradeoff, the performance of the MSPI (devices) are switched to a very low speed */
MSPI_TIMING_SPEED_MODE_NORMAL_PERF, /*!< Normal performance speed mode, MSPI speed is the same as you configured in menuconfig */ MSPI_TIMING_SPEED_MODE_NORMAL_PERF, /*!< Normal performance speed mode, MSPI speed is the same as you configured in menuconfig */
} mspi_timing_speed_mode_t; } mspi_timing_speed_mode_t;

View File

@@ -0,0 +1,15 @@
[mapping:mspi_timing_tuning_driver]
archive: libesp_hw_support.a
entries:
if APP_BUILD_TYPE_PURE_RAM_APP = n:
mspi_timing_tuning (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_MSPI_DELAY = y:
mspi_timing_by_mspi_delay (noflash)
mspi_timing_config (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_DQS = y:
mspi_timing_by_dqs (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_FLASH_DELAY = y:
mspi_timing_by_flash_delay (noflash)
if SOC_MEMSPI_TIMING_TUNING_BY_DQS = y || SOC_MEMSPI_TIMING_TUNING_BY_FLASH_DELAY = y:
mspi_timing_config (noflash)

View File

@@ -0,0 +1,11 @@
target_include_directories(${COMPONENT_LIB} PUBLIC .)
set(srcs)
if(NOT BOOTLOADER_BUILD)
if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
list(APPEND srcs "mspi_timing_config.c")
endif()
endif()
target_sources(${COMPONENT_LIB} PRIVATE "${srcs}")

View File

@@ -0,0 +1,11 @@
target_include_directories(${COMPONENT_LIB} PUBLIC . include)
set(srcs)
if(NOT BOOTLOADER_BUILD)
if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
list(APPEND srcs "mspi_timing_config.c")
endif()
endif()
target_sources(${COMPONENT_LIB} PRIVATE "${srcs}")

View File

@@ -11,11 +11,6 @@ set(srcs "rtc_clk_init.c"
if(NOT BOOTLOADER_BUILD) if(NOT BOOTLOADER_BUILD)
list(APPEND srcs "sar_periph_ctrl.c") list(APPEND srcs "sar_periph_ctrl.c")
if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
list(APPEND srcs "mspi_timing_config.c")
endif()
endif() endif()
add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}") add_prefix(srcs "${CMAKE_CURRENT_LIST_DIR}/" "${srcs}")

View File

@@ -12,10 +12,6 @@ set(srcs
if(NOT BOOTLOADER_BUILD) if(NOT BOOTLOADER_BUILD)
list(APPEND srcs "sar_periph_ctrl.c") list(APPEND srcs "sar_periph_ctrl.c")
if(NOT CONFIG_APP_BUILD_TYPE_PURE_RAM_APP)
list(APPEND srcs "mspi_timing_config.c")
endif()
if(CONFIG_ESP_SYSTEM_MEMPROT_FEATURE) if(CONFIG_ESP_SYSTEM_MEMPROT_FEATURE)
list(APPEND srcs "esp_memprot.c" "../esp_memprot_conv.c") list(APPEND srcs "esp_memprot.c" "../esp_memprot_conv.c")
endif() endif()

View File

@@ -119,7 +119,7 @@ SECONDARY: 230: usb_serial_jtag_conn_status_init in components/esp_driver_usb_se
# psram adjust timing point need a separate task which should be created at startup. # psram adjust timing point need a separate task which should be created at startup.
# Valid only `CONFIG_SPIRAM_TIMING_TUNING_POINT_VIA_TEMPERATURE_SENSOR` is enabled. # Valid only `CONFIG_SPIRAM_TIMING_TUNING_POINT_VIA_TEMPERATURE_SENSOR` is enabled.
SECONDARY: 240: psram_adjust_timing_point_via_temperature in components/esp_hw_support/mspi_timing_by_mspi_delay.c on BIT(0) SECONDARY: 240: psram_adjust_timing_point_via_temperature in components/esp_hw_support/mspi_timing_tuning/mspi_timing_by_mspi_delay.c on BIT(0)
# Has to be the last step! # Has to be the last step!
# Now that the application is about to start, disable boot watchdog # Now that the application is about to start, disable boot watchdog