For instance, over on the Hackaday Discord server, someone has built a WUSB3801 circuit which limits a Li-ion charger’s current based on whether the USB-C port connected can provide 3 amps or not.
In USB-C Power Delivery (PD) standard, the PPS (Programmable Power Supply) mode is an optional mode that lets you request a non-standard voltage from a charger, with the ability to set a current ...