103static constexpr uint8_t BQ25896_DEV_REV = 0x02;
112static constexpr uint16_t VBAT_MIN = 2304;
113static constexpr uint16_t VBAT_MAX = 4608;
114static constexpr uint16_t SYS_MIN = 3000;
115static constexpr uint16_t SYS_MAX = 3700;
116static constexpr uint16_t IN_CURRENT_MIN = 100;
117static constexpr uint16_t IN_CURRENT_MAX = 3250;
118static constexpr uint16_t CHG_CURRENT_MAX = 3008;
119static constexpr uint16_t BOOST_VOL_MIN = 4550;
120static constexpr uint16_t BOOST_VOL_MAX = 5510;
125static constexpr uint8_t BUS_STATE_NOINPUT = 0;
126static constexpr uint8_t BUS_STATE_USB_SDP = 1;
127static constexpr uint8_t BUS_STATE_ADAPTER = 2;
128static constexpr uint8_t BUS_STATE_OTG = 7;
133static constexpr uint8_t CHARGE_STATE_NO_CHARGE = 0;
134static constexpr uint8_t CHARGE_STATE_PRE_CHARGE = 1;
135static constexpr uint8_t CHARGE_STATE_FAST_CHARGE = 2;
136static constexpr uint8_t CHARGE_STATE_DONE = 3;
141static constexpr uint16_t VBUS_BASE_VAL = 2600;
142static constexpr uint16_t VBAT_BASE_VAL = 2304;
143static constexpr uint16_t VSYS_BASE_VAL = 2304;
144static constexpr float NTC_BASE_VAL = 21.0f;
149static constexpr uint16_t VBUS_VOL_STEP = 100;
150static constexpr uint16_t VBAT_VOL_STEP = 20;
151static constexpr uint16_t VSYS_VOL_STEP = 20;
152static constexpr float NTC_VOL_STEP = 0.465f;
157static constexpr uint16_t CHG_STEP_VAL = 50;
158static constexpr uint16_t FAST_CHG_CUR_STEP = 64;
159static constexpr uint16_t FAST_CHG_CURRENT_MIN = 0;
160static constexpr uint16_t FAST_CHG_CURRENT_MAX = 3008;
166static constexpr uint16_t PRE_CHG_CUR_BASE = 64;
167static constexpr uint16_t PRE_CHG_CUR_STEP = 64;
168static constexpr uint16_t PRE_CHG_CURRENT_MIN = 64;
169static constexpr uint16_t PRE_CHG_CURRENT_MAX = 1024;
175static constexpr uint16_t TERM_CHG_CUR_BASE = 64;
176static constexpr uint16_t TERM_CHG_CUR_STEP = 64;
177static constexpr uint16_t TERM_CHG_CURRENT_MIN = 64;
178static constexpr uint16_t TERM_CHG_CURRENT_MAX = 1024;
184static constexpr uint16_t CHG_VOL_BASE = 3840;
185static constexpr uint16_t CHG_VOL_STEP = 16;
186static constexpr uint16_t FAST_CHG_VOL_MIN = 3840;
187static constexpr uint16_t FAST_CHG_VOL_MAX = 4608;
193static constexpr uint16_t SYS_VOL_STEPS = 100;
194static constexpr uint16_t SYS_VOFF_VOL_MIN = 3000;
195static constexpr uint16_t SYS_VOFF_VOL_MAX = 3700;
201static constexpr uint16_t IN_CURRENT_STEP = 50;
202static constexpr uint16_t IN_CURRENT_MIN_VAL = 100;
203static constexpr uint16_t IN_CURRENT_MAX_VAL = 3250;
209static constexpr uint16_t BOOST_VOL_BASE = 4550;
210static constexpr uint16_t BOOST_VOL_STEP = 64;
211static constexpr uint16_t BOOST_VOL_MIN_VAL = 4550;
212static constexpr uint16_t BOOST_VOL_MAX_VAL = 5510;
218static constexpr uint16_t VINDPM_VOL_BASE = 2600;
219static constexpr uint16_t VINDPM_VOL_STEPS = 100;
220static constexpr uint16_t VINDPM_VOL_MIN = 3900;
221static constexpr uint16_t VINDPM_VOL_MAX = 15300;
227static constexpr uint16_t VINDPM_OS_STEP = 100;
228static constexpr uint16_t VINDPM_OS_MAX = 3100;
234static constexpr uint16_t BAT_COMP_STEPS = 20;
235static constexpr uint16_t BAT_COMP_MAX = 140;
241static constexpr uint16_t VCLAMP_STEP = 32;
242static constexpr uint16_t VCLAMP_MAX = 224;
248static constexpr uint8_t REG_PWR_INPUT = 0x00;
249static constexpr uint8_t MASK_EN_HIZ = 0x80;
250static constexpr uint8_t MASK_EN_ILIM = 0x40;
251static constexpr uint8_t MASK_IINLIM = 0x3F;
252static constexpr uint8_t SHIFT_IINLIM = 0;
258static constexpr uint8_t REG_PWR_VINDPM = 0x01;
259static constexpr uint8_t MASK_BHOT = 0xC0;
260static constexpr uint8_t SHIFT_BHOT = 6;
261static constexpr uint8_t MASK_BCOLD = 0x20;
262static constexpr uint8_t MASK_VINDPM_OS = 0x1F;
263static constexpr uint8_t SHIFT_VINDPM_OS = 0;
269static constexpr uint8_t REG_PWR_ONOFF = 0x02;
270static constexpr uint8_t MASK_CONV_START = 0x80;
271static constexpr uint8_t MASK_CONV_RATE = 0x40;
272static constexpr uint8_t MASK_BOOST_FREQ = 0x20;
273static constexpr uint8_t MASK_ICO_EN = 0x10;
274static constexpr uint8_t MASK_FORCE_DPDM = 0x02;
275static constexpr uint8_t MASK_AUTO_DPDM_EN = 0x01;
281static constexpr uint8_t REG_CHG_CTRL = 0x03;
282static constexpr uint8_t MASK_BAT_LOAD_EN = 0x80;
283static constexpr uint8_t MASK_WD_RST = 0x40;
284static constexpr uint8_t MASK_OTG_CONFIG = 0x20;
285static constexpr uint8_t MASK_CHG_CONFIG = 0x10;
286static constexpr uint8_t MASK_SYS_MIN = 0x0E;
287static constexpr uint8_t SHIFT_SYS_MIN = 1;
288static constexpr uint8_t MASK_MIN_VBAT_SEL = 0x01;
295static constexpr uint8_t REG_CHG_CURRENT = 0x04;
296static constexpr uint8_t MASK_EN_PUMPX = 0x80;
297static constexpr uint8_t MASK_ICHG = 0x7F;
298static constexpr uint8_t SHIFT_ICHG = 0;
304static constexpr uint8_t REG_CHG_PRE_CURR = 0x05;
305static constexpr uint8_t MASK_IPRECHG = 0xF0;
306static constexpr uint8_t SHIFT_IPRECHG = 4;
307static constexpr uint8_t MASK_ITERM = 0x0F;
308static constexpr uint8_t SHIFT_ITERM = 0;
314static constexpr uint8_t REG_CHG_VOLT = 0x06;
315static constexpr uint8_t MASK_VREG = 0xFC;
316static constexpr uint8_t SHIFT_VREG = 2;
317static constexpr uint8_t MASK_BATLOWV = 0x02;
318static constexpr uint8_t MASK_VRECHG = 0x01;
324static constexpr uint8_t REG_CHG_TIMER = 0x07;
325static constexpr uint8_t MASK_EN_TERM = 0x80;
326static constexpr uint8_t MASK_STAT_DIS = 0x40;
327static constexpr uint8_t MASK_WATCHDOG = 0x30;
328static constexpr uint8_t SHIFT_WATCHDOG = 4;
329static constexpr uint8_t MASK_EN_TIMER = 0x08;
330static constexpr uint8_t MASK_CHG_TIMER = 0x06;
331static constexpr uint8_t SHIFT_CHG_TIMER = 1;
332static constexpr uint8_t MASK_JEITA_ISET = 0x01;
338static constexpr uint8_t REG_CHG_IR_COMP = 0x08;
339static constexpr uint8_t MASK_BAT_COMP = 0xE0;
340static constexpr uint8_t SHIFT_BAT_COMP = 5;
341static constexpr uint8_t MASK_VCLAMP = 0x1C;
342static constexpr uint8_t SHIFT_VCLAMP = 2;
343static constexpr uint8_t MASK_TREG = 0x03;
344static constexpr uint8_t SHIFT_TREG = 0;
350static constexpr uint8_t REG_MISC_CTRL = 0x09;
351static constexpr uint8_t MASK_FORCE_ICO = 0x80;
352static constexpr uint8_t MASK_TMR2X_EN = 0x40;
353static constexpr uint8_t MASK_BATFET_DIS = 0x20;
354static constexpr uint8_t MASK_JEITA_VSET = 0x10;
355static constexpr uint8_t MASK_BATFET_DLY = 0x08;
356static constexpr uint8_t MASK_BATFET_RST_EN = 0x04;
357static constexpr uint8_t MASK_PUMPX_UP = 0x02;
358static constexpr uint8_t MASK_PUMPX_DN = 0x01;
364static constexpr uint8_t REG_BOOST_CTRL = 0x0A;
365static constexpr uint8_t MASK_BOOSTV = 0xF0;
366static constexpr uint8_t SHIFT_BOOSTV = 4;
367static constexpr uint8_t MASK_PFM_OTG_DIS = 0x08;
368static constexpr uint8_t MASK_BOOST_LIM = 0x07;
369static constexpr uint8_t SHIFT_BOOST_LIM = 0;
375static constexpr uint8_t REG_STATUS = 0x0B;
376static constexpr uint8_t MASK_VBUS_STAT = 0xE0;
377static constexpr uint8_t SHIFT_VBUS_STAT = 5;
378static constexpr uint8_t MASK_CHRG_STAT = 0x18;
379static constexpr uint8_t SHIFT_CHRG_STAT = 3;
380static constexpr uint8_t MASK_PG_STAT = 0x04;
381static constexpr uint8_t MASK_VSYS_STAT = 0x01;
387static constexpr uint8_t REG_FAULT = 0x0C;
388static constexpr uint8_t MASK_WD_FAULT = 0x80;
389static constexpr uint8_t MASK_BOOST_FAULT = 0x40;
390static constexpr uint8_t MASK_CHRG_FAULT = 0x30;
391static constexpr uint8_t SHIFT_CHRG_FAULT = 4;
392static constexpr uint8_t MASK_BAT_FAULT = 0x08;
393static constexpr uint8_t MASK_NTC_FAULT = 0x07;
394static constexpr uint8_t SHIFT_NTC_FAULT = 0;
400static constexpr uint8_t REG_VINDPM = 0x0D;
401static constexpr uint8_t MASK_FORCE_VINDPM = 0x80;
402static constexpr uint8_t MASK_VINDPM = 0x7F;
403static constexpr uint8_t SHIFT_VINDPM = 0;
409static constexpr uint8_t REG_ADC_BATV = 0x0E;
410static constexpr uint8_t MASK_THERM_STAT = 0x80;
411static constexpr uint8_t MASK_BATV = 0x7F;
412static constexpr uint8_t SHIFT_BATV = 0;
418static constexpr uint8_t REG_ADC_SYSV = 0x0F;
419static constexpr uint8_t MASK_SYSV = 0x7F;
420static constexpr uint8_t SHIFT_SYSV = 0;
431static constexpr uint8_t REG_ADC_NTC = 0x10;
432static constexpr uint8_t MASK_TSPCT = 0x7F;
433static constexpr uint8_t SHIFT_TSPCT = 0;
439static constexpr uint8_t REG_ADC_BUSV = 0x11;
440static constexpr uint8_t MASK_VBUS_GD = 0x80;
441static constexpr uint8_t MASK_VBUSV = 0x7F;
442static constexpr uint8_t SHIFT_VBUSV = 0;
449static constexpr uint8_t REG_ADC_ICHGR = 0x12;
450static constexpr uint8_t MASK_ICHGR = 0x7F;
451static constexpr uint8_t SHIFT_ICHGR = 0;
457static constexpr uint8_t REG_IDPM_STATUS = 0x13;
458static constexpr uint8_t MASK_VDPM_STAT = 0x80;
459static constexpr uint8_t MASK_IDPM_STAT = 0x40;
460static constexpr uint8_t MASK_IDPM_LIM = 0x3F;
461static constexpr uint8_t SHIFT_IDPM_LIM = 0;
467static constexpr uint8_t REG_DEVICE_REV = 0x14;
468static constexpr uint8_t MASK_REG_RST = 0x80;
469static constexpr uint8_t MASK_ICO_OPTIMIZED = 0x40;
470static constexpr uint8_t MASK_PN = 0x38;
471static constexpr uint8_t SHIFT_PN = 3;
472static constexpr uint8_t MASK_TS_PROFILE = 0x04;
473static constexpr uint8_t MASK_DEV_REV = 0x03;
474static constexpr uint8_t SHIFT_DEV_REV = 0;