16be33864SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 26be33864SEmmanuel Vadot# Copyright 2019-2020 Artur Rojek 36be33864SEmmanuel Vadot%YAML 1.2 46be33864SEmmanuel Vadot--- 5*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/ingenic,battery.yaml# 6*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 76be33864SEmmanuel Vadot 86be33864SEmmanuel Vadottitle: Ingenic JZ47xx battery bindings 96be33864SEmmanuel Vadot 106be33864SEmmanuel Vadotmaintainers: 116be33864SEmmanuel Vadot - Artur Rojek <contact@artur-rojek.eu> 126be33864SEmmanuel Vadot 136be33864SEmmanuel Vadotproperties: 146be33864SEmmanuel Vadot compatible: 156be33864SEmmanuel Vadot oneOf: 166be33864SEmmanuel Vadot - const: ingenic,jz4740-battery 176be33864SEmmanuel Vadot - items: 186be33864SEmmanuel Vadot - enum: 196be33864SEmmanuel Vadot - ingenic,jz4725b-battery 206be33864SEmmanuel Vadot - ingenic,jz4770-battery 216be33864SEmmanuel Vadot - const: ingenic,jz4740-battery 226be33864SEmmanuel Vadot 236be33864SEmmanuel Vadot io-channels: 246be33864SEmmanuel Vadot maxItems: 1 256be33864SEmmanuel Vadot 266be33864SEmmanuel Vadot io-channel-names: 276be33864SEmmanuel Vadot const: battery 286be33864SEmmanuel Vadot 296be33864SEmmanuel Vadot monitored-battery: 306be33864SEmmanuel Vadot description: > 316be33864SEmmanuel Vadot phandle to a "simple-battery" compatible node. 326be33864SEmmanuel Vadot 336be33864SEmmanuel Vadot This property must be a phandle to a node using the format described 346be33864SEmmanuel Vadot in battery.yaml, with the following properties being required: 356be33864SEmmanuel Vadot - voltage-min-design-microvolt: drained battery voltage, 366be33864SEmmanuel Vadot - voltage-max-design-microvolt: fully charged battery voltage. 376be33864SEmmanuel Vadot 386be33864SEmmanuel Vadotrequired: 396be33864SEmmanuel Vadot - compatible 406be33864SEmmanuel Vadot - io-channels 416be33864SEmmanuel Vadot - io-channel-names 426be33864SEmmanuel Vadot - monitored-battery 436be33864SEmmanuel Vadot 446be33864SEmmanuel VadotadditionalProperties: false 456be33864SEmmanuel Vadot 466be33864SEmmanuel Vadotexamples: 476be33864SEmmanuel Vadot - | 486be33864SEmmanuel Vadot #include <dt-bindings/iio/adc/ingenic,adc.h> 496be33864SEmmanuel Vadot 506be33864SEmmanuel Vadot simple_battery: battery { 516be33864SEmmanuel Vadot compatible = "simple-battery"; 526be33864SEmmanuel Vadot voltage-min-design-microvolt = <3600000>; 536be33864SEmmanuel Vadot voltage-max-design-microvolt = <4200000>; 546be33864SEmmanuel Vadot }; 556be33864SEmmanuel Vadot 566be33864SEmmanuel Vadot ingenic-battery { 576be33864SEmmanuel Vadot compatible = "ingenic,jz4740-battery"; 586be33864SEmmanuel Vadot io-channels = <&adc INGENIC_ADC_BATTERY>; 596be33864SEmmanuel Vadot io-channel-names = "battery"; 606be33864SEmmanuel Vadot monitored-battery = <&simple_battery>; 616be33864SEmmanuel Vadot }; 62