Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi 5 PMIC does not negotiate 5A current via USB-PD PPS profile #497

Open
l3iggs opened this issue Nov 21, 2023 · 11 comments
Open
Labels
enhancement New feature or request

Comments

@l3iggs
Copy link

l3iggs commented Nov 21, 2023

Describe the bug

The raspberry Pi 5 PMIC does not make use of 5000 mA current offered by a charger via USB-PD PPS profile. Instead, it gets stuck at 3000mA even when a charger that advertises a PPS PDO of 3.3V - 20V @ 5A (even when a 5A e-marked cable is used).

Steps to reproduce the behaviour

  1. Buy a decent 3rd party USB type-c charger. For example, Anker 150W 747 Gan Prime. This charger happens to advertise the following PDOs [1]:
    image
  2. Power a rpi 5 with it using a properly e-marked 5A cable.
  3. Inspect the bootloader's power: line. It will show the power source as being only 3000 mA capable

As you can see in the image above, the charger offers a PPS PDO profile of 3.3 - 11V at 5A. 5V @ 5A falls squarely in that range and the pi5 should make use of this.

[1]: https://www.chargerlab.com/teardown-of-anker-150w-ganprime-747-charger-a2340/

Device (s)

Other

Bootloader configuration.

versions 30de0ba5 2023/10/30 and earlier

System

No response

Bootloader logs

No response

USB boot

No response

NVMe boot

No response

Network (TFTP boot)

No response

@timg236
Copy link
Collaborator

timg236 commented Nov 21, 2023

This is expected. PPS is not supported.

@timg236 timg236 closed this as completed Nov 21, 2023
@timg236
Copy link
Collaborator

timg236 commented Nov 21, 2023

It would require considerable work in the firmware so for the foreeable future NGTF

@greyltc
Copy link

greyltc commented Nov 21, 2023

So you're saying there's a chance! (at some point) :-)

@timg236
Copy link
Collaborator

timg236 commented Nov 21, 2023

So you're saying there's a chance! (at some point) :-)

Maybe ... not an expert on PPS, IIRC there are some hardware constraints plus more time-critical messaging to and from the power supply which will cause an unexplained reset (go to 'safe' 0V) if messaging goes wrong which is a disaster if the sink doesn't have a battery.

@greyltc
Copy link

greyltc commented Nov 21, 2023

oof yeah. too bad the safe fallback wasn't something like 5V@3A

@greyltc
Copy link

greyltc commented Nov 21, 2023

@timg236 I've got a Satechi model ST-TC100GM charger which has a 5V fixed 3A PDO and a PPS 3.3-20V @ 5A one. When the time comes, I'd be willing to help in testing out any pre-alpha firmwares you might have for this feature. I can recover from bad power up negotiations with a benchtop power supply.

@timg236 timg236 added the enhancement New feature or request label Nov 21, 2023
@timg236 timg236 reopened this Nov 21, 2023
@timg236
Copy link
Collaborator

timg236 commented Nov 21, 2023

@greyltc I've re-opened this as a feature request so that anyone interested can track it. Warning, it's probably 50:50 whether this is actually doable :)

@raspberrypi raspberrypi deleted a comment from dev-drprasad Nov 23, 2023
@timg236
Copy link
Collaborator

timg236 commented Nov 23, 2023

Removed off-topic comments about product recomendations

@TudbuT
Copy link

TudbuT commented Mar 24, 2024

Just to add my own 2 cents to this:

I've been observing a lot of voltage-related throttling on all of my non-official power supplies, so I checked with a lab bench PSU and it actually never exceeds 2A of current draw without anything plugged into the USB ports - it shouldn't be receiving too low a voltage. But it is, because of cable resistance. My cables are all unmarked and one of them is long but of good quality, and the rest are shorter but of dubious quality, so it's no wonder they're all pretty high resistance.

Indeed, I also have another 3A power supply that has a built-in high quality cable, and it gives me absolutely no issues. The power supplies therefore aren't even the main issue when it comes to throttling (that is, unless you have a bunch of stuff on your USB ports) - the cables are. (And they really are a big one: I'm seeing things like 4.5V despite the PSU still being at 5.)

Using PPS, the pi could ask for 5.1 or 5.2 volts, which would make the voltage drop on the cable less of a problem. It could even regulate the voltage dynamically depending on load, though I'm not sure how realistic that part would be. Some power supplies with fixed cables might even do this on their own, but I have no idea if that's actually the case.

@greyltc
Copy link

greyltc commented Mar 24, 2024

Using PPS, the pi could ask for 5.1 or 5.2 volts

The official 27W brick runs at 5.1V and has a permanently attached cable, I'm sure those design choices are for mitigating the voltage drop over the cabling. 5A is a lot. Using PPS to request a flat 5.2V no matter what seems like it would be a good idea to me. It's too bad the USB(/PD) spec didn't include some sort of provision for proper remote voltage sensing so that the source voltage supply could automatically and universally compensate for the voltage drop in the cables.

@TudbuT
Copy link

TudbuT commented Mar 25, 2024

The official brick having a fixed cable is definitely deliberate. The majority of cables just kinda suck it seems, and permanently attaching a good one just avoids that problem for good. And it would also allow the PSU to compensate for the resistance since it's a known cable - but once again, not sure if that's actually done.

I have also finally found a high quality cable somewhere in my stash. It came with a USB-C laptop charger and needs to carry 100W (@20V/5A), so they gave it a lower resistance. It works just fine with this and basically any PSU, which basically confirms my hypothesis that the cables are the problem.

PPS 5.2V or higher would probably be able to at least lessen the issue. Not sure what the max voltage of the pi is, but 5.2V certainly works just fine according to my tests. (Okay, I checked with a search engine and it SEEMS 5.25V is the rated maximum, so I probably wouldn't go above 5.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants