modem_clock: implemented the modem clock hal/ll-layer (include modem syscon and lpcon) for esp32h2

This commit is contained in:
wuzhenghui
2023-03-22 12:07:27 +08:00
parent a76dee171e
commit 43a9456243
6 changed files with 626 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -58,6 +58,16 @@ void modem_clock_hal_set_clock_domain_icg_bitmap(modem_clock_hal_context_t *hal,
}
}
void modem_clock_hal_enable_fe_clock(modem_clock_hal_context_t *hal, bool enable)
{
if (enable) {
modem_syscon_ll_enable_fe_apb_clock(hal->syscon_dev, enable);
modem_syscon_ll_enable_fe_cal_160m_clock(hal->syscon_dev, enable);
modem_syscon_ll_enable_fe_160m_clock(hal->syscon_dev, enable);
modem_syscon_ll_enable_fe_80m_clock(hal->syscon_dev, enable);
}
}
void modem_clock_hal_deselect_all_lp_timer_lpclk_source(modem_clock_hal_context_t *hal)
{
modem_lpcon_ll_enable_lp_timer_slow_osc(hal->lpcon_dev, false);