(06-18-2016, 09:59 PM)pfeerick Wrote:(06-18-2016, 04:16 PM)tllim Wrote:(06-18-2016, 03:28 AM)xalius Wrote: I am currently investigating how the battery charger in the PMIC (AXP803) is supported by the software. Being a hardware guy I was working my way up from the bottom side of things, starting with the physical connection and the PMIC:
Unless having very good knowledge on Lithium battery charging (I am not), I don't encourage backer to modify the parameter. However, if there is backer has such deep knowledge and interest to do so, that will be awesome. The current charging characteristic gearing toward tablet application which is this SoC original usage.
I'm interested in knowing also. Another SoC board I have which has a AXP209 seems to be have much better access to the SoC, as you can easily access its registers over the i2c, thus allowing you to configure the battery maximums and minimums, as well as configure things like the current limit on the USB sockets, etc.
And since the AXP is connected to an i2c bus, why does't it register with either of the below commands? Is it hiding somewhere else?
Code:sudo i2cdetect -y 0
sudo i2cdetect -y 1
I get how you are concerned with people misconfiguring things and blowing up a battery, but that doesn't prevent the info from being put out there very clearly one what NOT to do, and what IS safe to do. I like how the other boards wiki tells you which settings are safe to touch, and how to change them, and cautions on the others.
And as far as default charge profiles, /sys/class/power_supply/battery/technology is certainly wrong, as /sys/class/power_supply/battery/voltage_min_design and /sys/class/power_supply/battery/voltage_max_design are clearly set for lipo batteries (which is what pretty much everyone would be using, so that is good!), as life batteries are designed to be charged to 3.6v, not the 4.2 volts that lipo batteries are!!!
The AXP803 seems to support one other communications mode according to the datasheet which is proprietary to Allwinner. It uses the I2C pins but a different protocol. Maybe that is the reason it doesnt turn up on the I2C Bus scan or the particular I2C bus is not exposed to userspace, I haven't found out yet. The linux kernel driver fot he PMIC has all the function to set/get registers and control the battery charger as well as the programmable regulators and monitor the different voltages.
As far as the default definition from the dts for the battery goes, I am also pretty sure it does not fit the 8Ah battery sold via the Pine store? Maybe someone with the exact battery specs should have a look at this asap... especially people could also be connecting random other Lithium chemistry batteries to the port, a safe setting there should be the default... if a certain charge current limit is set, that means there has to be a certain minimum battery size connected to not exceed the battery's safe operating area...
Come have a chat in the Pine IRC channel >>