mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-27 18:32:54 +00:00
add esp32s2beta in soc component
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#ifndef __ASSEMBLER__
|
||||
#include "dport_access.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* Registers defined in this header file must be accessed using special macros,
|
||||
* prefixed with DPORT_. See soc/dport_access.h file for details.
|
||||
*/
|
||||
@@ -961,7 +961,6 @@
|
||||
#define DPORT_CAN_CLK_EN (BIT(19))
|
||||
#define DPORT_I2C_EXT1_CLK_EN (BIT(18))
|
||||
#define DPORT_PWM0_CLK_EN (BIT(17))
|
||||
#define DPORT_SPI_CLK_EN_2 (BIT(16)) /** Deprecated, please use DPORT_SPI3_CLK_EN **/
|
||||
#define DPORT_SPI3_CLK_EN (BIT(16))
|
||||
#define DPORT_TIMERGROUP1_CLK_EN (BIT(15))
|
||||
#define DPORT_EFUSE_CLK_EN (BIT(14))
|
||||
@@ -972,13 +971,11 @@
|
||||
#define DPORT_RMT_CLK_EN (BIT(9))
|
||||
#define DPORT_UHCI0_CLK_EN (BIT(8))
|
||||
#define DPORT_I2C_EXT0_CLK_EN (BIT(7))
|
||||
#define DPORT_SPI_CLK_EN (BIT(6)) /** Deprecated, please use DPORT_SPI2_CLK_EN **/
|
||||
#define DPORT_SPI2_CLK_EN (BIT(6))
|
||||
#define DPORT_UART1_CLK_EN (BIT(5))
|
||||
#define DPORT_I2S0_CLK_EN (BIT(4))
|
||||
#define DPORT_WDG_CLK_EN (BIT(3))
|
||||
#define DPORT_UART_CLK_EN (BIT(2))
|
||||
#define DPORT_SPI_CLK_EN_1 (BIT(1)) /** Deprecated, please use DPORT_SPI01_CLK_EN **/
|
||||
#define DPORT_SPI01_CLK_EN (BIT(1))
|
||||
#define DPORT_TIMERS_CLK_EN (BIT(0))
|
||||
#define DPORT_PERIP_RST_EN_REG (DR_REG_DPORT_BASE + 0x0C4)
|
||||
@@ -998,7 +995,6 @@
|
||||
#define DPORT_CAN_RST (BIT(19))
|
||||
#define DPORT_I2C_EXT1_RST (BIT(18))
|
||||
#define DPORT_PWM0_RST (BIT(17))
|
||||
#define DPORT_SPI_RST_2 (BIT(16)) /** Deprecated, please use DPORT_SPI3_RST **/
|
||||
#define DPORT_SPI3_RST (BIT(16))
|
||||
#define DPORT_TIMERGROUP1_RST (BIT(15))
|
||||
#define DPORT_EFUSE_RST (BIT(14))
|
||||
@@ -1009,13 +1005,11 @@
|
||||
#define DPORT_RMT_RST (BIT(9))
|
||||
#define DPORT_UHCI0_RST (BIT(8))
|
||||
#define DPORT_I2C_EXT0_RST (BIT(7))
|
||||
#define DPORT_SPI_RST (BIT(6)) /** Deprecated, please use DPORT_SPI2_RST **/
|
||||
#define DPORT_SPI2_RST (BIT(6))
|
||||
#define DPORT_UART1_RST (BIT(5))
|
||||
#define DPORT_I2S0_RST (BIT(4))
|
||||
#define DPORT_WDG_RST (BIT(3))
|
||||
#define DPORT_UART_RST (BIT(2))
|
||||
#define DPORT_SPI_RST_1 (BIT(1)) /** Deprecated, please use DPORT_SPI01_RST **/
|
||||
#define DPORT_SPI01_RST (BIT(1))
|
||||
#define DPORT_TIMERS_RST (BIT(0))
|
||||
#define DPORT_SLAVE_SPI_CONFIG_REG (DR_REG_DPORT_BASE + 0x0C8)
|
||||
@@ -1090,7 +1084,7 @@
|
||||
#define DPORT_BT_RST (BIT(3))
|
||||
#define DPORT_MAC_RST (BIT(2))
|
||||
#define DPORT_FE_RST (BIT(1))
|
||||
#define DPORT_BB_RST (BIT(0))
|
||||
#define DPORT_BB_RST (BIT(0))
|
||||
|
||||
#define DPORT_BT_LPCK_DIV_INT_REG (DR_REG_DPORT_BASE + 0x0D4)
|
||||
/* DPORT_BTEXTWAKEUP_REQ : R/W ;bitpos:[12] ;default: 1'b0 ; */
|
||||
@@ -4283,6 +4277,8 @@
|
||||
|
||||
#define DPORT_FLASH_MMU_TABLE_INVALID_VAL 0x100
|
||||
|
||||
#define DPORT_MMU_ADDRESS_MASK 0xff
|
||||
|
||||
#endif /*_SOC_DPORT_REG_H_ */
|
||||
|
||||
|
||||
|
@@ -26,16 +26,22 @@
|
||||
|
||||
#define RSA_M_DASH_REG (DR_REG_RSA_BASE + 0x800)
|
||||
#define RSA_MODEXP_MODE_REG (DR_REG_RSA_BASE + 0x804)
|
||||
#define RSA_START_MODEXP_REG (DR_REG_RSA_BASE + 0x808)
|
||||
#define RSA_MODEXP_START_REG (DR_REG_RSA_BASE + 0x808)
|
||||
#define RSA_MULT_MODE_REG (DR_REG_RSA_BASE + 0x80c)
|
||||
#define RSA_MULT_START_REG (DR_REG_RSA_BASE + 0x810)
|
||||
|
||||
#define RSA_INTERRUPT_REG (DR_REG_RSA_BASE + 0x814)
|
||||
#define RSA_CLEAR_INTERRUPT_REG (DR_REG_RSA_BASE + 0x814)
|
||||
#define RSA_QUERY_INTERRUPT_REG (DR_REG_RSA_BASE + 0x814) /* same */
|
||||
|
||||
#define RSA_CLEAN_REG (DR_REG_RSA_BASE + 0x818)
|
||||
#define RSA_QUERY_CLEAN_REG (DR_REG_RSA_BASE + 0x818)
|
||||
|
||||
/* Backwards compatibility register names used pre-ESP32S2 */
|
||||
#define RSA_CLEAN_REG (RSA_QUERY_CLEAN_REG)
|
||||
#define RSA_INTERRUPT_REG (RSA_CLEAR_INTERRUPT_REG)
|
||||
#define RSA_START_MODEXP_REG (RSA_MODEXP_START_REG)
|
||||
|
||||
/* SHA acceleration registers */
|
||||
#define SHA_TEXT_BASE ((DR_REG_SHA_BASE) + 0x00)
|
||||
#define SHA_TEXT_BASE ((DR_REG_SHA_BASE) + 0x00)
|
||||
|
||||
#define SHA_1_START_REG ((DR_REG_SHA_BASE) + 0x80)
|
||||
#define SHA_1_CONTINUE_REG ((DR_REG_SHA_BASE) + 0x84)
|
||||
|
@@ -79,9 +79,9 @@
|
||||
|
||||
/*
|
||||
* @attention
|
||||
* The PIN_PULL[UP|DWN]_[EN|DIS]() functions used to exist as macros in previous SDK versions.
|
||||
* Unfortunately, however, they do not work for some GPIOs on the ESP32 chip, which needs pullups
|
||||
* and -downs turned on and off through RTC registers. The functions still exist for compatibility
|
||||
* The PIN_PULL[UP|DWN]_[EN|DIS]() functions used to exist as macros in previous SDK versions.
|
||||
* Unfortunately, however, they do not work for some GPIOs on the ESP32 chip, which needs pullups
|
||||
* and -downs turned on and off through RTC registers. The functions still exist for compatibility
|
||||
* with older code, but are marked as deprecated in order to generate a warning.
|
||||
* Please replace them in this fashion: (make sure to include driver/gpio.h as well)
|
||||
* PIN_PULLUP_EN(GPIO_PIN_MUX_REG[x]) -> gpio_pullup_en(x)
|
||||
@@ -90,7 +90,7 @@
|
||||
* PIN_PULLDWN_DIS(GPIO_PIN_MUX_REG[x]) -> gpio_pulldown_dis(x)
|
||||
*
|
||||
*/
|
||||
static inline void __attribute__ ((deprecated)) PIN_PULLUP_DIS(uint32_t PIN_NAME)
|
||||
static inline void __attribute__ ((deprecated)) PIN_PULLUP_DIS(uint32_t PIN_NAME)
|
||||
{
|
||||
REG_CLR_BIT(PIN_NAME, FUN_PU);
|
||||
}
|
||||
@@ -115,6 +115,13 @@ static inline void __attribute__ ((deprecated)) PIN_PULLDWN_EN(uint32_t PIN_NAME
|
||||
|
||||
#define PIN_FUNC_GPIO 2
|
||||
|
||||
#define SPI_CLK_GPIO_NUM 6
|
||||
#define SPI_CS0_GPIO_NUM 11
|
||||
#define SPI_Q_GPIO_NUM 7
|
||||
#define SPI_D_GPIO_NUM 8
|
||||
#define SPI_WP_GPIO_NUM 10
|
||||
#define SPI_HD_GPIO_NUM 9
|
||||
|
||||
#define PIN_CTRL (DR_REG_IO_MUX_BASE +0x00)
|
||||
#define CLK_OUT3 0xf
|
||||
#define CLK_OUT3_V CLK_OUT3
|
||||
|
@@ -25,19 +25,6 @@
|
||||
#define PRO_CPU_NUM (0)
|
||||
#define APP_CPU_NUM (1)
|
||||
|
||||
/* Overall memory map */
|
||||
#define SOC_IROM_LOW 0x400D0000
|
||||
#define SOC_IROM_HIGH 0x40400000
|
||||
#define SOC_DROM_LOW 0x3F400000
|
||||
#define SOC_DROM_HIGH 0x3F800000
|
||||
#define SOC_DRAM_LOW 0x3FFAE000
|
||||
#define SOC_DRAM_HIGH 0x40000000
|
||||
#define SOC_RTC_IRAM_LOW 0x400C0000
|
||||
#define SOC_RTC_IRAM_HIGH 0x400C2000
|
||||
#define SOC_RTC_DATA_LOW 0x50000000
|
||||
#define SOC_RTC_DATA_HIGH 0x50002000
|
||||
#define SOC_EXTRAM_DATA_LOW 0x3F800000
|
||||
#define SOC_EXTRAM_DATA_HIGH 0x3FC00000
|
||||
|
||||
#define SOC_MAX_CONTIGUOUS_RAM_SIZE 0x400000 ///< Largest span of contiguous memory (DRAM or IRAM) in the address space
|
||||
|
||||
@@ -246,24 +233,28 @@
|
||||
//}}
|
||||
|
||||
/* Overall memory map */
|
||||
#define SOC_DROM_LOW 0x3F400000
|
||||
#define SOC_DROM_HIGH 0x3F800000
|
||||
#define SOC_IROM_LOW 0x400D0000
|
||||
#define SOC_IROM_HIGH 0x40400000
|
||||
#define SOC_IROM_MASK_LOW 0x40000000
|
||||
#define SOC_IROM_MASK_HIGH 0x40070000
|
||||
#define SOC_CACHE_PRO_LOW 0x40070000
|
||||
#define SOC_CACHE_PRO_HIGH 0x40078000
|
||||
#define SOC_CACHE_APP_LOW 0x40078000
|
||||
#define SOC_CACHE_APP_HIGH 0x40080000
|
||||
#define SOC_IRAM_LOW 0x40080000
|
||||
#define SOC_IRAM_HIGH 0x400A0000
|
||||
#define SOC_RTC_IRAM_LOW 0x400C0000
|
||||
#define SOC_RTC_IRAM_HIGH 0x400C2000
|
||||
#define SOC_RTC_DRAM_LOW 0x3FF80000
|
||||
#define SOC_RTC_DRAM_HIGH 0x3FF82000
|
||||
#define SOC_RTC_DATA_LOW 0x50000000
|
||||
#define SOC_RTC_DATA_HIGH 0x50002000
|
||||
#define SOC_DROM_LOW 0x3F400000
|
||||
#define SOC_DROM_HIGH 0x3F800000
|
||||
#define SOC_DRAM_LOW 0x3FFAE000
|
||||
#define SOC_DRAM_HIGH 0x40000000
|
||||
#define SOC_IROM_LOW 0x400D0000
|
||||
#define SOC_IROM_HIGH 0x40400000
|
||||
#define SOC_IROM_MASK_LOW 0x40000000
|
||||
#define SOC_IROM_MASK_HIGH 0x40070000
|
||||
#define SOC_CACHE_PRO_LOW 0x40070000
|
||||
#define SOC_CACHE_PRO_HIGH 0x40078000
|
||||
#define SOC_CACHE_APP_LOW 0x40078000
|
||||
#define SOC_CACHE_APP_HIGH 0x40080000
|
||||
#define SOC_IRAM_LOW 0x40080000
|
||||
#define SOC_IRAM_HIGH 0x400A0000
|
||||
#define SOC_RTC_IRAM_LOW 0x400C0000
|
||||
#define SOC_RTC_IRAM_HIGH 0x400C2000
|
||||
#define SOC_RTC_DRAM_LOW 0x3FF80000
|
||||
#define SOC_RTC_DRAM_HIGH 0x3FF82000
|
||||
#define SOC_RTC_DATA_LOW 0x50000000
|
||||
#define SOC_RTC_DATA_HIGH 0x50002000
|
||||
#define SOC_EXTRAM_DATA_LOW 0x3F800000
|
||||
#define SOC_EXTRAM_DATA_HIGH 0x3FC00000
|
||||
|
||||
//First and last words of the D/IRAM region, for both the DRAM address as well as the IRAM alias.
|
||||
#define SOC_DIRAM_IRAM_LOW 0x400A0000
|
||||
@@ -355,6 +346,7 @@
|
||||
#define ETS_MMU_IA_INTR_SOURCE 66/**< interrupt of MMU Invalid Access, LEVEL*/
|
||||
#define ETS_MPU_IA_INTR_SOURCE 67/**< interrupt of MPU Invalid Access, LEVEL*/
|
||||
#define ETS_CACHE_IA_INTR_SOURCE 68/**< interrupt of Cache Invalied Access, LEVEL*/
|
||||
#define ETS_MAX_INTR_SOURCE 69/**< total number of interrupt sources*/
|
||||
|
||||
//interrupt cpu using table, Please see the core-isa.h
|
||||
/*************************************************************************************************************
|
||||
|
@@ -15,6 +15,9 @@
|
||||
#ifndef _SOC_SPI_PINS_H_
|
||||
#define _SOC_SPI_PINS_H_
|
||||
|
||||
#define SPI_PERIPH_NUM 3
|
||||
|
||||
#define SPI_FUNC_NUM 1
|
||||
#define SPI_IOMUX_PIN_NUM_MISO 7
|
||||
#define SPI_IOMUX_PIN_NUM_MOSI 8
|
||||
#define SPI_IOMUX_PIN_NUM_CLK 6
|
||||
@@ -22,6 +25,7 @@
|
||||
#define SPI_IOMUX_PIN_NUM_WP 10
|
||||
#define SPI_IOMUX_PIN_NUM_HD 9
|
||||
|
||||
#define HSPI_FUNC_NUM 1
|
||||
#define HSPI_IOMUX_PIN_NUM_MISO 12
|
||||
#define HSPI_IOMUX_PIN_NUM_MOSI 13
|
||||
#define HSPI_IOMUX_PIN_NUM_CLK 14
|
||||
@@ -29,6 +33,7 @@
|
||||
#define HSPI_IOMUX_PIN_NUM_WP 2
|
||||
#define HSPI_IOMUX_PIN_NUM_HD 4
|
||||
|
||||
#define VSPI_FUNC_NUM 1
|
||||
#define VSPI_IOMUX_PIN_NUM_MISO 19
|
||||
#define VSPI_IOMUX_PIN_NUM_MOSI 23
|
||||
#define VSPI_IOMUX_PIN_NUM_CLK 18
|
||||
@@ -36,4 +41,4 @@
|
||||
#define VSPI_IOMUX_PIN_NUM_WP 22
|
||||
#define VSPI_IOMUX_PIN_NUM_HD 21
|
||||
|
||||
#endif /* _SOC_SPI_PINS_H_ */
|
||||
#endif /* _SOC_SPI_PINS_H_ */
|
||||
|
Reference in New Issue
Block a user