That said I would have thought the toothbrush would just do normal old USB charging, and that should work on a macbook charger no matter what I'm pretty sure? But maybe not.
Edit to add note: I think the most commonly missing voltage is 12v, so your toothbrush might want that.
I have an Anker charger with two ports which use different tech to detect what the device needs : an USB A with Anker's poweriq (which supports multiple fast charging standards like qualcomm QC, but it also charges devices that don't use fast charging), and an USB C port that only does USB PD.
My vape only charges on the USB A port with poweriq. The strictly USB PD port doesn't work for it (but works on all my other devices).
I've decided in the future I will only buy chargers from Anker that have their proprietary poweriq thing, and dismiss anything that only supports USB PD. Poweriq 3 also works with USB PD devices so having a charger or a port that only does USB PD seems useless.
You can read more about how they should implemented the PD sink here: https://medium.com/@leung.benson/how-to-design-a-proper-usb-...
Power supplies typically have supported voltages and currents printed on them, but in my experience the easiest way to figure out if it works is to just try it.
I don't know what the rules are for programmable supplies.
What I should have said is if 3A at a standard voltage is within the charger's watt rating, then the charger has to support at least 3A at that voltage.
A charger has a top mandated voltage that depends on its watts. Standard voltages below the top mandated voltage, which is 15V on a 30W charger, have to support 3A.
But chargers are allowed to offer higher voltages if they want to. Thank you for clarifying that.
(And I did check the spec for this post, it is mandatory, USB Power Delivery Specification Revision 2.0 Version 1.3, section 10.2.2, Normative Voltages and Currents.)
Edit: I also checked the programmable supply rules now in Revision 3.1, it looks like 1) they have the same math mandating at least 5/9/15/20 volts based on wattage, 2) you can choose any voltage between 3.3v and the mandated max, 3) at those voltages it has to supply at least min(3A, [supply wattage] ÷ [chosen voltage])