Is it possible to limit outgoing PD current?

I have recently been trying to get into some Android development, (now devolved into debugging my phone’s adbd issues), which means I have my phone plugged into my laptop alot. In doing so, it charges the phone at ~10W. Combined with my normal usage, this drinks a constant 25-30W (peak 37) (according to battop).

I only have 25W/30W chargers for my phone and laptop–which usually suffices, but now with my phone plugged in, it can’t make up the difference anymore (discharging ~10W).

Is it possible to limit the output PD current (on an AMD board)?


bonus in writing: I’ve now seen the GitHub - FrameworkComputer/EmbeddedController: Embedded Controller firmware for the Framework Laptop repo, but it only makes mention of Intel boards; considering the giant warning atop the README, I don’t want to try it out myself. Does it support AMD boards aswell?

Using:

  • Debian 12.7
  • Kernel 6.10.11+bpo-amd6
  • AMD Ryzen 5 7640U board

I don’t think it’s a USB PD matter. The mainboards don’t do USB PD out.
10W is just standard 5v @ 2A.

If you’re doing Android development, you have root, right? You can control charge current on a lot of devices as long as you have root. I think it’s been standardized / built into android on newer android versions? And might not need root with that. But I don’t recall exactly. The still working old root way is with Advanced Charging Controller (AccA) or Battery Charge Limiter (BCL)

I do believe there are repositories or branches for the EC firmware corresponding to all the mainboards, as I recall someone recently listing them. Unfortunately, iirc, it’s not immediately clear which goes with which, due to using the codenames.

Oops, yes 10W is definitely a normal current!

I do have root! I would have to try later since I’d only time to make the post itself, but that seems like it would do it.

The EC firmware for the AMD boards is on the lotus-zephyr branch: EmbeddedController/zephyr at lotus-zephyr · FrameworkComputer/EmbeddedController · GitHub

and see also: What EC is used?
and the mega-thread: Exploring the Embedded Controller

1 Like