2021-11-05 05:23:24 -04:00
|
|
|
|
2021-10-07 23:45:57 -04:00
|
|
|
/*
|
2022-01-11 22:30:29 -05:00
|
|
|
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
2021-10-07 23:45:57 -04:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Soc capabilities file, describing the following chip attributes:
|
|
|
|
* - Peripheral or feature supported or not
|
|
|
|
* - Number of resources (peripheral, channel, etc.)
|
|
|
|
* - Maximum / Minimum value of HW, including: buffer/fifo size, length of transaction, frequency
|
|
|
|
* supported, etc.
|
|
|
|
*
|
|
|
|
* For boolean definitions:
|
|
|
|
* - if true: `#define MODULE_[SUBMODULE_]SUPPORT_FEATURE 1`.
|
|
|
|
* (`#define` blank string causes error when checking by `#if x`)
|
|
|
|
* - if false: not define anything at all.
|
|
|
|
* (`#ifdef x` is true even when `#define 0` is defined before.)
|
|
|
|
*
|
|
|
|
* The code depending on this file uses these boolean definitions as `#if x` or `#if !x`.
|
|
|
|
* (`#ifdef/ifndef x` is not compatible with `#define x 0`. Though we don't suggest to use `#define
|
|
|
|
* x 0`, it's still a risk.)
|
|
|
|
*
|
|
|
|
* ECO & exceptions:
|
|
|
|
* For ECO-ed booleans, `#define x "Not determined"` for them. This will cause error when used by
|
|
|
|
* `#if x` and `#if !x`, making these missing definitions more obvious.
|
2021-11-05 05:23:24 -04:00
|
|
|
*
|
|
|
|
* These defines are parsed and imported as kconfig variables via the script
|
|
|
|
* `tools/gen_soc_caps_kconfig/gen_soc_caps_kconfig.py`
|
|
|
|
*
|
|
|
|
* If this file is changed the script will automatically run the script
|
|
|
|
* and generate the kconfig variables as part of the pre-commit hooks.
|
|
|
|
*
|
|
|
|
* It can also be ran manually with `./tools/gen_soc_caps_kconfig/gen_soc_caps_kconfig.py 'components/soc/esp32/include/soc/'`
|
|
|
|
*
|
|
|
|
* For more information see `tools/gen_soc_caps_kconfig/README.md`
|
2020-09-09 22:37:58 -04:00
|
|
|
*/
|
2019-08-18 01:23:28 -04:00
|
|
|
|
2020-01-02 12:06:18 -05:00
|
|
|
#pragma once
|
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
#ifdef __has_include
|
|
|
|
# if __has_include("sdkconfig.h")
|
|
|
|
# include "sdkconfig.h"
|
|
|
|
# define SOC_CAPS_ECO_VER CONFIG_ESP32_REV_MIN
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if __DOXYGEN__ && !defined(SOC_CAPS_ECO_VER)
|
|
|
|
#define SOC_CAPS_ECO_VER SOC_CAPS_ECO_VER_MAX
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SOC_CAPS_ECO_VER
|
|
|
|
#warning ECO version not determined. Some ECO related caps will not be available.
|
|
|
|
#warning Define SOC_CAPS_ECO_VER before including this header.
|
|
|
|
|
|
|
|
// Define warning strings here for ECO-ed features to show error when they are used without being
|
|
|
|
// defined correctly
|
|
|
|
#define SOC_BROWNOUT_RESET_SUPPORTED "Not determined"
|
|
|
|
#define SOC_TWAI_BRP_DIV_SUPPORTED "Not determined"
|
2022-04-28 05:44:59 -04:00
|
|
|
#define SOC_DPORT_WORKAROUND "Not determined"
|
2020-09-09 22:37:58 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*-------------------------- COMMON CAPS ---------------------------------------*/
|
|
|
|
#define SOC_CAPS_ECO_VER_MAX 3
|
|
|
|
|
2021-12-15 01:15:32 -05:00
|
|
|
#define SOC_ADC_SUPPORTED 1
|
2021-04-06 09:56:27 -04:00
|
|
|
#define SOC_DAC_SUPPORTED 1
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_MCPWM_SUPPORTED 1
|
|
|
|
#define SOC_SDMMC_HOST_SUPPORTED 1
|
|
|
|
#define SOC_BT_SUPPORTED 1
|
2020-09-18 05:22:59 -04:00
|
|
|
#define SOC_PCNT_SUPPORTED 1
|
2021-11-09 04:11:01 -05:00
|
|
|
#define SOC_WIFI_SUPPORTED 1
|
2019-12-11 04:38:54 -05:00
|
|
|
#define SOC_SDIO_SLAVE_SUPPORTED 1
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_TWAI_SUPPORTED 1
|
|
|
|
#define SOC_EMAC_SUPPORTED 1
|
2020-11-25 23:39:49 -05:00
|
|
|
#define SOC_ULP_SUPPORTED 1
|
2020-12-03 22:35:21 -05:00
|
|
|
#define SOC_CCOMP_TIMER_SUPPORTED 1
|
2022-07-11 05:11:27 -04:00
|
|
|
#define SOC_RTC_FAST_MEM_SUPPORTED 1
|
|
|
|
#define SOC_RTC_SLOW_MEM_SUPPORTED 1
|
|
|
|
#define SOC_RTC_MEM_SUPPORTED 1
|
2021-11-26 04:03:47 -05:00
|
|
|
#define SOC_I2S_SUPPORTED 1
|
|
|
|
#define SOC_RMT_SUPPORTED 1
|
2022-05-17 01:47:14 -04:00
|
|
|
#define SOC_SDM_SUPPORTED 1
|
2022-08-31 08:12:24 -04:00
|
|
|
#define SOC_LEDC_SUPPORTED 1
|
|
|
|
#define SOC_I2C_SUPPORTED 1
|
2021-07-28 23:20:52 -04:00
|
|
|
#define SOC_SUPPORT_COEXISTENCE 1
|
2022-03-17 05:32:14 -04:00
|
|
|
#define SOC_AES_SUPPORTED 1
|
|
|
|
#define SOC_MPI_SUPPORTED 1
|
|
|
|
#define SOC_SHA_SUPPORTED 1
|
2022-03-31 08:13:50 -04:00
|
|
|
#define SOC_FLASH_ENC_SUPPORTED 1
|
|
|
|
#define SOC_SECURE_BOOT_SUPPORTED 1
|
2022-07-21 01:42:25 -04:00
|
|
|
#define SOC_TOUCH_SENSOR_SUPPORTED 1
|
2021-11-06 05:25:49 -04:00
|
|
|
|
2022-04-28 05:44:59 -04:00
|
|
|
#if SOC_CAPS_ECO_VER < 2
|
|
|
|
#define SOC_DPORT_WORKAROUND 1
|
|
|
|
#endif // SOC_CAPS_ECO_VER < 2
|
2022-06-15 05:26:29 -04:00
|
|
|
#define SOC_DPORT_WORKAROUND_DIS_INTERRUPT_LVL (5U)
|
2022-04-28 05:44:59 -04:00
|
|
|
|
2022-07-12 22:54:41 -04:00
|
|
|
/*-------------------------- XTAL CAPS ---------------------------------------*/
|
|
|
|
#define SOC_XTAL_SUPPORT_26M 1
|
|
|
|
#define SOC_XTAL_SUPPORT_40M 1
|
|
|
|
#define SOC_XTAL_SUPPORT_AUTO_DETECT 1
|
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
/*-------------------------- ADC CAPS ----------------------------------------*/
|
2021-09-06 23:21:35 -04:00
|
|
|
/*!< SAR ADC Module*/
|
|
|
|
#define SOC_ADC_RTC_CTRL_SUPPORTED 1
|
2021-12-15 01:15:32 -05:00
|
|
|
#define SOC_ADC_DIG_CTRL_SUPPORTED 1
|
2022-07-15 00:52:44 -04:00
|
|
|
#define SOC_ADC_DMA_SUPPORTED 1
|
2021-09-06 23:21:35 -04:00
|
|
|
#define SOC_ADC_PERIPH_NUM (2)
|
|
|
|
#define SOC_ADC_CHANNEL_NUM(PERIPH_NUM) ((PERIPH_NUM==0)? 8: 10)
|
|
|
|
#define SOC_ADC_MAX_CHANNEL_NUM (10)
|
2022-03-24 05:45:58 -04:00
|
|
|
#define SOC_ADC_ATTEN_NUM (4)
|
2021-09-06 23:21:35 -04:00
|
|
|
|
|
|
|
/*!< Digital */
|
|
|
|
#define SOC_ADC_DIGI_CONTROLLER_NUM (2)
|
|
|
|
#define SOC_ADC_PATT_LEN_MAX (16) //Two pattern table, each contains 16 items. Each item takes 1 byte. But only support ADC1 using DMA mode
|
|
|
|
#define SOC_ADC_DIGI_MIN_BITWIDTH (9)
|
|
|
|
#define SOC_ADC_DIGI_MAX_BITWIDTH (12)
|
2022-07-15 00:52:44 -04:00
|
|
|
#define SOC_ADC_DIGI_RESULT_BYTES (2)
|
|
|
|
#define SOC_ADC_DIGI_DATA_BYTES_PER_CONV (4)
|
2021-12-15 01:15:32 -05:00
|
|
|
#define SOC_ADC_SAMPLE_FREQ_THRES_HIGH (2*1000*1000)
|
2022-07-15 00:52:44 -04:00
|
|
|
#define SOC_ADC_SAMPLE_FREQ_THRES_LOW (20*1000)
|
2021-09-06 23:21:35 -04:00
|
|
|
|
|
|
|
/*!< RTC */
|
2022-03-24 05:45:58 -04:00
|
|
|
#define SOC_ADC_RTC_MIN_BITWIDTH (9)
|
|
|
|
#define SOC_ADC_RTC_MAX_BITWIDTH (12)
|
pm: fixed RTC8M domain power issues
introduced in e44ead535640525969c7e85892f38ca349d5ddf4
1. The int8M power domain config by default is PD. While LEDC is using
RTC8M as clock source, this power domain will be kept on.
But when 8MD256 is used as RTC clock source, the power domain should
also be kept on.
On ESP32, there was protection for it, but broken by commit
e44ead535640525969c7e85892f38ca349d5ddf4. Currently the power domain
will be forced on when LEDC is using RTC8M as clock source &&
!int8m_pd_en (user enable ESP_PDP_DOMAIN_RTC8M in lightsleep). Otherwise
the power domain will be powered off, regardless of RTC clock source.
In other words, int8M domain will be forced off (even when 8MD256
used as RTC clock source) if LEDC not using RTC8M as clock source, user
doesn't enable ESP_PDP_DOMAIN_RTC8M, or in deep sleep.
On later chips, there's no such protection, so 8MD256 could't be used as
RTC clock source in sleep modes.
This commit adds protection of 8MD256 clock to other chips. Fixes the
incorrect protection logic overriding on ESP32. Now the power domain
will be determiend by the logic below (order by priority):
1. When RTC clock source uses 8MD256, power up
2. When LEDC uses RTC8M clock source, power up
3. In deepsleep, power down
4. Otherwise determined by user config of ESP_PDP_DOMAIN_RTC8M,
power down by default. (This is preferred to have highest
priority, but it's kept as is because of current code structure.)
2. Before, after the macro `RTC_SLEEP_CONFIG_DEFAULT` decides dbias, the
protection above may force the int8m PU. This may cause the inconsistent
of dbias and the int8m PU status.
This commit lifts the logic of pd int8m/xtal fpu logic to upper layer
(sleep_modes.c).
Related: https://github.com/espressif/esp-idf/issues/8007, https://github.com/espressif/esp-idf/pull/8089
temp
2022-03-26 15:02:22 -04:00
|
|
|
#define SOC_RTC_SLOW_CLOCK_SUPPORT_8MD256 (1)
|
2021-09-06 23:21:35 -04:00
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
/*-------------------------- BROWNOUT CAPS -----------------------------------*/
|
|
|
|
#if SOC_CAPS_ECO_VER >= 1
|
|
|
|
#define SOC_BROWNOUT_RESET_SUPPORTED 1
|
|
|
|
#endif
|
|
|
|
|
2022-08-18 02:00:46 -04:00
|
|
|
|
|
|
|
/*-------------------------- CACHE/MMU CAPS ----------------------------------*/
|
2022-02-11 02:30:54 -05:00
|
|
|
#define SOC_SHARED_IDCACHE_SUPPORTED 1 //Shared Cache for both instructions and data
|
2022-08-18 02:00:46 -04:00
|
|
|
#define SOC_MMU_LINEAR_ADDRESS_REGION_NUM 5
|
|
|
|
|
2022-02-11 02:30:54 -05:00
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
/*-------------------------- CPU CAPS ----------------------------------------*/
|
2022-06-07 02:46:23 -04:00
|
|
|
#define SOC_CPU_CORES_NUM 2
|
|
|
|
#define SOC_CPU_INTR_NUM 32
|
|
|
|
#define SOC_CPU_HAS_FPU 1
|
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_CPU_BREAKPOINTS_NUM 2
|
|
|
|
#define SOC_CPU_WATCHPOINTS_NUM 2
|
|
|
|
#define SOC_CPU_WATCHPOINT_SIZE 64 // bytes
|
|
|
|
|
|
|
|
/*-------------------------- DAC CAPS ----------------------------------------*/
|
|
|
|
#define SOC_DAC_PERIPH_NUM 2
|
|
|
|
#define SOC_DAC_RESOLUTION 8 // DAC resolution ratio 8 bit
|
|
|
|
|
|
|
|
/*-------------------------- GPIO CAPS ---------------------------------------*/
|
|
|
|
// ESP32 has 1 GPIO peripheral
|
2021-11-05 05:23:24 -04:00
|
|
|
#define SOC_GPIO_PORT (1U)
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_GPIO_PIN_COUNT 40
|
|
|
|
|
2020-09-12 05:58:30 -04:00
|
|
|
// SOC_GPIO_SUPPORT_RTC_INDEPENDENT not defined. On ESP32 those PADs which have RTC functions must
|
|
|
|
// set pullup/down/capability via RTC register. On ESP32-S2, Digital IOs have their own registers to
|
|
|
|
// control pullup/down/capability, independent with RTC registers.
|
2020-09-09 22:37:58 -04:00
|
|
|
|
2021-04-21 17:01:14 -04:00
|
|
|
// 0~39 except from 24, 28~31 are valid
|
|
|
|
#define SOC_GPIO_VALID_GPIO_MASK (0xFFFFFFFFFFULL & ~(0ULL | BIT24 | BIT28 | BIT29 | BIT30 | BIT31))
|
2020-09-09 22:37:58 -04:00
|
|
|
// GPIO >= 34 are input only
|
|
|
|
#define SOC_GPIO_VALID_OUTPUT_GPIO_MASK (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | BIT34 | BIT35 | BIT36 | BIT37 | BIT38 | BIT39))
|
|
|
|
|
2020-11-12 07:39:55 -05:00
|
|
|
// Support to configure slept status
|
|
|
|
#define SOC_GPIO_SUPPORT_SLP_SWITCH (1)
|
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
/*-------------------------- I2C CAPS ----------------------------------------*/
|
2022-01-09 22:54:22 -05:00
|
|
|
// ESP32 has 2 I2C
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_I2C_NUM (2)
|
|
|
|
|
|
|
|
#define SOC_I2C_FIFO_LEN (32) /*!< I2C hardware FIFO depth */
|
2022-01-04 06:46:53 -05:00
|
|
|
#define SOC_I2C_SUPPORT_SLAVE (1)
|
2020-09-09 22:37:58 -04:00
|
|
|
|
2020-10-20 10:53:40 -04:00
|
|
|
#define SOC_I2C_SUPPORT_APB (1)
|
|
|
|
|
2021-12-02 07:24:19 -05:00
|
|
|
/*-------------------------- APLL CAPS ----------------------------------------*/
|
|
|
|
#define SOC_CLK_APLL_SUPPORTED (1)
|
|
|
|
// apll_multiplier_out = xtal_freq * (4 + sdm2 + sdm1/256 + sdm0/65536)
|
|
|
|
#define SOC_APLL_MULTIPLIER_OUT_MIN_HZ (350000000) // 350 MHz
|
|
|
|
#define SOC_APLL_MULTIPLIER_OUT_MAX_HZ (500000000) // 500 MHz
|
|
|
|
#define SOC_APLL_MIN_HZ (5303031) // 5.303031 MHz, refer to 'periph_rtc_apll_freq_set' for the calculation
|
|
|
|
#define SOC_APLL_MAX_HZ (125000000) // 125MHz, refer to 'periph_rtc_apll_freq_set' for the calculation
|
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
/*-------------------------- I2S CAPS ----------------------------------------*/
|
2022-01-09 22:54:22 -05:00
|
|
|
// ESP32 has 2 I2S
|
2021-12-02 07:24:19 -05:00
|
|
|
#define SOC_I2S_NUM (2U)
|
2022-03-13 23:34:46 -04:00
|
|
|
#define SOC_I2S_HW_VERSION_1 (1)
|
|
|
|
#define SOC_I2S_SUPPORTS_APLL (1)
|
|
|
|
#define SOC_I2S_SUPPORTS_PDM (1)
|
2020-05-31 21:47:48 -04:00
|
|
|
#define SOC_I2S_SUPPORTS_PDM_TX (1)
|
|
|
|
#define SOC_I2S_SUPPORTS_PDM_RX (1)
|
2022-03-13 23:34:46 -04:00
|
|
|
#define SOC_I2S_SUPPORTS_ADC_DAC (1)
|
|
|
|
#define SOC_I2S_SUPPORTS_ADC (1)
|
2021-08-17 22:52:16 -04:00
|
|
|
#define SOC_I2S_SUPPORTS_DAC (1)
|
2022-03-13 23:34:46 -04:00
|
|
|
#define SOC_I2S_SUPPORTS_LCD_CAMERA (1)
|
2020-09-09 22:37:58 -04:00
|
|
|
|
2021-08-05 08:10:13 -04:00
|
|
|
#define SOC_I2S_TRANS_SIZE_ALIGN_WORD (1) // I2S DMA transfer size must be aligned to word
|
|
|
|
#define SOC_I2S_LCD_I80_VARIANT (1) // I2S has a special LCD mode that can generate Intel 8080 TX timing
|
|
|
|
|
|
|
|
/*-------------------------- LCD CAPS ----------------------------------------*/
|
|
|
|
/* Notes: On esp32, LCD intel 8080 timing is generated by I2S peripheral */
|
|
|
|
#define SOC_LCD_I80_SUPPORTED (1) /*!< Intel 8080 LCD is supported */
|
2022-03-03 02:35:43 -05:00
|
|
|
#define SOC_LCD_I80_BUSES (2) /*!< Both I2S0/1 have LCD mode */
|
2021-08-05 08:10:13 -04:00
|
|
|
#define SOC_LCD_I80_BUS_WIDTH (24) /*!< Intel 8080 bus width */
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- LEDC CAPS ---------------------------------------*/
|
2021-06-02 08:19:09 -04:00
|
|
|
#define SOC_LEDC_HAS_TIMER_SPECIFIC_MUX (1)
|
2022-02-08 23:50:19 -05:00
|
|
|
#define SOC_LEDC_SUPPORT_APB_CLOCK (1)
|
|
|
|
#define SOC_LEDC_SUPPORT_REF_TICK (1)
|
|
|
|
#define SOC_LEDC_SUPPORT_HS_MODE (1)
|
|
|
|
#define SOC_LEDC_CHANNEL_NUM (8)
|
|
|
|
#define SOC_LEDC_TIMER_BIT_WIDE_NUM (20)
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- MCPWM CAPS --------------------------------------*/
|
2021-01-07 04:34:59 -05:00
|
|
|
#define SOC_MCPWM_GROUPS (2) ///< 2 MCPWM groups on the chip (i.e., the number of independent MCPWM peripherals)
|
|
|
|
#define SOC_MCPWM_TIMERS_PER_GROUP (3) ///< The number of timers that each group has
|
|
|
|
#define SOC_MCPWM_OPERATORS_PER_GROUP (3) ///< The number of operators that each group has
|
|
|
|
#define SOC_MCPWM_COMPARATORS_PER_OPERATOR (2) ///< The number of comparators that each operator has
|
|
|
|
#define SOC_MCPWM_GENERATORS_PER_OPERATOR (2) ///< The number of generators that each operator has
|
2021-07-05 12:12:25 -04:00
|
|
|
#define SOC_MCPWM_TRIGGERS_PER_OPERATOR (2) ///< The number of triggers that each operator has
|
|
|
|
#define SOC_MCPWM_GPIO_FAULTS_PER_GROUP (3) ///< The number of GPIO fault signals that each group has
|
2021-01-07 04:34:59 -05:00
|
|
|
#define SOC_MCPWM_CAPTURE_TIMERS_PER_GROUP (1) ///< The number of capture timers that each group has
|
|
|
|
#define SOC_MCPWM_CAPTURE_CHANNELS_PER_TIMER (3) ///< The number of capture channels that each capture timer has
|
2021-07-05 12:12:25 -04:00
|
|
|
#define SOC_MCPWM_GPIO_SYNCHROS_PER_GROUP (3) ///< The number of GPIO synchros that each group has
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- MPU CAPS ----------------------------------------*/
|
|
|
|
//TODO: correct the caller and remove unsupported lines
|
|
|
|
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
2020-12-01 17:29:35 -05:00
|
|
|
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_MPU_REGIONS_MAX_NUM 8
|
|
|
|
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
|
|
|
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
|
|
|
|
|
|
|
/*-------------------------- PCNT CAPS ---------------------------------------*/
|
2021-11-05 05:23:24 -04:00
|
|
|
#define SOC_PCNT_GROUPS (1U)
|
2021-08-07 05:43:08 -04:00
|
|
|
#define SOC_PCNT_UNITS_PER_GROUP (8)
|
|
|
|
#define SOC_PCNT_CHANNELS_PER_UNIT (2)
|
|
|
|
#define SOC_PCNT_THRES_POINT_PER_UNIT (2)
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- RMT CAPS ----------------------------------------*/
|
2022-03-01 02:06:29 -05:00
|
|
|
#define SOC_RMT_GROUPS 1U /*!< One RMT group */
|
|
|
|
#define SOC_RMT_TX_CANDIDATES_PER_GROUP 8 /*!< Number of channels that capable of Transmit in each group */
|
|
|
|
#define SOC_RMT_RX_CANDIDATES_PER_GROUP 8 /*!< Number of channels that capable of Receive in each group */
|
|
|
|
#define SOC_RMT_CHANNELS_PER_GROUP 8 /*!< Total 8 channels */
|
|
|
|
#define SOC_RMT_MEM_WORDS_PER_CHANNEL 64 /*!< Each channel owns 64 words memory */
|
|
|
|
#define SOC_RMT_SUPPORT_REF_TICK 1 /*!< Support set REF_TICK as the RMT clock source */
|
2022-04-21 02:46:06 -04:00
|
|
|
#define SOC_RMT_SUPPORT_APB 1 /*!< Support set APB as the RMT clock source */
|
2022-03-01 02:06:29 -05:00
|
|
|
#define SOC_RMT_CHANNEL_CLK_INDEPENDENT 1 /*!< Can select different source clock for each channel */
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- RTCIO CAPS --------------------------------------*/
|
|
|
|
#define SOC_RTCIO_PIN_COUNT 18
|
2020-11-25 23:39:49 -05:00
|
|
|
#define SOC_RTCIO_INPUT_OUTPUT_SUPPORTED 1
|
|
|
|
#define SOC_RTCIO_HOLD_SUPPORTED 1
|
|
|
|
#define SOC_RTCIO_WAKE_SUPPORTED 1
|
2020-09-09 22:37:58 -04:00
|
|
|
|
2022-05-17 01:47:14 -04:00
|
|
|
/*-------------------------- Sigma Delta Modulator CAPS -----------------*/
|
|
|
|
#define SOC_SDM_GROUPS 1U
|
|
|
|
#define SOC_SDM_CHANNELS_PER_GROUP 8
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- SPI CAPS ----------------------------------------*/
|
2022-01-11 22:30:29 -05:00
|
|
|
#define SOC_SPI_HD_BOTH_INOUT_SUPPORTED 1 //Support enabling MOSI and MISO phases together under Halfduplex mode
|
|
|
|
#define SOC_SPI_AS_CS_SUPPORTED 1 //Support to toggle the CS while the clock toggles
|
|
|
|
#define SOC_SPI_PERIPH_NUM 3
|
|
|
|
#define SOC_SPI_DMA_CHAN_NUM 2
|
2020-09-09 22:37:58 -04:00
|
|
|
|
2022-01-11 22:30:29 -05:00
|
|
|
#define SOC_SPI_PERIPH_CS_NUM(i) 3
|
2022-08-31 09:06:24 -04:00
|
|
|
#define SOC_SPI_MAX_CS_NUM 3
|
2022-01-11 22:30:29 -05:00
|
|
|
|
|
|
|
#define SOC_SPI_MAXIMUM_BUFFER_SIZE 64
|
|
|
|
#define SOC_SPI_MAX_PRE_DIVIDER 8192
|
2020-09-09 22:37:58 -04:00
|
|
|
|
2022-04-12 04:37:40 -04:00
|
|
|
// Although ESP32 doesn't has memspi, but keep consistent with following chips.(This means SPI0/1)
|
|
|
|
#define SOC_MEMSPI_SRC_FREQ_80M_SUPPORTED 1
|
|
|
|
#define SOC_MEMSPI_SRC_FREQ_40M_SUPPORTED 1
|
|
|
|
#define SOC_MEMSPI_SRC_FREQ_26M_SUPPORTED 1
|
|
|
|
#define SOC_MEMSPI_SRC_FREQ_20M_SUPPORTED 1
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
|
|
|
|
// Peripheral supports DIO, DOUT, QIO, or QOUT
|
|
|
|
#define SOC_SPI_PERIPH_SUPPORT_MULTILINE_MODE(spi_host) ({(void)spi_host; 1;})
|
|
|
|
|
|
|
|
/*-------------------------- TIMER GROUP CAPS --------------------------------*/
|
2021-02-01 01:17:10 -05:00
|
|
|
#define SOC_TIMER_GROUPS (2)
|
|
|
|
#define SOC_TIMER_GROUP_TIMERS_PER_GROUP (2)
|
|
|
|
#define SOC_TIMER_GROUP_COUNTER_BIT_WIDTH (64)
|
2021-12-16 10:13:09 -05:00
|
|
|
#define SOC_TIMER_GROUP_TOTAL_TIMERS (4)
|
2022-04-13 01:12:30 -04:00
|
|
|
#define SOC_TIMER_GROUP_SUPPORT_APB (1)
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- TOUCH SENSOR CAPS -------------------------------*/
|
2021-09-14 02:36:18 -04:00
|
|
|
#define SOC_TOUCH_VERSION_1 (1) /*!<Hardware version of touch sensor */
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_TOUCH_SENSOR_NUM (10)
|
|
|
|
|
|
|
|
#define SOC_TOUCH_PAD_MEASURE_WAIT_MAX (0xFF) /*!<The timer frequency is 8Mhz, the max value is 0xff */
|
|
|
|
#define SOC_TOUCH_PAD_THRESHOLD_MAX (0) /*!<If set touch threshold max value, The touch sensor can't be in touched status */
|
|
|
|
|
|
|
|
/*-------------------------- TWAI CAPS ---------------------------------------*/
|
|
|
|
#define SOC_TWAI_BRP_MIN 2
|
|
|
|
#if SOC_CAPS_ECO_VER >= 2
|
2021-04-16 06:36:18 -04:00
|
|
|
# define SOC_TWAI_BRP_MAX 256
|
2020-09-09 22:37:58 -04:00
|
|
|
# define SOC_TWAI_BRP_DIV_SUPPORTED 1
|
|
|
|
# define SOC_TWAI_BRP_DIV_THRESH 128
|
|
|
|
#else
|
2021-04-16 06:36:18 -04:00
|
|
|
# define SOC_TWAI_BRP_MAX 128
|
2020-09-09 22:37:58 -04:00
|
|
|
#endif
|
2021-04-16 06:36:18 -04:00
|
|
|
#define SOC_TWAI_SUPPORT_MULTI_ADDRESS_LAYOUT 1
|
2020-09-09 22:37:58 -04:00
|
|
|
|
|
|
|
/*-------------------------- UART CAPS ---------------------------------------*/
|
|
|
|
// ESP32 have 3 UART.
|
2020-11-19 04:03:10 -05:00
|
|
|
#define SOC_UART_NUM (3)
|
2022-07-27 22:47:13 -04:00
|
|
|
#define SOC_UART_SUPPORT_APB_CLK (1) /*!< Support APB as the clock source */
|
2020-11-19 04:03:10 -05:00
|
|
|
#define SOC_UART_SUPPORT_REF_TICK (1) /*!< Support REF_TICK as the clock source */
|
|
|
|
#define SOC_UART_FIFO_LEN (128) /*!< The UART hardware FIFO length */
|
|
|
|
#define SOC_UART_BITRATE_MAX (5000000) /*!< Max bit rate supported by UART */
|
2020-09-09 22:37:58 -04:00
|
|
|
|
2020-10-28 22:51:36 -04:00
|
|
|
|
2020-11-25 23:39:49 -05:00
|
|
|
/*-------------------------- SPIRAM CAPS -------------------------------------*/
|
|
|
|
#define SOC_SPIRAM_SUPPORTED 1
|
|
|
|
|
2022-01-24 22:02:52 -05:00
|
|
|
/*-------------------------- SPI MEM CAPS ---------------------------------------*/
|
|
|
|
#define SOC_SPI_MEM_SUPPORT_CONFIG_GPIO_BY_EFUSE (1)
|
|
|
|
|
2020-10-28 22:51:36 -04:00
|
|
|
/*--------------------------- SHA CAPS ---------------------------------------*/
|
|
|
|
/* ESP32 style SHA engine, where multiple states can be stored in parallel */
|
|
|
|
#define SOC_SHA_SUPPORT_PARALLEL_ENG (1)
|
|
|
|
|
|
|
|
/* Supported HW algorithms */
|
|
|
|
#define SOC_SHA_SUPPORT_SHA1 (1)
|
|
|
|
#define SOC_SHA_SUPPORT_SHA256 (1)
|
|
|
|
#define SOC_SHA_SUPPORT_SHA384 (1)
|
|
|
|
#define SOC_SHA_SUPPORT_SHA512 (1)
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------- RSA CAPS ---------------------------------------*/
|
|
|
|
#define SOC_RSA_MAX_BIT_LEN (4096)
|
|
|
|
|
|
|
|
|
2020-11-12 02:11:38 -05:00
|
|
|
/*-------------------------- AES CAPS -----------------------------------------*/
|
|
|
|
#define SOC_AES_SUPPORT_AES_128 (1)
|
|
|
|
#define SOC_AES_SUPPORT_AES_192 (1)
|
|
|
|
#define SOC_AES_SUPPORT_AES_256 (1)
|
|
|
|
|
2022-03-31 08:13:50 -04:00
|
|
|
/*-------------------------- Secure Boot CAPS----------------------------*/
|
|
|
|
/*
|
|
|
|
* ESP32 ECO3 revision also supports `SOC_SECURE_BOOT_V2_RSA` but for that we will need selected ECO
|
|
|
|
* version from `Kconfig`, which is not possible while generating `Kconfig.soc_caps.in` from this header.
|
|
|
|
* Hence, for now we are handling this special capability in bootloader "security" configuration itself.
|
|
|
|
*/
|
|
|
|
#define SOC_SECURE_BOOT_V1 1
|
|
|
|
#define SOC_EFUSE_SECURE_BOOT_KEY_DIGESTS 1
|
|
|
|
|
2021-02-24 23:25:38 -05:00
|
|
|
/*-------------------------- Flash Encryption CAPS----------------------------*/
|
|
|
|
#define SOC_FLASH_ENCRYPTED_XTS_AES_BLOCK_MAX (32)
|
|
|
|
|
2021-01-19 06:36:06 -05:00
|
|
|
/*--------------- PHY REGISTER AND MEMORY SIZE CAPS --------------------------*/
|
|
|
|
#define SOC_PHY_DIG_REGS_MEM_SIZE (21*4)
|
|
|
|
|
2021-01-12 06:10:21 -05:00
|
|
|
/*-------------------------- Power Management CAPS ---------------------------*/
|
2022-01-12 02:04:59 -05:00
|
|
|
#define SOC_PM_SUPPORT_EXT_WAKEUP (1)
|
2021-09-06 09:45:08 -04:00
|
|
|
#define SOC_PM_SUPPORT_TOUCH_SENSOR_WAKEUP (1) /*!<Supports waking up from touch pad trigger */
|
2022-01-12 02:04:59 -05:00
|
|
|
#define SOC_PM_SUPPORT_RTC_PERIPH_PD (1)
|
|
|
|
#define SOC_PM_SUPPORT_RTC_FAST_MEM_PD (1)
|
|
|
|
#define SOC_PM_SUPPORT_RTC_SLOW_MEM_PD (1)
|
2021-01-12 06:10:21 -05:00
|
|
|
|
2020-09-09 22:37:58 -04:00
|
|
|
/* ---------------------------- Compatibility ------------------------------- */
|
|
|
|
#define SOC_CAN_SUPPORTED SOC_TWAI_SUPPORTED
|
|
|
|
#define CAN_BRP_MIN SOC_TWAI_BRP_MIN
|
|
|
|
#define CAN_BRP_MAX SOC_TWAI_BRP_MAX
|
|
|
|
#define CAN_SUPPORT_MULTI_ADDRESS_LAYOUT SOC_TWAI_SUPPORT_MULTI_ADDRESS_LAYOUT
|
2021-04-16 06:36:18 -04:00
|
|
|
#if SOC_CAPS_ECO_VER >= 2
|
|
|
|
# define CAN_BRP_DIV_SUPPORTED SOC_TWAI_BRP_DIV_SUPPORTED
|
|
|
|
# define CAN_BRP_DIV_THRESH SOC_TWAI_BRP_DIV_THRESH
|
|
|
|
#endif
|
2021-01-04 14:34:31 -05:00
|
|
|
|
|
|
|
/*-------------------------- SDMMC CAPS -----------------------------------------*/
|
|
|
|
|
|
|
|
/* On ESP32, clock/cmd/data pins use IO MUX.
|
|
|
|
* Card detect, write protect, interrupt use GPIO Matrix on all chips.
|
|
|
|
*/
|
|
|
|
#define SOC_SDMMC_USE_IOMUX 1
|
|
|
|
#define SOC_SDMMC_NUM_SLOTS 2
|
2021-07-13 10:13:20 -04:00
|
|
|
|
2022-05-10 04:00:01 -04:00
|
|
|
/*-------------------------- WI-FI HARDWARE CAPS -------------------------------*/
|
2022-06-20 07:37:21 -04:00
|
|
|
#define SOC_WIFI_HW_TSF (0) /*!< Hardware TSF is not supported */
|
|
|
|
#define SOC_WIFI_FTM_SUPPORT (0) /*!< FTM is not supported */
|
|
|
|
#define SOC_WIFI_GCMP_SUPPORT (0) /*!< GCMP is not supported(GCMP128 and GCMP256) */
|
|
|
|
#define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */
|
2022-06-20 09:35:52 -04:00
|
|
|
#define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */
|
2022-06-21 04:48:52 -04:00
|
|
|
#define SOC_WIFI_MESH_SUPPORT (1) /*!< Support WIFI MESH */
|
2022-07-25 02:02:07 -04:00
|
|
|
|
|
|
|
/*---------------------------------- Bluetooth CAPS ----------------------------------*/
|
|
|
|
#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */
|
2022-08-11 05:21:27 -04:00
|
|
|
#define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
|
2022-07-25 02:02:07 -04:00
|
|
|
#define SOC_BT_CLASSIC_SUPPORTED (1) /*!< Support Bluetooth Classic hardware */
|