[Gta04-owner] various powermanagement issues

Andreas Kemnade andreas at kemnade.info
Sun Oct 25 14:10:05 CET 2015

On Sun, 25 Oct 2015 08:41:40 +0100
"H. Nikolaus Schaller" <hns at goldelico.com> wrote:

> >> When I find time (sigh... I assume people are still waiting for GTA04A5
> >> news...), I can look into the U-Boot systest approach.
> >> 
> > I managed to hang uboot with systest ch...
> Yes, for me it hangs as well. So there might be another bug.
PHY_DPLL clock does not come up for some reason. And systest ch waits
forever for it.
Found that out by doing everything via i2c mw/md commands
Linear charging works with less things enabled. 

> > I tried to insert these lines into boot.scr
> > 
> > i2c dev 0 
> > i2c mw 0x4b 0x3d 0x30 1
> > i2c mw 0x4a 0x75 0x26 1
> > i2c mw 0x4a 0x95 0xf3 1
> > 
> > That starts charging for me.
> Great!
#enable madc
i2c mw 0x4a 0x00 0x01 1
#disable charging it bciboot 
i2c mw 0x4b 0x3d 0x30 1
#enable linear charging
i2c mw 0x4a 0x75 0x26 1
i2c mw 0x4a 0x95 0xf3 1
#current monitoring
i2c mw 0x4a 0x85 0x9c 1
i2c mw 0x4a 0x88 0xf0 1

gives a bit better behavior. Drawback is that some kernels do not
behave well when linear charging is enabled before bootup.
And I would prefer if the kernel switches back to automagic charging.

> > I found this line in board/goldelico/gta04/twl4030-additions.h:
> > #define BCIAUTOWEN       (TWL4030_BASEADD_PM_MASTER + 0x020)
> > 
> > That looks wrong for a *bit*  definition.
> Indeed!
> I have looked around and it appears to come from some TI / WindRiver source
> code from 2009 or so. E.g.
> https://github.com/CMNookTablet/acclaim_cyanoboot/blob/master/include/twl4030.h
> This may indeed be buggy.
> In Linux it was suggested (today's code is very different) as a bit value:
> https://lwn.net/Articles/364310/
> #define BCIAUTOWEN		0x20
The uboot stuff was an exercise to refresh my knowledge about charging
to be able to deal with current kernel code.
I have stolen i2c 0x4a and 0x4b (via echo 0x4a >unbind)from the twl4030
driver. Via i2cget I could find out that
bciiref was set to 0! I could enable charging with i2cset. And when the
kernel notices that theft. It became angry of course!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20151025/3891c009/attachment.asc>

More information about the Gta04-owner mailing list