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