mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 09:39:10 -04:00
change(soc): update pmu register context structure and driver for esp32c5
This commit is contained in:
parent
14a2be6eed
commit
3e70dafa0b
@ -202,6 +202,7 @@ const pmu_hp_system_digital_param_t * pmu_hp_system_digital_param_default(pmu_hp
|
|||||||
.bias_sleep = 0 \
|
.bias_sleep = 0 \
|
||||||
}, \
|
}, \
|
||||||
.regulator0 = { \
|
.regulator0 = { \
|
||||||
|
.slp_connect_en = 0, \
|
||||||
.lp_dbias_vol = 0xd, \
|
.lp_dbias_vol = 0xd, \
|
||||||
.hp_dbias_vol = 0x1c, \
|
.hp_dbias_vol = 0x1c, \
|
||||||
.dbias_sel = 1, \
|
.dbias_sel = 1, \
|
||||||
@ -226,6 +227,7 @@ const pmu_hp_system_digital_param_t * pmu_hp_system_digital_param_default(pmu_hp
|
|||||||
.bias_sleep = 0 \
|
.bias_sleep = 0 \
|
||||||
}, \
|
}, \
|
||||||
.regulator0 = { \
|
.regulator0 = { \
|
||||||
|
.slp_connect_en = 0, \
|
||||||
.slp_mem_xpd = 0, \
|
.slp_mem_xpd = 0, \
|
||||||
.slp_logic_xpd = 0, \
|
.slp_logic_xpd = 0, \
|
||||||
.xpd = 1, \
|
.xpd = 1, \
|
||||||
@ -246,6 +248,7 @@ const pmu_hp_system_digital_param_t * pmu_hp_system_digital_param_default(pmu_hp
|
|||||||
.bias_sleep = 0 \
|
.bias_sleep = 0 \
|
||||||
}, \
|
}, \
|
||||||
.regulator0 = { \
|
.regulator0 = { \
|
||||||
|
.slp_connect_en = 0, \
|
||||||
.slp_mem_xpd = 0, \
|
.slp_mem_xpd = 0, \
|
||||||
.slp_logic_xpd = 0, \
|
.slp_logic_xpd = 0, \
|
||||||
.xpd = 1, \
|
.xpd = 1, \
|
||||||
@ -269,7 +272,7 @@ const pmu_hp_system_analog_param_t * pmu_hp_system_analog_param_default(pmu_hp_m
|
|||||||
return &hp_analog[mode];
|
return &hp_analog[mode];
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PMU_HP_RETENTION_REGDMA_CONFIG(dir, entry) ((((dir)<<2) | (entry & 0x3)) & 0x7)
|
#define PMU_HP_RETENTION_REGDMA_CONFIG(dir, entry) ((((dir)<<4) | (entry & 0xf)) & 0x1f)
|
||||||
|
|
||||||
#define PMU_HP_ACTIVE_RETENTION_CONFIG_DEFAULT() { \
|
#define PMU_HP_ACTIVE_RETENTION_CONFIG_DEFAULT() { \
|
||||||
.retention = { \
|
.retention = { \
|
||||||
|
@ -169,7 +169,12 @@ typedef struct {
|
|||||||
uint32_t bias_sleep: 1;
|
uint32_t bias_sleep: 1;
|
||||||
};
|
};
|
||||||
struct {
|
struct {
|
||||||
uint32_t reserved1 : 16;
|
uint32_t reserved1 : 3; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
|
uint32_t dbias_init : 1; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
|
uint32_t lp_dbias_vol : 5; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
|
uint32_t hp_dbias_vol : 5; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
|
uint32_t dbias_sel : 1; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
|
uint32_t slp_connect_en : 1;
|
||||||
uint32_t slp_mem_xpd : 1;
|
uint32_t slp_mem_xpd : 1;
|
||||||
uint32_t slp_logic_xpd : 1;
|
uint32_t slp_logic_xpd : 1;
|
||||||
uint32_t xpd : 1;
|
uint32_t xpd : 1;
|
||||||
|
@ -87,10 +87,9 @@ typedef union {
|
|||||||
uint32_t reserved2 : 1;
|
uint32_t reserved2 : 1;
|
||||||
uint32_t hp_sleep2active_backup_clk_sel : 2;
|
uint32_t hp_sleep2active_backup_clk_sel : 2;
|
||||||
uint32_t hp_modem2active_backup_clk_sel : 2;
|
uint32_t hp_modem2active_backup_clk_sel : 2;
|
||||||
uint32_t reserved3 : 2;
|
uint32_t hp_sleep2active_backup_mode : 5;
|
||||||
uint32_t hp_sleep2active_backup_mode : 3;
|
uint32_t hp_modem2active_backup_mode : 5;
|
||||||
uint32_t hp_modem2active_backup_mode : 3;
|
uint32_t reserved4 : 1;
|
||||||
uint32_t reserved4 : 3;
|
|
||||||
uint32_t hp_sleep2active_backup_en : 1;
|
uint32_t hp_sleep2active_backup_en : 1;
|
||||||
uint32_t hp_modem2active_backup_en : 1;
|
uint32_t hp_modem2active_backup_en : 1;
|
||||||
uint32_t reserved5 : 1;
|
uint32_t reserved5 : 1;
|
||||||
@ -104,8 +103,8 @@ typedef union {
|
|||||||
uint32_t reserved8 : 2;
|
uint32_t reserved8 : 2;
|
||||||
uint32_t hp_sleep2modem_backup_clk_sel : 2;
|
uint32_t hp_sleep2modem_backup_clk_sel : 2;
|
||||||
uint32_t reserved9 : 4;
|
uint32_t reserved9 : 4;
|
||||||
uint32_t hp_sleep2modem_backup_mode : 3;
|
uint32_t hp_sleep2modem_backup_mode : 5;
|
||||||
uint32_t reserved10 : 6;
|
uint32_t reserved10 : 4;
|
||||||
uint32_t hp_sleep2modem_backup_en : 1;
|
uint32_t hp_sleep2modem_backup_en : 1;
|
||||||
uint32_t reserved11 : 2;
|
uint32_t reserved11 : 2;
|
||||||
};
|
};
|
||||||
@ -120,10 +119,8 @@ typedef union {
|
|||||||
uint32_t reserved14 : 2;
|
uint32_t reserved14 : 2;
|
||||||
uint32_t hp_modem2sleep_backup_clk_sel : 2;
|
uint32_t hp_modem2sleep_backup_clk_sel : 2;
|
||||||
uint32_t hp_active2sleep_backup_clk_sel : 2;
|
uint32_t hp_active2sleep_backup_clk_sel : 2;
|
||||||
uint32_t reserved15 : 3;
|
uint32_t hp_modem2sleep_backup_mode : 5;
|
||||||
uint32_t hp_modem2sleep_backup_mode : 3;
|
uint32_t hp_active2sleep_backup_mode : 5;
|
||||||
uint32_t hp_active2sleep_backup_mode : 3;
|
|
||||||
uint32_t reserved16 : 1;
|
|
||||||
uint32_t hp_modem2sleep_backup_en : 1;
|
uint32_t hp_modem2sleep_backup_en : 1;
|
||||||
uint32_t hp_active2sleep_backup_en : 1;
|
uint32_t hp_active2sleep_backup_en : 1;
|
||||||
};
|
};
|
||||||
@ -144,11 +141,12 @@ typedef union {
|
|||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
uint32_t reserved0 : 4; /* Only HP_ACTIVE modem under hp system is valid */
|
uint32_t reserved0 : 3; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
|
uint32_t dbias_init : 1; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
uint32_t lp_dbias_vol : 5; /* Only HP_ACTIVE modem under hp system is valid */
|
uint32_t lp_dbias_vol : 5; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
uint32_t hp_dbias_vol : 5; /* Only HP_ACTIVE modem under hp system is valid */
|
uint32_t hp_dbias_vol : 5; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
uint32_t dbias_sel : 1; /* Only HP_ACTIVE modem under hp system is valid */
|
uint32_t dbias_sel : 1; /* Only HP_ACTIVE modem under hp system is valid */
|
||||||
uint32_t dbias_init : 1; /* Only HP_ACTIVE modem under hp system is valid */
|
uint32_t slp_connect_en : 1;
|
||||||
uint32_t slp_mem_xpd : 1;
|
uint32_t slp_mem_xpd : 1;
|
||||||
uint32_t slp_logic_xpd : 1;
|
uint32_t slp_logic_xpd : 1;
|
||||||
uint32_t xpd : 1;
|
uint32_t xpd : 1;
|
||||||
@ -378,10 +376,10 @@ typedef union {
|
|||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
uint32_t reserved0 : 9;
|
uint32_t lp_iso_wait_timer : 8;
|
||||||
uint32_t powerdown_timer: 7;
|
uint32_t lp_rst_wait_timer : 8;
|
||||||
uint32_t powerup_timer : 7;
|
uint32_t hp_iso_wait_timer : 8;
|
||||||
uint32_t wait_timer : 9;
|
uint32_t hp_rst_wait_timer : 8;
|
||||||
};
|
};
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
} pmu_power_wait_timer2_reg_t;
|
} pmu_power_wait_timer2_reg_t;
|
||||||
@ -565,7 +563,10 @@ typedef union {
|
|||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
uint32_t reserved0 : 26;
|
uint32_t reserved0 : 23;
|
||||||
|
uint32_t xpd_ckgen5g : 1;
|
||||||
|
uint32_t xpd_tc5g_i2c : 1;
|
||||||
|
uint32_t xpd_rx5g_i2c : 1;
|
||||||
uint32_t perif_i2c_rstb: 1;
|
uint32_t perif_i2c_rstb: 1;
|
||||||
uint32_t xpd_perif_i2c : 1;
|
uint32_t xpd_perif_i2c : 1;
|
||||||
uint32_t xpd_txrf_i2c : 1;
|
uint32_t xpd_txrf_i2c : 1;
|
||||||
@ -754,9 +755,7 @@ typedef struct pmu_dev_t{
|
|||||||
extern pmu_dev_t PMU;
|
extern pmu_dev_t PMU;
|
||||||
|
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
|
_Static_assert(sizeof(pmu_dev_t) == 0x1ac, "Invalid size of pmu_dev_t structure");
|
||||||
//_Static_assert(offsetof(pmu_dev_t, reserved) == (PMU_VDD_SPI_STATUS_REG - DR_REG_PMU_BASE) + 4, "Invalid size of pmu_dev_t structure"); TODO IDF-8643
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
Loading…
x
Reference in New Issue
Block a user