summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/power/supply
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-06-23 12:14:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-07-05 20:49:06 +0200
commitabef60363d8ecac66e45853f328afa8eeb9e00fd (patch)
treec7d6f1dcf0ef5154b9182da86f1acad048cb7da1 /dts/Bindings/power/supply
parente307bc559a2830b7f695150212ea1b26cdca69fb (diff)
downloadbarebox-abef60363d8ecac66e45853f328afa8eeb9e00fd.tar.gz
barebox-abef60363d8ecac66e45853f328afa8eeb9e00fd.tar.xz
dts: update to v5.8-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'dts/Bindings/power/supply')
-rw-r--r--dts/Bindings/power/supply/battery.txt6
-rw-r--r--dts/Bindings/power/supply/bq27xxx.txt56
-rw-r--r--dts/Bindings/power/supply/bq27xxx.yaml91
-rw-r--r--dts/Bindings/power/supply/cw2015_battery.yaml79
-rw-r--r--dts/Bindings/power/supply/power-supply.yaml40
-rw-r--r--dts/Bindings/power/supply/power_supply.txt25
-rw-r--r--dts/Bindings/power/supply/rohm,bd99954.yaml155
-rw-r--r--dts/Bindings/power/supply/sbs,sbs-battery.yaml81
-rw-r--r--dts/Bindings/power/supply/sbs_sbs-battery.txt27
9 files changed, 454 insertions, 106 deletions
diff --git a/dts/Bindings/power/supply/battery.txt b/dts/Bindings/power/supply/battery.txt
index 3049cf88bd..5e29595edd 100644
--- a/dts/Bindings/power/supply/battery.txt
+++ b/dts/Bindings/power/supply/battery.txt
@@ -11,15 +11,21 @@ different type. This prevents unpredictable, potentially harmful,
behavior should a replacement that changes the battery type occur
without a corresponding update to the dtb.
+Please note that not all charger drivers respect all of the properties.
+
Required Properties:
- compatible: Must be "simple-battery"
Optional Properties:
+ - over-voltage-threshold-microvolt: battery over-voltage limit
+ - re-charge-voltage-microvolt: limit to automatically start charging again
- voltage-min-design-microvolt: drained battery voltage
- voltage-max-design-microvolt: fully charged battery voltage
- energy-full-design-microwatt-hours: battery design energy
- charge-full-design-microamp-hours: battery design capacity
+ - trickle-charge-current-microamp: current for trickle-charge phase
- precharge-current-microamp: current for pre-charge phase
+ - precharge-upper-limit-microvolt: limit when to change to constant charging
- charge-term-current-microamp: current for charge termination phase
- constant-charge-current-max-microamp: maximum constant input current
- constant-charge-voltage-max-microvolt: maximum constant input voltage
diff --git a/dts/Bindings/power/supply/bq27xxx.txt b/dts/Bindings/power/supply/bq27xxx.txt
deleted file mode 100644
index 4fa8e08df2..0000000000
--- a/dts/Bindings/power/supply/bq27xxx.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-TI BQ27XXX fuel gauge family
-
-Required properties:
-- compatible: contains one of the following:
- * "ti,bq27200" - BQ27200
- * "ti,bq27210" - BQ27210
- * "ti,bq27500" - deprecated, use revision specific property below
- * "ti,bq27510" - deprecated, use revision specific property below
- * "ti,bq27520" - deprecated, use revision specific property below
- * "ti,bq27500-1" - BQ27500/1
- * "ti,bq27510g1" - BQ27510-g1
- * "ti,bq27510g2" - BQ27510-g2
- * "ti,bq27510g3" - BQ27510-g3
- * "ti,bq27520g1" - BQ27520-g1
- * "ti,bq27520g2" - BQ27520-g2
- * "ti,bq27520g3" - BQ27520-g3
- * "ti,bq27520g4" - BQ27520-g4
- * "ti,bq27521" - BQ27521
- * "ti,bq27530" - BQ27530
- * "ti,bq27531" - BQ27531
- * "ti,bq27541" - BQ27541
- * "ti,bq27542" - BQ27542
- * "ti,bq27546" - BQ27546
- * "ti,bq27742" - BQ27742
- * "ti,bq27545" - BQ27545
- * "ti,bq27411" - BQ27411
- * "ti,bq27421" - BQ27421
- * "ti,bq27425" - BQ27425
- * "ti,bq27426" - BQ27426
- * "ti,bq27441" - BQ27441
- * "ti,bq27621" - BQ27621
-- reg: integer, I2C address of the fuel gauge.
-
-Optional properties:
-- monitored-battery: phandle of battery characteristics node
- The fuel gauge uses the following battery properties:
- + energy-full-design-microwatt-hours
- + charge-full-design-microamp-hours
- + voltage-min-design-microvolt
- Both or neither of the *-full-design-*-hours properties must be set.
- See Documentation/devicetree/bindings/power/supply/battery.txt
-
-Example:
-
- bat: battery {
- compatible = "simple-battery";
- voltage-min-design-microvolt = <3200000>;
- energy-full-design-microwatt-hours = <5290000>;
- charge-full-design-microamp-hours = <1430000>;
- };
-
- bq27510g3: fuel-gauge@55 {
- compatible = "ti,bq27510g3";
- reg = <0x55>;
- monitored-battery = <&bat>;
- };
diff --git a/dts/Bindings/power/supply/bq27xxx.yaml b/dts/Bindings/power/supply/bq27xxx.yaml
new file mode 100644
index 0000000000..03d1020a2e
--- /dev/null
+++ b/dts/Bindings/power/supply/bq27xxx.yaml
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2020 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/bq27xxx.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: TI BQ27XXX fuel gauge family
+
+maintainers:
+ - Pali Rohár <pali@kernel.org>
+ - Andrew F. Davis <afd@ti.com>
+ - Sebastian Reichel <sre@kernel.org>
+
+description: |
+ Support various Texas Instruments fuel gauge devices that share similar
+ register maps and power supply properties
+
+allOf:
+ - $ref: power-supply.yaml#
+
+properties:
+ compatible:
+ enum:
+ - ti,bq27200
+ - ti,bq27210
+ - ti,bq27500 # deprecated, use revision specific property below
+ - ti,bq27510 # deprecated, use revision specific property below
+ - ti,bq27520 # deprecated, use revision specific property below
+ - ti,bq27500-1
+ - ti,bq27510g1
+ - ti,bq27510g2
+ - ti,bq27510g3
+ - ti,bq27520g1
+ - ti,bq27520g2
+ - ti,bq27520g3
+ - ti,bq27520g4
+ - ti,bq27521
+ - ti,bq27530
+ - ti,bq27531
+ - ti,bq27541
+ - ti,bq27542
+ - ti,bq27546
+ - ti,bq27742
+ - ti,bq27545
+ - ti,bq27411
+ - ti,bq27421
+ - ti,bq27425
+ - ti,bq27426
+ - ti,bq27441
+ - ti,bq27621
+
+ reg:
+ maxItems: 1
+ description: integer, I2C address of the fuel gauge.
+
+ monitored-battery:
+ description: |
+ phandle of battery characteristics node.
+ The fuel gauge uses the following battery properties:
+ - energy-full-design-microwatt-hours
+ - charge-full-design-microamp-hours
+ - voltage-min-design-microvolt
+ Both or neither of the *-full-design-*-hours properties must be set.
+ See Documentation/devicetree/bindings/power/supply/battery.txt
+
+ power-supplies: true
+
+required:
+ - compatible
+ - reg
+additionalProperties: false
+
+examples:
+ - |
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ bat: battery {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3200000>;
+ energy-full-design-microwatt-hours = <5290000>;
+ charge-full-design-microamp-hours = <1430000>;
+ };
+
+ bq27510g3: fuel-gauge@55 {
+ compatible = "ti,bq27510g3";
+ reg = <0x55>;
+ monitored-battery = <&bat>;
+ };
+ };
diff --git a/dts/Bindings/power/supply/cw2015_battery.yaml b/dts/Bindings/power/supply/cw2015_battery.yaml
new file mode 100644
index 0000000000..2036977ecc
--- /dev/null
+++ b/dts/Bindings/power/supply/cw2015_battery.yaml
@@ -0,0 +1,79 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/cw2015_battery.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Battery driver for CW2015 shuntless fuel gauge by CellWise.
+
+maintainers:
+ - Tobias Schramm <t.schramm@manjaro.org>
+
+description: |
+ The driver can utilize information from a simple-battery linked via a
+ phandle in monitored-battery. If specified the driver uses the
+ charge-full-design-microamp-hours property of the battery.
+
+properties:
+ compatible:
+ const: cellwise,cw2015
+
+ reg:
+ maxItems: 1
+
+ cellwise,battery-profile:
+ description: |
+ This property specifies characteristics of the battery used. The format
+ of this binary blob is kept secret by CellWise. The only way to obtain
+ it is to mail two batteries to a test facility of CellWise and receive
+ back a test report with the binary blob.
+ $ref: /schemas/types.yaml#definitions/uint8-array
+ minItems: 64
+ maxItems: 64
+
+ cellwise,monitor-interval-ms:
+ description:
+ Specifies the interval in milliseconds gauge values are polled at
+ minimum: 250
+
+ power-supplies:
+ description:
+ Specifies supplies used for charging the battery connected to this gauge
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ minItems: 1
+ maxItems: 8 # Should be enough
+
+ monitored-battery:
+ description:
+ Specifies the phandle of a simple-battery connected to this gauge
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cw2015@62 {
+ compatible = "cellwise,cw201x";
+ reg = <0x62>;
+ cellwise,battery-profile = /bits/ 8 <
+ 0x17 0x67 0x80 0x73 0x6E 0x6C 0x6B 0x63
+ 0x77 0x51 0x5C 0x58 0x50 0x4C 0x48 0x36
+ 0x15 0x0C 0x0C 0x19 0x5B 0x7D 0x6F 0x69
+ 0x69 0x5B 0x0C 0x29 0x20 0x40 0x52 0x59
+ 0x57 0x56 0x54 0x4F 0x3B 0x1F 0x7F 0x17
+ 0x06 0x1A 0x30 0x5A 0x85 0x93 0x96 0x2D
+ 0x48 0x77 0x9C 0xB3 0x80 0x52 0x94 0xCB
+ 0x2F 0x00 0x64 0xA5 0xB5 0x11 0xF0 0x11
+ >;
+ cellwise,monitor-interval-ms = <5000>;
+ monitored-battery = <&bat>;
+ power-supplies = <&mains_charger>, <&usb_charger>;
+ };
+ };
+
diff --git a/dts/Bindings/power/supply/power-supply.yaml b/dts/Bindings/power/supply/power-supply.yaml
new file mode 100644
index 0000000000..3bb02bb3a2
--- /dev/null
+++ b/dts/Bindings/power/supply/power-supply.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/power-supply.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Power Supply Core Support
+
+maintainers:
+ - Sebastian Reichel <sre@kernel.org>
+
+properties:
+ power-supplies:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ This property is added to a supply in order to list the devices which
+ supply it power, referenced by their phandles.
+
+examples:
+ - |
+ power {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb_charger:charger@e {
+ compatible = "some,usb-charger";
+ reg = <0xe>;
+ };
+
+ ac_charger:charger@c {
+ compatible = "some,ac-charger";
+ reg = <0xc>;
+ };
+
+ battery:battery@b {
+ compatible = "some,battery";
+ reg = <0xb>;
+ power-supplies = <&usb_charger>, <&ac_charger>;
+ };
+ };
diff --git a/dts/Bindings/power/supply/power_supply.txt b/dts/Bindings/power/supply/power_supply.txt
index 8391bfa0ed..d9693e0545 100644
--- a/dts/Bindings/power/supply/power_supply.txt
+++ b/dts/Bindings/power/supply/power_supply.txt
@@ -1,23 +1,2 @@
-Power Supply Core Support
-
-Optional Properties:
- - power-supplies : This property is added to a supply in order to list the
- devices which supply it power, referenced by their phandles.
-
-Example:
-
- usb-charger: power@e {
- compatible = "some,usb-charger";
- ...
- };
-
- ac-charger: power@c {
- compatible = "some,ac-charger";
- ...
- };
-
- battery@b {
- compatible = "some,battery";
- ...
- power-supplies = <&usb-charger>, <&ac-charger>;
- };
+This binding has been converted to yaml please see power-supply.yaml in this
+directory.
diff --git a/dts/Bindings/power/supply/rohm,bd99954.yaml b/dts/Bindings/power/supply/rohm,bd99954.yaml
new file mode 100644
index 0000000000..7e0f73a898
--- /dev/null
+++ b/dts/Bindings/power/supply/rohm,bd99954.yaml
@@ -0,0 +1,155 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/rohm,bd99954.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ROHM BD99954 Battery charger
+
+maintainers:
+ - Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
+ - Markus Laine <markus.laine@fi.rohmeurope.com>
+ - Mikko Mutanen <mikko.mutanen@fi.rohmeurope.com>
+
+description: |
+ The ROHM BD99954 is a Battery Management LSI for 1-4 cell Lithium-Ion
+ secondary battery intended to be used in space-constraint equipment such
+ as Low profile Notebook PC, Tablets and other applications. BD99954
+ provides a Dual-source Battery Charger, two port BC1.2 detection and a
+ Battery Monitor.
+
+
+properties:
+ compatible:
+ const: rohm,bd99954
+#
+# The battery charging profile of BD99954.
+#
+# Curve (1) represents charging current.
+# Curve (2) represents battery voltage.
+#
+# The BD99954 data sheet divides charging to three phases.
+# a) Trickle-charge with constant current (8).
+# b) pre-charge with constant current (6)
+# c) fast-charge with:
+# First a constant current (5) phase (CC)
+# Then constant voltage (CV) phase (after the battery voltage has reached
+# target level - until charging current has dropped to termination
+# level (7)
+#
+# V ^ ^ I
+# . .
+# . .
+# (4)- -.- - - - - - - - - - - - - - +++++++++++++++++++++++++++.
+# . / .
+# . ++++++/++ - - - - - - - - - - - - -.- - (5)
+# . + / + .
+# . + - -- .
+# . + - + .
+# . +.- -: .
+# . .+ +` .
+# . .- + | `/ .
+# . .." + .: .
+# . -" + -- .
+# . (2) ..." + | :- .
+# . ..."" + -: .
+# (3)- -.-.""- - - - -+++++++++ - - - - - - -.:- - - - - - - - - .- - (6)
+# . + `:. .
+# . + | -: .
+# . + -: .
+# . + .. .
+# . (1) + | "+++- - - -.- - (7)
+# -++++++++++++++- - - - - - - - - - - - - - - - - + - - - .- - (8)
+# . + -
+# -------------------------------------------------+++++++++-->
+# | | | CC | CV |
+# | --trickle-- | -pre- | ---------fast----------- |
+#
+# The charger uses the following battery properties
+# - trickle-charge-current-microamp:
+# Current used at trickle-charge phase (8 in above chart)
+# minimum: 64000
+# maximum: 1024000
+# multipleOf: 64000
+# - precharge-current-microamp:
+# Current used at pre-charge phase (6 in above chart)
+# minimum: 64000
+# maximum: 1024000
+# multipleOf: 64000
+# - constant-charge-current-max-microamp
+# Current used at fast charge constant current phase (5 in above chart)
+# minimum: 64000
+# maximum: 1024000
+# multipleOf: 64000
+# - constant-charge-voltage-max-microvolt
+# The constant voltage used in fast charging phase (4 in above chart)
+# minimum: 2560000
+# maximum: 19200000
+# multipleOf: 16000
+# - precharge-upper-limit-microvolt
+# charging mode is changed from trickle charging to pre-charging
+# when battery voltage exceeds this limit voltage (3 in above chart)
+# minimum: 2048000
+# maximum: 19200000
+# multipleOf: 64000
+# - re-charge-voltage-microvolt
+# minimum: 2560000
+# maximum: 19200000
+# multipleOf: 16000
+# re-charging is automatically started when battry has been discharging
+# to the point where the battery voltage drops below this limit
+# - over-voltage-threshold-microvolt
+# battery is expected to be faulty if battery voltage exceeds this limit.
+# Charger will then enter to a "battery faulty" -state
+# minimum: 2560000
+# maximum: 19200000
+# multipleOf: 16000
+# - charge-term-current-microamp
+# minimum: 0
+# maximum: 1024000
+# multipleOf: 64000
+# a charge cycle terminates when the battery voltage is above recharge
+# threshold, and the current is below this setting (7 in above chart)
+# See also Documentation/devicetree/bindings/power/supply/battery.txt
+
+ monitored-battery:
+ description:
+ phandle of battery characteristics devicetree node
+
+ rohm,vsys-regulation-microvolt:
+ description: system specific lower limit for system voltage.
+ minimum: 2560000
+ maximum: 19200000
+ multipleOf: 64000
+
+ rohm,vbus-input-current-limit-microamp:
+ description: system specific VBUS input current limit (in microamps).
+ minimum: 32000
+ maximum: 16352000
+ multipleOf: 32000
+
+ rohm,vcc-input-current-limit-microamp:
+ description: system specific VCC/VACP input current limit (in microamps).
+ minimum: 32000
+ maximum: 16352000
+ multipleOf: 32000
+
+required:
+ - compatible
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ charger@9 {
+ compatible = "rohm,bd99954";
+ monitored-battery = <&battery>;
+ reg = <0x9>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <29 8>;
+ rohm,vsys-regulation-microvolt = <8960000>;
+ rohm,vbus-input-current-limit-microamp = <1472000>;
+ rohm,vcc-input-current-limit-microamp = <1472000>;
+ };
+ };
diff --git a/dts/Bindings/power/supply/sbs,sbs-battery.yaml b/dts/Bindings/power/supply/sbs,sbs-battery.yaml
new file mode 100644
index 0000000000..a90b3601e6
--- /dev/null
+++ b/dts/Bindings/power/supply/sbs,sbs-battery.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/supply/sbs,sbs-battery.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SBS compliant battery
+
+maintainers:
+ - Sebastian Reichel <sre@kernel.org>
+
+description: |
+ Battery compatible with the smart battery system specifications
+
+properties:
+
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - ti,bq20z65
+ - ti,bq20z75
+ - enum:
+ - sbs,sbs-battery
+ - items:
+ - const: sbs,sbs-battery
+
+ reg:
+ maxItems: 1
+
+ sbs,i2c-retry-count:
+ description:
+ The number of times to retry I2C transactions on I2C IO failure.
+ default: 0
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ sbs,poll-retry-count:
+ description:
+ The number of times to try looking for new status after an external
+ change notification.
+ default: 0
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ sbs,battery-detect-gpios:
+ description:
+ GPIO which signals battery detection. If this is not supplied, the bus
+ needs to be polled to detect the battery.
+ maxItems: 1
+
+ sbs,disable-charger-broadcasts:
+ description:
+ SBS batteries by default send broadcast messages to SBS compliant chargers to
+ configure max. charge current/voltage. If your hardware does not have an SBS
+ compliant charger it should be disabled via this property to avoid blocking
+ the bus. Also some SBS battery fuel gauges are known to have a buggy multi-
+ master implementation.
+ type: boolean
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ battery@b {
+ compatible = "ti,bq20z75", "sbs,sbs-battery";
+ reg = <0xb>;
+ sbs,i2c-retry-count = <2>;
+ sbs,poll-retry-count = <10>;
+ sbs,battery-detect-gpios = <&gpio 122 GPIO_ACTIVE_HIGH>;
+ sbs,disable-charger-broadcasts;
+ };
+ };
diff --git a/dts/Bindings/power/supply/sbs_sbs-battery.txt b/dts/Bindings/power/supply/sbs_sbs-battery.txt
deleted file mode 100644
index 4e78e51018..0000000000
--- a/dts/Bindings/power/supply/sbs_sbs-battery.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-SBS sbs-battery
-~~~~~~~~~~
-
-Required properties :
- - compatible: "<vendor>,<part-number>", "sbs,sbs-battery" as fallback. The
- part number compatible string might be used in order to take care of
- vendor specific registers.
- Known <vendor>,<part-number>:
- ti,bq20z75
-
-Optional properties :
- - sbs,i2c-retry-count : The number of times to retry i2c transactions on i2c
- IO failure.
- - sbs,poll-retry-count : The number of times to try looking for new status
- after an external change notification.
- - sbs,battery-detect-gpios : The gpio which signals battery detection and
- a flag specifying its polarity.
-
-Example:
-
- battery@b {
- compatible = "ti,bq20z75", "sbs,sbs-battery";
- reg = <0xb>;
- sbs,i2c-retry-count = <2>;
- sbs,poll-retry-count = <10>;
- sbs,battery-detect-gpios = <&gpio-controller 122 1>;
- }