1*89919370SSebastian Reichel# SPDX-License-Identifier: GPL-2.0 2*89919370SSebastian Reichel%YAML 1.2 3*89919370SSebastian Reichel--- 4*89919370SSebastian Reichel$id: "http://devicetree.org/schemas/power/supply/sc27xx-fg.yaml#" 5*89919370SSebastian Reichel$schema: "http://devicetree.org/meta-schemas/core.yaml#" 6*89919370SSebastian Reichel 7*89919370SSebastian Reicheltitle: Spreadtrum SC27XX PMICs Fuel Gauge Unit Power Supply Bindings 8*89919370SSebastian Reichel 9*89919370SSebastian Reichelmaintainers: 10*89919370SSebastian Reichel - Sebastian Reichel <sre@kernel.org> 11*89919370SSebastian Reichel 12*89919370SSebastian ReichelallOf: 13*89919370SSebastian Reichel - $ref: power-supply.yaml# 14*89919370SSebastian Reichel 15*89919370SSebastian Reichelproperties: 16*89919370SSebastian Reichel compatible: 17*89919370SSebastian Reichel enum: 18*89919370SSebastian Reichel - sprd,sc2720-fgu 19*89919370SSebastian Reichel - sprd,sc2721-fgu 20*89919370SSebastian Reichel - sprd,sc2723-fgu 21*89919370SSebastian Reichel - sprd,sc2730-fgu 22*89919370SSebastian Reichel - sprd,sc2731-fgu 23*89919370SSebastian Reichel 24*89919370SSebastian Reichel reg: 25*89919370SSebastian Reichel maxItems: 1 26*89919370SSebastian Reichel 27*89919370SSebastian Reichel battery-detect-gpios: 28*89919370SSebastian Reichel maxItems: 1 29*89919370SSebastian Reichel 30*89919370SSebastian Reichel io-channels: 31*89919370SSebastian Reichel items: 32*89919370SSebastian Reichel - description: Battery Temperature ADC 33*89919370SSebastian Reichel - description: Battery Charge Voltage ADC 34*89919370SSebastian Reichel 35*89919370SSebastian Reichel io-channel-names: 36*89919370SSebastian Reichel items: 37*89919370SSebastian Reichel - const: bat-temp 38*89919370SSebastian Reichel - const: charge-vol 39*89919370SSebastian Reichel 40*89919370SSebastian Reichel nvmem-cells: 41*89919370SSebastian Reichel maxItems: 1 42*89919370SSebastian Reichel description: Calibration cells provided by eFuse device 43*89919370SSebastian Reichel 44*89919370SSebastian Reichel nvmem-cell-names: 45*89919370SSebastian Reichel const: fgu_calib 46*89919370SSebastian Reichel 47*89919370SSebastian Reichel sprd,calib-resistance-micro-ohms: 48*89919370SSebastian Reichel description: real resistance of coulomb counter chip in micro Ohms 49*89919370SSebastian Reichel 50*89919370SSebastian Reichel monitored-battery: true 51*89919370SSebastian Reichel 52*89919370SSebastian Reichelrequired: 53*89919370SSebastian Reichel - compatible 54*89919370SSebastian Reichel - reg 55*89919370SSebastian Reichel - battery-detect-gpios 56*89919370SSebastian Reichel - io-channels 57*89919370SSebastian Reichel - io-channel-names 58*89919370SSebastian Reichel - nvmem-cells 59*89919370SSebastian Reichel - nvmem-cell-names 60*89919370SSebastian Reichel - sprd,calib-resistance-micro-ohms 61*89919370SSebastian Reichel - monitored-battery 62*89919370SSebastian Reichel 63*89919370SSebastian ReicheladditionalProperties: false 64*89919370SSebastian Reichel 65*89919370SSebastian Reichelexamples: 66*89919370SSebastian Reichel - | 67*89919370SSebastian Reichel #include <dt-bindings/gpio/gpio.h> 68*89919370SSebastian Reichel bat: battery { 69*89919370SSebastian Reichel compatible = "simple-battery"; 70*89919370SSebastian Reichel charge-full-design-microamp-hours = <1900000>; 71*89919370SSebastian Reichel constant-charge-voltage-max-microvolt = <4350000>; 72*89919370SSebastian Reichel ocv-capacity-celsius = <20>; 73*89919370SSebastian Reichel ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, 74*89919370SSebastian Reichel <4022000 85>, <3983000 80>, <3949000 75>, 75*89919370SSebastian Reichel <3917000 70>, <3889000 65>, <3864000 60>, 76*89919370SSebastian Reichel <3835000 55>, <3805000 50>, <3787000 45>, 77*89919370SSebastian Reichel <3777000 40>, <3773000 35>, <3770000 30>, 78*89919370SSebastian Reichel <3765000 25>, <3752000 20>, <3724000 15>, 79*89919370SSebastian Reichel <3680000 10>, <3605000 5>, <3400000 0>; 80*89919370SSebastian Reichel // ... 81*89919370SSebastian Reichel }; 82*89919370SSebastian Reichel 83*89919370SSebastian Reichel pmic { 84*89919370SSebastian Reichel #address-cells = <1>; 85*89919370SSebastian Reichel #size-cells = <0>; 86*89919370SSebastian Reichel 87*89919370SSebastian Reichel battery@a00 { 88*89919370SSebastian Reichel compatible = "sprd,sc2731-fgu"; 89*89919370SSebastian Reichel reg = <0xa00>; 90*89919370SSebastian Reichel battery-detect-gpios = <&pmic_eic 9 GPIO_ACTIVE_HIGH>; 91*89919370SSebastian Reichel io-channels = <&pmic_adc 5>, <&pmic_adc 14>; 92*89919370SSebastian Reichel io-channel-names = "bat-temp", "charge-vol"; 93*89919370SSebastian Reichel nvmem-cells = <&fgu_calib>; 94*89919370SSebastian Reichel nvmem-cell-names = "fgu_calib"; 95*89919370SSebastian Reichel monitored-battery = <&bat>; 96*89919370SSebastian Reichel sprd,calib-resistance-micro-ohms = <21500>; 97*89919370SSebastian Reichel }; 98*89919370SSebastian Reichel }; 99