Commit Graph

507 Commits

Author SHA1 Message Date
Michael (XIAO Xufeng)
234628b3ea pm: putting dbias and pd_cur code into same function 2022-05-14 02:35:11 +08:00
Jing Li
ac0d16cdc8 Merge branch 'bugfix/fix_cannot_lslp_again_after_ulp_wakeup' into 'master'
sleep: fix cannot lightsleep again after a wakeup from ULP

Closes IDFGH-4396

See merge request espressif/esp-idf!17970
2022-05-13 22:25:23 +08:00
jingli
abb6bb1181 esp_hw_support/sleep: fix cannot enable sleep reject in some cases
When enable sleep reject before this fix, we have two limitations:
1. it must be light sleep
2. RTC GPIO wakeup source must be set

We require light sleep because `esp_deep_sleep_start` function has
been declared with "noreturn" attribute, So developers don't expect
that this function may return (due to an error or a sleep reject).
But the requirement for RTC GPIO wakeup source is not reasonable for
all chips. This requirement exists because ESP32 only supports RTC GPIO
and SDIO sleep reject sources. But later chips support all sleep reject
sources.

This fix brings the following changes:
for ESP32: RTC GPIO and SDIO sleep reject sources can be enabled
           when corresponding wakeup source is set.

for later chips: all sleep reject sources can be enabled when
                 corresponding wakeup source is set.
2022-05-12 19:09:57 +08:00
Marius Vikhammer
c8617fe965 docs: fix all doxygen warnings
Doxygen warnings would previously not result in a failed pipeline.
Fixed this as well as all current warnings.
2022-05-12 14:50:03 +08:00
Michael (XIAO Xufeng)
2905cbbe03 pm: fixed RTC8M domain power issues
introduced in e44ead5356

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
e44ead5356. 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-05-11 11:30:47 +08:00
morris
523c51818c Merge branch 'feature/c2_soc_hwsupport_code' into 'master'
ESP32-C2 (729) RTC update (Clock, PM)

Closes IDF-3833 and IDF-4874

See merge request espressif/esp-idf!17311
2022-05-11 11:23:57 +08:00
zlq
6336f8191e C2 rtc code 2022-05-09 17:50:54 +08:00
morris
722fde218d uart: add default source clock for all targets 2022-05-09 11:26:30 +08:00
Armando
49747bb486 adc: create common adc hal layer 2022-05-07 19:20:44 +08:00
Armando (Dou Yiwen)
76be0c2624 Merge branch 'bugfix/fix_esp32_mmu_init_issue' into 'master'
mmu: add ll functions for mmu unmap

Closes OCD-526 and IDF-4962

See merge request espressif/esp-idf!17868
2022-05-05 22:21:18 +08:00
Armando
b748a4fe5e mmu: improve vaddr range check 2022-04-27 11:35:07 +08:00
Armando
e09787d851 mmu: fix macro MMU_ENTRY_NUM and add new macro MMU_MAX_PADDR_PAGE_NUM 2022-04-27 11:35:07 +08:00
Armando
2764cd5682 mmu: simplify mmu_hal_init 2022-04-27 11:35:07 +08:00
jiangguangming
63ac5e4a99 mmu: add ll func used to invalidate the mmu entry 2022-04-27 11:35:07 +08:00
Cao Sen Miao
4418a855ba spi_flash: refactor the spi_flash clock configuration, and add support for esp32c2 2022-04-26 15:22:37 +08:00
Marius Vikhammer
45c1d1cba2 Merge branch 'feature/move_target_kconfig_2' into 'master'
system: move kconfig options out of target component

See merge request espressif/esp-idf!17321
2022-04-24 13:29:43 +08:00
morris
4280164be4 rmt: add more clock source caps 2022-04-21 13:59:47 +00:00
Marius Vikhammer
d2872095f9 soc: moved kconfig options out of the target component.
Moved the following kconfig options out of the target component:
 * CONFIG_ESP*_DEFAULT_CPU_FREQ* -> esp_system
 * ESP*_REV_MIN -> esp_hw_support
 * ESP*_TIME_SYSCALL -> newlib
 * ESP*_RTC_* -> esp_hw_support

Where applicable these target specific konfig names were merged into
a single common config, e.g;
CONFIG_ESP*_DEFAULT_CPU_FREQ -> CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ
2022-04-21 12:09:43 +08:00
morris
373d9b3dbc Merge branch 'feature/default_clk_for_gptimer' into 'master'
clk_tree: added default clock source for peripherals (GPTimer, RMT, LCD, TempSensor)

Closes IDF-4894

See merge request espressif/esp-idf!17759
2022-04-19 18:02:40 +08:00
songruojing
534346f4bb ledc: Provide support for esp32c2 and esp32h2
LEDC examples, unit test, and programming guide are all updated.
2022-04-14 08:15:14 +00:00
morris
f32a89826c clk_tree: added default clock source for peripheral 2022-04-14 15:44:56 +08:00
songruo
60bb5c913d clk_tree: prework of introducing clk subsystem control
1. Clean up clk usage in IDF, replace rtc_clk_xtal/apb_freq_get with
   upper level API esp_clk_xtal/apb_freq
2. Fix small errors and wrong comments related to clock
3. Add clk_tree_defs.h to provide an unified clock id for each chip
   Modify the NGed drivers to adopt new clock ids
2022-04-11 12:09:06 +08:00
Mahavir Jain
74005ed2f5 soc: add capability macros for security features
- Security features covers "secure boot", "flash encryption" etc.
- ECO revision specific modifications still need to be handled
through kconfig itself, as soc_caps.h is processed before ECO revision
selection
- This will simplify addition of security features for newer chips by
using these SOC capability macros
2022-04-01 09:38:34 +00:00
Armando
fe9c6cde4f spi: support spi on h2 2022-03-29 11:54:08 +08:00
Kevin (Lao Kaiyao)
ba9d3fe819 Merge branch 'refactor/i2s_major_refactoring_for_ng' into 'master'
🔨i2s: Major refactoring for driver-NG

Closes IDF-4781 and IDF-4779

See merge request espressif/esp-idf!17484
2022-03-23 15:32:46 +08:00
laokaiyao
f17edba20b i2s: extract std/pdm/tdm modes
Type structures of these modes are defined. Driver and HAL layer are modified to fit these concepts.
2022-03-22 10:14:45 +08:00
Mahavir Jain
bcc4883c25 soc: add capability macros for crypto peripherals
Closes IDF-4790
2022-03-22 02:06:30 +00:00
Armando (Dou Yiwen)
36457b1346 Merge branch 'refactor/adc_unify_adc_unit' into 'master'
adc: adc single driver NG pre-step - unify adc_ll_num_t and adc_unit_t

See merge request espressif/esp-idf!17408
2022-03-18 20:29:36 +08:00
Armando
386363cafd adc: unify adc_ll_num_t and adc_unit_t 2022-03-18 11:36:50 +08:00
Jiang Jiang Jian
10f3aba770 Merge branch 'feature/final_h2' into 'master'
Add support in Nimble for ESP32H2

See merge request espressif/esp-idf!16329
2022-03-15 16:03:24 +08:00
Rahul Tank
f376bb5d05 Add support in Nimble for ESP32H2 2022-03-14 11:57:53 +05:30
morris
9422fe077a lcd: support I2S1 LCD mode on esp32 2022-03-14 13:55:01 +08:00
Michael (XIAO Xufeng)
aab535fe4a Merge branch 'bugfix/regi2c_ctrl_spinlock_s2' into 'master'
hw_support: fixed regi2c not protected by lock on ESP32S2

See merge request espressif/esp-idf!16653
2022-03-13 02:47:53 +08:00
Michael (XIAO Xufeng)
d5bdf95580 hw_support: fixed regi2c not protected by lock on ESP32S2 2022-03-13 00:24:08 +08:00
Armando (Dou Yiwen)
6ed3ffbbf1 Merge branch 'refactor/remove_redundant_rom_cache_dependency' into 'master'
cache: remove redundant rom cache dependency in bootloader

Closes IDF-4523

See merge request espressif/esp-idf!17077
2022-03-12 10:11:39 +08:00
Armando
c1cbd7bbf6 cache/mmu: implememnt cache and mmu hal APIs in bootloader 2022-03-11 22:43:11 +08:00
Dai Zi Yan
1462367eeb Merge branch 'docs/translate_coexist' into 'master'
docs/ translate coexist

Closes DOC-2479

See merge request espressif/esp-idf!16830
2022-03-10 10:59:18 +08:00
morris
9f55712c03 rmt: document and improve LL driver 2022-03-09 10:58:12 +08:00
xiongweichao
6514f9e94c docs: translate coexist from CN to EN 2022-03-09 02:50:00 +00:00
morris
ec8defaa96 pulse_cnt: new driver for PCNT peripheral 2022-03-03 22:38:32 +08:00
Michael (XIAO Xufeng)
78165c541e Merge branch 'bugfix/bootloader_uart_custom_gpio' into 'master'
bootloader: fixed the issue custom_uart_gpio doesn't take effect

Closes IDF-4606

See merge request espressif/esp-idf!16910
2022-03-02 02:35:14 +08:00
songruojing
d4334cc109 uart: fixed incorrect channel number on ESP32S2, S3 and C3 2022-03-01 18:21:27 +08:00
KonstantinKondrashov
7d097511fa soc: Fix efuse_hal_get_chip_revision for esp32 2022-03-01 16:55:43 +08:00
Kevin (Lao Kaiyao)
cc1d89ebba Merge branch 'feature/i2c_support_on_esp8684_esp32h2' into 'master'
i2c: support i2c on esp32c2 and esp32h2

Closes IDF-3918

See merge request espressif/esp-idf!16444
2022-02-28 13:59:02 +08:00
Konstantin Kondrashov
44e5ac2c59 Merge branch 'feature/efuse_hal' into 'master'
hal: Adds efuse hal layer

See merge request espressif/esp-idf!16354
2022-02-28 13:38:43 +08:00
KonstantinKondrashov
9605f3eb1a soc: Adds efuse hal
Replaced eFuse ROM funcs with hal layer
2022-02-24 22:20:09 +08:00
laokaiyao
7da023ceae i2c: support esp32c2 2022-02-23 15:19:37 +08:00
morris
116197040f i2s: update copyright 2022-02-21 21:28:48 +08:00
Zim Kalinowski
67f51a4ce5 Merge branch 'bugfix/riscv_i2c_description' into 'master'
i2c: fix the controller count in the header description

Closes IDFGH-6476

See merge request espressif/esp-idf!16718
2022-01-26 03:13:07 +00:00
Omar Chebib
bb730292d4 i2c: fix the controller count in the header description
Closes https://github.com/espressif/esp-idf/issues/8133
2022-01-13 18:25:41 +08:00