Is L5 able to charge using the lowly SDP protocol?

I’ve looked at all the threads that I can find on this. It seems in all cases over the last years our approach seems to have been that we need to find compatible hardware to charge L5, not really looking at if L5 should be compatible to be charged with something. In few cases we diagnosed that L5 charges best using PD and mostly with DCP and CPD (see here and here for comparison - you can check by running when charging tail -n+0 /sys/class/power_supply/*/ueven where see POWER_SUPPLY_USB_TYPE=).

It seems the L5 does have SDP listed as an option under tps6598x-source-psy-0-003f which should be the base minimum (USB 2.0 charging at 500mA that any USB should give out), although it’s not really able to keep L5 alive indefinitely (at the moment at least), but gives a bit extra life. For some reason some of my external chargers can’t trigger that correctly - they either get ignored or get wrongly classified. USB meter show nothing special about the volts. Computer USB port works correctly. Good PD chargers work perfect.

My question is, has anyone any idea why SDP wouldn’t trigger or how it could be forced or if there are any threshold values that could be tweaked (and how)? I’m trying to figure out if I can use a small caliber mini charger to prolong daily usage (and in this case, damn the battery overall lifetime).

1 Like

Librem 5 will use:

  • whatever current is negotiated over PD at 5V (up to 3A)
  • if there’s no PD, USB-C CC resistors are used to determine whether to use 3A or 1.5A
  • if there’s no PD and no such resistors, it will try to perform BC1.2 negotiation and use up to 1.5A if a DCP or CDP is detected
  • if that’s not detected either (aka it’s a SDP port), it uses up to 500mA, as mandated by the standard.

…actually, to be fully compliant it should use 100mA until enumeration (150/900mA in case of USB3 port), but nothing actually complies to that part of the spec :laughing:

3 Likes

So, why wouldn’t SDP get detected even when voltage and current are there? There must be something that triggers it.

1 Like

There’s no such thing as “detecting SDP” - it get marked as SDP when nothing else gets detected.

You’ll have to be a bit more specific on what you’re actually experiencing there.

1 Like

Charger giving out 5v/500mA (with some minor normal variance) is not detected vs. computer USB port is. As side effect, in SDP led blinks red (is blinking normal? it doesn’t seem to be in rhythm - more like there is not enough power to keep it steady).

1 Like

If you’re using a USB-A to C cable and it isn’t registered at all, it may be missing its 56kOhm Rp resistor on one of its CC lines (or it may have one on both lines - this isn’t compliant either).

Blinking is a different thing and it’s not normal. I’d guess that drawing the current makes the voltage drop low enough for the disconnection event to occur.

1 Like

There’s no cable but I’m suspicious that the charger doesn’t have that resistor built in. Maybe. Is there any way to sircumvent this in L5? The charger does work on other phones, which is a bit odd though.

1 Like

If it gets detected at all (the red LED shines up), it has the resistor. The resistor thing I’ve typed before you added the mention about blinking :wink:

1 Like

Nope, no led at all with the charger as it’s not detected at all (it blinks with comp, when SDP). Charger detected and works with several other phones.

1 Like

It could be that these phones start charging as soon as there’s a voltage applied on Vbus. AFAIR we don’t do that, we require the other side to be standards compliant. It could probably be configured in TPS65982 config though.

2 Likes

Sounds probable. Any idea how?

1 Like

You’ll have to dig into the datasheets yourself :laughing: Its registers are accessible over I2C. Take special care not to break anything though, putting a wrong voltage somewhere unexpected may have unintended consequences :wink:

2 Likes

Thanks. The smoke signals are empirical results too. :wink:
Luckily I have a circuit diagram to help (see right side center) :cloud:

1 Like

I often use a USB-A to swivel-magnet cable so I don’t jack up the connector if I grab the phone off the dash and forget it is plugged in (trashed to many charging connectors on spy-phones – don’t want to damage My Precious). I get that fast, stuttery blinking when the magnet gets dirty or the center pin get worn. I know it’s reaching that point when I can tap or twist the magnet connector and the blinking stops and it starts charging again.

1 Like

For the record, I just caught my L5 blinking while connected with USB-A to C cable to a USB-C hub powered from a laptop. Power meter showed that input voltage was dropping down to about 4.3V whenever the phone attempted to draw ~900mA, which is far below the safety threshold.

The hub advertises its port as a CDP. Seems like it’s a lie - at least when powered from 5V. It stopped blinking when I applied external power to the hub.

In these cases, you can always apply lower input current limit manually, which should let it charge even from such lying port - just slower.

1 Like

How do I force this?

1 Like

With /sys/class/power_supply/bq25890-charger-0/input_current_limit.

2 Likes

Ah, I thought you meant it was possible to set the protocol manually

1 Like

The only thing protocol detection influences anyway is input current limit.

2 Likes