12-03-2017, 03:56 PM
The PMIC and battery parameters are actually all read from the devicetree file, so to change them requires only dtc (the device tree compilter). The devicetree files for each board are in the /boot folder (.dtb). The dtc converts the binary back to a text file and creates the new binary from the text file after edits. The parameters correspond more or less to the registers in the AXP803 datasheet. One important thing is, the register settings are persistent as long as the AXP has either input power or battery power! And the linux driver updates the battery parameters only once if the AXP has empty registers. To reset that, all power has to be removed from the AXP. The battery charger only works properly if the battery parameters are persistent, e.g. the battery is not removed, since it is self learning and adapts certain values over charge cycles...
Come have a chat in the Pine IRC channel >>