1# SPDX-License-Identifier: GPL-2.0 2# Copyright (C) 2021 Sebastian Reichel 3%YAML 1.2 4--- 5$id: http://devicetree.org/schemas/power/supply/stericsson,ab8500-fg.yaml# 6$schema: http://devicetree.org/meta-schemas/core.yaml# 7 8title: AB8500 Fuel Gauge 9 10maintainers: 11 - Sebastian Reichel <sre@kernel.org> 12 13allOf: 14 - $ref: power-supply.yaml# 15 16properties: 17 compatible: 18 const: stericsson,ab8500-fg 19 20 monitored-battery: true 21 22 battery: 23 $ref: /schemas/types.yaml#/definitions/phandle 24 deprecated: true 25 26 line-impedance-micro-ohms: 27 description: The line impedance between the battery and the 28 AB8500 inputs, to compensate for this when determining internal 29 resistance. 30 31 interrupts: 32 maxItems: 5 33 34 interrupt-names: 35 items: 36 - const: NCONV_ACCU 37 - const: BATT_OVV 38 - const: LOW_BAT_F 39 - const: CC_INT_CALIB 40 - const: CCEOC 41 42 io-channels: 43 maxItems: 1 44 45 io-channel-names: 46 items: 47 - const: main_bat_v 48 49required: 50 - compatible 51 - monitored-battery 52 - interrupts 53 - interrupt-names 54 - io-channels 55 - io-channel-names 56 57additionalProperties: false 58 59examples: 60 - | 61 #include <dt-bindings/interrupt-controller/irq.h> 62 pmic { 63 fuel-gauge { 64 compatible = "stericsson,ab8500-fg"; 65 monitored-battery = <&battery>; 66 interrupts = <24 IRQ_TYPE_LEVEL_HIGH>, 67 <8 IRQ_TYPE_LEVEL_HIGH>, 68 <28 IRQ_TYPE_LEVEL_HIGH>, 69 <27 IRQ_TYPE_LEVEL_HIGH>, 70 <26 IRQ_TYPE_LEVEL_HIGH>; 71 interrupt-names = "NCONV_ACCU", 72 "BATT_OVV", 73 "LOW_BAT_F", 74 "CC_INT_CALIB", 75 "CCEOC"; 76 io-channels = <&gpadc 0x08>; 77 io-channel-names = "main_bat_v"; 78 }; 79 }; 80