From 47a34db3d5d2c04592f2b800b8ba39bcbf48e366 Mon Sep 17 00:00:00 2001 From: "Angus Ainslie (Purism)" Date: Sat, 14 Dec 2019 07:27:55 -0800 Subject: device-tree: bindings: max17042_battery: add all of the compatible strings The bindings are missing documentation for some of the compatible strings. Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sebastian Reichel --- Documentation/devicetree/bindings/power/supply/max17042_battery.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/power/supply/max17042_battery.txt b/Documentation/devicetree/bindings/power/supply/max17042_battery.txt index 3f3894aaeebc..f34c5daae9af 100644 --- a/Documentation/devicetree/bindings/power/supply/max17042_battery.txt +++ b/Documentation/devicetree/bindings/power/supply/max17042_battery.txt @@ -2,7 +2,11 @@ max17042_battery ~~~~~~~~~~~~~~~~ Required properties : - - compatible : "maxim,max17042" + - compatible : one of the following + * "maxim,max17042" + * "maxim,max17047" + * "maxim,max17050" + * "maxim,max17055" Optional properties : - maxim,rsns-microohm : Resistance of rsns resistor in micro Ohms -- cgit v1.2.3-59-g8ed1b From 9a056a879111f88149dad428e7cc4f85c87a62bc Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 9 Dec 2019 11:56:21 +0800 Subject: dt-bindings: power: Introduce one property to describe the battery resistance with temperature changes Since the battery internal resistance can be changed as the temperature changes, thus add one table to describe the battery resistance percent in different temperatures to get a accurate battery internal resistance. Reviewed-by: Rob Herring Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel --- Documentation/devicetree/bindings/power/supply/battery.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/power/supply/battery.txt b/Documentation/devicetree/bindings/power/supply/battery.txt index 5c913d4cf36c..3049cf88bdcf 100644 --- a/Documentation/devicetree/bindings/power/supply/battery.txt +++ b/Documentation/devicetree/bindings/power/supply/battery.txt @@ -35,6 +35,10 @@ Optional Properties: for each of the battery capacity lookup table. The first temperature value specifies the OCV table 0, and the second temperature value specifies the OCV table 1, and so on. + - resistance-temp-table: An array providing the temperature in degree Celsius + and corresponding battery internal resistance percent, which is used to look + up the resistance percent according to current temperature to get a accurate + batterty internal resistance in different temperatures. Battery properties are named, where possible, for the corresponding elements in enum power_supply_property, defined in @@ -61,6 +65,7 @@ Example: ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>, ...; ocv-capacity-table-1 = <4200000 100>, <4185000 95>, <4113000 90>, ...; ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>, ...; + resistance-temp-table = <20 100>, <10 90>, <0 80>, <(-10) 60>; }; charger: charger@11 { -- cgit v1.2.3-59-g8ed1b From 7772d22e4b0681b5d0ff1bf4127c1b35e7641d07 Mon Sep 17 00:00:00 2001 From: Baolin Wang Date: Mon, 9 Dec 2019 11:56:24 +0800 Subject: dt-bindings: power: sc27xx: Add a new property to describe the real resistance of coulomb counter chip Add a new property to describe the real resistance of coulomb counter chip, which is used to calibrate the accuracy of the coulomb counter chip. Acked-by: Rob Herring Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel --- Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt b/Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt index 0a5705b8b592..b6359b590383 100644 --- a/Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt +++ b/Documentation/devicetree/bindings/power/supply/sc27xx-fg.txt @@ -13,6 +13,8 @@ Required properties: - io-channel-names: Should be "bat-temp" or "charge-vol". - nvmem-cells: A phandle to the calibration cells provided by eFuse device. - nvmem-cell-names: Should be "fgu_calib". +- sprd,calib-resistance-micro-ohms: Specify the real resistance of coulomb counter + chip in micro Ohms. - monitored-battery: Phandle of battery characteristics devicetree node. See Documentation/devicetree/bindings/power/supply/battery.txt @@ -52,5 +54,6 @@ Example: nvmem-cells = <&fgu_calib>; nvmem-cell-names = "fgu_calib"; monitored-battery = <&bat>; + sprd,calib-resistance-micro-ohms = <21500>; }; }; -- cgit v1.2.3-59-g8ed1b From 7a8bac169a65e0fb7e5da8ef3277b4016b5d1ffe Mon Sep 17 00:00:00 2001 From: Matheus Castello Date: Thu, 5 Dec 2019 12:44:07 -0300 Subject: dt-bindings: power: supply: max17040: Add DT bindings for max17040 fuel gauge Documentation of max17040 based fuel gauge characteristics. For configure low level state of charge threshold alert signaled from max17043/max17044 we add "maxim,alert-low-soc-level" property. Signed-off-by: Matheus Castello Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel --- .../bindings/power/supply/max17040_battery.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/max17040_battery.txt (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/power/supply/max17040_battery.txt b/Documentation/devicetree/bindings/power/supply/max17040_battery.txt new file mode 100644 index 000000000000..4e0186b8380f --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/max17040_battery.txt @@ -0,0 +1,33 @@ +max17040_battery +~~~~~~~~~~~~~~~~ + +Required properties : + - compatible : "maxim,max17040" or "maxim,max77836-battery" + - reg: i2c slave address + +Optional properties : +- maxim,alert-low-soc-level : The alert threshold that sets the state of + charge level (%) where an interrupt is + generated. Can be configured from 1 up to 32 + (%). If skipped the power up default value of + 4 (%) will be used. +- interrupts : Interrupt line see Documentation/devicetree/ + bindings/interrupt-controller/interrupts.txt +- wakeup-source : This device has wakeup capabilities. Use this + property to use alert low SOC level interrupt + as wake up source. + +Optional properties support interrupt functionality for alert low state of +charge level, present in some ICs in the same family, and should be used with +compatible "maxim,max77836-battery". + +Example: + + battery-fuel-gauge@36 { + compatible = "maxim,max77836-battery"; + reg = <0x36>; + maxim,alert-low-soc-level = <10>; + interrupt-parent = <&gpio7>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>; + wakeup-source; + }; -- cgit v1.2.3-59-g8ed1b From 333853be564526ecd74e9cbdf3e28650a47ad85d Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Wed, 8 Jan 2020 14:23:11 -0600 Subject: power: supply: core: Update sysfs-class-power ABI document Add the "Over Current" string to /sys/class/power_supply//health description. Fixes: e3e83cc601e57 ("power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant") Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel --- Documentation/ABI/testing/sysfs-class-power | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/ABI/testing/sysfs-class-power index 27edc06e2495..bf3b48f022dc 100644 --- a/Documentation/ABI/testing/sysfs-class-power +++ b/Documentation/ABI/testing/sysfs-class-power @@ -189,7 +189,8 @@ Description: Access: Read Valid values: "Unknown", "Good", "Overheat", "Dead", "Over voltage", "Unspecified failure", "Cold", - "Watchdog timer expire", "Safety timer expire" + "Watchdog timer expire", "Safety timer expire", + "Over current" What: /sys/class/power_supply//precharge_current Date: June 2017 -- cgit v1.2.3-59-g8ed1b From 13f0a589eff21936e50ebc8875c8be9eed9dfc68 Mon Sep 17 00:00:00 2001 From: Yauhen Kharuzhy Date: Thu, 2 Jan 2020 01:46:27 +0300 Subject: dt-bindings: Add new chips to bq25890 binding documentation Add bq25892, bq25895 and bq25896 to list of supported device IDs in the bq25890 DT binding document. Signed-off-by: Yauhen Kharuzhy Acked-by: Rob Herring Signed-off-by: Sebastian Reichel --- Documentation/devicetree/bindings/power/supply/bq25890.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/power/supply/bq25890.txt b/Documentation/devicetree/bindings/power/supply/bq25890.txt index dc0568933359..dc9c8f76e06c 100644 --- a/Documentation/devicetree/bindings/power/supply/bq25890.txt +++ b/Documentation/devicetree/bindings/power/supply/bq25890.txt @@ -1,11 +1,14 @@ Binding for TI bq25890 Li-Ion Charger -This driver will support the bq25896 and the bq25890. There are other ICs -in the same family but those have not been tested. +This driver will support the bq25892, the bq25896 and the bq25890. There are +other ICs in the same family but those have not been tested. Required properties: - compatible: Should contain one of the following: * "ti,bq25890" + * "ti,bq25892" + * "ti,bq25895" + * "ti,bq25896" - reg: integer, i2c address of the device. - ti,battery-regulation-voltage: integer, maximum charging voltage (in uV); - ti,charge-current: integer, maximum charging current (in uA); -- cgit v1.2.3-59-g8ed1b