global: bring up esp32s2(not beta)

This commit is contained in:
morris
2019-12-26 15:25:24 +08:00
parent a85b207d68
commit 1c2cc5430e
128 changed files with 17102 additions and 9733 deletions
@@ -16,15 +16,26 @@
#include "soc/rtc.h"
#include "soc/dport_reg.h"
#include "soc/efuse_periph.h"
#include "soc/rtc_cntl_reg.h"
#ifdef CONFIG_IDF_TARGET_ESP32
#include "esp32/rom/uart.h"
#include "esp32/rom/rtc.h"
#else
#elif CONFIG_IDF_TARGET_ESP32S2BETA
#include "esp32s2beta/rom/uart.h"
#include "esp32s2beta/rom/rtc.h"
#endif
#if CONFIG_IDF_ENV_FPGA
void bootloader_clock_configure(void)
{
uart_tx_wait_idle(0);
REG_SET_FIELD(DPORT_SYSCLK_CONF_REG, DPORT_PRE_DIV_CNT, 0);
rtc_cpu_freq_t cpu_freq = ets_get_apb_freq();
ets_update_cpu_frequency(cpu_freq / 1000000);
REG_WRITE(RTC_CNTL_STORE5_REG, (cpu_freq >> 12) | ((cpu_freq >> 12) << 16));
}
#else // CONFIG_IDF_ENV_FPGA
void bootloader_clock_configure(void)
{
// ROM bootloader may have put a lot of text into UART0 FIFO.
@@ -72,6 +83,7 @@ void bootloader_clock_configure(void)
}
#endif
}
#endif // CONFIG_IDF_ENV_FPGA
#ifdef BOOTLOADER_BUILD