Zephyr API Documentation
3.0.0
A Scalable Open Source RTOS
3.0.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
pca9420_i2c.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2021, NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_REGULATOR_PCA9420_I2C_H_
8
#define ZEPHYR_INCLUDE_DT_BINDINGS_REGULATOR_PCA9420_I2C_H_
9
10
/*
11
* Voltage Ranges should be defined without commas, spaces, or brackets. These
12
* ranges will be inserted directly into the devicetree as arrays, so that the
13
* driver can parse them.
14
*/
15
#define PCA9420_SW1_VOLTAGE_RANGE \
16
500000 0x00
/* SW1 output voltage 0.500V. */
\
17
525000 0x01
/* SW1 output voltage 0.525V. */
\
18
550000 0x02
/* SW1 output voltage 0.550V. */
\
19
575000 0x03
/* SW1 output voltage 0.575V. */
\
20
600000 0x04
/* SW1 output voltage 0.600V. */
\
21
625000 0x05
/* SW1 output voltage 0.625V. */
\
22
650000 0x06
/* SW1 output voltage 0.650V. */
\
23
675000 0x07
/* SW1 output voltage 0.675V. */
\
24
700000 0x08
/* SW1 output voltage 0.700V. */
\
25
725000 0x09
/* SW1 output voltage 0.725V. */
\
26
750000 0x0A
/* SW1 output voltage 0.750V. */
\
27
775000 0x0B
/* SW1 output voltage 0.775V. */
\
28
800000 0x0C
/* SW1 output voltage 0.800V. */
\
29
825000 0x0D
/* SW1 output voltage 0.825V. */
\
30
850000 0x0E
/* SW1 output voltage 0.850V. */
\
31
875000 0x0F
/* SW1 output voltage 0.875V. */
\
32
900000 0x10
/* SW1 output voltage 0.900V. */
\
33
925000 0x11
/* SW1 output voltage 0.925V. */
\
34
950000 0x12
/* SW1 output voltage 0.950V. */
\
35
975000 0x13
/* SW1 output voltage 0.975V. */
\
36
1000000 0x14
/* SW1 output voltage 1.000V. */
\
37
1025000 0x15
/* SW1 output voltage 1.025V. */
\
38
1050000 0x16
/* SW1 output voltage 1.050V. */
\
39
1075000 0x17
/* SW1 output voltage 1.075V. */
\
40
1100000 0x18
/* SW1 output voltage 1.100V. */
\
41
1125000 0x19
/* SW1 output voltage 1.125V. */
\
42
1150000 0x1A
/* SW1 output voltage 1.150V. */
\
43
1175000 0x1B
/* SW1 output voltage 1.175V. */
\
44
1200000 0x1C
/* SW1 output voltage 1.200V. */
\
45
1225000 0x1D
/* SW1 output voltage 1.225V. */
\
46
1250000 0x1E
/* SW1 output voltage 1.250V. */
\
47
1275000 0x1F
/* SW1 output voltage 1.275V. */
\
48
1300000 0x20
/* SW1 output voltage 1.300V. */
\
49
1325000 0x21
/* SW1 output voltage 1.325V. */
\
50
1350000 0x22
/* SW1 output voltage 1.350V. */
\
51
1375000 0x23
/* SW1 output voltage 1.375V. */
\
52
1400000 0x24
/* SW1 output voltage 1.400V. */
\
53
1425000 0x25
/* SW1 output voltage 1.425V. */
\
54
1450000 0x26
/* SW1 output voltage 1.450V. */
\
55
1475000 0x27
/* SW1 output voltage 1.475V. */
\
56
1500000 0x28
/* SW1 output voltage 1.500V. */
\
57
1800000 0x3F
/* SW1 output voltage 1.800V. */
\
58
59
#define PCA9420_SW2_VOLTAGE_RANGE \
60
1500000 0x00
/* SW2 output voltage 1.500V. */
\
61
1525000 0x01
/* SW2 output voltage 1.525V. */
\
62
1550000 0x02
/* SW2 output voltage 1.550V. */
\
63
1575000 0x03
/* SW2 output voltage 1.575V. */
\
64
1600000 0x04
/* SW2 output voltage 1.600V. */
\
65
1625000 0x05
/* SW2 output voltage 1.625V. */
\
66
1650000 0x06
/* SW2 output voltage 1.650V. */
\
67
1675000 0x07
/* SW2 output voltage 1.675V. */
\
68
1700000 0x08
/* SW2 output voltage 1.700V. */
\
69
1725000 0x09
/* SW2 output voltage 1.725V. */
\
70
1750000 0x0A
/* SW2 output voltage 1.750V. */
\
71
1775000 0x0B
/* SW2 output voltage 1.775V. */
\
72
1800000 0x0C
/* SW2 output voltage 1.800V. */
\
73
1825000 0x0D
/* SW2 output voltage 1.825V. */
\
74
1850000 0x0E
/* SW2 output voltage 1.850V. */
\
75
1875000 0x0F
/* SW2 output voltage 1.875V. */
\
76
1900000 0x10
/* SW2 output voltage 1.900V. */
\
77
1925000 0x11
/* SW2 output voltage 1.925V. */
\
78
1950000 0x12
/* SW2 output voltage 1.950V. */
\
79
1975000 0x13
/* SW2 output voltage 1.975V. */
\
80
2000000 0x14
/* SW2 output voltage 2.000V. */
\
81
2025000 0x15
/* SW2 output voltage 2.025V. */
\
82
2050000 0x16
/* SW2 output voltage 2.050V. */
\
83
2075000 0x17
/* SW2 output voltage 2.075V. */
\
84
2100000 0x18
/* SW2 output voltage 2.100V. */
\
85
2700000 0x20
/* SW2 output voltage 2.700V. */
\
86
2725000 0x21
/* SW2 output voltage 2.725V. */
\
87
2750000 0x22
/* SW2 output voltage 2.750V. */
\
88
2775000 0x23
/* SW2 output voltage 2.775V. */
\
89
2800000 0x24
/* SW2 output voltage 2.800V. */
\
90
2825000 0x25
/* SW2 output voltage 2.825V. */
\
91
2850000 0x26
/* SW2 output voltage 2.850V. */
\
92
2875000 0x27
/* SW2 output voltage 2.875V. */
\
93
2900000 0x28
/* SW2 output voltage 2.900V. */
\
94
2925000 0x29
/* SW2 output voltage 2.925V. */
\
95
2950000 0x2A
/* SW2 output voltage 2.950V. */
\
96
2975000 0x2B
/* SW2 output voltage 2.975V. */
\
97
3000000 0x2C
/* SW2 output voltage 3.000V. */
\
98
3025000 0x2D
/* SW2 output voltage 3.025V. */
\
99
3050000 0x2E
/* SW2 output voltage 3.050V. */
\
100
3075000 0x2F
/* SW2 output voltage 3.075V. */
\
101
3100000 0x30
/* SW2 output voltage 3.100V. */
\
102
3125000 0x31
/* SW2 output voltage 3.125V. */
\
103
3150000 0x32
/* SW2 output voltage 3.150V. */
\
104
3175000 0x33
/* SW2 output voltage 3.175V. */
\
105
3200000 0x34
/* SW2 output voltage 3.200V. */
\
106
3225000 0x35
/* SW2 output voltage 3.225V. */
\
107
3250000 0x36
/* SW2 output voltage 3.250V. */
\
108
3275000 0x37
/* SW2 output voltage 3.275V. */
\
109
3300000 0x38
/* SW2 output voltage 3.300V. */
\
110
111
#define PCA9420_LDO1_VOLTAGE_RANGE \
112
1700000 0x00
/* LDO1 output voltage 1.700V. */
\
113
1725000 0x10
/* LDO1 output voltage 1.725V. */
\
114
1750000 0x20
/* LDO1 output voltage 1.750V. */
\
115
1775000 0x30
/* LDO1 output voltage 1.775V. */
\
116
1800000 0x40
/* LDO1 output voltage 1.800V. */
\
117
1825000 0x50
/* LDO1 output voltage 1.825V. */
\
118
1850000 0x60
/* LDO1 output voltage 1.850V. */
\
119
1875000 0x70
/* LDO1 output voltage 1.875V. */
\
120
1900000 0x80
/* LDO1 output voltage 1.900V. */
\
121
122
#define PCA9420_LDO2_VOLTAGE_RANGE \
123
1500000 0x00
/* LDO2 output voltage 1.500V. */
\
124
1525000 0x01
/* LDO2 output voltage 1.525V. */
\
125
1550000 0x02
/* LDO2 output voltage 1.550V. */
\
126
1575000 0x03
/* LDO2 output voltage 1.575V. */
\
127
1600000 0x04
/* LDO2 output voltage 1.600V. */
\
128
1625000 0x05
/* LDO2 output voltage 1.625V. */
\
129
1650000 0x06
/* LDO2 output voltage 1.650V. */
\
130
1675000 0x07
/* LDO2 output voltage 1.675V. */
\
131
1700000 0x08
/* LDO2 output voltage 1.700V. */
\
132
1725000 0x09
/* LDO2 output voltage 1.725V. */
\
133
1750000 0x0A
/* LDO2 output voltage 1.750V. */
\
134
1775000 0x0B
/* LDO2 output voltage 1.775V. */
\
135
1800000 0x0C
/* LDO2 output voltage 1.800V. */
\
136
1825000 0x0D
/* LDO2 output voltage 1.825V. */
\
137
1850000 0x0E
/* LDO2 output voltage 1.850V. */
\
138
1875000 0x0F
/* LDO2 output voltage 1.875V. */
\
139
1900000 0x10
/* LDO2 output voltage 1.900V. */
\
140
1925000 0x11
/* LDO2 output voltage 1.925V. */
\
141
1950000 0x12
/* LDO2 output voltage 1.950V. */
\
142
1975000 0x13
/* LDO2 output voltage 1.975V. */
\
143
2000000 0x14
/* LDO2 output voltage 2.000V. */
\
144
2025000 0x15
/* LDO2 output voltage 2.025V. */
\
145
2050000 0x16
/* LDO2 output voltage 2.050V. */
\
146
2075000 0x17
/* LDO2 output voltage 2.075V. */
\
147
2100000 0x18
/* LDO2 output voltage 2.100V. */
\
148
2700000 0x20
/* LDO2 output voltage 2.700V. */
\
149
2725000 0x21
/* LDO2 output voltage 2.725V. */
\
150
2750000 0x22
/* LDO2 output voltage 2.750V. */
\
151
2775000 0x23
/* LDO2 output voltage 2.775V. */
\
152
2800000 0x24
/* LDO2 output voltage 2.800V. */
\
153
2825000 0x25
/* LDO2 output voltage 2.825V. */
\
154
2850000 0x26
/* LDO2 output voltage 2.850V. */
\
155
2875000 0x27
/* LDO2 output voltage 2.875V. */
\
156
2900000 0x28
/* LDO2 output voltage 2.900V. */
\
157
2925000 0x29
/* LDO2 output voltage 2.925V. */
\
158
2950000 0x2A
/* LDO2 output voltage 2.950V. */
\
159
2975000 0x2B
/* LDO2 output voltage 2.975V. */
\
160
3000000 0x2C
/* LDO2 output voltage 3.000V. */
\
161
3025000 0x2D
/* LDO2 output voltage 3.025V. */
\
162
3050000 0x2E
/* LDO2 output voltage 3.050V. */
\
163
3075000 0x2F
/* LDO2 output voltage 3.075V. */
\
164
3100000 0x30
/* LDO2 output voltage 3.100V. */
\
165
3125000 0x31
/* LDO2 output voltage 3.125V. */
\
166
3150000 0x32
/* LDO2 output voltage 3.150V. */
\
167
3175000 0x33
/* LDO2 output voltage 3.175V. */
\
168
3200000 0x34
/* LDO2 output voltage 3.200V. */
\
169
3225000 0x35
/* LDO2 output voltage 3.225V. */
\
170
3250000 0x36
/* LDO2 output voltage 3.250V. */
\
171
3275000 0x37
/* LDO2 output voltage 3.275V. */
\
172
3300000 0x38
/* LDO2 output voltage 3.300V. */
\
173
174
#define PCA9420_CURRENT_LIMIT_LEVELS \
175
85000 0x00
/* min: 74mA, typ: 85mA, max: 98mA */
\
176
225000 0x20
/* min: 222mA, typ: 225mA, max: 293mA */
\
177
425000 0x40
/* min: 370mA, typ: 425mA, max: 489mA */
\
178
595000 0x60
/* min: 517mA, typ: 595mA, max: 684mA */
\
179
765000 0x80
/* min: 665mA, typ: 765mA, max: 880mA */
\
180
935000 0xA0
/* min: 813mA, typ: 935mA, max: 1075mA */
\
181
1105000 0xC0
/* min: 961mA, typ: 1105mA, max: 1271mA */
\
182
183
184
188
#define PCA9420_DEV_INFO 0x00U
190
#define PCA9420_TOP_INT 0x01U
192
#define PCA9420_SUB_INT0 0x02U
194
#define PCA9420_SUB_INT0_MASK 0x03U
196
#define PCA9420_SUB_INT1 0x04U
198
#define PCA9420_SUB_INT1_MASK 0x05U
200
#define PCA9420_SUB_INT2 0x06U
202
#define PCA9420_SUB_INT2_MASK 0x07U
204
#define PCA9420_TOP_CNTL0 0x09U
206
#define PCA9420_TOP_CNTL1 0x0AU
208
#define PCA9420_TOP_CNTL2 0x0BU
210
#define PCA9420_TOP_CNTL3 0x0CU
212
#define PCA9420_TOP_CNTL4 0x0DU
213
216
#define PCA9420_CHG_CNTL0 0x10U
218
#define PCA9420_CHG_CNTL1 0x11U
220
#define PCA9420_CHG_CNTL2 0x12U
222
#define PCA9420_CHG_CNTL3 0x13U
224
#define PCA9420_CHG_CNTL4 0x14U
226
#define PCA9420_CHG_CNTL5 0x15U
228
#define PCA9420_CHG_CNTL6 0x16U
230
#define PCA9420_CHG_CNTL7 0x17U
232
#define PCA9420_CHG_STATUS_0 0x18U
234
#define PCA9420_CHG_STATUS_1 0x19U
236
#define PCA9420_CHG_STATUS_2 0x1AU
238
#define PCA9420_CHG_STATUS_3 0x1BU
239
242
#define PCA9420_REG_STATUS 0x20U
244
#define PCA9420_ACT_DISCHARGE_CNTL_1 0x21U
246
#define PCA9420_MODECFG_0_0 0x22U
248
#define PCA9420_MODECFG_0_1 0x23U
250
#define PCA9420_MODECFG_0_2 0x24U
252
#define PCA9420_MODECFG_0_3 0x25U
254
#define PCA9420_MODECFG_1_0 0x26U
256
#define PCA9420_MODECFG_1_1 0x27U
258
#define PCA9420_MODECFG_1_2 0x28U
260
#define PCA9420_MODECFG_1_3 0x29U
262
#define PCA9420_MODECFG_2_0 0x2AU
264
#define PCA9420_MODECFG_2_1 0x2BU
266
#define PCA9420_MODECFG_2_2 0x2CU
268
#define PCA9420_MODECFG_2_3 0x2DU
270
#define PCA9420_MODECFG_3_0 0x2EU
272
#define PCA9420_MODECFG_3_1 0x2FU
274
#define PCA9420_MODECFG_3_2 0x30U
276
#define PCA9420_MODECFG_3_3 0x31U
277
280
#define PCA9420_DEV_INFO_DEV_ID_MASK 0xF0U
281
#define PCA9420_DEV_INFO_DEV_ID_SHIFT 0x04U
283
#define PCA9420_DEV_INFO_DEV_REV_MASK 0x0FU
284
#define PCA9420_DEV_INFO_DEV_REV_SHIFT 0x00U
286
#define PCA9420_TOP_INT_SYS_INT_MASK 0x01U
287
#define PCA9420_TOP_INT_SYS_INT_SHIFT 0x03U
289
#define PCA9420_TOP_INT_CHG_INT_MASK 0x01U
290
#define PCA9420_TOP_INT_CHG_INT_SHIFT 0x02U
292
#define PCA9420_TOP_INT_SW_INT_MASK 0x01U
293
#define PCA9420_TOP_INT_SW_INT_SHIFT 0x01U
295
#define PCA9420_TOP_INT_LDO_INT_MASK 0x01U
296
#define PCA9420_TOP_INT_LDO_INT_SHIFT 0x00U
297
299
#define PCA9420_TOP_CNTL0_VIN_ILIM_SEL_MASK 0xE0U
300
#define PCA9420_TOP_CNTL0_VIN_ILIM_SEL_SHIFT 0x05U
301
303
#define PCA9420_TOP_CNTL3_MODE_I2C_MASK 0x18U
304
#define PCA9420_TOP_CNTL3_MODE_I2C_SHIFT 0x03U
306
#define PCA9420_MODECFG_0_SHIP_EN_MASK 0x80U
307
/*
308
* @brief Mode control selection mask. When this bit is set, the external
309
* PMIC pins MODESEL0 and MODESEL1 can be used to select the active mode
310
*/
311
#define PCA9420_MODECFG_0_MODE_CTRL_SEL_MASK 0x40U
313
#define PCA9420_MODECFG_0_SW1_OUT_MASK 0x3FU
314
/*
315
* @brief Mode configuration upon falling edge applied to ON pin. If set,
316
* the device will switch to mode 0 when a valid falling edge is applied.
317
* to the ON pin
318
*/
319
#define PCA9420_MODECFG_1_ON_CFG_MASK 0x40U
321
#define PCA9420_MODECFG_1_SW2_OUT_MASK 0x3FU
323
#define PCA9420_MODECFG_2_LDO1_OUT_MASK 0xF0U
324
#define PCA9420_MODECFG_2_LDO1_OUT_SHIFT 0x04U
326
#define PCA9420_MODECFG_2_SW1_EN_MASK 0x08U
327
#define PCA9420_MODECFG_2_SW1_EN_VAL 0x08U
329
#define PCA9420_MODECFG_2_SW2_EN_MASK 0x04U
330
#define PCA9420_MODECFG_2_SW2_EN_VAL 0x04U
332
#define PCA9420_MODECFG_2_LDO1_EN_MASK 0x02U
333
#define PCA9420_MODECFG_2_LDO1_EN_VAL 0x02U
335
#define PCA9420_MODECFG_2_LDO2_EN_MASK 0x01U
336
#define PCA9420_MODECFG_2_LDO2_EN_VAL 0x01U
338
#define PCA9420_MODECFG_3_WDIMER_MASK 0xC0U
340
#define PCA9420_MODECFG_3_LDO2_OUT_MASK 0x3FU
341
342
343
344
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_REGULATOR_PCA9420_I2C_H_*/
include
dt-bindings
regulator
pca9420_i2c.h
Generated on Mon Feb 21 2022 22:43:01 for Zephyr API Documentation by
1.9.2