xref: /freebsd/sys/contrib/device-tree/Bindings/power/supply/gpio-charger.txt (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1gpio-charger
2
3Required properties :
4 - compatible : "gpio-charger"
5 - gpios : GPIO indicating the charger presence.
6   See GPIO binding in bindings/gpio/gpio.txt .
7 - charger-type : power supply type, one of
8     unknown
9     battery
10     ups
11     mains
12     usb-sdp (USB standard downstream port)
13     usb-dcp (USB dedicated charging port)
14     usb-cdp (USB charging downstream port)
15     usb-aca (USB accessory charger adapter)
16
17Optional properties:
18 - charge-status-gpios: GPIO indicating whether a battery is charging.
19
20Example:
21
22	usb_charger: charger {
23		compatible = "gpio-charger";
24		charger-type = "usb-sdp";
25		gpios = <&gpd 28 GPIO_ACTIVE_LOW>;
26		charge-status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>;
27	};
28
29	battery {
30		power-supplies = <&usb_charger>;
31	};
32