Commit Graph

271 Commits

Author SHA1 Message Date
wanlei
fdeeced62c twai: h2 support twai driver 2023-02-16 16:34:23 +08:00
jingli
9c37441b17 wdt: refactor wdt codes to use unified type 2023-02-15 12:08:55 +08:00
Sachin Billore
120fcec026 apm: added support for APM on esp32h2
Closes IDF-6277 IDF-6278 and IDF-5909
2023-02-14 10:43:49 +00:00
morris
e0c98da169 Merge branch 'feature/glitch_filter_h2' into 'master'
gpio: support glitch filter on esp32h2

Closes IDF-6286

See merge request espressif/esp-idf!22273
2023-02-14 13:07:44 +08:00
Mahavir Jain
f4fb62eee7 Merge branch 'bugfix/esp32c6_h2_clk_gate_periph_rst' into 'master'
clk_gate_ll: fix issue with DS peripheral clk reset

Closes IDF-6740

See merge request espressif/esp-idf!22301
2023-02-13 20:06:13 +08:00
Mahavir Jain
13c8407a19
esp32h2: add DS peripheral HAL 2023-02-13 10:26:37 +05:30
Mahavir Jain
c680113d52
esp32h2: add HMAC peripheral HAL 2023-02-13 10:26:36 +05:30
morris
a3f887a1fe gpio: support glitch filter on esp32h2 2023-02-11 23:01:01 +08:00
Cao Sen Miao
bbbe569e03 temperature_sensor: Add support for esp32h2 2023-02-10 16:36:56 +08:00
Mahavir Jain
725e1fb3cc
clk_gate_ll: remove DPORT_ prefix as this is not required for H2/C6 2023-02-10 10:48:45 +05:30
Mahavir Jain
f790fe0e1f
clk_gate_ll: fix issue with DS peripheral clk reset
In ESP32-H2, every peripheral reset enable bit is in different register
(unlike some of the previous SoCs) and hence they must be handled with
multiple register write operations.

This allows AES, MPI peripherals to works correctly after DS peripheral
has done some operations.
2023-02-09 17:11:37 +05:30
Wan Lei
005e4c7e0b Merge branch 'feature/spi_h2_support' into 'master'
SPI: Support master, slave, slave_hd driver for H2

Closes IDF-6245, IDF-6246, IDF-6247, and IDF-6696

See merge request espressif/esp-idf!22048
2023-02-09 11:04:46 +08:00
Song Ruo Jing
b69f983525 uart: Fix two TX concurrency issues
1. Concurrency might cause ESP_ERR_TIMEOUT when calling uart_wait_tx_done
2. Concurrency might cause RTS line being de-assreted during tx transmission for rs485 mode
2023-02-08 14:24:43 +08:00
wanlei
5300bd3b2f spi: support H2 spi master, slave, slave_hd driver 2023-02-08 11:38:45 +08:00
morris
990c6f58a6 Merge branch 'feature/etm_support_h2' into 'master'
etm: add basic driver on esp32h2

Closes IDF-6225

See merge request espressif/esp-idf!22246
2023-02-08 10:42:10 +08:00
morris
6f8ee89302 etm: add basic driver on esp32h2 2023-02-07 14:54:08 +00:00
Armando
d6844051fc esp_mm: new virtual memory mapping apis via mmu 2023-02-07 20:23:52 +08:00
wuzhenghui
146b9b047b soc: add modem regs and force enable i2c_ana_mst clock 2023-02-06 21:43:26 +08:00
Song Ruo Jing
b72d759290 uart: Add support for esp32h2 2023-02-06 00:48:04 +08:00
morris
15b9352f60 mcpwm: support esp32h2 2023-02-02 19:05:31 +08:00
morris
753eab91ee Merge branch 'feature/usj_support_h2' into 'master'
USJ console support on esp32h2

Closes IDF-6239

See merge request espressif/esp-idf!22156
2023-02-02 17:07:19 +08:00
laokaiyao
330149f3a6 i2c: support i2c on esp32h2 2023-02-01 11:23:11 +08:00
morris
3151f9c8f1 usj: bringup on esp32h2 2023-01-31 16:21:47 +08:00
morris
dbca74f1ef gdma: prevent mutli-channels connect to the same peripheral
1. add check in the gdma driver, to prevent multiple channels connecting
   to the same peripheral
2. memory copy DMA ID will occupy the peripheral's DMA ID on some ESP
   targets (e.g. esp32c3/s3). We should search for a free one when
install async memcpy driver.

Closes https://github.com/espressif/esp-idf/issues/10575
2023-01-31 15:18:19 +08:00
Song Ruo Jing
ad55230b0a ledc: Add support for esp32h2; Refactor ledc driver clock source selection related code
LEDC examples and test cases are supported on ESP32H2.
   Switch to use general clock IDs for ledc_clk_cfg_t enum values.
   Deprecate LEDC_USE_RTC8M_CLK.
2023-01-30 19:19:34 +08:00
Mahavir Jain
9374ebe529
esp32h2: add support for AES peripheral
Closes IDF-6280
2023-01-30 10:09:14 +05:30
Mahavir Jain
8203d40fc3
esp32h2: add support for SHA peripheral
Closes IDF-6275
2023-01-30 10:08:58 +05:30
Marius Vikhammer
e2d3f7c54c Merge branch 'feature/c6_wdt' into 'master'
wdt: add support for WDTs on C6

Closes IDF-5935 and IDF-5340

See merge request espressif/esp-idf!21038
2023-01-20 10:36:42 +08:00
Marius Vikhammer
5e9e8c396f wdt: add support for WDTs on C6 2023-01-19 12:58:26 +08:00
laokaiyao
c79187fdeb i2s: support i2s on esp32h2 2023-01-18 18:42:56 +08:00
Song Ruo Jing
9db3865cb7 Merge branch 'feature/esp32h2_gpio_support' into 'master'
gpio: Add support for esp32h2

Closes IDF-6227, IDF-6388, IDF-6403, and IDF-6676

See merge request espressif/esp-idf!21986
2023-01-18 16:24:13 +08:00
Song Ruo Jing
4c8fdc31f9 gpio: Add support for esp32h2 2023-01-18 11:41:12 +08:00
morris
b589fff0af rmt: support esp32h2 2023-01-18 11:40:35 +08:00
morris
d9825f5165 Merge branch 'feature/add_clk_tree_get_frequency_api' into 'master'
clk_tree: Stage 4 - Add a general API to get the frequency of different clocks

Closes IDF-6569

See merge request espressif/esp-idf!21830
2023-01-17 17:08:23 +08:00
C.S.M
01913f6d01 Merge branch 'feature/esp32h2_build_test' into 'master'
ESP32H2 (CI): enable CI build stage test on esp32h2

Closes IDF-6263 and IDF-6264

See merge request espressif/esp-idf!21954
2023-01-17 13:28:11 +08:00
Kevin (Lao Kaiyao)
c5af31fa19 Merge branch 'feature/support_pcnt_on_h2' into 'master'
pcnt: support pcnt on esp32h2

Closes IDF-6221 and IDF-6669

See merge request espressif/esp-idf!21950
2023-01-17 12:20:00 +08:00
Song Ruo Jing
2c9aa4559c clk_tree: Add a general API to get the frequency of different clocks
Add basic clk_tree driver and hal implementation.
2023-01-17 11:30:24 +08:00
Cao Sen Miao
94120b82c2 esp32h2: add build test 2023-01-17 10:29:04 +08:00
laokaiyao
482a26e284 sdm: support sdm on esp32h2 2023-01-13 16:55:51 +08:00
laokaiyao
2730186561 pcnt: support pcnt on esp32h2 2023-01-13 16:11:50 +08:00
morris
ce84476870 gptimer: support esp32h2 2023-01-12 14:10:11 +00:00
morris
f7c3d791a2 Merge branch 'feature/systimer_support_esp32h2' into 'master'
systimer: assign counter and alarm in esp_hw_support

Closes IDF-6484, IDF-5323, and IDF-6230

See merge request espressif/esp-idf!21984
2023-01-12 11:01:17 +08:00
morris
1f3507eac0 Merge branch 'feature/gdma_support_h2' into 'master'
gdma: support esp32h2

Closes IDF-6222 and IDF-6238

See merge request espressif/esp-idf!21932
2023-01-11 14:04:14 +08:00
morris
6c1d98d556 systimer: assign counter and alarm in esp_hw_support 2023-01-10 17:05:49 +08:00
morris
3681dee80e gdma: support esp32h2 2023-01-10 16:37:02 +08:00
morris
cbde82c33f apm: added low level functions for tee controller 2023-01-10 16:37:01 +08:00
jiangguangming
cceccb4ed9 hal: add rtc_cntl LL function for wake stub 2023-01-10 16:09:49 +08:00
Cao Sen Miao
56a2d0b8a2 BOD: Bringup for ESP32C6 2023-01-10 10:37:30 +08:00
Song Ruo Jing
981d6a67b0 clk: Add basic clock support for esp32h2 2023-01-03 11:00:32 +08:00
Cao Sen Miao
4713a9a7f2 ESP32H2: Introduce new chip target esp32h2, hello_world example supported 2022-12-29 12:29:14 +08:00
C.S.M
6b1d4b4d49 ESP32-H2: Last MR for g0 component support, (only hal left) 2022-12-05 17:32:21 +08:00
Cao Sen Miao
86aa4df5b5 ESP32-H2: Introduce new target for ESP32H2 2022-11-23 14:38:05 +08:00
laokaiyao
8677216576 esp32h2: renaming esp32h2 to esp32h4 2022-11-08 17:05:33 +08:00
C.S.M
86aa012c26 Merge branch 'feature/bringup_i2c_esp32c6' into 'master'
I2C: Add i2c support for ESP32C6

Closes IDF-5326 and IDF-5327

See merge request espressif/esp-idf!20905
2022-11-08 11:56:15 +08:00
Cao Sen Miao
803fc3fbe0 I2C: Add i2c support for ESP32C6 2022-11-07 14:12:53 +08:00
morris
a25123f703 twai: bringup on esp32c6 2022-11-04 17:40:29 +08:00
KonstantinKondrashov
1f9260d790 all: Apply new version logic (major * 100 + minor) 2022-11-03 08:36:23 +00:00
Armando
260ee86c37 rtc: united sar peripheral control 2022-10-27 16:51:25 +08:00
Song Ruo Jing
6d24e8bcf4 gpio: Add support for esp32c6 2022-10-18 12:38:36 +08:00
morris
b562754a2f rmt: support esp32c6 2022-09-17 04:56:49 +00:00
laokaiyao
bae4944b90 i2s: bringup i2s on esp32c6 2022-09-15 20:03:39 +08:00
laokaiyao
7197e987cb i2s: add XTAL clock source 2022-09-15 19:32:06 +08:00
morris
5f550b2a13 rmt,gptimer: don't support rc_fast clock source for c6 and h2
The RC_FAST clock source on ESP32C6 and ESP32H2 can't be calibrated.
Which makes it impossible to work stable for peripherals like timer, RMT
2022-09-14 14:40:28 +00:00
morris
a1030307f1 gptimer: bringup driver on esp32c6 2022-09-13 10:50:58 +08:00
gaoxu
5934ba731e SPI: Fix SPI wrong dummy bits on ESP32H2 2022-09-09 01:54:53 +00:00
Simon
e923c15859 Merge branch 'refactor/i2c_hal' into 'master'
I2C: Refactor i2c hal and ll(pre-MR of I2C driver-NG)

See merge request espressif/esp-idf!19750
2022-09-02 10:47:35 +08:00
Cao Sen Miao
31b88a4c88 I2C: Refactor i2c hal and ll 2022-09-01 15:53:59 +08:00
wuzhenghui
1d299a8976 esp32c6: add hal support 2022-09-01 12:37:51 +08:00
wuzhenghui
c31aaeda2a ll: add reset interface to rtc_cntl_ll 2022-08-31 01:59:36 +00:00
Gao Xu
0da21aca0d Merge branch 'bugfix/fix_spi_hd_quad_issue_esp32c3' into 'master'
essl_spi: fix wrong dummy cycle under quad spi mode ant add a test to verify spi quad mod

Closes IDF-5182 and IDF-5181

See merge request espressif/esp-idf!18680
2022-08-30 10:53:11 +08:00
morris
995b89fbb6 gptimer: add API to get captured count value 2022-08-25 17:55:19 +08:00
gaoxu
3610b14aef SPI : fix wrong dummy cycle on quad mode and put get-command function in spi_ll.h
1.The dummy_bits is set to 4 in ESP32C3/C2, therefore, the data transmission started too early.This commit fix this issue by changing dummy_bits to 8.
2.Put the spi command the spi defintion in spi_types.h
3.Put the function which get spi command or dummy bits in spi_ll.h
2022-08-23 10:46:56 +08:00
Song Ruo Jing
72a15e3c7a Merge branch 'bugfix/gpio_usb_pin_pupd' into 'master'
gpio: fix USB D+ pin cannot disable pullup

Closes IDFGH-7984

See merge request espressif/esp-idf!19191
2022-08-22 17:18:05 +08:00
songruojing
01143bd732 gpio: fix USB D+ pin cannot disable pullup
Internally, disable usb serial jtag DP pin's pullup when calling gpio_ll_pullup_dis and rtcio_ll_pullup_disable
At usb serial jtag setup/install, re-enable DP pin's pullup

Closes https://github.com/espressif/esp-idf/issues/9495
2022-08-19 15:05:28 +08:00
Michael (XIAO Xufeng)
746f4b814c uart: move frequency of clock sources out of HAL 2022-08-15 18:55:43 +00:00
morris
6f2ac1ce2a rmt: add iram safe test
Closes https://github.com/espressif/esp-idf/issues/9487
2022-08-12 11:30:14 +08:00
morris
cf4cfc69ed esp_adc: add test with -O0 2022-08-02 23:07:06 +08:00
morris
a5a171926b rmt: add test with -O0 2022-08-02 23:07:06 +08:00
morris
031adc01c4 gpio: add test with -O0 2022-08-02 23:07:06 +08:00
morris
7faf1bee73 gptimer: add test with -O0 2022-08-02 22:53:36 +08:00
Armando
f325ad2211 mmu: fix wrong mmu end check
In mmu code, we follow the rule that the `end` address shouldn't be
touched. This commit fix wrong end address check in mmu_ll.h
2022-07-27 10:22:09 +00:00
morris
d94432fea8 systimer: refactor hal to accomodate more xtal choices 2022-07-25 16:08:52 +08:00
laokaiyao
edee3ee3cd i2s: add slot sequence table
Closes: https://github.com/espressif/esp-idf/issues/9208

When I2S is configured into different modes, the slot sequence varies.
This commit updates slot sequence tables and corresponding descriptions
in (both code and programming guide).
2022-07-21 15:52:39 +08:00
laokaiyao
90866e99fb i2s: add basic examples for STD/TDM/PDM mode 2022-07-21 15:52:39 +08:00
morris
4154eaec93 sdm: clean up soc/hal/ll code 2022-07-20 14:59:50 +08:00
Song Ruo Jing
4734b1433b Merge branch 'bugfix/gpio_hal_coverity_fix' into 'master'
gpio: Fix ESP32S3 GPIO48 does not support hold function bug and Fix coverity report

Closes IDF-4901

See merge request espressif/esp-idf!18805
2022-07-19 21:37:15 +08:00
Armando (Dou Yiwen)
9f6f61345b Merge branch 'feature/adc_driver_ng' into 'master'
ADC Driver NG

Closes IDF-4560, IDF-3908, IDF-4225, IDF-2482, IDF-4111, IDF-3610, IDF-4058, IDF-3801, IDF-3636, IDF-2537, IDF-4310, IDF-5150, IDF-5151, and IDF-4979

See merge request espressif/esp-idf!17960
2022-07-19 21:28:31 +08:00
Cao Sen Miao
53580a62b5 I2C: Fullfill the I2C clock tree, and support 26M XTAL on ESP32-C2 2022-07-19 11:41:42 +08:00
Armando
5b523a3313 esp_adc: new esp_adc component and adc drivers 2022-07-15 18:31:00 +08:00
songruojing
0c4b9a0101 gpio: Fix HAL bad bit shift operation on gpio_num_t reported from coverity
All gpio hal and ll functions input arguments gpio_num_t are changed to uint32_t type.
Validation of gpio num should be guaranteed from the driver layer.
2022-07-15 16:51:25 +08:00
Ivan Grokhotkov
5b54ae76d4 esp_timer, hal: add support for non-integer systimer frequency
When ESP32-C2 is paired with a 26 MHz XTAL, the systimer tick
frequency becomes equal to 26 / 2.5 = 10.4 MHz. Previously we always
assumed that systimer tick frequency is integer (and 1 MHz * power of
two, above that!).
This commit introduces a new LL macro, SYSTIMER_LL_TICKS_PER_US_DIV.
It should be set in such a way that:

1. SYSTIMER_LL_TICKS_PER_US / SYSTIMER_LL_TICKS_PER_US_DIV equals the
   actual systimer tick frequency,
2. and SYSTIMER_LL_TICKS_PER_US is integer.

For ESP32-C2 this means that SYSTIMER_LL_TICKS_PER_US = 52 and
SYSTIMER_LL_TICKS_PER_US_DIV = 5.

This introduced two possible issues:

1. Overflow when multiplying systimer counter by 5
   - Should not be an issue, since systimer counter is 52-bit, so
     counter * 5 is no more than 55-bit.
2. The code needs to perform:
   - divide by 5: when converting from microseconds to ticks
   - divide by 52: when converting from ticks to microseconds
   The latter potentially introduces a performance issue for the
   esp_timer_get_time function.
2022-07-11 12:24:37 +08:00
Michael (XIAO Xufeng)
a58362a429 Merge branch 'feature/efuse_rev_major_minor' into 'master'
efuse: Adds major and minor versions

See merge request espressif/esp-idf!18255
2022-07-07 11:48:54 +08:00
morris
a92cce9861 Merge branch 'bugfix/calib_i2c_clk' into 'master'
I2C: Make I2C clock frequency accurate

Closes IDF-5363

See merge request espressif/esp-idf!18686
2022-07-06 20:52:31 +08:00
Cao Sen Miao
e218723e0e I2C: Make I2C clock frequency accurate 2022-07-06 11:58:08 +08:00
GengYuchao
d145c337e0 Enable rpa_moudle reset function 2022-07-05 20:50:31 +08:00
KonstantinKondrashov
0f8ff5aa15 efuse: Adds major and minor versions and others 2022-07-05 14:38:27 +08:00
morris
7863c1bc45 Merge branch 'bugfix/fix_rtc_freq_err_for_h2_beta1' into 'master'
Bugfix/fix rtc freq err for h2 beta1

See merge request espressif/esp-idf!18682
2022-07-04 16:46:17 +08:00
Omar Chebib
cd48baf979 Refactor: move regi2c_*.h header files from esp_hw_support to soc component
When creating G0 layer, some regi2c_*.h headers were moved out from
esp_hw_support (G1) to soc (G0). In order to be consistent with that change,
move all the remaining regi2c_*.h headers to soc too.
2022-06-30 09:40:44 +00:00
GengYuchao
10fd1daa10 Add ETM clk gate defines for h2 2022-06-30 17:02:00 +08:00
Armando
31b3f31ef4 ext_mem: make memory region check strict 2022-06-28 14:17:44 +08:00