A way to disable blinking red led?

As far as I know the battery of the L5 is never charged to 100%. I copied some information about this as a screenshot from the matrix room to the wiki: https://source.puri.sm/Librem5/community-wiki/-/wikis/work-in-progress/battery-and-charging .

Update: If someone wants to take care off writing an article we’d all be very thankful :smiley: ! All the developers are very helpful with explaining missing stuff when it comes to filling the gaps in a new piece of documentation. Just get on the matrix channel about the librem5 (msg me to get an invitation) and start writing and ask for the missing information.

2 Likes

Correct. Therefore and although cannot proof this (actually do not know) as “hardware” behavior but still allow myself to recognize this end/stop at 4.20V of internal charging, of Librem 5 battery, as fourth HKS :wink::

Have you tried laying the phone face down. Mine is face down on the nightstand overnight.

Nope.

The red LED is connected to both SoC (which can be controlled via /sys/class/leds) and to BQ25895’s (charging controller’s) STAT pin; it works in an “OR” fashion. Currently our software does not try to drive the red LED in any way, so all you see is the result of STAT pin activity.

STAT pin can be disabled by setting bit 6 (STAT_DIS) of register 07 to 1:

$ sudo i2cget -f -y 3 0x6a 0x07
0x8d
$ sudo i2cset -f -y 3 0x6a 0x07 0xcd

Datasheet: https://www.ti.com/product/BQ25895

Make sure to know exactly what you’re doing when fiddling with charging controller’s I2C registers; setting wrong values can be dangerous.

7 Likes

Just receiving SMS might trigger this (probably), as I guess that modem card relies on inserted battery heavily (in not exclusively). Therefore turn off related HKS to test further.

EDIT: Well, I just realized and admit now that I misunderstood you completely, but never-mind. My thought was related to same usage of 5V only power bank (but red LED blinking would persist, on and on as well).

1 Like

Will never do this because of:

1 Like

The TPU case would fix that.

1 Like

I think it is not SAFE sharing this programing tool on public, this may worsen the L5 funtions on non tech user. IMHO.

It is probably safer that customers cut-and-paste shell commands from @‍dos than attempt to read the Datasheet and come up with their own I2C commands.

Safer still would be to expose this via the GUI …

3 Likes

Cover it with a sliver of black electrician’s tape.

2 Likes

Perfect ! Thanks @dos ! That’s exactly this kind of thing I was thinking of

I’ve looked at the bq25895 I2C datasheet and in the section “Pin configuration” I see that the pin STAT is N°4, but in your command, you use ‘3’ in the ic2bus parameter, I can assume there is a shift between those ?
pin 1 => ic2bus 0
pin 2 => ic2bus 1
pin 3 => ic2bus 2
pin 4 => ic2bus 3

Sorry guys you missed one of my prerequisites : I need to see the blue LED for new notification :wink:
Try again :stuck_out_tongue:

I think sharing is a good thing, whatever you do (completely fail, or completely succeed) you will learn something valuable.
Warning about the dangers is also good (which @dos did), some kind of warning frame would be a good idea :thinking: (like the spoiler alert frame for exemple, where you have to click to show)

How can one learn something like this if it’s not shared in public ?
Do you think @dos should have PM me about this ?
Or maybe I should have sent an email to the support ?
I think it’s best to talk about it publicly in the forum, so everyone can give its advice, or warning, or share its own experience about it, and someone with the same kind of problem would find the answer in this topic

And with that, knowing that it’s working only by setting a bit, I can now script this behavior without writing those commands manually every time I need it :+1:

True but I don’t think that is relevant.

The command is targeting the STAT_DIS bit, which controls whether the STAT pin operates at all. The documentation confirms which register that bit is in (7), which bit it is (6) and the bus address (6A hex).

So I have no idea how the bus number ends up as 3. :wink:

Perhaps: i2cdetect -l

That’s bus parameter. bq25895 sits at address 0x6a on bus i2c-3 (as described here). The first command is reading the value of register 0x07 (which turns out to be 0x8d), and the second command sets that register to 0xcd, which is 0x8d with bit 6 (STAT_DIS) set to 1.

1 Like

There’s little point in gatekeeping knowledge, especially when it’s already available publicly if you look hard enough. I had to learn this stuff myself at some point too.

Just remember that if you fiddle with charging controller in a wrong way and break your phone in the process, it’s your own fault :stuck_out_tongue:

4 Likes

The battery blinking in addition to maybe indicating battery dead, or missing more generally just indicates it isnt charging the battery, so battery is actually discharging while plugged in.

This happens to me all the time, typically when thermal readings are exceeded for safe battery charging. So charging stops. At 100% typically while plugged in i still get a solid red when using or not using the phone and nominal battery temperature. So i assume it is always charging/topping off all the time.

What might be nice is once 100% is reached it stops charging (could turn off led at that time) until battery reaches say 80%, then starts charging again when phone isnt used.

1 Like

Do you have the battery controller firmware updated?

That’s what I observe i.e. if I have put in on charge and I walk past and the red LED is off then I know that it has finished charging.

To be more explicit, please post output from

sudo cat /sys/kernel/debug/tps6598x/0-003f/customer_use

Ok i may have spoken too soon, let me do some more testing. I might have assumed when it says 100% it stops charging, but that is probably not the correction assumption. Since the LED is still on, I will check if it is on after an overnight charge and when it goes to suspend.

Don’t know about my battery firmware, but I get 0x4c35445000000200.
What does that signify?

My question was actually intended for @Captain_Morgan but all good.

Your value signifies, as far as I know, the latest USB-C PD firmware. (First 4 bytes are ASCII “L5DP”. Remaining bytes are the version.)