1 # SPDX-License-Identifier: GPL-2.0
2 # Copyright (C) 2021 Sebastian Reichel
5 $id: "http://devicetree.org/schemas/power/supply/stericsson,ab8500-charger.yaml#"
6 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
11 - Sebastian Reichel <sre@kernel.org>
14 - $ref: power-supply.yaml#
18 const: stericsson,ab8500-charger
21 $ref: /schemas/types.yaml#/definitions/phandle
22 description: phandle to battery node
25 description: Supply for USB and Main charger
29 description: automatic poweron after powerloss
36 - const: MAIN_CH_UNPLUG_DET
37 - const: MAIN_CHARGE_PLUG_DET
38 - const: MAIN_EXT_CH_NOT_OK
39 - const: MAIN_CH_TH_PROT_R
40 - const: MAIN_CH_TH_PROT_F
43 - const: USB_LINK_STATUS
44 - const: USB_CH_TH_PROT_R
45 - const: USB_CH_TH_PROT_F
46 - const: USB_CHARGER_NOT_OKR
49 - const: VBUS_CH_DROP_END
58 - const: main_charger_v
59 - const: main_charger_c
61 - const: usb_charger_c
64 - const: usb_charger_c
76 additionalProperties: false
80 #include <dt-bindings/interrupt-controller/irq.h>
83 compatible = "stericsson,ab8500-charger";
84 battery = <&ab8500_battery>;
85 vddadc-supply = <&ab8500_ldo_tvout_reg>;
86 interrupts = <10 IRQ_TYPE_LEVEL_HIGH>,
87 <11 IRQ_TYPE_LEVEL_HIGH>,
88 <0 IRQ_TYPE_LEVEL_HIGH>,
89 <107 IRQ_TYPE_LEVEL_HIGH>,
90 <106 IRQ_TYPE_LEVEL_HIGH>,
91 <14 IRQ_TYPE_LEVEL_HIGH>,
92 <15 IRQ_TYPE_LEVEL_HIGH>,
93 <79 IRQ_TYPE_LEVEL_HIGH>,
94 <105 IRQ_TYPE_LEVEL_HIGH>,
95 <104 IRQ_TYPE_LEVEL_HIGH>,
96 <89 IRQ_TYPE_LEVEL_HIGH>,
97 <22 IRQ_TYPE_LEVEL_HIGH>,
98 <21 IRQ_TYPE_LEVEL_HIGH>,
99 <16 IRQ_TYPE_LEVEL_HIGH>;
100 interrupt-names = "MAIN_CH_UNPLUG_DET",
101 "MAIN_CHARGE_PLUG_DET",
102 "MAIN_EXT_CH_NOT_OK",
110 "USB_CHARGER_NOT_OKR",
114 io-channels = <&gpadc 0x03>,
118 io-channel-names = "main_charger_v",