1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/power/supply/cw2015_battery.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 7c66ec88fSEmmanuel Vadottitle: Battery driver for CW2015 shuntless fuel gauge by CellWise. 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10c66ec88fSEmmanuel Vadot - Tobias Schramm <t.schramm@manjaro.org> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotdescription: | 13c66ec88fSEmmanuel Vadot The driver can utilize information from a simple-battery linked via a 14c66ec88fSEmmanuel Vadot phandle in monitored-battery. If specified the driver uses the 15c66ec88fSEmmanuel Vadot charge-full-design-microamp-hours property of the battery. 16c66ec88fSEmmanuel Vadot 17*c9ccf3a3SEmmanuel VadotallOf: 18*c9ccf3a3SEmmanuel Vadot - $ref: power-supply.yaml# 19*c9ccf3a3SEmmanuel Vadot 20c66ec88fSEmmanuel Vadotproperties: 21c66ec88fSEmmanuel Vadot compatible: 22c66ec88fSEmmanuel Vadot const: cellwise,cw2015 23c66ec88fSEmmanuel Vadot 24c66ec88fSEmmanuel Vadot reg: 25c66ec88fSEmmanuel Vadot maxItems: 1 26c66ec88fSEmmanuel Vadot 27c66ec88fSEmmanuel Vadot cellwise,battery-profile: 28c66ec88fSEmmanuel Vadot description: | 29c66ec88fSEmmanuel Vadot This property specifies characteristics of the battery used. The format 30c66ec88fSEmmanuel Vadot of this binary blob is kept secret by CellWise. The only way to obtain 31c66ec88fSEmmanuel Vadot it is to mail two batteries to a test facility of CellWise and receive 32c66ec88fSEmmanuel Vadot back a test report with the binary blob. 335def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint8-array 34c66ec88fSEmmanuel Vadot minItems: 64 35c66ec88fSEmmanuel Vadot maxItems: 64 36c66ec88fSEmmanuel Vadot 37c66ec88fSEmmanuel Vadot cellwise,monitor-interval-ms: 38c66ec88fSEmmanuel Vadot description: 39c66ec88fSEmmanuel Vadot Specifies the interval in milliseconds gauge values are polled at 40c66ec88fSEmmanuel Vadot minimum: 250 41c66ec88fSEmmanuel Vadot 42c66ec88fSEmmanuel Vadot power-supplies: 43c66ec88fSEmmanuel Vadot minItems: 1 44c66ec88fSEmmanuel Vadot maxItems: 8 # Should be enough 45c66ec88fSEmmanuel Vadot 46c66ec88fSEmmanuel Vadot monitored-battery: 47c66ec88fSEmmanuel Vadot description: 48c66ec88fSEmmanuel Vadot Specifies the phandle of a simple-battery connected to this gauge 49c66ec88fSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 50c66ec88fSEmmanuel Vadot 51c66ec88fSEmmanuel Vadotrequired: 52c66ec88fSEmmanuel Vadot - compatible 53c66ec88fSEmmanuel Vadot - reg 54c66ec88fSEmmanuel Vadot 556be33864SEmmanuel VadotadditionalProperties: false 566be33864SEmmanuel Vadot 57c66ec88fSEmmanuel Vadotexamples: 58c66ec88fSEmmanuel Vadot - | 59c66ec88fSEmmanuel Vadot i2c { 60c66ec88fSEmmanuel Vadot #address-cells = <1>; 61c66ec88fSEmmanuel Vadot #size-cells = <0>; 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel Vadot cw2015@62 { 642eb4d8dcSEmmanuel Vadot compatible = "cellwise,cw2015"; 65c66ec88fSEmmanuel Vadot reg = <0x62>; 66c66ec88fSEmmanuel Vadot cellwise,battery-profile = /bits/ 8 < 67c66ec88fSEmmanuel Vadot 0x17 0x67 0x80 0x73 0x6E 0x6C 0x6B 0x63 68c66ec88fSEmmanuel Vadot 0x77 0x51 0x5C 0x58 0x50 0x4C 0x48 0x36 69c66ec88fSEmmanuel Vadot 0x15 0x0C 0x0C 0x19 0x5B 0x7D 0x6F 0x69 70c66ec88fSEmmanuel Vadot 0x69 0x5B 0x0C 0x29 0x20 0x40 0x52 0x59 71c66ec88fSEmmanuel Vadot 0x57 0x56 0x54 0x4F 0x3B 0x1F 0x7F 0x17 72c66ec88fSEmmanuel Vadot 0x06 0x1A 0x30 0x5A 0x85 0x93 0x96 0x2D 73c66ec88fSEmmanuel Vadot 0x48 0x77 0x9C 0xB3 0x80 0x52 0x94 0xCB 74c66ec88fSEmmanuel Vadot 0x2F 0x00 0x64 0xA5 0xB5 0x11 0xF0 0x11 75c66ec88fSEmmanuel Vadot >; 76c66ec88fSEmmanuel Vadot cellwise,monitor-interval-ms = <5000>; 77c66ec88fSEmmanuel Vadot monitored-battery = <&bat>; 78c66ec88fSEmmanuel Vadot power-supplies = <&mains_charger>, <&usb_charger>; 79c66ec88fSEmmanuel Vadot }; 80c66ec88fSEmmanuel Vadot }; 81