From 37e7808223673898f5ea685c60b10148982920c5 Mon Sep 17 00:00:00 2001 From: armando Date: Fri, 3 Apr 2026 10:01:31 +0800 Subject: [PATCH] feat(psram): support psram 100mhz --- .../port/esp32s31/mspi_timing_tuning_configs.h | 4 ++-- components/esp_psram/device/esp_psram_impl_ap_oct.c | 4 +--- components/esp_psram/esp32s31/Kconfig.spiram | 5 ++--- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/components/esp_hw_support/mspi/mspi_timing_tuning/port/esp32s31/mspi_timing_tuning_configs.h b/components/esp_hw_support/mspi/mspi_timing_tuning/port/esp32s31/mspi_timing_tuning_configs.h index cb1e4e2eca..645f75b75e 100644 --- a/components/esp_hw_support/mspi/mspi_timing_tuning/port/esp32s31/mspi_timing_tuning_configs.h +++ b/components/esp_hw_support/mspi/mspi_timing_tuning/port/esp32s31/mspi_timing_tuning_configs.h @@ -21,9 +21,9 @@ #elif CONFIG_SPIRAM_SPEED_200M #define MSPI_TIMING_PSRAM_NEEDS_TUNING 1 #define MSPI_TIMING_MPLL_FREQ_MHZ 400 -#elif CONFIG_SPIRAM_SPEED_80M +#elif CONFIG_SPIRAM_SPEED_100M #define MSPI_TIMING_PSRAM_NEEDS_TUNING 1 -#define MSPI_TIMING_MPLL_FREQ_MHZ 320 +#define MSPI_TIMING_MPLL_FREQ_MHZ 400 #else #define MSPI_TIMING_MPLL_FREQ_MHZ 400 #endif diff --git a/components/esp_psram/device/esp_psram_impl_ap_oct.c b/components/esp_psram/device/esp_psram_impl_ap_oct.c index a57695864d..756eb9edb6 100644 --- a/components/esp_psram/device/esp_psram_impl_ap_oct.c +++ b/components/esp_psram/device/esp_psram_impl_ap_oct.c @@ -54,9 +54,7 @@ #define AP_OCT_PSRAM_CS_ECC_HOLD_TIME 4 #define AP_OCT_PSRAM_CS_HOLD_DELAY 3 -#if CONFIG_SPIRAM_SPEED_80M -#define AP_OCT_PSRAM_MPLL_DEFAULT_FREQ_MHZ 320 -#elif CONFIG_SPIRAM_SPEED_250M +#if CONFIG_SPIRAM_SPEED_250M #define AP_OCT_PSRAM_MPLL_DEFAULT_FREQ_MHZ 500 #else #define AP_OCT_PSRAM_MPLL_DEFAULT_FREQ_MHZ 400 diff --git a/components/esp_psram/esp32s31/Kconfig.spiram b/components/esp_psram/esp32s31/Kconfig.spiram index a4ae908d4d..5dc5310b6f 100644 --- a/components/esp_psram/esp32s31/Kconfig.spiram +++ b/components/esp_psram/esp32s31/Kconfig.spiram @@ -28,8 +28,8 @@ menu "PSRAM config" config SPIRAM_SPEED_200M bool "200MHz clock speed" - config SPIRAM_SPEED_80M - bool "80MHz clock speed" + config SPIRAM_SPEED_100M + bool "100MHz clock speed" config SPIRAM_SPEED_40M bool "40MHz clock speed" @@ -38,7 +38,6 @@ menu "PSRAM config" config SPIRAM_SPEED int default 40 if SPIRAM_SPEED_40M - default 80 if SPIRAM_SPEED_80M default 100 if SPIRAM_SPEED_100M default 200 if SPIRAM_SPEED_200M default 250 if SPIRAM_SPEED_250M