summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/power
diff options
context:
space:
mode:
Diffstat (limited to 'dts/Bindings/power')
-rw-r--r--dts/Bindings/power/amlogic,meson-ee-pwrc.yaml23
-rw-r--r--dts/Bindings/power/amlogic,meson-sec-pwrc.yaml2
-rw-r--r--dts/Bindings/power/brcm,bcm63xx-power.yaml44
-rw-r--r--dts/Bindings/power/domain-idle-state.yaml2
-rw-r--r--dts/Bindings/power/fsl,imx-gpcv2.yaml4
-rw-r--r--dts/Bindings/power/mti,mips-cpc.yaml2
-rw-r--r--dts/Bindings/power/pd-samsung.yaml2
-rw-r--r--dts/Bindings/power/power-domain.yaml2
-rw-r--r--dts/Bindings/power/renesas,rcar-sysc.yaml1
-rw-r--r--dts/Bindings/power/reset/ocelot-reset.txt7
-rw-r--r--dts/Bindings/power/reset/reboot-mode.txt25
-rw-r--r--dts/Bindings/power/reset/reboot-mode.yaml47
-rw-r--r--dts/Bindings/power/supply/act8945a-charger.txt2
-rw-r--r--dts/Bindings/power/supply/battery.yaml24
-rw-r--r--dts/Bindings/power/supply/bq25890.txt4
-rw-r--r--dts/Bindings/power/supply/bq25980.yaml114
-rw-r--r--dts/Bindings/power/supply/bq27xxx.yaml1
-rw-r--r--dts/Bindings/power/supply/charger-manager.txt30
-rw-r--r--dts/Bindings/power/supply/cw2015_battery.yaml2
-rw-r--r--dts/Bindings/power/supply/gpio-charger.yaml31
-rw-r--r--dts/Bindings/power/supply/ingenic,battery.txt31
-rw-r--r--dts/Bindings/power/supply/ingenic,battery.yaml61
-rw-r--r--dts/Bindings/power/supply/max17040_battery.txt21
-rw-r--r--dts/Bindings/power/supply/power-supply.yaml2
-rw-r--r--dts/Bindings/power/supply/rohm,bd99954.yaml8
-rw-r--r--dts/Bindings/power/supply/summit,smb347-charger.yaml152
26 files changed, 572 insertions, 72 deletions
diff --git a/dts/Bindings/power/amlogic,meson-ee-pwrc.yaml b/dts/Bindings/power/amlogic,meson-ee-pwrc.yaml
index 4f524f822e..d30f85cc39 100644
--- a/dts/Bindings/power/amlogic,meson-ee-pwrc.yaml
+++ b/dts/Bindings/power/amlogic,meson-ee-pwrc.yaml
@@ -27,6 +27,7 @@ properties:
- amlogic,meson8b-pwrc
- amlogic,meson8m2-pwrc
- amlogic,meson-gxbb-pwrc
+ - amlogic,meson-axg-pwrc
- amlogic,meson-g12a-pwrc
- amlogic,meson-sm1-pwrc
@@ -42,11 +43,11 @@ properties:
- const: vapb
resets:
- minItems: 11
+ minItems: 5
maxItems: 12
reset-names:
- minItems: 11
+ minItems: 5
maxItems: 12
"#power-domain-cells":
@@ -111,6 +112,24 @@ allOf:
properties:
compatible:
enum:
+ - amlogic,meson-axg-pwrc
+ then:
+ properties:
+ reset-names:
+ items:
+ - const: viu
+ - const: venc
+ - const: vcbus
+ - const: vencl
+ - const: vid_lock
+ required:
+ - resets
+ - reset-names
+
+ - if:
+ properties:
+ compatible:
+ enum:
- amlogic,meson-g12a-pwrc
- amlogic,meson-sm1-pwrc
then:
diff --git a/dts/Bindings/power/amlogic,meson-sec-pwrc.yaml b/dts/Bindings/power/amlogic,meson-sec-pwrc.yaml
index bc4e037f3f..5dae04d293 100644
--- a/dts/Bindings/power/amlogic,meson-sec-pwrc.yaml
+++ b/dts/Bindings/power/amlogic,meson-sec-pwrc.yaml
@@ -27,6 +27,8 @@ required:
- compatible
- "#power-domain-cells"
+additionalProperties: false
+
examples:
- |
secure-monitor {
diff --git a/dts/Bindings/power/brcm,bcm63xx-power.yaml b/dts/Bindings/power/brcm,bcm63xx-power.yaml
new file mode 100644
index 0000000000..63b15ac6dd
--- /dev/null
+++ b/dts/Bindings/power/brcm,bcm63xx-power.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/brcm,bcm63xx-power.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: BCM63xx power domain driver
+
+maintainers:
+ - Álvaro Fernández Rojas <noltari@gmail.com>
+
+description: |
+ BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
+ to enable/disable certain components in order to save power.
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - brcm,bcm6318-power-controller
+ - brcm,bcm6328-power-controller
+ - brcm,bcm6362-power-controller
+ - brcm,bcm63268-power-controller
+
+ reg:
+ maxItems: 1
+
+ "#power-domain-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - "#power-domain-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ periph_pwr: power-controller@10001848 {
+ compatible = "brcm,bcm6328-power-controller";
+ reg = <0x10001848 0x4>;
+ #power-domain-cells = <1>;
+ };
diff --git a/dts/Bindings/power/domain-idle-state.yaml b/dts/Bindings/power/domain-idle-state.yaml
index dfba1af9ab..6a12efdf43 100644
--- a/dts/Bindings/power/domain-idle-state.yaml
+++ b/dts/Bindings/power/domain-idle-state.yaml
@@ -50,6 +50,8 @@ patternProperties:
- exit-latency-us
- min-residency-us
+additionalProperties: false
+
examples:
- |
diff --git a/dts/Bindings/power/fsl,imx-gpcv2.yaml b/dts/Bindings/power/fsl,imx-gpcv2.yaml
index bde09a0b2d..a96e6dbf18 100644
--- a/dts/Bindings/power/fsl,imx-gpcv2.yaml
+++ b/dts/Bindings/power/fsl,imx-gpcv2.yaml
@@ -33,6 +33,10 @@ properties:
interrupts:
maxItems: 1
+ interrupt-controller: true
+ '#interrupt-cells':
+ const: 3
+
pgc:
type: object
description: list of power domains provided by this controller.
diff --git a/dts/Bindings/power/mti,mips-cpc.yaml b/dts/Bindings/power/mti,mips-cpc.yaml
index ccdeaece16..be447ccfdc 100644
--- a/dts/Bindings/power/mti,mips-cpc.yaml
+++ b/dts/Bindings/power/mti,mips-cpc.yaml
@@ -26,6 +26,8 @@ required:
- compatible
- reg
+additionalProperties: false
+
examples:
- |
cpc@1bde0000 {
diff --git a/dts/Bindings/power/pd-samsung.yaml b/dts/Bindings/power/pd-samsung.yaml
index 09bdd96c1e..9c2c511334 100644
--- a/dts/Bindings/power/pd-samsung.yaml
+++ b/dts/Bindings/power/pd-samsung.yaml
@@ -49,6 +49,8 @@ required:
- "#power-domain-cells"
- reg
+unevaluatedProperties: false
+
examples:
- |
lcd0_pd: power-domain@10023c80 {
diff --git a/dts/Bindings/power/power-domain.yaml b/dts/Bindings/power/power-domain.yaml
index dd564349aa..aed51e9dcb 100644
--- a/dts/Bindings/power/power-domain.yaml
+++ b/dts/Bindings/power/power-domain.yaml
@@ -69,6 +69,8 @@ properties:
required:
- "#power-domain-cells"
+additionalProperties: true
+
examples:
- |
power: power-controller@12340000 {
diff --git a/dts/Bindings/power/renesas,rcar-sysc.yaml b/dts/Bindings/power/renesas,rcar-sysc.yaml
index ec2aaeee78..99e8042ac1 100644
--- a/dts/Bindings/power/renesas,rcar-sysc.yaml
+++ b/dts/Bindings/power/renesas,rcar-sysc.yaml
@@ -40,6 +40,7 @@ properties:
- renesas,r8a77980-sysc # R-Car V3H
- renesas,r8a77990-sysc # R-Car E3
- renesas,r8a77995-sysc # R-Car D3
+ - renesas,r8a779a0-sysc # R-Car V3U
reg:
maxItems: 1
diff --git a/dts/Bindings/power/reset/ocelot-reset.txt b/dts/Bindings/power/reset/ocelot-reset.txt
index 1b4213eb34..4d530d8154 100644
--- a/dts/Bindings/power/reset/ocelot-reset.txt
+++ b/dts/Bindings/power/reset/ocelot-reset.txt
@@ -1,10 +1,13 @@
Microsemi Ocelot reset controller
The DEVCPU_GCB:CHIP_REGS have a SOFT_RST register that can be used to reset the
-SoC MIPS core.
+SoC core.
+
+The reset registers are both present in the MSCC vcoreiii MIPS and
+microchip Sparx5 armv8 SoC's.
Required Properties:
- - compatible: "mscc,ocelot-chip-reset"
+ - compatible: "mscc,ocelot-chip-reset" or "microchip,sparx5-chip-reset"
Example:
reset@1070008 {
diff --git a/dts/Bindings/power/reset/reboot-mode.txt b/dts/Bindings/power/reset/reboot-mode.txt
deleted file mode 100644
index de34f27d50..0000000000
--- a/dts/Bindings/power/reset/reboot-mode.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Generic reboot mode core map driver
-
-This driver get reboot mode arguments and call the write
-interface to store the magic value in special register
-or ram. Then the bootloader can read it and take different
-action according to the argument stored.
-
-All mode properties are vendor specific, it is a indication to tell
-the bootloader what to do when the system reboots, and should be named
-as mode-xxx = <magic> (xxx is mode name, magic should be a none-zero value).
-
-For example modes common on Android platform:
-- mode-normal: Normal reboot mode, system reboot with command "reboot".
-- mode-recovery: Android Recovery mode, it is a mode to format the device or update a new image.
-- mode-bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device.
-- mode-loader: A bootloader mode, it's a mode used to download image on Rockchip platform,
- usually used in development.
-
-Example:
- reboot-mode {
- mode-normal = <BOOT_NORMAL>;
- mode-recovery = <BOOT_RECOVERY>;
- mode-bootloader = <BOOT_FASTBOOT>;
- mode-loader = <BOOT_BL_DOWNLOAD>;
- }
diff --git a/dts/Bindings/power/reset/reboot-mode.yaml b/dts/Bindings/power/reset/reboot-mode.yaml
new file mode 100644
index 0000000000..a6c91026d4
--- /dev/null
+++ b/dts/Bindings/power/reset/reboot-mode.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/reboot-mode.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic reboot mode core map
+
+maintainers:
+ - Andy Yan <andy.yan@rock-chips.com>
+
+description: |
+ This driver get reboot mode arguments and call the write
+ interface to store the magic value in special register
+ or ram. Then the bootloader can read it and take different
+ action according to the argument stored.
+
+ All mode properties are vendor specific, it is a indication to tell
+ the bootloader what to do when the system reboots, and should be named
+ as mode-xxx = <magic> (xxx is mode name, magic should be a non-zero value).
+
+ For example, modes common Android platform are:
+ - normal: Normal reboot mode, system reboot with command "reboot".
+ - recovery: Android Recovery mode, it is a mode to format the device or update a new image.
+ - bootloader: Android fastboot mode, it's a mode to re-flash partitions on the Android based device.
+ - loader: A bootloader mode, it's a mode used to download image on Rockchip platform,
+ usually used in development.
+
+properties:
+ mode-normal:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Default value to set on a reboot if no command was provided.
+
+patternProperties:
+ "^mode-.*$":
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+examples:
+ - |
+ reboot-mode {
+ mode-normal = <0>;
+ mode-recovery = <1>;
+ mode-bootloader = <2>;
+ mode-loader = <3>;
+ };
+...
diff --git a/dts/Bindings/power/supply/act8945a-charger.txt b/dts/Bindings/power/supply/act8945a-charger.txt
index c7dfb7cecf..cb737a9e1f 100644
--- a/dts/Bindings/power/supply/act8945a-charger.txt
+++ b/dts/Bindings/power/supply/act8945a-charger.txt
@@ -33,7 +33,7 @@ Example:
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
interrupt-parent = <&pioA>;
- interrupts = <45 GPIO_ACTIVE_LOW>;
+ interrupts = <45 IRQ_TYPE_LEVEL_LOW>;
active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
diff --git a/dts/Bindings/power/supply/battery.yaml b/dts/Bindings/power/supply/battery.yaml
index 932b736ce5..0c7e2e4479 100644
--- a/dts/Bindings/power/supply/battery.yaml
+++ b/dts/Bindings/power/supply/battery.yaml
@@ -82,6 +82,27 @@ properties:
An array containing the temperature in degree Celsius,
for each of the battery capacity lookup table.
+ operating-range-celsius:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: operating temperature range of a battery
+ items:
+ - description: minimum temperature at which battery can operate
+ - description: maximum temperature at which battery can operate
+
+ ambient-celsius:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: safe range of ambient temperature
+ items:
+ - description: alert when ambient temperature is lower than this value
+ - description: alert when ambient temperature is higher than this value
+
+ alert-celsius:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: safe range of battery temperature
+ items:
+ - description: alert when battery temperature is lower than this value
+ - description: alert when battery temperature is higher than this value
+
required:
- compatible
@@ -130,6 +151,9 @@ examples:
/* table for 10 degree Celsius */
ocv-capacity-table-2 = <4250000 100>, <4200000 95>, <4185000 90>;
resistance-temp-table = <20 100>, <10 90>, <0 80>, <(-10) 60>;
+ operating-range-celsius = <(-30) 50>;
+ ambient-celsius = <(-5) 50>;
+ alert-celsius = <0 40>;
};
charger@11 {
diff --git a/dts/Bindings/power/supply/bq25890.txt b/dts/Bindings/power/supply/bq25890.txt
index 3b4c69a7fa..805040c6ff 100644
--- a/dts/Bindings/power/supply/bq25890.txt
+++ b/dts/Bindings/power/supply/bq25890.txt
@@ -33,6 +33,10 @@ Optional properties:
- ti,thermal-regulation-threshold: integer, temperature above which the charge
current is lowered, to avoid overheating (in degrees Celsius). If omitted,
the default setting will be used (120 degrees);
+- ti,ibatcomp-micro-ohms: integer, value of a resistor in series with
+ the battery;
+- ti,ibatcomp-clamp-microvolt: integer, maximum charging voltage adjustment due
+ to expected voltage drop on in-series resistor;
Example:
diff --git a/dts/Bindings/power/supply/bq25980.yaml b/dts/Bindings/power/supply/bq25980.yaml
new file mode 100644
index 0000000000..f6b3dd4093
--- /dev/null
+++ b/dts/Bindings/power/supply/bq25980.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2020 Texas Instruments Incorporated
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/bq25980.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: TI BQ25980 Flash Charger
+
+maintainers:
+ - Dan Murphy <dmurphy@ti.com>
+ - Ricardo Rivera-Matos <r-rivera-matos@ti.com>
+
+description: |
+ The BQ25980, BQ25975, and BQ25960 are a series of flash chargers intended
+ for use in high-power density portable electronics. These inductorless
+ switching chargers can provide over 97% efficiency by making use of the
+ switched capacitor architecture.
+
+allOf:
+ - $ref: power-supply.yaml#
+
+properties:
+ compatible:
+ enum:
+ - ti,bq25980
+ - ti,bq25975
+ - ti,bq25960
+
+ reg:
+ maxItems: 1
+
+ ti,watchdog-timeout-ms:
+ description: |
+ Watchdog timer in milli seconds. 0 disables the watchdog.
+ default: 0
+ minimum: 0
+ maximum: 300000
+ enum: [ 0, 5000, 10000, 50000, 300000]
+
+ ti,sc-ovp-limit-microvolt:
+ description: |
+ Minimum input voltage limit in micro volts with a when the charger is in
+ switch cap mode. 100000 micro volt step.
+ default: 17800000
+ minimum: 14000000
+ maximum: 22000000
+
+ ti,sc-ocp-limit-microamp:
+ description: |
+ Maximum input current limit in micro amps with a 100000 micro amp step.
+ minimum: 100000
+ maximum: 3300000
+
+ ti,bypass-ovp-limit-microvolt:
+ description: |
+ Minimum input voltage limit in micro volts with a when the charger is in
+ switch cap mode. 50000 micro volt step.
+ minimum: 7000000
+ maximum: 12750000
+
+ ti,bypass-ocp-limit-microamp:
+ description: |
+ Maximum input current limit in micro amps with a 100000 micro amp step.
+ minimum: 100000
+ maximum: 3300000
+
+ ti,bypass-enable:
+ type: boolean
+ description: Enables bypass mode at boot time
+
+ interrupts:
+ description: |
+ Indicates that the device state has changed.
+
+ monitored-battery:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: phandle to the battery node being monitored
+
+required:
+ - compatible
+ - reg
+ - monitored-battery
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ bat: battery {
+ compatible = "simple-battery";
+ constant-charge-current-max-microamp = <4000000>;
+ constant-charge-voltage-max-microvolt = <8400000>;
+ precharge-current-microamp = <160000>;
+ charge-term-current-microamp = <160000>;
+ };
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ i2c0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ bq25980: charger@65 {
+ compatible = "ti,bq25980";
+ reg = <0x65>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
+ ti,watchdog-timer = <0>;
+ ti,sc-ocp-limit-microamp = <2000000>;
+ ti,sc-ovp-limit-microvolt = <17800000>;
+ monitored-battery = <&bat>;
+ };
+ };
+
+...
diff --git a/dts/Bindings/power/supply/bq27xxx.yaml b/dts/Bindings/power/supply/bq27xxx.yaml
index 82f682705f..45beefccf3 100644
--- a/dts/Bindings/power/supply/bq27xxx.yaml
+++ b/dts/Bindings/power/supply/bq27xxx.yaml
@@ -51,6 +51,7 @@ properties:
- ti,bq27621
- ti,bq27z561
- ti,bq28z610
+ - ti,bq34z100
reg:
maxItems: 1
diff --git a/dts/Bindings/power/supply/charger-manager.txt b/dts/Bindings/power/supply/charger-manager.txt
index ec4fe9de31..b5ae9061b7 100644
--- a/dts/Bindings/power/supply/charger-manager.txt
+++ b/dts/Bindings/power/supply/charger-manager.txt
@@ -3,24 +3,32 @@ charger-manager bindings
Required properties :
- compatible : "charger-manager"
- - <>-supply : for regulator consumer
- - cm-num-chargers : number of chargers
+ - <>-supply : for regulator consumer, named according to cm-regulator-name
- cm-chargers : name of chargers
- cm-fuel-gauge : name of battery fuel gauge
- subnode <regulator> :
- cm-regulator-name : name of charger regulator
- subnode <cable> :
- - cm-cable-name : name of charger cable
+ - cm-cable-name : name of charger cable - one of USB, USB-HOST,
+ SDP, DCP, CDP, ACA, FAST-CHARGER, SLOW-CHARGER, WPT,
+ PD, DOCK, JIG, or MECHANICAL
- cm-cable-extcon : name of extcon dev
(optional) - cm-cable-min : minimum current of cable
(optional) - cm-cable-max : maximum current of cable
Optional properties :
- cm-name : charger manager's name (default : "battery")
- - cm-poll-mode : polling mode (enum polling_modes)
- - cm-poll-interval : polling interval
- - cm-battery-stat : battery status (enum data_source)
- - cm-fullbatt-* : data for full battery checking
+ - cm-poll-mode : polling mode - 0 for disabled, 1 for always, 2 for when
+ external power is connected, or 3 for when charging. If not present,
+ then polling is disabled
+ - cm-poll-interval : polling interval (in ms)
+ - cm-battery-stat : battery status - 0 for battery always present, 1 for no
+ battery, 2 to check presence via fuel gauge, or 3 to check presence
+ via charger
+ - cm-fullbatt-vchkdrop-volt : voltage drop (in uV) before restarting charging
+ - cm-fullbatt-voltage : voltage (in uV) of full battery
+ - cm-fullbatt-soc : state of charge to consider as full battery
+ - cm-fullbatt-capacity : capcity (in uAh) to consider as full battery
- cm-thermal-zone : name of external thermometer's thermal zone
- cm-battery-* : threshold battery temperature for charging
-cold : critical cold temperature of battery for charging
@@ -29,6 +37,10 @@ Optional properties :
-temp-diff : temperature difference to allow recharging
- cm-dis/charging-max = limits of charging duration
+Deprecated properties:
+ - cm-num-chargers
+ - cm-fullbatt-vchkdrop-ms
+
Example :
charger-manager@0 {
compatible = "charger-manager";
@@ -39,13 +51,11 @@ Example :
cm-poll-mode = <1>;
cm-poll-interval = <30000>;
- cm-fullbatt-vchkdrop-ms = <30000>;
cm-fullbatt-vchkdrop-volt = <150000>;
cm-fullbatt-soc = <100>;
cm-battery-stat = <3>;
- cm-num-chargers = <3>;
cm-chargers = "charger0", "charger1", "charger2";
cm-fuel-gauge = "fuelgauge0";
@@ -71,7 +81,7 @@ Example :
cm-cable-max = <500000>;
};
cable@1 {
- cm-cable-name = "TA";
+ cm-cable-name = "SDP";
cm-cable-extcon = "extcon-dev.0";
cm-cable-min = <650000>;
cm-cable-max = <675000>;
diff --git a/dts/Bindings/power/supply/cw2015_battery.yaml b/dts/Bindings/power/supply/cw2015_battery.yaml
index 2036977ecc..ee92e6a076 100644
--- a/dts/Bindings/power/supply/cw2015_battery.yaml
+++ b/dts/Bindings/power/supply/cw2015_battery.yaml
@@ -52,6 +52,8 @@ required:
- compatible
- reg
+additionalProperties: false
+
examples:
- |
i2c {
diff --git a/dts/Bindings/power/supply/gpio-charger.yaml b/dts/Bindings/power/supply/gpio-charger.yaml
index 6244b8ee94..89f8e2bcb2 100644
--- a/dts/Bindings/power/supply/gpio-charger.yaml
+++ b/dts/Bindings/power/supply/gpio-charger.yaml
@@ -39,6 +39,25 @@ properties:
maxItems: 1
description: GPIO indicating the charging status
+ charge-current-limit-gpios:
+ minItems: 1
+ maxItems: 32
+ description: GPIOs used for current limiting
+
+ charge-current-limit-mapping:
+ description: List of tuples with current in uA and a GPIO bitmap (in
+ this order). The tuples must be provided in descending order of the
+ current limit.
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ items:
+ items:
+ - description:
+ Current limit in uA
+ - description:
+ Encoded GPIO setting. Bit 0 represents last GPIO from the
+ charge-current-limit-gpios property. Bit 1 second to last
+ GPIO and so on.
+
required:
- compatible
@@ -47,6 +66,12 @@ anyOf:
- gpios
- required:
- charge-status-gpios
+ - required:
+ - charge-current-limit-gpios
+
+dependencies:
+ charge-current-limit-gpios: [ charge-current-limit-mapping ]
+ charge-current-limit-mapping: [ charge-current-limit-gpios ]
additionalProperties: false
@@ -60,4 +85,10 @@ examples:
gpios = <&gpd 28 GPIO_ACTIVE_LOW>;
charge-status-gpios = <&gpc 27 GPIO_ACTIVE_LOW>;
+
+ charge-current-limit-gpios = <&gpioA 11 GPIO_ACTIVE_HIGH>,
+ <&gpioA 12 GPIO_ACTIVE_HIGH>;
+ charge-current-limit-mapping = <2500000 0x00>, // 2.5 A => both GPIOs low
+ <700000 0x01>, // 700 mA => GPIO A.12 high
+ <0 0x02>; // 0 mA => GPIO A.11 high
};
diff --git a/dts/Bindings/power/supply/ingenic,battery.txt b/dts/Bindings/power/supply/ingenic,battery.txt
deleted file mode 100644
index 66430bf738..0000000000
--- a/dts/Bindings/power/supply/ingenic,battery.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-* Ingenic JZ47xx battery bindings
-
-Required properties:
-
-- compatible: Must be "ingenic,jz4740-battery".
-- io-channels: phandle and IIO specifier pair to the IIO device.
- Format described in iio-bindings.txt.
-- monitored-battery: phandle to a "simple-battery" compatible node.
-
-The "monitored-battery" property must be a phandle to a node using the format
-described in battery.txt, with the following properties being required:
-
-- voltage-min-design-microvolt: Drained battery voltage.
-- voltage-max-design-microvolt: Fully charged battery voltage.
-
-Example:
-
-#include <dt-bindings/iio/adc/ingenic,adc.h>
-
-simple_battery: battery {
- compatible = "simple-battery";
- voltage-min-design-microvolt = <3600000>;
- voltage-max-design-microvolt = <4200000>;
-};
-
-ingenic_battery {
- compatible = "ingenic,jz4740-battery";
- io-channels = <&adc INGENIC_ADC_BATTERY>;
- io-channel-names = "battery";
- monitored-battery = <&simple_battery>;
-};
diff --git a/dts/Bindings/power/supply/ingenic,battery.yaml b/dts/Bindings/power/supply/ingenic,battery.yaml
new file mode 100644
index 0000000000..867e3e6b7e
--- /dev/null
+++ b/dts/Bindings/power/supply/ingenic,battery.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2019-2020 Artur Rojek
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/ingenic,battery.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Ingenic JZ47xx battery bindings
+
+maintainers:
+ - Artur Rojek <contact@artur-rojek.eu>
+
+properties:
+ compatible:
+ oneOf:
+ - const: ingenic,jz4740-battery
+ - items:
+ - enum:
+ - ingenic,jz4725b-battery
+ - ingenic,jz4770-battery
+ - const: ingenic,jz4740-battery
+
+ io-channels:
+ maxItems: 1
+
+ io-channel-names:
+ const: battery
+
+ monitored-battery:
+ description: >
+ phandle to a "simple-battery" compatible node.
+
+ This property must be a phandle to a node using the format described
+ in battery.yaml, with the following properties being required:
+ - voltage-min-design-microvolt: drained battery voltage,
+ - voltage-max-design-microvolt: fully charged battery voltage.
+
+required:
+ - compatible
+ - io-channels
+ - io-channel-names
+ - monitored-battery
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/iio/adc/ingenic,adc.h>
+
+ simple_battery: battery {
+ compatible = "simple-battery";
+ voltage-min-design-microvolt = <3600000>;
+ voltage-max-design-microvolt = <4200000>;
+ };
+
+ ingenic-battery {
+ compatible = "ingenic,jz4740-battery";
+ io-channels = <&adc INGENIC_ADC_BATTERY>;
+ io-channel-names = "battery";
+ monitored-battery = <&simple_battery>;
+ };
diff --git a/dts/Bindings/power/supply/max17040_battery.txt b/dts/Bindings/power/supply/max17040_battery.txt
index 4e0186b838..c802f664b5 100644
--- a/dts/Bindings/power/supply/max17040_battery.txt
+++ b/dts/Bindings/power/supply/max17040_battery.txt
@@ -2,7 +2,9 @@ max17040_battery
~~~~~~~~~~~~~~~~
Required properties :
- - compatible : "maxim,max17040" or "maxim,max77836-battery"
+ - compatible : "maxim,max17040", "maxim,max17041", "maxim,max17043",
+ "maxim,max17044", "maxim,max17048", "maxim,max17049",
+ "maxim,max17058", "maxim,max17059" or "maxim,max77836-battery"
- reg: i2c slave address
Optional properties :
@@ -11,6 +13,15 @@ Optional properties :
generated. Can be configured from 1 up to 32
(%). If skipped the power up default value of
4 (%) will be used.
+- maxim,double-soc : Certain devices return double the capacity.
+ Specify this boolean property to divide the
+ reported value in 2 and thus normalize it.
+ SOC == State of Charge == Capacity.
+- maxim,rcomp : A value to compensate readings for various
+ battery chemistries and operating temperatures.
+ max17040,41 have 2 byte rcomp, default to
+ 0x97 0x00. All other devices have one byte
+ rcomp, default to 0x97.
- interrupts : Interrupt line see Documentation/devicetree/
bindings/interrupt-controller/interrupts.txt
- wakeup-source : This device has wakeup capabilities. Use this
@@ -31,3 +42,11 @@ Example:
interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
wakeup-source;
};
+
+ battery-fuel-gauge@36 {
+ compatible = "maxim,max17048";
+ reg = <0x36>;
+ maxim,rcomp = /bits/ 8 <0x56>;
+ maxim,alert-low-soc-level = <10>;
+ maxim,double-soc;
+ };
diff --git a/dts/Bindings/power/supply/power-supply.yaml b/dts/Bindings/power/supply/power-supply.yaml
index 3bb02bb3a2..c5c55f6272 100644
--- a/dts/Bindings/power/supply/power-supply.yaml
+++ b/dts/Bindings/power/supply/power-supply.yaml
@@ -16,6 +16,8 @@ properties:
This property is added to a supply in order to list the devices which
supply it power, referenced by their phandles.
+additionalProperties: true
+
examples:
- |
power {
diff --git a/dts/Bindings/power/supply/rohm,bd99954.yaml b/dts/Bindings/power/supply/rohm,bd99954.yaml
index 7e0f73a898..9852d2febf 100644
--- a/dts/Bindings/power/supply/rohm,bd99954.yaml
+++ b/dts/Bindings/power/supply/rohm,bd99954.yaml
@@ -112,6 +112,12 @@ properties:
# threshold, and the current is below this setting (7 in above chart)
# See also Documentation/devicetree/bindings/power/supply/battery.txt
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
monitored-battery:
description:
phandle of battery characteristics devicetree node
@@ -137,6 +143,8 @@ properties:
required:
- compatible
+additionalProperties: false
+
examples:
- |
i2c {
diff --git a/dts/Bindings/power/supply/summit,smb347-charger.yaml b/dts/Bindings/power/supply/summit,smb347-charger.yaml
new file mode 100644
index 0000000000..193a23af20
--- /dev/null
+++ b/dts/Bindings/power/supply/summit,smb347-charger.yaml
@@ -0,0 +1,152 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/supply/summit,smb347-charger.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Battery charger driver for SMB345, SMB347 and SMB358
+
+maintainers:
+ - David Heidelberg <david@ixit.cz>
+ - Dmitry Osipenko <digetx@gmail.com>
+
+properties:
+ compatible:
+ enum:
+ - summit,smb345
+ - summit,smb347
+ - summit,smb358
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ monitored-battery:
+ description: phandle to the battery node
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ summit,enable-usb-charging:
+ type: boolean
+ description: Enable charging through USB.
+
+ summit,enable-otg-charging:
+ type: boolean
+ description: Provide power for USB OTG
+
+ summit,enable-mains-charging:
+ type: boolean
+ description: Enable charging through mains
+
+ summit,enable-charge-control:
+ description: Enable charging control
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # SMB3XX_CHG_ENABLE_SW SW (I2C interface)
+ - 1 # SMB3XX_CHG_ENABLE_PIN_ACTIVE_LOW Pin control (Active Low)
+ - 2 # SMB3XX_CHG_ENABLE_PIN_ACTIVE_HIGH Pin control (Active High)
+
+ summit,fast-voltage-threshold-microvolt:
+ description: Voltage threshold to transit to fast charge mode (in uV)
+ minimum: 2400000
+ maximum: 3000000
+
+ summit,mains-current-limit-microamp:
+ description: Maximum input current from AC/DC input (in uA)
+
+ summit,usb-current-limit-microamp:
+ description: Maximum input current from USB input (in uA)
+
+ summit,charge-current-compensation-microamp:
+ description: Charge current compensation (in uA)
+
+ summit,chip-temperature-threshold-celsius:
+ description: Chip temperature for thermal regulation in °C.
+ enum: [100, 110, 120, 130]
+
+ summit,soft-compensation-method:
+ description: Soft temperature limit compensation method
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # SMB3XX_SOFT_TEMP_COMPENSATE_NONE Compensation none
+ - 1 # SMB3XX_SOFT_TEMP_COMPENSATE_CURRENT Current compensation
+ - 2 # SMB3XX_SOFT_TEMP_COMPENSATE_VOLTAGE Voltage compensation
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ enum:
+ - summit,smb345
+ - summit,smb358
+
+ then:
+ properties:
+ summit,mains-current-limit-microamp:
+ enum: [ 300000, 500000, 700000, 1000000,
+ 1500000, 1800000, 2000000]
+
+ summit,usb-current-limit-microamp:
+ enum: [ 300000, 500000, 700000, 1000000,
+ 1500000, 1800000, 2000000]
+
+ summit,charge-current-compensation-microamp:
+ enum: [200000, 450000, 600000, 900000]
+
+ else:
+ properties:
+ summit,mains-current-limit-microamp:
+ enum: [ 300000, 500000, 700000, 900000, 1200000,
+ 1500000, 1800000, 2000000, 2200000, 2500000]
+
+ summit,usb-current-limit-microamp:
+ enum: [ 300000, 500000, 700000, 900000, 1200000,
+ 1500000, 1800000, 2000000, 2200000, 2500000]
+
+ summit,charge-current-compensation-microamp:
+ enum: [250000, 700000, 900000, 1200000]
+
+required:
+ - compatible
+ - reg
+
+anyOf:
+ - required:
+ - summit,enable-usb-charging
+ - required:
+ - summit,enable-otg-charging
+ - required:
+ - summit,enable-mains-charging
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/power/summit,smb347-charger.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ charger@7f {
+ compatible = "summit,smb347";
+ reg = <0x7f>;
+
+ summit,enable-charge-control = <SMB3XX_CHG_ENABLE_PIN_ACTIVE_HIGH>;
+ summit,chip-temperature-threshold-celsius = <110>;
+ summit,mains-current-limit-microamp = <2000000>;
+ summit,usb-current-limit-microamp = <500000>;
+ summit,enable-usb-charging;
+ summit,enable-mains-charging;
+
+ monitored-battery = <&battery>;
+ };
+ };
+
+ battery: battery-cell {
+ compatible = "simple-battery";
+ constant-charge-current-max-microamp = <1800000>;
+ operating-range-celsius = <0 45>;
+ alert-celsius = <3 42>;
+ };