mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 13:00:19 +00:00
refactor(regi2c): add LL function to control analog i2c master clock
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "esp_private/regi2c_ctrl.h"
|
||||
#include "soc/regi2c_lp_bias.h"
|
||||
#include "soc/regi2c_bias.h"
|
||||
#include "modem/modem_lpcon_reg.h"
|
||||
#include "bootloader_console.h"
|
||||
#include "bootloader_flash_priv.h"
|
||||
#include "bootloader_soc.h"
|
||||
@@ -43,7 +42,7 @@
|
||||
#include "soc/lp_wdt_reg.h"
|
||||
#include "soc/pmu_reg.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "modem/modem_lpcon_reg.h"
|
||||
#include "hal/regi2c_ctrl_ll.h"
|
||||
|
||||
static const char *TAG = "boot.esp32h2";
|
||||
|
||||
@@ -89,8 +88,9 @@ static inline void bootloader_hardware_init(void)
|
||||
/* Disable RF pll by default */
|
||||
CLEAR_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_RFPLL);
|
||||
SET_PERI_REG_MASK(PMU_RF_PWC_REG, PMU_XPD_FORCE_RFPLL);
|
||||
/* Enable analog i2c master clock */
|
||||
SET_PERI_REG_MASK(MODEM_LPCON_CLK_CONF_REG, MODEM_LPCON_CLK_I2C_MST_EN);
|
||||
|
||||
regi2c_ctrl_ll_master_enable_clock(true);
|
||||
regi2c_ctrl_ll_master_configure_clock();
|
||||
}
|
||||
|
||||
static inline void bootloader_ana_reset_config(void)
|
||||
@@ -160,7 +160,7 @@ esp_err_t bootloader_init(void)
|
||||
}
|
||||
#endif // !CONFIG_APP_BUILD_TYPE_RAM
|
||||
|
||||
// check whether a WDT reset happend
|
||||
// check whether a WDT reset happened
|
||||
bootloader_check_wdt_reset();
|
||||
// config WDT
|
||||
bootloader_config_wdt();
|
||||
|
Reference in New Issue
Block a user