From 672e70a023e7ff912e9ebb35965b2f1f80c0d296 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 1 Jul 2022 19:50:00 +0200 Subject: [PATCH] esp_hw_support: add 26 MHz XTAL option for esp32c2 Some esp32c2 boards will be produced with a 26 MHz XTAL. This commit adds the basic Kconfig option for this type of hardware. Support for CONFIG_ESP32C2_XTAL_FREQ_26 in other areas of IDF will be implemented in subsequent commits. --- .../port/esp32c2/Kconfig.hw_support | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 components/esp_hw_support/port/esp32c2/Kconfig.hw_support diff --git a/components/esp_hw_support/port/esp32c2/Kconfig.hw_support b/components/esp_hw_support/port/esp32c2/Kconfig.hw_support new file mode 100644 index 0000000000..d84edf2692 --- /dev/null +++ b/components/esp_hw_support/port/esp32c2/Kconfig.hw_support @@ -0,0 +1,21 @@ +config ESP32C2_XTAL_FREQ + int + default 40 if ESP32C2_XTAL_FREQ_40 + default 26 if ESP32C2_XTAL_FREQ_26 + +choice ESP32C2_XTAL_FREQ_SEL + prompt "Main XTAL frequency" + default ESP32C2_XTAL_FREQ_40 + help + ESP32-C2 currently supports the following XTAL frequencies: + + - 26 MHz + - 40 MHz + + This option must be set to the correct value for the given hardware. + + config ESP32C2_XTAL_FREQ_40 # TODO: IDF-5488 + bool "40 MHz" + config ESP32C2_XTAL_FREQ_26 + bool "26 MHz" +endchoice