Lines Matching +full:id +full:- +full:gpios
1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: simple battery chargers only communicating through GPIOs
10 - Sebastian Reichel <sre@kernel.org>
14 autonomously, only providing some status GPIOs and possibly some
15 GPIOs for limited control over the charging process.
19 const: gpio-charger
21 charger-type:
23 - unknown
24 - battery
25 - ups
26 - mains
27 - usb-sdp # USB standard downstream port
28 - usb-dcp # USB dedicated charging port
29 - usb-cdp # USB charging downstream port
30 - usb-aca # USB accessory charger adapter
34 gpios:
38 charge-status-gpios:
42 charge-current-limit-gpios:
45 description: GPIOs used for current limiting
47 charge-current-limit-mapping:
51 $ref: /schemas/types.yaml#/definitions/uint32-matrix
54 - description:
56 - description:
58 charge-current-limit-gpios property. Bit 1 second to last
62 - compatible
65 - required:
66 - gpios
67 - required:
68 - charge-status-gpios
69 - required:
70 - charge-current-limit-gpios
73 charge-current-limit-gpios: [ charge-current-limit-mapping ]
74 charge-current-limit-mapping: [ charge-current-limit-gpios ]
79 - |
80 #include <dt-bindings/gpio/gpio.h>
83 compatible = "gpio-charger";
84 charger-type = "usb-sdp";
86 gpios = <&gpd 28 GPIO_ACTIVE_LOW>;
87 charge-status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>;
89 charge-current-limit-gpios = <&gpioA 11 GPIO_ACTIVE_HIGH>,
91 charge-current-limit-mapping = <2500000 0x00>, // 2.5 A => both GPIOs low