Tool/software:
Hey,
It looks like that IBAT ADC is not showing correct value (it shows 0) when the load draws more current that it can be drawn from the usb source. Simple reproduction is to set the input current limit to a know lesser value than the system draws.
POWER_SUPPLY_NAME=bq2562x-charger
POWER_SUPPLY_TYPE=USB
POWER_SUPPLY_MANUFACTURER=Texas Instruments
POWER_SUPPLY_MODEL_NAME=bq25622
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_ONLINE=1
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT=1040000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE=4200000
POWER_SUPPLY_PRECHARGE_CURRENT=100000
POWER_SUPPLY_CHARGE_TERM_CURRENT=60000
POWER_SUPPLY_VOLTAGE_NOW=5164970
POWER_SUPPLY_INPUT_VOLTAGE_LIMIT=4600000
POWER_SUPPLY_INPUT_CURRENT_LIMIT=100000
POWER_SUPPLY_CHARGE_TYPE=Trickle
POWER_SUPPLY_USB_TYPE=ACA SDP CDP DCP [Unknown]
POWER_SUPPLY_CURRENT_NOW=80000
POWER_SUPPLY_TEMP=440
POWER_SUPPLY_TEMP_MIN=-400
POWER_SUPPLY_TEMP_MAX=1250
admin@er-white-9d4e98b5:~ $ cat /sys/class/power_supply/bq2562x-battery/uevent
POWER_SUPPLY_NAME=bq2562x-battery
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=1040000
POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE_MAX=4200000
POWER_SUPPLY_VOLTAGE_NOW=4061590
POWER_SUPPLY_VOLTAGE_AVG=4061590
POWER_SUPPLY_CURRENT_NOW=0
POWER_SUPPLY_CURRENT_AVG=0
POWER_SUPPLY_CAPACITY=89
POWER_SUPPLY_CHARGE_FULL_DESIGN=5000000
POWER_SUPPLY_TEMP=303
00: 00
01: 00
02: 40
03: 03
04: 20
05: 0d
06: 50
07: 00
08: 60
09: 0e
0a: 20
0b: 03
0d: 0f
0e: 00
0f: 0b
10: 50
11: 00
12: 18
13: 00
14: 06
15: 5c
16: a2
17: cf
18: 0c
19: c4
1a: 3d
1b: 25
1c: 3f
1d: 48
1e: 0c
1f: 00
20: 00
21: 00
22: 00
23: 00
24: 00
25: 00
26: 70
27: 01
28: 50
29: 00
2a: 00
2b: 00
2c: 54
2d: 14
2e: 00
2f: 00
30: f2
31: 0f
32: f2
33: 0f
34: 3d
35: 02
36: 58
37: 00
38: 0a