1 /* 2 * Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_ESP32C3_H_ 8 #define ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_ESP32C3_H_ 9 10 /* System Clock Source */ 11 #define ESP32_CLK_SRC_XTAL 0U 12 #define ESP32_CLK_SRC_PLL 1U 13 #define ESP32_CLK_SRC_RTC8M 2U 14 #define ESP32_CLK_SRC_APLL 3U 15 16 /* Supported CPU Frequencies */ 17 #define ESP32_CLK_CPU_80M 80000000 18 #define ESP32_CLK_CPU_160M 160000000 19 20 /* Supported XTAL Frequencies */ 21 #define ESP32_CLK_XTAL_32M 0U 22 #define ESP32_CLK_XTAL_40M 1U 23 24 /* Supported RTC fast clock frequencies */ 25 #define ESP32_RTC_FAST_CLK_FREQ_8M 8500000U 26 #define ESP32_RTC_FAST_CLK_FREQ_APPROX ESP32_RTC_FAST_CLK_FREQ_8M 27 28 /* Supported RTC slow clock frequencies */ 29 #define ESP32_RTC_SLOW_CLK_FREQ_90K 90000U 30 #define ESP32_RTC_SLOW_CLK_FREQ_8MD256 (ESP32_RTC_FAST_CLK_FREQ_APPROX / 256) 31 #define ESP32_RTC_SLOW_CLK_FREQ_32K 32768U 32 33 /* Modules IDs 34 * These IDs are actually offsets in CLK and RST Control registers. 35 * These IDs shouldn't be changed unless there is a Hardware change 36 * from Espressif. 37 * 38 * Basic Modules 39 * Registers: DPORT_PERIP_CLK_EN_REG, DPORT_PERIP_RST_EN_REG 40 */ 41 #define ESP32_LEDC_MODULE 0 42 #define ESP32_UART0_MODULE 1 43 #define ESP32_UART1_MODULE 2 44 #define ESP32_USB_MODULE 3 45 #define ESP32_I2C0_MODULE 4 46 #define ESP32_I2S1_MODULE 5 47 #define ESP32_TIMG0_MODULE 6 48 #define ESP32_TIMG1_MODULE 7 49 #define ESP32_UHCI0_MODULE 8 50 #define ESP32_RMT_MODULE 9 51 #define ESP32_SPI_MODULE 10 52 #define ESP32_SPI2_MODULE 11 53 #define ESP32_TWAI_MODULE 12 54 #define ESP32_RNG_MODULE 13 55 #define ESP32_WIFI_MODULE 14 56 #define ESP32_BT_MODULE 15 57 #define ESP32_WIFI_BT_COMMON_MODULE 16 58 #define ESP32_BT_BASEBAND_MODULE 17 59 #define ESP32_BT_LC_MODULE 18 60 #define ESP32_RSA_MODULE 19 61 #define ESP32_AES_MODULE 20 62 #define ESP32_SHA_MODULE 21 63 #define ESP32_HMAC_MODULE 22 64 #define ESP32_DS_MODULE 23 65 #define ESP32_GDMA_MODULE 24 66 #define ESP32_SYSTIMER_MODULE 25 67 #define ESP32_SARADC_MODULE 26 68 #define ESP32_MODULE_MAX 27 69 70 #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_ESP32C3_H_ */ 71