feat(vbat): Add support to use vbat as rtc battery

This commit is contained in:
C.S.M
2025-01-15 15:28:09 +08:00
parent 349d1dbd33
commit 59df7c1b8f
18 changed files with 395 additions and 10 deletions
@@ -219,6 +219,10 @@ config SOC_BOD_SUPPORTED
bool
default y
config SOC_VBAT_SUPPORTED
bool
default y
config SOC_APM_SUPPORTED
bool
default y
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -23,3 +23,26 @@
#define I2C_BOD_THRESHOLD_H 0x9
#define I2C_BOD_THRESHOLD_H_MSB 7
#define I2C_BOD_THRESHOLD_H_LSB 5
#define I2C_BIAS_OR_DREF_VBAT_L 8
#define I2C_BIAS_OR_DREF_VBAT_L_MSB 4
#define I2C_BIAS_OR_DREF_VBAT_L_LSB 2
#define I2C_BIAS_OR_DREF_VBAT_H 8
#define I2C_BIAS_OR_DREF_VBAT_H_MSB 7
#define I2C_BIAS_OR_DREF_VBAT_H_LSB 5
#define I2C_BIAS_OR_DREF_VBAT_CHARGER_L 10
#define I2C_BIAS_OR_DREF_VBAT_CHARGER_L_MSB 4
#define I2C_BIAS_OR_DREF_VBAT_CHARGER_L_LSB 2
#define I2C_BIAS_OR_DREF_VBAT_CHARGER_H 10
#define I2C_BIAS_OR_DREF_VBAT_CHARGER_H_MSB 7
#define I2C_BIAS_OR_DREF_VBAT_CHARGER_H_LSB 5
#define I2C_BIAS_OR_FORCE_PU_VBAT_CHARGER 10
#define I2C_BIAS_OR_FORCE_PU_VBAT_CHARGER_MSB 0
#define I2C_BIAS_OR_FORCE_PU_VBAT_CHARGER_LSB 0
/** Change the charging current by adjusting the value of the series resistor. 1kΩ + N * 0.5kΩ */
#define I2C_BIAS_OR_DRES_CHARGER 3
#define I2C_BIAS_OR_DRES_CHARGER_MSB 7
#define I2C_BIAS_OR_DRES_CHARGER_LSB 4
@@ -71,6 +71,7 @@
#define SOC_FLASH_ENC_SUPPORTED 1
#define SOC_SECURE_BOOT_SUPPORTED 1
#define SOC_BOD_SUPPORTED 1
#define SOC_VBAT_SUPPORTED 1
#define SOC_APM_SUPPORTED 1
#define SOC_PMU_SUPPORTED 1
#define SOC_DCDC_SUPPORTED 1