Skip to content

Commit 8bd81b2

Browse files
esp-wzhQingzhaoYin
authored andcommitted
feat(esp_hw_support): update pmu sleep parameters and register header and structure file for esp32c61
1 parent 0a25960 commit 8bd81b2

File tree

3 files changed

+69
-73
lines changed

3 files changed

+69
-73
lines changed

components/esp_hw_support/port/esp32c61/pmu_param.c

Lines changed: 50 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -202,66 +202,69 @@ const pmu_hp_system_digital_param_t * pmu_hp_system_digital_param_default(pmu_hp
202202
}
203203

204204
#define PMU_HP_ACTIVE_ANALOG_CONFIG_DEFAULT() { \
205-
.bias = { \
206-
.xpd_bias = 1, \
207-
.dbg_atten = 0x0, \
208-
.pd_cur = 0, \
209-
.bias_sleep = 0 \
205+
.bias = { \
206+
.xpd_bias = 1, \
207+
.dbg_atten = 0x0, \
208+
.pd_cur = 0, \
209+
.bias_sleep = 0 \
210210
}, \
211-
.regulator0 = { \
212-
.lp_dbias_vol = 0xd, \
213-
.hp_dbias_vol = 0x1c,\
214-
.dbias_sel = 1, \
215-
.dbias_init = 1, \
216-
.slp_mem_xpd = 0, \
217-
.slp_logic_xpd = 0, \
218-
.xpd = 1, \
219-
.slp_mem_dbias = 0, \
220-
.slp_logic_dbias = 0, \
221-
.dbias = HP_CALI_DBIAS_DEFAULT \
211+
.regulator0 = { \
212+
.slp_connect_en_active = 1, \
213+
.lp_dbias_vol = 0xd, \
214+
.hp_dbias_vol = 0x1c,\
215+
.dbias_sel = 1, \
216+
.dbias_init_active = 1, \
217+
.slp_mem_xpd = 0, \
218+
.slp_logic_xpd = 0, \
219+
.xpd = 1, \
220+
.slp_mem_dbias = 0, \
221+
.slp_logic_dbias = 0, \
222+
.dbias = HP_CALI_DBIAS_DEFAULT \
222223
}, \
223-
.regulator1 = { \
224-
.drv_b = 0x0 \
224+
.regulator1 = { \
225+
.drv_b = 0x0 \
225226
} \
226227
}
227228

228229
#define PMU_HP_MODEM_ANALOG_CONFIG_DEFAULT() { \
229-
.bias = { \
230-
.xpd_bias = 0, \
231-
.dbg_atten = 0x0, \
232-
.pd_cur = 0, \
233-
.bias_sleep = 0 \
230+
.bias = { \
231+
.xpd_bias = 0, \
232+
.dbg_atten = 0x0,\
233+
.pd_cur = 0, \
234+
.bias_sleep = 0 \
234235
}, \
235-
.regulator0 = { \
236-
.slp_mem_xpd = 0, \
237-
.slp_logic_xpd = 0, \
238-
.xpd = 1, \
239-
.slp_mem_dbias = 0, \
240-
.slp_logic_dbias = 0, \
241-
.dbias = HP_CALI_DBIAS_DEFAULT \
236+
.regulator0 = { \
237+
.slp_connect_en_modem = 1, \
238+
.slp_mem_xpd = 0, \
239+
.slp_logic_xpd = 0, \
240+
.xpd = 1, \
241+
.slp_mem_dbias = 0, \
242+
.slp_logic_dbias = 0, \
243+
.dbias = HP_CALI_DBIAS_DEFAULT \
242244
}, \
243-
.regulator1 = { \
244-
.drv_b = 0x0 \
245+
.regulator1 = { \
246+
.drv_b = 0x0 \
245247
} \
246248
}
247249

248250
#define PMU_HP_SLEEP_ANALOG_CONFIG_DEFAULT() { \
249-
.bias = { \
250-
.xpd_bias = 0, \
251-
.dbg_atten = 0x0, \
252-
.pd_cur = 0, \
253-
.bias_sleep = 0 \
251+
.bias = { \
252+
.xpd_bias = 0, \
253+
.dbg_atten = 0x0,\
254+
.pd_cur = 0, \
255+
.bias_sleep = 0 \
254256
}, \
255-
.regulator0 = { \
256-
.slp_mem_xpd = 0, \
257-
.slp_logic_xpd = 0, \
258-
.xpd = 1, \
259-
.slp_mem_dbias = 0, \
260-
.slp_logic_dbias = 0, \
261-
.dbias = 1 \
257+
.regulator0 = { \
258+
.slp_connect_en_sleep = 1, \
259+
.slp_mem_xpd = 0, \
260+
.slp_logic_xpd = 0, \
261+
.xpd = 1, \
262+
.slp_mem_dbias = 0, \
263+
.slp_logic_dbias = 0, \
264+
.dbias = 1 \
262265
}, \
263-
.regulator1 = { \
264-
.drv_b = 0x0 \
266+
.regulator1 = { \
267+
.drv_b = 0x0 \
265268
} \
266269
}
267270

components/soc/esp32c61/register/soc/pmu_reg.h

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -1336,18 +1336,6 @@ extern "C" {
13361336
#define PMU_HP_SLEEP_LP_REGULATOR_DRV_B_V 0x0000000FU
13371337
#define PMU_HP_SLEEP_LP_REGULATOR_DRV_B_S 28
13381338

1339-
/** PMU_HP_SLEEP_LP_DCDC_RESERVE_REG register
1340-
* need_des
1341-
*/
1342-
#define PMU_HP_SLEEP_LP_DCDC_RESERVE_REG (DR_REG_PMU_BASE + 0xa4)
1343-
/** PMU_HP_SLEEP_LP_DCDC_RESERVE : WT; bitpos: [31:0]; default: 0;
1344-
* need_des
1345-
*/
1346-
#define PMU_HP_SLEEP_LP_DCDC_RESERVE 0xFFFFFFFFU
1347-
#define PMU_HP_SLEEP_LP_DCDC_RESERVE_M (PMU_HP_SLEEP_LP_DCDC_RESERVE_V << PMU_HP_SLEEP_LP_DCDC_RESERVE_S)
1348-
#define PMU_HP_SLEEP_LP_DCDC_RESERVE_V 0xFFFFFFFFU
1349-
#define PMU_HP_SLEEP_LP_DCDC_RESERVE_S 0
1350-
13511339
/** PMU_HP_SLEEP_LP_DIG_POWER_REG register
13521340
* need_des
13531341
*/
@@ -1400,18 +1388,6 @@ extern "C" {
14001388
#define PMU_HP_SLEEP_PD_OSC_CLK_V 0x00000001U
14011389
#define PMU_HP_SLEEP_PD_OSC_CLK_S 31
14021390

1403-
/** PMU_LP_SLEEP_LP_BIAS_RESERVE_REG register
1404-
* need_des
1405-
*/
1406-
#define PMU_LP_SLEEP_LP_BIAS_RESERVE_REG (DR_REG_PMU_BASE + 0xb0)
1407-
/** PMU_LP_SLEEP_LP_BIAS_RESERVE : WT; bitpos: [31:0]; default: 0;
1408-
* need_des
1409-
*/
1410-
#define PMU_LP_SLEEP_LP_BIAS_RESERVE 0xFFFFFFFFU
1411-
#define PMU_LP_SLEEP_LP_BIAS_RESERVE_M (PMU_LP_SLEEP_LP_BIAS_RESERVE_V << PMU_LP_SLEEP_LP_BIAS_RESERVE_S)
1412-
#define PMU_LP_SLEEP_LP_BIAS_RESERVE_V 0xFFFFFFFFU
1413-
#define PMU_LP_SLEEP_LP_BIAS_RESERVE_S 0
1414-
14151391
/** PMU_LP_SLEEP_LP_REGULATOR0_REG register
14161392
* need_des
14171393
*/

components/soc/esp32c61/register/soc/pmu_struct.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -156,6 +156,23 @@ typedef union {
156156
uint32_t slp_logic_dbias: 4;
157157
uint32_t dbias : 5;
158158
};
159+
struct {
160+
uint32_t reserved2 : 3;
161+
uint32_t slp_connect_en_active: 1;
162+
uint32_t reserved3 : 11;
163+
uint32_t dbias_init_active : 1;
164+
uint32_t reserved4 : 16;
165+
};
166+
struct {
167+
uint32_t reserved5 : 15;
168+
uint32_t slp_connect_en_modem : 1;
169+
uint32_t reserved6 : 16;
170+
};
171+
struct {
172+
uint32_t reserved7 : 15;
173+
uint32_t slp_connect_en_sleep : 1;
174+
uint32_t reserved8 : 16;
175+
};
159176
uint32_t val;
160177
} pmu_hp_regulator0_reg_t;
161178

0 commit comments

Comments
 (0)