Lines Matching +full:0 +full:- +full:mon
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
8 #include <linux/mfd/rohm-generic.h>
9 #include <linux/mfd/rohm-shared.h>
30 #define BD71828_BUCK1267_VOLTS 0x100
31 #define BD71828_BUCK3_VOLTS 0x20
32 #define BD71828_BUCK4_VOLTS 0x40
33 #define BD71828_BUCK5_VOLTS 0x20
34 #define BD71828_LDO_VOLTS 0x40
41 #define BD71828_REG_PS_CTRL_1 0x04
42 #define BD71828_REG_PS_CTRL_2 0x05
43 #define BD71828_REG_PS_CTRL_3 0x06
47 #define BD71828_MASK_RUN_LVL_CTRL 0x30
51 #define BD71828_MASK_RAMP_DELAY 0x6
53 #define BD71828_MASK_RUN_EN 0x08
54 #define BD71828_MASK_SUSP_EN 0x04
55 #define BD71828_MASK_IDLE_EN 0x02
56 #define BD71828_MASK_LPSR_EN 0x01
58 #define BD71828_MASK_RUN0_EN 0x01
59 #define BD71828_MASK_RUN1_EN 0x02
60 #define BD71828_MASK_RUN2_EN 0x04
61 #define BD71828_MASK_RUN3_EN 0x08
63 #define BD71828_MASK_DVS_BUCK1_CTRL 0x10
64 #define BD71828_DVS_BUCK1_CTRL_I2C 0
65 #define BD71828_DVS_BUCK1_USE_RUNLVL 0x10
67 #define BD71828_MASK_DVS_BUCK2_CTRL 0x20
68 #define BD71828_DVS_BUCK2_CTRL_I2C 0
69 #define BD71828_DVS_BUCK2_USE_RUNLVL 0x20
71 #define BD71828_MASK_DVS_BUCK6_CTRL 0x40
72 #define BD71828_DVS_BUCK6_CTRL_I2C 0
73 #define BD71828_DVS_BUCK6_USE_RUNLVL 0x40
75 #define BD71828_MASK_DVS_BUCK7_CTRL 0x80
76 #define BD71828_DVS_BUCK7_CTRL_I2C 0
77 #define BD71828_DVS_BUCK7_USE_RUNLVL 0x80
79 #define BD71828_MASK_BUCK1267_VOLT 0xff
80 #define BD71828_MASK_BUCK3_VOLT 0x1f
81 #define BD71828_MASK_BUCK4_VOLT 0x3f
82 #define BD71828_MASK_BUCK5_VOLT 0x1f
83 #define BD71828_MASK_LDO_VOLT 0x3f
86 #define BD71828_REG_BUCK1_EN 0x08
87 #define BD71828_REG_BUCK1_CTRL 0x09
88 #define BD71828_REG_BUCK1_MODE 0x0a
89 #define BD71828_REG_BUCK1_IDLE_VOLT 0x0b
90 #define BD71828_REG_BUCK1_SUSP_VOLT 0x0c
91 #define BD71828_REG_BUCK1_VOLT 0x0d
93 #define BD71828_REG_BUCK2_EN 0x12
94 #define BD71828_REG_BUCK2_CTRL 0x13
95 #define BD71828_REG_BUCK2_MODE 0x14
96 #define BD71828_REG_BUCK2_IDLE_VOLT 0x15
97 #define BD71828_REG_BUCK2_SUSP_VOLT 0x16
98 #define BD71828_REG_BUCK2_VOLT 0x17
100 #define BD71828_REG_BUCK3_EN 0x1c
101 #define BD71828_REG_BUCK3_MODE 0x1d
102 #define BD71828_REG_BUCK3_VOLT 0x1e
104 #define BD71828_REG_BUCK4_EN 0x1f
105 #define BD71828_REG_BUCK4_MODE 0x20
106 #define BD71828_REG_BUCK4_VOLT 0x21
108 #define BD71828_REG_BUCK5_EN 0x22
109 #define BD71828_REG_BUCK5_MODE 0x23
110 #define BD71828_REG_BUCK5_VOLT 0x24
112 #define BD71828_REG_BUCK6_EN 0x25
113 #define BD71828_REG_BUCK6_CTRL 0x26
114 #define BD71828_REG_BUCK6_MODE 0x27
115 #define BD71828_REG_BUCK6_IDLE_VOLT 0x28
116 #define BD71828_REG_BUCK6_SUSP_VOLT 0x29
117 #define BD71828_REG_BUCK6_VOLT 0x2a
119 #define BD71828_REG_BUCK7_EN 0x2f
120 #define BD71828_REG_BUCK7_CTRL 0x30
121 #define BD71828_REG_BUCK7_MODE 0x31
122 #define BD71828_REG_BUCK7_IDLE_VOLT 0x32
123 #define BD71828_REG_BUCK7_SUSP_VOLT 0x33
124 #define BD71828_REG_BUCK7_VOLT 0x34
126 #define BD71828_REG_LDO1_EN 0x39
127 #define BD71828_REG_LDO1_VOLT 0x3a
128 #define BD71828_REG_LDO2_EN 0x3b
129 #define BD71828_REG_LDO2_VOLT 0x3c
130 #define BD71828_REG_LDO3_EN 0x3d
131 #define BD71828_REG_LDO3_VOLT 0x3e
132 #define BD71828_REG_LDO4_EN 0x3f
133 #define BD71828_REG_LDO4_VOLT 0x40
134 #define BD71828_REG_LDO5_EN 0x41
135 #define BD71828_REG_LDO5_VOLT 0x43
136 #define BD71828_REG_LDO5_VOLT_OPT 0x42
137 #define BD71828_REG_LDO6_EN 0x44
138 #define BD71828_REG_LDO7_EN 0x45
139 #define BD71828_REG_LDO7_VOLT 0x46
143 #define BD71828_GPIO_DRIVE_MASK 0x2
144 #define BD71828_GPIO_OPEN_DRAIN 0x0
145 #define BD71828_GPIO_PUSH_PULL 0x2
146 #define BD71828_GPIO_OUT_HI 0x1
147 #define BD71828_GPIO_OUT_LO 0x0
148 #define BD71828_GPIO_OUT_MASK 0x1
150 #define BD71828_REG_GPIO_CTRL1 0x47
151 #define BD71828_REG_GPIO_CTRL2 0x48
152 #define BD71828_REG_GPIO_CTRL3 0x49
153 #define BD71828_REG_IO_STAT 0xed
156 #define BD71828_REG_OUT32K 0x4b
159 #define BD71828_REG_RTC_SEC 0x4c
160 #define BD71828_REG_RTC_MINUTE 0x4d
161 #define BD71828_REG_RTC_HOUR 0x4e
162 #define BD71828_REG_RTC_WEEK 0x4f
163 #define BD71828_REG_RTC_DAY 0x50
164 #define BD71828_REG_RTC_MONTH 0x51
165 #define BD71828_REG_RTC_YEAR 0x52
167 #define BD71828_REG_RTC_ALM0_SEC 0x53
169 #define BD71828_REG_RTC_ALM0_MINUTE 0x54
170 #define BD71828_REG_RTC_ALM0_HOUR 0x55
171 #define BD71828_REG_RTC_ALM0_WEEK 0x56
172 #define BD71828_REG_RTC_ALM0_DAY 0x57
173 #define BD71828_REG_RTC_ALM0_MONTH 0x58
174 #define BD71828_REG_RTC_ALM0_YEAR 0x59
175 #define BD71828_REG_RTC_ALM0_MASK 0x61
177 #define BD71828_REG_RTC_ALM1_SEC 0x5a
178 #define BD71828_REG_RTC_ALM1_MINUTE 0x5b
179 #define BD71828_REG_RTC_ALM1_HOUR 0x5c
180 #define BD71828_REG_RTC_ALM1_WEEK 0x5d
181 #define BD71828_REG_RTC_ALM1_DAY 0x5e
182 #define BD71828_REG_RTC_ALM1_MONTH 0x5f
183 #define BD71828_REG_RTC_ALM1_YEAR 0x60
184 #define BD71828_REG_RTC_ALM1_MASK 0x62
186 #define BD71828_REG_RTC_ALM2 0x63
190 #define BD71828_REG_CHG_STATE 0x65
191 #define BD71828_REG_CHG_FULL 0xd2
194 #define BD71828_REG_LED_CTRL 0x4A
195 #define BD71828_MASK_LED_AMBER 0x80
196 #define BD71828_MASK_LED_GREEN 0x40
197 #define BD71828_LED_ON 0xff
198 #define BD71828_LED_OFF 0x0
201 #define BD71828_REG_INT_MASK_BUCK 0xd3
202 #define BD71828_REG_INT_MASK_DCIN1 0xd4
203 #define BD71828_REG_INT_MASK_DCIN2 0xd5
204 #define BD71828_REG_INT_MASK_VSYS 0xd6
205 #define BD71828_REG_INT_MASK_CHG 0xd7
206 #define BD71828_REG_INT_MASK_BAT 0xd8
207 #define BD71828_REG_INT_MASK_BAT_MON1 0xd9
208 #define BD71828_REG_INT_MASK_BAT_MON2 0xda
209 #define BD71828_REG_INT_MASK_BAT_MON3 0xdb
210 #define BD71828_REG_INT_MASK_BAT_MON4 0xdc
211 #define BD71828_REG_INT_MASK_TEMP 0xdd
212 #define BD71828_REG_INT_MASK_RTC 0xde
214 #define BD71828_REG_INT_MAIN 0xdf
215 #define BD71828_REG_INT_BUCK 0xe0
216 #define BD71828_REG_INT_DCIN1 0xe1
217 #define BD71828_REG_INT_DCIN2 0xe2
218 #define BD71828_REG_INT_VSYS 0xe3
219 #define BD71828_REG_INT_CHG 0xe4
220 #define BD71828_REG_INT_BAT 0xe5
221 #define BD71828_REG_INT_BAT_MON1 0xe6
222 #define BD71828_REG_INT_BAT_MON2 0xe7
223 #define BD71828_REG_INT_BAT_MON3 0xe8
224 #define BD71828_REG_INT_BAT_MON4 0xe9
225 #define BD71828_REG_INT_TEMP 0xea
226 #define BD71828_REG_INT_RTC 0xeb
227 #define BD71828_REG_INT_UPDATE 0xec
302 /* Battery Mon 1 */
310 /* Battery Mon 2 */
313 /* Battery Mon 3 (Coulomb counter) */
317 /* Battery Mon 4 */
339 #define BD71828_INT_BUCK1_OCP_MASK 0x1
340 #define BD71828_INT_BUCK2_OCP_MASK 0x2
341 #define BD71828_INT_BUCK3_OCP_MASK 0x4
342 #define BD71828_INT_BUCK4_OCP_MASK 0x8
343 #define BD71828_INT_BUCK5_OCP_MASK 0x10
344 #define BD71828_INT_BUCK6_OCP_MASK 0x20
345 #define BD71828_INT_BUCK7_OCP_MASK 0x40
346 #define BD71828_INT_PGFAULT_MASK 0x80
348 #define BD71828_INT_DCIN_DET_MASK 0x1
349 #define BD71828_INT_DCIN_RMV_MASK 0x2
350 #define BD71828_INT_CLPS_OUT_MASK 0x4
351 #define BD71828_INT_CLPS_IN_MASK 0x8
353 #define BD71828_INT_DCIN_MON_RES_MASK 0x1
354 #define BD71828_INT_DCIN_MON_DET_MASK 0x2
355 #define BD71828_INT_LONGPUSH_MASK 0x4
356 #define BD71828_INT_MIDPUSH_MASK 0x8
357 #define BD71828_INT_SHORTPUSH_MASK 0x10
358 #define BD71828_INT_PUSH_MASK 0x20
359 #define BD71828_INT_WDOG_MASK 0x40
360 #define BD71828_INT_SWRESET_MASK 0x80
362 #define BD71828_INT_VSYS_UV_RES_MASK 0x1
363 #define BD71828_INT_VSYS_UV_DET_MASK 0x2
364 #define BD71828_INT_VSYS_LOW_RES_MASK 0x4
365 #define BD71828_INT_VSYS_LOW_DET_MASK 0x8
366 #define BD71828_INT_VSYS_HALL_IN_MASK 0x10
367 #define BD71828_INT_VSYS_HALL_TOGGLE_MASK 0x20
368 #define BD71828_INT_VSYS_MON_RES_MASK 0x40
369 #define BD71828_INT_VSYS_MON_DET_MASK 0x80
371 #define BD71828_INT_CHG_DCIN_ILIM_MASK 0x1
372 #define BD71828_INT_CHG_TOPOFF_TO_DONE_MASK 0x2
373 #define BD71828_INT_CHG_WDG_TEMP_MASK 0x4
374 #define BD71828_INT_CHG_WDG_TIME_MASK 0x8
375 #define BD71828_INT_CHG_RECHARGE_RES_MASK 0x10
376 #define BD71828_INT_CHG_RECHARGE_DET_MASK 0x20
377 #define BD71828_INT_CHG_RANGED_TEMP_TRANSITION_MASK 0x40
378 #define BD71828_INT_CHG_STATE_TRANSITION_MASK 0x80
380 #define BD71828_INT_BAT_TEMP_NORMAL_MASK 0x1
381 #define BD71828_INT_BAT_TEMP_ERANGE_MASK 0x2
382 #define BD71828_INT_BAT_TEMP_WARN_MASK 0x4
383 #define BD71828_INT_BAT_REMOVED_MASK 0x10
384 #define BD71828_INT_BAT_DETECTED_MASK 0x20
385 #define BD71828_INT_THERM_REMOVED_MASK 0x40
386 #define BD71828_INT_THERM_DETECTED_MASK 0x80
387 /* Battery Mon 1 */
388 #define BD71828_INT_BAT_DEAD_MASK 0x2
389 #define BD71828_INT_BAT_SHORTC_RES_MASK 0x4
390 #define BD71828_INT_BAT_SHORTC_DET_MASK 0x8
391 #define BD71828_INT_BAT_LOW_VOLT_RES_MASK 0x10
392 #define BD71828_INT_BAT_LOW_VOLT_DET_MASK 0x20
393 #define BD71828_INT_BAT_OVER_VOLT_RES_MASK 0x40
394 #define BD71828_INT_BAT_OVER_VOLT_DET_MASK 0x80
395 /* Battery Mon 2 */
396 #define BD71828_INT_BAT_MON_RES_MASK 0x1
397 #define BD71828_INT_BAT_MON_DET_MASK 0x2
398 /* Battery Mon 3 (Coulomb counter) */
399 #define BD71828_INT_BAT_CC_MON1_MASK 0x1
400 #define BD71828_INT_BAT_CC_MON2_MASK 0x2
401 #define BD71828_INT_BAT_CC_MON3_MASK 0x4
402 /* Battery Mon 4 */
403 #define BD71828_INT_BAT_OVER_CURR_1_RES_MASK 0x1
404 #define BD71828_INT_BAT_OVER_CURR_1_DET_MASK 0x2
405 #define BD71828_INT_BAT_OVER_CURR_2_RES_MASK 0x4
406 #define BD71828_INT_BAT_OVER_CURR_2_DET_MASK 0x8
407 #define BD71828_INT_BAT_OVER_CURR_3_RES_MASK 0x10
408 #define BD71828_INT_BAT_OVER_CURR_3_DET_MASK 0x20
410 #define BD71828_INT_TEMP_BAT_LOW_RES_MASK 0x1
411 #define BD71828_INT_TEMP_BAT_LOW_DET_MASK 0x2
412 #define BD71828_INT_TEMP_BAT_HI_RES_MASK 0x4
413 #define BD71828_INT_TEMP_BAT_HI_DET_MASK 0x8
414 #define BD71828_INT_TEMP_CHIP_OVER_125_RES_MASK 0x10
415 #define BD71828_INT_TEMP_CHIP_OVER_125_DET_MASK 0x20
416 #define BD71828_INT_TEMP_CHIP_OVER_VF_RES_MASK 0x40
417 #define BD71828_INT_TEMP_CHIP_OVER_VF_DET_MASK 0x80
419 #define BD71828_INT_RTC0_MASK 0x1
420 #define BD71828_INT_RTC1_MASK 0x2
421 #define BD71828_INT_RTC2_MASK 0x4
423 #define BD71828_OUT_TYPE_MASK 0x2
424 #define BD71828_OUT_TYPE_OPEN_DRAIN 0x0
425 #define BD71828_OUT_TYPE_CMOS 0x2