BBB battery charging

78 views
Skip to first unread message

evilwulfie

unread,
Sep 2, 2016, 3:11:06 PM9/2/16
to BeagleBoard
Has anybody been using the battery backup on the BBB ?

I am noticing that if you remove power that the BBB keeps running just fine.

If you have apci enabled the BBB will shutdown as expected.

The BBB will continue to draw full power from the battery. Ok i can deal
with this and have designed around that in hardware.

But if the battery discharges way down the PMIC cannot seem to revive
the battery when DC power is reapplied.

Does anybody know where the code is that sets the PMIC charging current ?

Is it even enabled ?

Thanks in advance.

William Hermans

unread,
Sep 2, 2016, 6:52:59 PM9/2/16
to beagl...@googlegroups.com
Page 41 of the datasheet, looks like registers 3-6. Although I have not read in details what the function of those registers are. This should be fixable through custom software, but I'd have to read in greater detail to understand what must be done, and what should be checked for before manually setting the charger bits. Or even if it is even a good idea to do so.

I'm a bit leery about writing to the actual registers of the PMIC, but only because I have no hands on with that.

William Hermans

unread,
Sep 2, 2016, 10:04:27 PM9/2/16
to beagl...@googlegroups.com
So I did some searching on this because I am interested in this as well. I figured that the PMIC driver in the kernel would or should be responsible for this if such support existed. So I read through the source file here: http://lxr.free-electrons.com/source/drivers/mfd/tps65217.c?v=4.4 , and came to the conclusion that battery charging was not "supported". Afterwards I found this: http://elinux.org/BeagleBone_Power_Management#Battery which seems to confirm my belief that battery charging is not supported in the kernel driver.

Anyway, it seems as though that if someone wants battery charging to work "flawlessly" they either have to rewrite the kernel module to support this feature. *OR* I do believe it should be possible to write a userspace application, or script that communicates with the tps65217c directly via the i2c bus, where it is connected. To manually "twiddle" the register bits.

I would have to experiment with this myself to confirm that anything I think may be possible. Actually *is* possible.

William Hermans

unread,
Sep 2, 2016, 10:14:27 PM9/2/16
to beagl...@googlegroups.com
interestingly:

william@beaglebone:~$ cat /sys/bus/i2c/drivers/tps65217/0-0024/tps65217-charger/power/runtime_enabled
disabled

So is it possible to change this to "enabled" ? If so what are the consequences ?

evilwulfie

unread,
Sep 2, 2016, 11:09:43 PM9/2/16
to beagl...@googlegroups.com
cant hurt to try enabling it

I see nobody uses the battery on the BBx boards ?
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORqR-Bk3PVRN3ChAzCeHsCUH9vR0CjWUfav38GaSbOyWUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Christoph Mayer

unread,
Sep 5, 2016, 5:06:17 AM9/5/16
to beagl...@googlegroups.com
I am not an expert on this but it looks like you have looked at the
wrong driver.

You may have a look here:
http://lxr.free-electrons.com/source/drivers/regulator/tps65217-regulator.c?v=4.4
The low-level driver you have looked at is used by this.

Cheers
Christoph
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beagleboard...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CALHSORoP%2BctrmrzjEa%2B_2jRQ%3DBe_J6GKdjgiMsjC%2BENXLxWpDA%40mail.gmail.com.

William Hermans

unread,
Sep 5, 2016, 11:48:04 AM9/5/16
to beagl...@googlegroups.com
Thats the regulator driver.


> To view this discussion on the web visit
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAJahsjXOChOneEfFZmKKvhjsZSb6foLeyBm5HcCpmumi9E8L9A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages