93static constexpr uint8_t SY6970_DEV_REV = 0x00;
98static constexpr uint16_t VBAT_MIN = 2304;
99static constexpr uint16_t VBAT_MAX = 4608;
100static constexpr uint16_t SYS_MIN = 3000;
101static constexpr uint16_t SYS_MAX = 3700;
102static constexpr uint16_t IN_CURRENT_MIN = 100;
103static constexpr uint16_t IN_CURRENT_MAX = 3250;
104static constexpr uint16_t CHG_CURRENT_MAX = 5056;
105static constexpr uint16_t BOOST_VOL_MIN = 4550;
106static constexpr uint16_t BOOST_VOL_MAX = 5510;
111static constexpr uint8_t BUS_STATE_NOINPUT = 0;
112static constexpr uint8_t BUS_STATE_USB_SDP = 1;
113static constexpr uint8_t BUS_STATE_USB_CDP = 2;
114static constexpr uint8_t BUS_STATE_USB_DCP = 3;
115static constexpr uint8_t BUS_STATE_HVDCP = 4;
116static constexpr uint8_t BUS_STATE_ADAPTER = 5;
117static constexpr uint8_t BUS_STATE_NO_STANDARD_ADAPTER = 6;
118static constexpr uint8_t BUS_STATE_OTG = 7;
123static constexpr uint8_t CHARGE_STATE_NO_CHARGE = 0;
124static constexpr uint8_t CHARGE_STATE_PRE_CHARGE = 1;
125static constexpr uint8_t CHARGE_STATE_FAST_CHARGE = 2;
126static constexpr uint8_t CHARGE_STATE_DONE = 3;
131static constexpr uint16_t VBUS_BASE_VAL = 2600;
132static constexpr uint16_t VBAT_BASE_VAL = 2304;
133static constexpr uint16_t VSYS_BASE_VAL = 2304;
134static constexpr float NTC_BASE_VAL = 21.0f;
139static constexpr uint16_t VBUS_VOL_STEP = 100;
140static constexpr uint16_t VBAT_VOL_STEP = 20;
141static constexpr uint16_t VSYS_VOL_STEP = 20;
142static constexpr float NTC_VOL_STEP = 0.465f;
147static constexpr uint16_t CHG_STEP_VAL = 50;
148static constexpr uint16_t FAST_CHG_CUR_STEP = 64;
149static constexpr uint16_t FAST_CHG_CURRENT_MIN = 0;
150static constexpr uint16_t FAST_CHG_CURRENT_MAX = 5056;
155static constexpr uint16_t PRE_CHG_CUR_BASE = 64;
156static constexpr uint16_t PRE_CHG_CUR_STEP = 64;
157static constexpr uint16_t PRE_CHG_CURRENT_MIN = 64;
158static constexpr uint16_t PRE_CHG_CURRENT_MAX = 1024;
163static constexpr uint16_t TERM_CHG_CUR_BASE = 64;
164static constexpr uint16_t TERM_CHG_CUR_STEP = 64;
165static constexpr uint16_t TERM_CHG_CURRENT_MIN = 64;
166static constexpr uint16_t TERM_CHG_CURRENT_MAX = 1024;
171static constexpr uint16_t CHG_VOL_BASE = 3840;
172static constexpr uint16_t CHG_VOL_STEP = 16;
173static constexpr uint16_t FAST_CHG_VOL_MIN = 3840;
174static constexpr uint16_t FAST_CHG_VOL_MAX = 4608;
179static constexpr uint16_t SYS_VOL_STEPS = 100;
180static constexpr uint16_t SYS_VOFF_VOL_MIN = 3000;
181static constexpr uint16_t SYS_VOFF_VOL_MAX = 3700;
186static constexpr uint16_t IN_CURRENT_STEP = 50;
187static constexpr uint16_t IN_CURRENT_MIN_VAL = 100;
188static constexpr uint16_t IN_CURRENT_MAX_VAL = 3250;
193static constexpr uint16_t BOOST_VOL_BASE = 4550;
194static constexpr uint16_t BOOST_VOL_STEP = 64;
195static constexpr uint16_t BOOST_VOL_MIN_VAL = 4550;
196static constexpr uint16_t BOOST_VOL_MAX_VAL = 5510;
201static constexpr uint16_t VINDPM_VOL_BASE = 2600;
202static constexpr uint16_t VINDPM_VOL_STEPS = 100;
203static constexpr uint16_t VINDPM_VOL_MIN = 3900;
204static constexpr uint16_t VINDPM_VOL_MAX = 15300;
209static constexpr uint16_t BAT_COMP_STEPS = 20;
210static constexpr uint16_t BAT_COMP_MAX = 140;
215static constexpr uint16_t VCLAMP_STEP = 32;
216static constexpr uint16_t VCLAMP_MAX = 224;
221static constexpr uint8_t REG_PWR_INPUT = 0x00;
222static constexpr uint8_t MASK_EN_HIZ = 0x80;
223static constexpr uint8_t MASK_EN_ILIM = 0x40;
224static constexpr uint8_t MASK_IINLIM = 0x3F;
225static constexpr uint8_t SHIFT_IINLIM = 0;
230static constexpr uint8_t REG_PWR_VINDPM = 0x01;
231static constexpr uint8_t MASK_BHOT = 0xC0;
232static constexpr uint8_t SHIFT_BHOT = 6;
233static constexpr uint8_t MASK_BCOLD = 0x20;
234static constexpr uint8_t MASK_VINDPM_OS = 0x1F;
235static constexpr uint8_t SHIFT_VINDPM_OS = 0;
240static constexpr uint8_t REG_PWR_ONOFF = 0x02;
241static constexpr uint8_t MASK_CONV_START = 0x80;
242static constexpr uint8_t MASK_CONV_RATE = 0x40;
243static constexpr uint8_t MASK_BOOST_FREQ = 0x20;
244static constexpr uint8_t MASK_AICL_EN = 0x10;
245static constexpr uint8_t MASK_HVDCP_EN = 0x08;
246static constexpr uint8_t MASK_HV_TYPE = 0x04;
247static constexpr uint8_t MASK_FORCE_DPDM = 0x02;
248static constexpr uint8_t MASK_AUTO_DPDM_EN = 0x01;
253static constexpr uint8_t REG_CHG_CTRL = 0x03;
254static constexpr uint8_t MASK_BAT_LOAD_EN = 0x80;
255static constexpr uint8_t MASK_WD_RST = 0x40;
256static constexpr uint8_t MASK_OTG_CONFIG = 0x20;
257static constexpr uint8_t MASK_CHG_CONFIG = 0x10;
258static constexpr uint8_t MASK_SYS_MIN = 0x0E;
259static constexpr uint8_t SHIFT_SYS_MIN = 1;
264static constexpr uint8_t REG_CHG_CURRENT = 0x04;
265static constexpr uint8_t MASK_ICHG = 0x7F;
266static constexpr uint8_t SHIFT_ICHG = 0;
271static constexpr uint8_t REG_CHG_PRE_CURR = 0x05;
272static constexpr uint8_t MASK_IPRECHG = 0xF0;
273static constexpr uint8_t SHIFT_IPRECHG = 4;
274static constexpr uint8_t MASK_ITERM = 0x0F;
275static constexpr uint8_t SHIFT_ITERM = 0;
280static constexpr uint8_t REG_CHG_VOLT = 0x06;
281static constexpr uint8_t MASK_VREG = 0xFC;
282static constexpr uint8_t SHIFT_VREG = 2;
283static constexpr uint8_t MASK_BATLOWV = 0x02;
284static constexpr uint8_t MASK_VRECHG = 0x01;
289static constexpr uint8_t REG_CHG_TIMER = 0x07;
290static constexpr uint8_t MASK_EN_TERM = 0x80;
291static constexpr uint8_t MASK_STAT_DIS = 0x40;
292static constexpr uint8_t MASK_WATCHDOG = 0x30;
293static constexpr uint8_t SHIFT_WATCHDOG = 4;
294static constexpr uint8_t MASK_EN_TIMER = 0x08;
295static constexpr uint8_t MASK_CHG_TIMER = 0x06;
296static constexpr uint8_t SHIFT_CHG_TIMER = 1;
297static constexpr uint8_t MASK_JEITA_ISET = 0x01;
302static constexpr uint8_t REG_CHG_IR_COMP = 0x08;
303static constexpr uint8_t MASK_BAT_COMP = 0xE0;
304static constexpr uint8_t SHIFT_BAT_COMP = 5;
305static constexpr uint8_t MASK_VCLAMP = 0x1C;
306static constexpr uint8_t SHIFT_VCLAMP = 2;
307static constexpr uint8_t MASK_TREG = 0x03;
308static constexpr uint8_t SHIFT_TREG = 0;
313static constexpr uint8_t REG_MISC_CTRL = 0x09;
314static constexpr uint8_t MASK_FORCE_AICL = 0x80;
315static constexpr uint8_t MASK_TMR2X_EN = 0x40;
316static constexpr uint8_t MASK_BATFET_DIS = 0x20;
317static constexpr uint8_t MASK_JEITA_VSET = 0x10;
318static constexpr uint8_t MASK_BATFET_DLY = 0x08;
319static constexpr uint8_t MASK_BATFET_RST_EN = 0x04;
320static constexpr uint8_t MASK_PUMPX_UP = 0x02;
321static constexpr uint8_t MASK_PUMPX_DN = 0x01;
326static constexpr uint8_t REG_BOOST_CTRL = 0x0A;
327static constexpr uint8_t MASK_BOOSTV = 0xF0;
328static constexpr uint8_t SHIFT_BOOSTV = 4;
329static constexpr uint8_t MASK_BOOST_LIM = 0x07;
330static constexpr uint8_t SHIFT_BOOST_LIM = 0;
335static constexpr uint8_t REG_STATUS = 0x0B;
336static constexpr uint8_t MASK_BUS_STAT = 0xE0;
337static constexpr uint8_t SHIFT_BUS_STAT = 5;
338static constexpr uint8_t MASK_CHRG_STAT = 0x18;
339static constexpr uint8_t SHIFT_CHRG_STAT = 3;
340static constexpr uint8_t MASK_PG_STAT = 0x04;
341static constexpr uint8_t MASK_SDP_STAT = 0x02;
342static constexpr uint8_t MASK_VSYS_STAT = 0x01;
347static constexpr uint8_t REG_FAULT = 0x0C;
348static constexpr uint8_t MASK_WD_FAULT = 0x80;
349static constexpr uint8_t MASK_BOOST_FAULT = 0x40;
350static constexpr uint8_t MASK_CHRG_FAULT = 0x30;
351static constexpr uint8_t SHIFT_CHRG_FAULT = 4;
352static constexpr uint8_t MASK_BAT_FAULT = 0x08;
353static constexpr uint8_t MASK_NTC_FAULT = 0x07;
354static constexpr uint8_t SHIFT_NTC_FAULT = 0;
359static constexpr uint8_t REG_VINDPM = 0x0D;
360static constexpr uint8_t MASK_VINDPM_MODE = 0x80;
361static constexpr uint8_t MASK_VINDPM = 0x7F;
362static constexpr uint8_t SHIFT_VINDPM = 0;
367static constexpr uint8_t REG_ADC_BATV = 0x0E;
368static constexpr uint8_t MASK_THERM_STAT = 0x80;
369static constexpr uint8_t MASK_BATV = 0x7F;
370static constexpr uint8_t SHIFT_BATV = 0;
375static constexpr uint8_t REG_ADC_SYSV = 0x0F;
376static constexpr uint8_t MASK_SYSV = 0x7F;
377static constexpr uint8_t SHIFT_SYSV = 0;
382static constexpr uint8_t REG_ADC_NTC = 0x10;
383static constexpr uint8_t MASK_NTPCPT = 0x7F;
384static constexpr uint8_t SHIFT_NTPCPT = 0;
389static constexpr uint8_t REG_ADC_BUSV = 0x11;
390static constexpr uint8_t MASK_BUS_GD = 0x80;
391static constexpr uint8_t MASK_BUSV = 0x7F;
392static constexpr uint8_t SHIFT_BUSV = 0;
397static constexpr uint8_t REG_ADC_ICHGR = 0x12;
398static constexpr uint8_t MASK_ICHGR = 0x7F;
399static constexpr uint8_t SHIFT_ICHGR = 0;
404static constexpr uint8_t REG_IDPM_STATUS = 0x13;
405static constexpr uint8_t MASK_VDPM_STAT = 0x80;
406static constexpr uint8_t MASK_IDPM_STAT = 0x40;
407static constexpr uint8_t MASK_IDPM_LIM = 0x3F;
408static constexpr uint8_t SHIFT_IDPM_LIM = 0;
413static constexpr uint8_t REG_DEVICE_REV = 0x14;
414static constexpr uint8_t MASK_REG_RST = 0x80;
415static constexpr uint8_t MASK_AICL_OPTIMIZED = 0x40;
416static constexpr uint8_t MASK_PN = 0x38;
417static constexpr uint8_t SHIFT_PN = 3;
418static constexpr uint8_t MASK_NTC_PROFILE = 0x04;
419static constexpr uint8_t MASK_DEV_REV = 0x03;
420static constexpr uint8_t SHIFT_DEV_REV = 0;