This is an automated email from the ASF dual-hosted git repository.

lupyuen pushed a commit to branch releases/12.9
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/releases/12.9 by this push:
     new 46c72c6738 arch/risc-v/esp32h2: Set the default SPI flash frequency to 
64MHz
46c72c6738 is described below

commit 46c72c6738a299cf386a8c7d3afdcaa48cc7d60d
Author: Tiago Medicci Serrano <tiago.medi...@espressif.com>
AuthorDate: Thu Mar 27 11:39:25 2025 -0300

    arch/risc-v/esp32h2: Set the default SPI flash frequency to 64MHz
    
    The default frequency for the SPI flash chip on ESP32-H2 is 64MHz.
    Although it was being set to 48MHz, this isn't a valid value. The
    device, however, must be flashed using 48MHz when 64MHz is set.
---
 arch/risc-v/src/common/espressif/Bootloader.mk | 1 +
 arch/risc-v/src/common/espressif/Kconfig       | 6 +++---
 tools/espressif/Config.mk                      | 2 ++
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/risc-v/src/common/espressif/Bootloader.mk 
b/arch/risc-v/src/common/espressif/Bootloader.mk
index 1cde993138..e14d627ba7 100644
--- a/arch/risc-v/src/common/espressif/Bootloader.mk
+++ b/arch/risc-v/src/common/espressif/Bootloader.mk
@@ -57,6 +57,7 @@ $(BOOTLOADER_CONFIG): $(TOPDIR)/.config $(BOOTLOADER_SRCDIR)
                $(if $(CONFIG_ESPRESSIF_FLASH_MODE_QIO),$(call 
cfg_en,CONFIG_ESPTOOLPY_FLASHMODE_QIO)) \
                $(if $(CONFIG_ESPRESSIF_FLASH_MODE_QOUT),$(call 
cfg_en,CONFIG_ESPTOOLPY_FLASHMODE_QOUT)) \
                $(if $(CONFIG_ESPRESSIF_FLASH_FREQ_80M),$(call 
cfg_en,CONFIG_ESPTOOLPY_FLASHFREQ_80M)) \
+               $(if $(CONFIG_ESPRESSIF_FLASH_FREQ_64M),$(call 
cfg_en,CONFIG_ESPTOOLPY_FLASHFREQ_64M)) \
                $(if $(CONFIG_ESPRESSIF_FLASH_FREQ_48M),$(call 
cfg_en,CONFIG_ESPTOOLPY_FLASHFREQ_48M)) \
                $(if $(CONFIG_ESPRESSIF_FLASH_FREQ_40M),$(call 
cfg_en,CONFIG_ESPTOOLPY_FLASHFREQ_40M)) \
                $(if $(CONFIG_ESPRESSIF_FLASH_FREQ_26M),$(call 
cfg_en,CONFIG_ESPTOOLPY_FLASHFREQ_26M)) \
diff --git a/arch/risc-v/src/common/espressif/Kconfig 
b/arch/risc-v/src/common/espressif/Kconfig
index a30f636b3a..f67766625c 100644
--- a/arch/risc-v/src/common/espressif/Kconfig
+++ b/arch/risc-v/src/common/espressif/Kconfig
@@ -1461,7 +1461,7 @@ endif # ESPRESSIF_SPIFLASH
 choice ESPRESSIF_FLASH_FREQ
        prompt "SPI Flash frequency"
        default ESPRESSIF_FLASH_FREQ_80M if ESPRESSIF_ESP32C3 || 
ESPRESSIF_ESP32C6
-       default ESPRESSIF_FLASH_FREQ_48M if ESPRESSIF_ESP32H2
+       default ESPRESSIF_FLASH_FREQ_64M if ESPRESSIF_ESP32H2
        ---help---
                SPI Flash frequency.
 
@@ -1469,8 +1469,8 @@ config ESPRESSIF_FLASH_FREQ_80M
        bool "80 MHz"
        depends on ESPRESSIF_ESP32C3 || ESPRESSIF_ESP32C6
 
-config ESPRESSIF_FLASH_FREQ_48M
-       bool "48 MHz"
+config ESPRESSIF_FLASH_FREQ_64M
+       bool "64 MHz"
        depends on ESPRESSIF_ESP32H2
 
 config ESPRESSIF_FLASH_FREQ_40M
diff --git a/tools/espressif/Config.mk b/tools/espressif/Config.mk
index a09b083c76..568d749ca4 100644
--- a/tools/espressif/Config.mk
+++ b/tools/espressif/Config.mk
@@ -50,6 +50,8 @@ endif
 
 ifeq ($(CONFIG_ESPRESSIF_FLASH_FREQ_80M),y)
        FLASH_FREQ := 80m
+else ifeq ($(CONFIG_ESPRESSIF_FLASH_FREQ_64M),y)
+       FLASH_FREQ := 48m
 else ifeq ($(CONFIG_ESPRESSIF_FLASH_FREQ_48M),y)
        FLASH_FREQ := 48m
 else ifeq ($(CONFIG_ESPRESSIF_FLASH_FREQ_40M),y)

Reply via email to