Am 03.03.2017 um 06:49 schrieb Matthijs van Duin matthijsvanduin@gmail.com:
I noticed another difference in behaviour since I removed R1208: the charger ic now correctly detects what it's connected to:
=> i2c md 16b 0 b
Disconnected: 0000: 32 1b 60 11 93 8a 73 4b 00 00 60 2.`...sK..` status 00 = no power, not connected
Connected to laptop: 0000: 32 1b 60 11 93 8a 73 4b 6c 00 60 2.`...sKl.` status 6c = power good, connected to usb host, charging limited by input
Connected to 1A-rated charger: 0000: 34 1b 60 11 93 8a 73 4b a4 00 60 4.`...sK..` status a4 = power good, connected to charger, charging byte 0 spontaneously changed to 34 to allow 1A current!
All this can't be properly checked if R1208 is installed because it hides the power-on sequence before we can check it.
Previously the status byte would invariably report "unknown".
I think this can be explained.
Since the bq24297 does a charger detection only after power-on on its VBUS input and this VBUS either comes from the charger port or the OTG port, it will try to detect a charger at the OTG port even if we initially power through the charger port. It will of course not find any charger there.
This sequence is not triggered again if we plug in a charger to the OTG port later than to the charger port. But we could trigger it by software.
BR, Nikolaus