Resguardo inicial

This commit is contained in:
lastdragon
2026-09-06 12:53:21 -06:00
parent 662efe3c2a
commit ad2088d178
94853 changed files with 43200404 additions and 0 deletions
@@ -0,0 +1,39 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/actions,s500-sps.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Actions Semi Owl Smart Power System (SPS)
maintainers:
- Andreas Färber <afaerber@suse.de>
- Manivannan Sadhasivam <mani@kernel.org>
properties:
compatible:
enum:
- actions,s500-sps
- actions,s700-sps
- actions,s900-sps
reg:
maxItems: 1
'#power-domain-cells':
const: 1
required:
- compatible
- reg
- '#power-domain-cells'
additionalProperties: false
examples:
- |
power-controller@b01b0100 {
compatible = "actions,s500-sps";
reg = <0xb01b0100 0x100>;
#power-domain-cells = <1>;
};
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/allwinner,sun20i-d1-ppu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner SoCs PPU power domain controller
maintainers:
- Samuel Holland <samuel@sholland.org>
description:
D1 and related SoCs contain a power domain controller for the CPUs, GPU, and
video-related hardware.
properties:
compatible:
enum:
- allwinner,sun8i-v853-ppu
- allwinner,sun20i-d1-ppu
- allwinner,sun55i-a523-pck-600
- allwinner,sun55i-a523-ppu
- allwinner,sun60i-a733-pck-600
reg:
maxItems: 1
clocks:
description: Bus Clock
maxItems: 1
resets:
maxItems: 1
'#power-domain-cells':
const: 1
required:
- compatible
- reg
- clocks
- '#power-domain-cells'
allOf:
- if:
properties:
compatible:
contains:
enum:
- allwinner,sun8i-v853-ppu
- allwinner,sun20i-d1-ppu
- allwinner,sun55i-a523-pck-600
- allwinner,sun55i-a523-ppu
then:
required:
- resets
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/sun20i-d1-r-ccu.h>
#include <dt-bindings/reset/sun20i-d1-r-ccu.h>
ppu: power-controller@7001000 {
compatible = "allwinner,sun20i-d1-ppu";
reg = <0x7001000 0x1000>;
clocks = <&r_ccu CLK_BUS_R_PPU>;
resets = <&r_ccu RST_BUS_R_PPU>;
#power-domain-cells = <1>;
};
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/allwinner,sun50i-h6-prcm-ppu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Allwinner SoCs PRCM power domain controller
maintainers:
- Andre Przywara <andre.przywara@arm.com>
description:
The Allwinner Power Reset Clock Management (PRCM) unit contains bits to
control a few power domains.
properties:
compatible:
enum:
- allwinner,sun50i-h6-prcm-ppu
- allwinner,sun50i-h616-prcm-ppu
- allwinner,sun55i-a523-prcm-ppu
reg:
maxItems: 1
'#power-domain-cells':
const: 1
required:
- compatible
- reg
- '#power-domain-cells'
additionalProperties: false
examples:
- |
prcm_ppu: power-controller@7010210 {
compatible = "allwinner,sun50i-h616-prcm-ppu";
reg = <0x7010210 0x10>;
#power-domain-cells = <1>;
};
@@ -0,0 +1,184 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 BayLibre, SAS
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/amlogic,meson-ee-pwrc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Meson Everything-Else Power Domains
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
description: |+
The Everything-Else Power Domains node should be the child of a syscon
node with the required property:
- compatible: Should be the following:
"amlogic,meson-gx-hhi-sysctrl", "simple-mfd", "syscon"
Refer to the bindings described in
Documentation/devicetree/bindings/mfd/syscon.yaml
properties:
compatible:
enum:
- amlogic,meson8-pwrc
- amlogic,meson8b-pwrc
- amlogic,meson8m2-pwrc
- amlogic,meson-gxbb-pwrc
- amlogic,meson-axg-pwrc
- amlogic,meson-g12a-pwrc
- amlogic,meson-sm1-pwrc
clocks:
minItems: 1
maxItems: 2
clock-names:
minItems: 1
items:
- const: vpu
- const: vapb
resets:
minItems: 5
maxItems: 12
reset-names:
minItems: 5
maxItems: 12
"#power-domain-cells":
const: 1
amlogic,ao-sysctrl:
description: phandle to the AO sysctrl node
$ref: /schemas/types.yaml#/definitions/phandle
allOf:
- if:
properties:
compatible:
enum:
- amlogic,meson8b-pwrc
- amlogic,meson8m2-pwrc
then:
properties:
reset-names:
items:
- const: dblk
- const: pic_dc
- const: hdmi_apb
- const: hdmi_system
- const: venci
- const: vencp
- const: vdac
- const: vencl
- const: viu
- const: venc
- const: rdma
required:
- resets
- reset-names
- if:
properties:
compatible:
enum:
- amlogic,meson-gxbb-pwrc
then:
properties:
reset-names:
items:
- const: viu
- const: venc
- const: vcbus
- const: bt656
- const: dvin
- const: rdma
- const: venci
- const: vencp
- const: vdac
- const: vdi6
- const: vencl
- const: vid_lock
required:
- resets
- reset-names
- if:
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:
properties:
reset-names:
items:
- const: viu
- const: venc
- const: vcbus
- const: bt656
- const: rdma
- const: venci
- const: vencp
- const: vdac
- const: vdi6
- const: vencl
- const: vid_lock
required:
- resets
- reset-names
required:
- compatible
- clocks
- clock-names
- "#power-domain-cells"
- amlogic,ao-sysctrl
additionalProperties: false
examples:
- |
pwrc: power-controller {
compatible = "amlogic,meson-sm1-pwrc";
#power-domain-cells = <1>;
amlogic,ao-sysctrl = <&rti>;
resets = <&reset_viu>,
<&reset_venc>,
<&reset_vcbus>,
<&reset_bt656>,
<&reset_rdma>,
<&reset_venci>,
<&reset_vencp>,
<&reset_vdac>,
<&reset_vdi6>,
<&reset_vencl>,
<&reset_vid_lock>;
reset-names = "viu", "venc", "vcbus", "bt656",
"rdma", "venci", "vencp", "vdac",
"vdi6", "vencl", "vid_lock";
clocks = <&clk_vpu>, <&clk_vapb>;
clock-names = "vpu", "vapb";
};
@@ -0,0 +1,63 @@
Amlogic Meson Power Controller (deprecated)
===========================================
The Amlogic Meson SoCs embeds an internal Power domain controller.
VPU Power Domain
----------------
The Video Processing Unit power domain is controlled by this power controller,
but the domain requires some external resources to meet the correct power
sequences.
The bindings must respect the power domain bindings as described in the file
power-domain.yaml
Device Tree Bindings:
---------------------
Required properties:
- compatible: should be one of the following :
- "amlogic,meson-gx-pwrc-vpu" for the Meson GX SoCs
- "amlogic,meson-g12a-pwrc-vpu" for the Meson G12A SoCs
- #power-domain-cells: should be 0
- amlogic,hhi-sysctrl: phandle to the HHI sysctrl node
- resets: phandles to the reset lines needed for this power demain sequence
as described in ../reset/reset.txt
- clocks: from common clock binding: handle to VPU and VAPB clocks
- clock-names: from common clock binding: must contain "vpu", "vapb"
corresponding to entry in the clocks property.
Parent node should have the following properties :
- compatible: "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd"
- reg: base address and size of the AO system control register space.
Example:
-------
ao_sysctrl: sys-ctrl@0 {
compatible = "amlogic,meson-gx-ao-sysctrl", "syscon", "simple-mfd";
reg = <0x0 0x0 0x0 0x100>;
pwrc_vpu: power-controller-vpu {
compatible = "amlogic,meson-gx-pwrc-vpu";
#power-domain-cells = <0>;
amlogic,hhi-sysctrl = <&sysctrl>;
resets = <&reset RESET_VIU>,
<&reset RESET_VENC>,
<&reset RESET_VCBUS>,
<&reset RESET_BT656>,
<&reset RESET_DVIN_RESET>,
<&reset RESET_RDMA>,
<&reset RESET_VENCI>,
<&reset RESET_VENCP>,
<&reset RESET_VDAC>,
<&reset RESET_VDI6>,
<&reset RESET_VENCL>,
<&reset RESET_VID_LOCK>;
clocks = <&clkc CLKID_VPU>,
<&clkc CLKID_VAPB>;
clock-names = "vpu", "vapb";
};
};
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: (GPL-2.0+ OR MIT)
# Copyright (c) 2019 Amlogic, Inc
# Author: Jianxin Pan <jianxin.pan@amlogic.com>
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/amlogic,meson-sec-pwrc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Meson Secure Power Domains
maintainers:
- Jianxin Pan <jianxin.pan@amlogic.com>
description: |+
Secure Power Domains used in Meson A1/C1/S4 & C3/T7 SoCs, and should be the child node
of secure-monitor.
properties:
compatible:
enum:
- amlogic,meson-a1-pwrc
- amlogic,meson-s4-pwrc
- amlogic,a4-pwrc
- amlogic,a5-pwrc
- amlogic,c3-pwrc
- amlogic,t7-pwrc
- amlogic,s6-pwrc
- amlogic,s7-pwrc
- amlogic,s7d-pwrc
"#power-domain-cells":
const: 1
required:
- compatible
- "#power-domain-cells"
additionalProperties: false
examples:
- |
secure-monitor {
compatible = "amlogic,meson-gxbb-sm";
pwrc: power-controller {
compatible = "amlogic,meson-a1-pwrc";
#power-domain-cells = <1>;
};
};
@@ -0,0 +1,92 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/apple,pmgr-pwrstate.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Apple SoC PMGR Power States
maintainers:
- Hector Martin <marcan@marcan.st>
allOf:
- $ref: power-domain.yaml#
description: |
Apple SoCs include PMGR blocks responsible for power management,
which can control various clocks, resets, power states, and
performance features. This binding describes the device power
state registers, which control power states and resets.
Each instance of a power controller within the PMGR syscon node
represents a generic power domain provider, as documented in
Documentation/devicetree/bindings/power/power-domain.yaml.
The provider controls a single SoC block. The power hierarchy is
represented via power-domains relationships between these nodes.
See Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml
for the top-level PMGR node documentation.
properties:
compatible:
oneOf:
- items:
- enum:
# Do not add additional SoC to this list.
- apple,s5l8960x-pmgr-pwrstate
- apple,t7000-pmgr-pwrstate
- apple,s8000-pmgr-pwrstate
- apple,t8010-pmgr-pwrstate
- apple,t8015-pmgr-pwrstate
- apple,t8103-pmgr-pwrstate
- apple,t8112-pmgr-pwrstate
- apple,t6000-pmgr-pwrstate
- const: apple,pmgr-pwrstate
- items:
- enum:
- apple,t6020-pmgr-pwrstate
- apple,t8122-pmgr-pwrstate
- const: apple,t8103-pmgr-pwrstate
reg:
maxItems: 1
"#power-domain-cells":
const: 0
"#reset-cells":
const: 0
power-domains:
description:
Reference to parent power domains. A domain may have multiple parents,
and all will be powered up when it is powered.
minItems: 1
maxItems: 8 # Arbitrary, should be enough
label:
description:
Specifies the name of the SoC domain being controlled. This is used to
name the power/reset domains.
apple,always-on:
description:
Forces this power domain to always be powered up.
type: boolean
apple,min-state:
description:
Specifies the minimum power state for auto-PM.
0 = power gated, 4 = clock gated, 15 = on.
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
required:
- compatible
- reg
- "#power-domain-cells"
- "#reset-cells"
- label
additionalProperties: false
@@ -0,0 +1,161 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/avs/qcom,cpr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm Core Power Reduction (CPR)
maintainers:
- Niklas Cassel <nks@flawful.org>
description: |
CPR (Core Power Reduction) is a technology to reduce core power on a CPU
or other device. Each OPP of a device corresponds to a "corner" that has
a range of valid voltages for a particular frequency. While the device is
running at a particular frequency, CPR monitors dynamic factors such as
temperature, etc. and suggests adjustments to the voltage to save power
and meet silicon characteristic requirements.
properties:
compatible:
items:
- enum:
- qcom,qcs404-cpr
- const: qcom,cpr
reg:
description: Base address and size of the RBCPR register region.
maxItems: 1
interrupts:
maxItems: 1
clocks:
items:
- description: Reference clock.
clock-names:
items:
- const: ref
vdd-apc-supply:
description: APC regulator supply.
'#power-domain-cells':
const: 0
operating-points-v2:
description: |
A phandle to the OPP table containing the performance states
supported by the CPR power domain.
acc-syscon:
$ref: /schemas/types.yaml#/definitions/phandle
description: A phandle to the syscon used for writing ACC settings.
nvmem-cells:
items:
- description: Corner 1 quotient offset
- description: Corner 2 quotient offset
- description: Corner 3 quotient offset
- description: Corner 1 initial voltage
- description: Corner 2 initial voltage
- description: Corner 3 initial voltage
- description: Corner 1 quotient
- description: Corner 2 quotient
- description: Corner 3 quotient
- description: Corner 1 ring oscillator
- description: Corner 2 ring oscillator
- description: Corner 3 ring oscillator
- description: Fuse revision
nvmem-cell-names:
items:
- const: cpr_quotient_offset1
- const: cpr_quotient_offset2
- const: cpr_quotient_offset3
- const: cpr_init_voltage1
- const: cpr_init_voltage2
- const: cpr_init_voltage3
- const: cpr_quotient1
- const: cpr_quotient2
- const: cpr_quotient3
- const: cpr_ring_osc1
- const: cpr_ring_osc2
- const: cpr_ring_osc3
- const: cpr_fuse_revision
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- vdd-apc-supply
- '#power-domain-cells'
- operating-points-v2
- nvmem-cells
- nvmem-cell-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
cpr_opp_table: opp-table-cpr {
compatible = "operating-points-v2-qcom-level";
cpr_opp1: opp1 {
opp-level = <1>;
qcom,opp-fuse-level = <1>;
};
cpr_opp2: opp2 {
opp-level = <2>;
qcom,opp-fuse-level = <2>;
};
cpr_opp3: opp3 {
opp-level = <3>;
qcom,opp-fuse-level = <3>;
};
};
power-controller@b018000 {
compatible = "qcom,qcs404-cpr", "qcom,cpr";
reg = <0x0b018000 0x1000>;
interrupts = <0 15 IRQ_TYPE_EDGE_RISING>;
clocks = <&xo_board>;
clock-names = "ref";
vdd-apc-supply = <&pms405_s3>;
#power-domain-cells = <0>;
operating-points-v2 = <&cpr_opp_table>;
acc-syscon = <&tcsr>;
nvmem-cells = <&cpr_efuse_quot_offset1>,
<&cpr_efuse_quot_offset2>,
<&cpr_efuse_quot_offset3>,
<&cpr_efuse_init_voltage1>,
<&cpr_efuse_init_voltage2>,
<&cpr_efuse_init_voltage3>,
<&cpr_efuse_quot1>,
<&cpr_efuse_quot2>,
<&cpr_efuse_quot3>,
<&cpr_efuse_ring1>,
<&cpr_efuse_ring2>,
<&cpr_efuse_ring3>,
<&cpr_efuse_revision>;
nvmem-cell-names = "cpr_quotient_offset1",
"cpr_quotient_offset2",
"cpr_quotient_offset3",
"cpr_init_voltage1",
"cpr_init_voltage2",
"cpr_init_voltage3",
"cpr_quotient1",
"cpr_quotient2",
"cpr_quotient3",
"cpr_ring_osc1",
"cpr_ring_osc2",
"cpr_ring_osc3",
"cpr_fuse_revision";
};
@@ -0,0 +1,51 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/brcm,bcm-pmb.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom PMB (Power Management Bus) controller
description: This document describes Broadcom's PMB controller. It supports
powering various types of connected devices (e.g. PCIe, USB, SATA).
maintainers:
- Rafał Miłecki <rafal@milecki.pl>
properties:
compatible:
enum:
- brcm,bcm4908-pmb
- brcm,bcm63138-pmb
reg:
description: register space of one or more buses
maxItems: 1
big-endian:
$ref: /schemas/types.yaml#/definitions/flag
description: Flag to use for block working in big endian mode.
"#power-domain-cells":
description: cell specifies device ID (see bcm-pmb.h)
const: 1
required:
- reg
- "#power-domain-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/soc/bcm-pmb.h>
pmb: power-controller@802800e0 {
compatible = "brcm,bcm4908-pmb";
reg = <0x802800e0 0x40>;
#power-domain-cells = <1>;
};
foo {
power-domains = <&pmb BCM_PMB_PCIE0>;
};
@@ -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>;
};
@@ -0,0 +1,81 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/domain-idle-state.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: PM Domain Idle States
maintainers:
- Ulf Hansson <ulf.hansson@linaro.org>
description:
A domain idle state node represents the state parameters that will be used to
select the state when there are no active components in the PM domain.
properties:
$nodename:
const: domain-idle-states
patternProperties:
"^(cpu|cluster|domain)-":
type: object
additionalProperties: false
description:
Each state node represents a domain idle state description.
properties:
compatible:
const: domain-idle-state
entry-latency-us:
description:
The worst case latency in microseconds required to enter the idle
state. Note that, the exit-latency-us duration may be guaranteed only
after the entry-latency-us has passed.
exit-latency-us:
description:
The worst case latency in microseconds required to exit the idle
state.
min-residency-us:
description:
The minimum residency duration in microseconds after which the idle
state will yield power benefits, after overcoming the overhead while
entering the idle state.
arm,psci-suspend-param:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
power_state parameter to pass to the ARM PSCI suspend call.
Device tree nodes that require usage of PSCI CPU_SUSPEND function
(i.e. idle states node with entry-method property is set to "psci")
must specify this property.
idle-state-name:
$ref: /schemas/types.yaml#/definitions/string
description:
A string used as a descriptive name for the idle state.
required:
- compatible
- entry-latency-us
- exit-latency-us
- min-residency-us
additionalProperties: false
examples:
- |
domain-idle-states {
domain_retention: domain-retention {
compatible = "domain-idle-state";
entry-latency-us = <20>;
exit-latency-us = <40>;
min-residency-us = <80>;
};
};
...
@@ -0,0 +1,151 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/fsl,imx-gpc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX General Power Controller
maintainers:
- Philipp Zabel <p.zabel@pengutronix.de>
description: |
The i.MX6 General Power Control (GPC) block contains DVFS load tracking
counters and Power Gating Control (PGC).
The power domains are generic power domain providers as documented in
Documentation/devicetree/bindings/power/power-domain.yaml. They are
described as subnodes of the power gating controller 'pgc' node of the GPC.
IP cores belonging to a power domain should contain a 'power-domains'
property that is a phandle pointing to the power domain the device belongs
to.
properties:
compatible:
oneOf:
- enum:
- fsl,imx6q-gpc
- items:
- enum:
- fsl,imx6qp-gpc
- fsl,imx6sl-gpc
- fsl,imx6sll-gpc
- fsl,imx6sx-gpc
- fsl,imx6ul-gpc
- const: fsl,imx6q-gpc
reg:
maxItems: 1
"#address-cells":
const: 0
interrupts:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 3
clocks:
maxItems: 1
clock-names:
const: ipg
pgc:
type: object
additionalProperties: false
description: list of power domains provided by this controller.
properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"power-domain@[0-9]$":
type: object
additionalProperties: false
properties:
'#power-domain-cells':
const: 0
reg:
description: |
The following DOMAIN_INDEX values are valid for i.MX6Q:
ARM_DOMAIN 0
PU_DOMAIN 1
The following additional DOMAIN_INDEX value is valid for i.MX6SL:
DISPLAY_DOMAIN 2
The following additional DOMAIN_INDEX value is valid for i.MX6SX:
PCI_DOMAIN 3
maxItems: 1
clocks:
description: |
A number of phandles to clocks that need to be enabled during domain
power-up sequencing to ensure reset propagation into devices located
inside this power domain.
minItems: 1
maxItems: 7
power-supply: true
required:
- '#power-domain-cells'
- reg
required:
- '#address-cells'
- '#size-cells'
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- pgc
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/imx6qdl-clock.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpc@20dc000 {
compatible = "fsl,imx6q-gpc";
reg = <0x020dc000 0x4000>;
interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_IPG>;
clock-names = "ipg";
pgc {
#address-cells = <1>;
#size-cells = <0>;
power-domain@0 {
reg = <0>;
#power-domain-cells = <0>;
};
pd_pu: power-domain@1 {
reg = <1>;
#power-domain-cells = <0>;
power-supply = <&reg_pu>;
clocks = <&clks IMX6QDL_CLK_GPU3D_CORE>,
<&clks IMX6QDL_CLK_GPU3D_SHADER>,
<&clks IMX6QDL_CLK_GPU2D_CORE>,
<&clks IMX6QDL_CLK_GPU2D_AXI>,
<&clks IMX6QDL_CLK_OPENVG_AXI>,
<&clks IMX6QDL_CLK_VPU_AXI>;
};
};
};
@@ -0,0 +1,144 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/fsl,imx-gpcv2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Freescale i.MX General Power Controller v2
maintainers:
- Andrey Smirnov <andrew.smirnov@gmail.com>
description: |
The i.MX7S/D General Power Control (GPC) block contains Power Gating
Control (PGC) for various power domains.
Power domains contained within GPC node are generic power domain
providers, documented in
Documentation/devicetree/bindings/power/power-domain.yaml, which are
described as subnodes of the power gating controller 'pgc' node.
IP cores belonging to a power domain should contain a 'power-domains'
property that is a phandle for PGC node representing the domain.
properties:
compatible:
enum:
- fsl,imx7d-gpc
- fsl,imx8mn-gpc
- fsl,imx8mq-gpc
- fsl,imx8mm-gpc
- fsl,imx8mp-gpc
reg:
maxItems: 1
interrupts:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 3
pgc:
type: object
additionalProperties: false
description: list of power domains provided by this controller.
properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
patternProperties:
"power-domain@[0-9a-f]+$":
type: object
additionalProperties: false
properties:
'#power-domain-cells':
const: 0
reg:
description: |
Power domain index. Valid values are defined in
include/dt-bindings/power/imx7-power.h for fsl,imx7d-gpc and
include/dt-bindings/power/imx8m-power.h for fsl,imx8mq-gpc
include/dt-bindings/power/imx8mm-power.h for fsl,imx8mm-gpc
include/dt-bindings/power/imx8mp-power.h for fsl,imx8mp-gpc
maxItems: 1
clocks:
description: |
A number of phandles to clocks that need to be enabled during domain
power-up sequencing to ensure reset propagation into devices located
inside this power domain.
minItems: 1
maxItems: 5
power-supply: true
power-domains:
maxItems: 1
resets:
description: |
A number of phandles to resets that need to be asserted during
power-up sequencing of the domain. The resets belong to devices
located inside the power domain, which need to be held in reset
across the power-up sequence. So no means to specify what each
reset is in a generic power-domain binding.
minItems: 1
maxItems: 4
required:
- '#power-domain-cells'
- reg
required:
- '#address-cells'
- '#size-cells'
required:
- compatible
- reg
- interrupts
- pgc
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
gpc@303a0000 {
compatible = "fsl,imx7d-gpc";
reg = <0x303a0000 0x1000>;
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
pgc {
#address-cells = <1>;
#size-cells = <0>;
pgc_mipi_phy: power-domain@0 {
#power-domain-cells = <0>;
reg = <0>;
power-supply = <&reg_1p0d>;
};
pgc_pcie_phy: power-domain@1 {
#power-domain-cells = <0>;
reg = <1>;
power-supply = <&reg_1p0d>;
};
pgc_hsic_phy: power-domain@2 {
#power-domain-cells = <0>;
reg = <2>;
power-supply = <&reg_1p2>;
};
};
};
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/fsl,scu-pd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: i.MX SCU Client Device Node - Power Domain Based on SCU Message Protocol
maintainers:
- Dong Aisheng <aisheng.dong@nxp.com>
description: i.MX SCU Client Device Node
Client nodes are maintained as children of the relevant IMX-SCU device node.
Power domain bindings based on SCU Message Protocol
allOf:
- $ref: power-domain.yaml#
properties:
compatible:
items:
- enum:
- fsl,imx8dl-scu-pd
- fsl,imx8qm-scu-pd
- fsl,imx8qxp-scu-pd
- const: fsl,scu-pd
'#power-domain-cells':
const: 1
required:
- compatible
- '#power-domain-cells'
additionalProperties: false
examples:
- |
power-controller {
compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
#power-domain-cells = <1>;
};
@@ -0,0 +1,130 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/mediatek,mt8196-gpufreq.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek MFlexGraphics Power and Frequency Controller
maintainers:
- Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
description:
A special-purpose embedded MCU to control power and frequency of GPU devices
using MediaTek Flexible Graphics integration hardware.
properties:
$nodename:
pattern: '^power-controller@[a-f0-9]+$'
compatible:
enum:
- mediatek,mt8196-gpufreq
reg:
items:
- description: GPR memory area
- description: RPC memory area
- description: SoC variant ID register
reg-names:
items:
- const: gpr
- const: rpc
- const: hw-revision
clocks:
items:
- description: main clock of the embedded controller (EB)
- description: core PLL
- description: stack 0 PLL
- description: stack 1 PLL
clock-names:
items:
- const: eb
- const: core
- const: stack0
- const: stack1
mboxes:
items:
- description: FastDVFS events
- description: frequency control
- description: sleep control
- description: timer control
- description: frequency hopping control
- description: hardware voter control
- description: FastDVFS control
mbox-names:
items:
- const: fast-dvfs-event
- const: gpufreq
- const: sleep
- const: timer
- const: fhctl
- const: ccf
- const: fast-dvfs
memory-region:
items:
- description: phandle to the GPUEB shared memory
"#clock-cells":
const: 1
"#nvmem-cell-cells":
const: 0
"#power-domain-cells":
const: 0
shader-present:
type: object
dependencies:
shader-present: [ "#nvmem-cell-cells" ]
required:
- compatible
- reg
- reg-names
- clocks
- clock-names
- mboxes
- mbox-names
- memory-region
- "#clock-cells"
- "#power-domain-cells"
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/mediatek,mt8196-clock.h>
power-controller@4b09fd00 {
compatible = "mediatek,mt8196-gpufreq";
reg = <0x4b09fd00 0x80>,
<0x4b800000 0x1000>,
<0x4b860128 0x4>;
reg-names = "gpr", "rpc", "hw-revision";
clocks = <&topckgen CLK_TOP_MFG_EB>,
<&mfgpll CLK_MFG_AO_MFGPLL>,
<&mfgpll_sc0 CLK_MFGSC0_AO_MFGPLL_SC0>,
<&mfgpll_sc1 CLK_MFGSC1_AO_MFGPLL_SC1>;
clock-names = "eb", "core", "stack0", "stack1";
mboxes = <&gpueb_mbox 0>, <&gpueb_mbox 1>, <&gpueb_mbox 2>,
<&gpueb_mbox 3>, <&gpueb_mbox 4>, <&gpueb_mbox 5>,
<&gpueb_mbox 7>;
mbox-names = "fast-dvfs-event", "gpufreq", "sleep", "timer", "fhctl",
"ccf", "fast-dvfs";
memory-region = <&gpueb_shared_memory>;
#clock-cells = <1>;
#nvmem-cell-cells = <0>;
#power-domain-cells = <0>;
shader-present {
};
};
@@ -0,0 +1,269 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/mediatek,power-controller.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mediatek Power Domains Controller
maintainers:
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
- Matthias Brugger <mbrugger@suse.com>
description: |
Mediatek processors include support for multiple power domains which can be
powered up/down by software based on different application scenes to save power.
IP cores belonging to a power domain should contain a 'power-domains'
property that is a phandle for SCPSYS node representing the domain.
properties:
$nodename:
pattern: '^power-controller(@[0-9a-f]+)?$'
compatible:
enum:
- mediatek,mt6735-power-controller
- mediatek,mt6795-power-controller
- mediatek,mt6893-power-controller
- mediatek,mt8167-power-controller
- mediatek,mt8173-power-controller
- mediatek,mt8183-power-controller
- mediatek,mt8186-power-controller
- mediatek,mt8188-power-controller
- mediatek,mt8189-power-controller
- mediatek,mt8192-power-controller
- mediatek,mt8195-power-controller
- mediatek,mt8196-hwv-hfrp-power-controller
- mediatek,mt8196-hwv-scp-power-controller
- mediatek,mt8196-power-controller
- mediatek,mt8365-power-controller
'#power-domain-cells':
const: 1
'#address-cells':
const: 1
'#size-cells':
const: 0
access-controllers:
description:
A number of phandles to external blocks to set and clear the required
bits to enable or disable bus protection, necessary to avoid any bus
faults while enabling or disabling a power domain.
For example, this may hold phandles to INFRACFG and SMI.
minItems: 1
maxItems: 3
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/power-domain-node"
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/power-domain-node"
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/power-domain-node"
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/power-domain-node"
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/power-domain-node"
unevaluatedProperties: false
unevaluatedProperties: false
unevaluatedProperties: false
unevaluatedProperties: false
unevaluatedProperties: false
$defs:
power-domain-node:
type: object
description: |
Represents the power domains within the power controller node as documented
in Documentation/devicetree/bindings/power/power-domain.yaml.
properties:
'#power-domain-cells':
description:
Must be 0 for nodes representing a single PM domain and 1 for nodes
providing multiple PM domains.
'#address-cells':
const: 1
'#size-cells':
const: 0
reg:
description: |
Power domain index. Valid values are defined in:
"include/dt-bindings/power/mt6795-power.h" - for MT8167 type power domain.
"include/dt-bindings/power/mediatek,mt6893-power.h" - for MT6893 type power domain.
"include/dt-bindings/power/mt8167-power.h" - for MT8167 type power domain.
"include/dt-bindings/power/mt8173-power.h" - for MT8173 type power domain.
"include/dt-bindings/power/mt8183-power.h" - for MT8183 type power domain.
"include/dt-bindings/power/mediatek,mt8188-power.h" - for MT8188 type power domain.
"include/dt-bindings/power/mt8192-power.h" - for MT8192 type power domain.
"include/dt-bindings/power/mt8195-power.h" - for MT8195 type power domain.
"include/dt-bindings/power/mediatek,mt8365-power.h" - for MT8365 type power domain.
maxItems: 1
clocks:
description: |
A number of phandles to clocks that need to be enabled during domain
power-up sequencing.
clock-names:
description: |
List of names of clocks, in order to match the power-up sequencing
for each power domain we need to group the clocks by name. BASIC
clocks need to be enabled before enabling the corresponding power
domain, and should not have a '-' in their name (i.e mm, mfg, venc).
SUSBYS clocks need to be enabled before releasing the bus protection,
and should contain a '-' in their name (i.e mm-0, isp-0, cam-0).
In order to follow properly the power-up sequencing, the clocks must
be specified by order, adding first the BASIC clocks followed by the
SUSBSYS clocks.
domain-supply:
description: domain regulator supply.
mediatek,infracfg:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the INFRACFG register range.
deprecated: true
mediatek,infracfg-nao:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the INFRACFG-NAO register range.
deprecated: true
mediatek,smi:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the SMI register range.
deprecated: true
required:
- reg
required:
- compatible
allOf:
- if:
properties:
compatible:
contains:
enum:
- mediatek,mt8183-power-controller
- mediatek,mt8196-power-controller
then:
properties:
access-controllers:
minItems: 2
maxItems: 2
- if:
properties:
compatible:
contains:
enum:
- mediatek,mt8365-power-controller
then:
properties:
access-controllers:
minItems: 3
maxItems: 3
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/mt8173-clk.h>
#include <dt-bindings/power/mt8173-power.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
scpsys: syscon@10006000 {
compatible = "mediatek,mt8173-scpsys", "syscon", "simple-mfd";
reg = <0 0x10006000 0 0x1000>;
spm: power-controller {
compatible = "mediatek,mt8173-power-controller";
#address-cells = <1>;
#size-cells = <0>;
#power-domain-cells = <1>;
/* power domains of the SoC */
power-domain@MT8173_POWER_DOMAIN_VDEC {
reg = <MT8173_POWER_DOMAIN_VDEC>;
clocks = <&topckgen CLK_TOP_MM_SEL>;
clock-names = "mm";
#power-domain-cells = <0>;
};
power-domain@MT8173_POWER_DOMAIN_VENC {
reg = <MT8173_POWER_DOMAIN_VENC>;
clocks = <&topckgen CLK_TOP_MM_SEL>,
<&topckgen CLK_TOP_VENC_SEL>;
clock-names = "mm", "venc";
#power-domain-cells = <0>;
};
power-domain@MT8173_POWER_DOMAIN_ISP {
reg = <MT8173_POWER_DOMAIN_ISP>;
clocks = <&topckgen CLK_TOP_MM_SEL>;
clock-names = "mm";
#power-domain-cells = <0>;
};
power-domain@MT8173_POWER_DOMAIN_MM {
reg = <MT8173_POWER_DOMAIN_MM>;
clocks = <&topckgen CLK_TOP_MM_SEL>;
clock-names = "mm";
#power-domain-cells = <0>;
mediatek,infracfg = <&infracfg>;
};
power-domain@MT8173_POWER_DOMAIN_VENC_LT {
reg = <MT8173_POWER_DOMAIN_VENC_LT>;
clocks = <&topckgen CLK_TOP_MM_SEL>,
<&topckgen CLK_TOP_VENC_LT_SEL>;
clock-names = "mm", "venclt";
#power-domain-cells = <0>;
};
power-domain@MT8173_POWER_DOMAIN_AUDIO {
reg = <MT8173_POWER_DOMAIN_AUDIO>;
#power-domain-cells = <0>;
};
power-domain@MT8173_POWER_DOMAIN_USB {
reg = <MT8173_POWER_DOMAIN_USB>;
#power-domain-cells = <0>;
};
power-domain@MT8173_POWER_DOMAIN_MFG_ASYNC {
reg = <MT8173_POWER_DOMAIN_MFG_ASYNC>;
clocks = <&clk26m>;
clock-names = "mfg";
#address-cells = <1>;
#size-cells = <0>;
#power-domain-cells = <1>;
power-domain@MT8173_POWER_DOMAIN_MFG_2D {
reg = <MT8173_POWER_DOMAIN_MFG_2D>;
#address-cells = <1>;
#size-cells = <0>;
#power-domain-cells = <1>;
power-domain@MT8173_POWER_DOMAIN_MFG {
reg = <MT8173_POWER_DOMAIN_MFG>;
#power-domain-cells = <0>;
mediatek,infracfg = <&infracfg>;
};
};
};
};
};
};
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/mti,mips-cpc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MIPS Cluster Power Controller
description: |
Defines a location of the MIPS Cluster Power Controller registers.
maintainers:
- Paul Burton <paulburton@kernel.org>
properties:
compatible:
const: mti,mips-cpc
reg:
description: |
Base address and size of an unoccupied memory region, which will be
used to map the MIPS CPC registers block.
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
cpc@1bde0000 {
compatible = "mti,mips-cpc";
reg = <0x1bde0000 0x8000>;
};
...
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/pd-samsung.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Samsung Exynos SoC Power Domains
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |+
Exynos processors include support for multiple power domains which are used
to gate power to one or more peripherals on the processor.
allOf:
- $ref: power-domain.yaml#
properties:
compatible:
enum:
- samsung,exynos4210-pd
- samsung,exynos5433-pd
reg:
maxItems: 1
clocks:
deprecated: true
maxItems: 1
clock-names:
deprecated: true
maxItems: 1
label:
description:
Human readable string with domain name. Will be visible in userspace
to let user to distinguish between multiple domains in SoC.
"#power-domain-cells":
const: 0
power-domains:
maxItems: 1
required:
- compatible
- "#power-domain-cells"
- reg
unevaluatedProperties: false
examples:
- |
lcd0_pd: power-domain@10023c80 {
compatible = "samsung,exynos4210-pd";
reg = <0x10023c80 0x20>;
#power-domain-cells = <0>;
label = "LCD0";
};
mfc_pd: power-domain@10044060 {
compatible = "samsung,exynos4210-pd";
reg = <0x10044060 0x20>;
#power-domain-cells = <0>;
label = "MFC";
};
@@ -0,0 +1,17 @@
* Generic system power control capability
Power-management integrated circuits or miscellaneous hardware components are
sometimes able to control the system power. The device driver associated with these
components might need to define this capability, which tells the kernel that
it can be used to switch off the system. The corresponding device must have the
standard property "system-power-controller" in its device node. This property
marks the device as able to control the system power. In order to test if this
property is found programmatically, use the helper function
"of_device_is_system_power_controller" from of.h .
Example:
act8846: act8846@5 {
compatible = "active-semi,act8846";
system-power-controller;
}
@@ -0,0 +1,169 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/power-domain.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic PM domains
maintainers:
- Rafael J. Wysocki <rafael@kernel.org>
- Kevin Hilman <khilman@kernel.org>
- Ulf Hansson <ulf.hansson@linaro.org>
description: |+
System on chip designs are often divided into multiple PM domains that can be
used for power gating of selected IP blocks for power saving by reduced
leakage current. Moreover, in some cases the similar PM domains may also be
capable of scaling performance for a group of IP blocks.
This device tree binding can be used to bind PM domain consumer devices with
their PM domains provided by PM domain providers. A PM domain provider can be
represented by any node in the device tree and can provide one or more PM
domains. A consumer node can refer to the provider by a phandle and a set of
phandle arguments (so called PM domain specifiers) of length specified by the
\#power-domain-cells property in the PM domain provider node.
properties:
$nodename:
pattern: "^(power-controller|power-domain|performance-domain)([@-].*)?$"
domain-idle-states:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
maxItems: 1
description: |
Phandles of idle states that defines the available states for the
power-domain provider. The idle state definitions are compatible with the
domain-idle-state bindings, specified in ./domain-idle-state.yaml.
Note that, the domain-idle-state property reflects the idle states of this
PM domain and not the idle states of the devices or sub-domains in the PM
domain. Devices and sub-domains have their own idle states independent of
the parent domain's idle states. In the absence of this property, the
domain would be considered as capable of being powered-on or powered-off.
operating-points-v2:
description:
Phandles to the OPP tables of power domains that are capable of scaling
performance, provided by a power domain provider. If the provider provides
a single power domain only or all the power domains provided by the
provider have identical OPP tables, then this shall contain a single
phandle. Refer to ../opp/opp-v2-base.yaml for more information.
"#power-domain-cells":
description:
Number of cells in a PM domain specifier. Typically 0 for nodes
representing a single PM domain and 1 for nodes providing multiple PM
domains (e.g. power controllers), but can be any value as specified
by device tree binding documentation of particular provider.
power-domains:
description:
A phandle and PM domain specifier as defined by bindings of the power
controller specified by phandle. Some power domains might be powered
from another power domain (or have other hardware specific
dependencies). For representing such dependency a standard PM domain
consumer binding is used. When provided, all domains created
by the given provider should be subdomains of the domain specified
by this binding.
power-domains-child-ids:
$ref: /schemas/types.yaml#/definitions/uint32-array
description:
An array of child domain IDs that correspond to the power-domains
property. This property is only applicable to power domain providers
with "#power-domain-cells" > 0 (i.e., providers that supply multiple
power domains). It specifies which of the provider's child domains
should be associated with each parent domain listed in the power-domains
property. The number of elements in this array must match the number of
phandles in the power-domains property. Each element specifies the child
domain ID (index) that should be made a child domain of the corresponding
parent domain. This enables hierarchical power domain structures where
different child domains from the same provider can have different
parent domains.
required:
- "#power-domain-cells"
additionalProperties: true
examples:
- |
power: power-controller@12340000 {
compatible = "foo,power-controller";
reg = <0x12340000 0x1000>;
#power-domain-cells = <1>;
};
// The node above defines a power controller that is a PM domain provider and
// expects one cell as its phandle argument.
- |
parent2: power-controller@12340000 {
compatible = "foo,power-controller";
reg = <0x12340000 0x1000>;
#power-domain-cells = <1>;
};
child2: power-controller@12341000 {
compatible = "foo,power-controller";
reg = <0x12341000 0x1000>;
power-domains = <&parent2 0>;
#power-domain-cells = <1>;
};
// The nodes above define two power controllers: 'parent' and 'child'.
// Domains created by the 'child' power controller are subdomains of '0' power
// domain provided by the 'parent' power controller.
- |
parent3: power-controller@12340000 {
compatible = "foo,power-controller";
reg = <0x12340000 0x1000>;
#power-domain-cells = <0>;
domain-idle-states = <&DOMAIN_RET>, <&DOMAIN_PWR_DN>;
};
child3: power-controller@12341000 {
compatible = "foo,power-controller";
reg = <0x12341000 0x1000>;
power-domains = <&parent3>;
#power-domain-cells = <0>;
domain-idle-states = <&DOMAIN_PWR_DN>;
};
domain-idle-states {
DOMAIN_RET: domain-retention {
compatible = "domain-idle-state";
entry-latency-us = <1000>;
exit-latency-us = <2000>;
min-residency-us = <10000>;
};
DOMAIN_PWR_DN: domain-pwr-dn {
compatible = "domain-idle-state";
entry-latency-us = <5000>;
exit-latency-us = <8000>;
min-residency-us = <7000>;
};
};
- |
// Example: SCMI domain 15 -> MAIN_PD, SCMI domain 19 -> WKUP_PD
MAIN_PD: power-controller-main {
compatible = "foo,power-controller";
#power-domain-cells = <0>;
};
WKUP_PD: power-controller-wkup {
compatible = "foo,power-controller";
#power-domain-cells = <0>;
};
scmi_pds: power-controller-scmi {
compatible = "foo,power-controller";
#power-domain-cells = <1>;
power-domains = <&MAIN_PD>, <&WKUP_PD>;
power-domains-child-ids = <15>, <19>;
};
@@ -0,0 +1,112 @@
* Generic PM domains
System on chip designs are often divided into multiple PM domains that can be
used for power gating of selected IP blocks for power saving by reduced leakage
current.
This device tree binding can be used to bind PM domain consumer devices with
their PM domains provided by PM domain providers. A PM domain provider can be
represented by any node in the device tree and can provide one or more PM
domains. A consumer node can refer to the provider by a phandle and a set of
phandle arguments (so called PM domain specifiers) of length specified by the
#power-domain-cells property in the PM domain provider node.
==PM domain providers==
See power-domain.yaml.
==PM domain consumers==
Required properties:
- power-domains : A list of PM domain specifiers, as defined by bindings of
the power controller that is the PM domain provider.
Optional properties:
- power-domain-names : A list of power domain name strings sorted in the same
order as the power-domains property. Consumers drivers will use
power-domain-names to match power domains with power-domains
specifiers.
Example:
leaky-device@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 0>;
power-domain-names = "io";
};
leaky-device@12351000 {
compatible = "foo,i-leak-current";
reg = <0x12351000 0x1000>;
power-domains = <&power 0>, <&power 1> ;
power-domain-names = "io", "clk";
};
The first example above defines a typical PM domain consumer device, which is
located inside a PM domain with index 0 of a power controller represented by a
node with the label "power".
In the second example the consumer device are partitioned across two PM domains,
the first with index 0 and the second with index 1, of a power controller that
is represented by a node with the label "power".
Optional properties:
- required-opps: This contains phandle to an OPP node in another device's OPP
table. It may contain an array of phandles, where each phandle points to an
OPP of a different device. It should not contain multiple phandles to the OPP
nodes in the same OPP table. This specifies the minimum required OPP of the
device(s), whose OPP's phandle is present in this property, for the
functioning of the current device at the current OPP (where this property is
present).
Example:
- OPP table for domain provider that provides two domains.
domain0_opp_table: opp-table0 {
compatible = "operating-points-v2";
domain0_opp_0: opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <975000 970000 985000>;
};
domain0_opp_1: opp-1100000000 {
opp-hz = /bits/ 64 <1100000000>;
opp-microvolt = <1000000 980000 1010000>;
};
};
domain1_opp_table: opp-table1 {
compatible = "operating-points-v2";
domain1_opp_0: opp-1200000000 {
opp-hz = /bits/ 64 <1200000000>;
opp-microvolt = <975000 970000 985000>;
};
domain1_opp_1: opp-1300000000 {
opp-hz = /bits/ 64 <1300000000>;
opp-microvolt = <1000000 980000 1010000>;
};
};
power: power-controller@12340000 {
compatible = "foo,power-controller";
reg = <0x12340000 0x1000>;
#power-domain-cells = <1>;
operating-points-v2 = <&domain0_opp_table>, <&domain1_opp_table>;
};
leaky-device0@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 0>;
required-opps = <&domain0_opp_0>;
};
leaky-device1@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&power 1>;
required-opps = <&domain1_opp_1>;
};
[1]. Documentation/devicetree/bindings/power/domain-idle-state.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/qcom,kpss-acc-v2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) v2
maintainers:
- Christian Marangi <ansuelsmth@gmail.com>
description:
The KPSS ACC provides clock, power manager, and reset control to a Krait CPU.
There is one ACC register region per CPU within the KPSS remapped region as
well as an alias register region that remaps accesses to the ACC associated
with the CPU accessing the region. ACC v2 is currently used as a
power-manager for enabling the cpu.
properties:
compatible:
enum:
- qcom,kpss-acc-v2
- qcom,msm8916-acc
reg:
items:
- description: Base address and size of the register region
- description: Optional base address and size of the alias register region
minItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
power-manager@f9088000 {
compatible = "qcom,kpss-acc-v2";
reg = <0xf9088000 0x1000>,
<0xf9008000 0x1000>;
};
...
@@ -0,0 +1,222 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/qcom,rpmpd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm RPM/RPMh Power domains
maintainers:
- Bjorn Andersson <andersson@kernel.org>
description:
For RPM/RPMh Power domains, we communicate a performance state to RPM/RPMh
which then translates it into a corresponding voltage on a rail.
properties:
compatible:
oneOf:
- enum:
- qcom,eliza-rpmhpd
- qcom,glymur-rpmhpd
- qcom,hawi-rpmhpd
- qcom,kaanapali-rpmhpd
- qcom,mdm9607-rpmpd
- qcom,milos-rpmhpd
- qcom,msm8226-rpmpd
- qcom,msm8909-rpmpd
- qcom,msm8916-rpmpd
- qcom,msm8917-rpmpd
- qcom,msm8939-rpmpd
- qcom,msm8953-rpmpd
- qcom,msm8974-rpmpd
- qcom,msm8974pro-pma8084-rpmpd
- qcom,msm8976-rpmpd
- qcom,msm8994-rpmpd
- qcom,msm8996-rpmpd
- qcom,msm8998-rpmpd
- qcom,nord-rpmhpd
- qcom,qcm2290-rpmpd
- qcom,qcs404-rpmpd
- qcom,qcs615-rpmhpd
- qcom,qcs8300-rpmhpd
- qcom,qdu1000-rpmhpd
- qcom,qm215-rpmpd
- qcom,sa8155p-rpmhpd
- qcom,sa8540p-rpmhpd
- qcom,sa8775p-rpmhpd
- qcom,sar2130p-rpmhpd
- qcom,sc7180-rpmhpd
- qcom,sc7280-rpmhpd
- qcom,sc8180x-rpmhpd
- qcom,sc8280xp-rpmhpd
- qcom,sdm660-rpmpd
- qcom,sdm670-rpmhpd
- qcom,sdm845-rpmhpd
- qcom,sdx55-rpmhpd
- qcom,sdx65-rpmhpd
- qcom,sdx75-rpmhpd
- qcom,shikra-rpmpd
- qcom,sm4450-rpmhpd
- qcom,sm6115-rpmpd
- qcom,sm6125-rpmpd
- qcom,sm6350-rpmhpd
- qcom,sm6375-rpmpd
- qcom,sm7150-rpmhpd
- qcom,sm8150-rpmhpd
- qcom,sm8250-rpmhpd
- qcom,sm8350-rpmhpd
- qcom,sm8450-rpmhpd
- qcom,sm8550-rpmhpd
- qcom,sm8650-rpmhpd
- qcom,sm8750-rpmhpd
- qcom,x1e80100-rpmhpd
- items:
- enum:
- qcom,msm8937-rpmpd
- const: qcom,msm8917-rpmpd
'#power-domain-cells':
const: 1
operating-points-v2: true
opp-table:
type: object
required:
- compatible
- '#power-domain-cells'
- operating-points-v2
additionalProperties: false
examples:
- |
// Example 1 (rpmh power domain controller and OPP table):
#include <dt-bindings/power/qcom-rpmpd.h>
rpmhpd: power-controller {
compatible = "qcom,sdm845-rpmhpd";
#power-domain-cells = <1>;
operating-points-v2 = <&rpmhpd_opp_table>;
rpmhpd_opp_table: opp-table {
compatible = "operating-points-v2";
rpmhpd_opp_ret: opp1 {
opp-level = <RPMH_REGULATOR_LEVEL_RETENTION>;
};
rpmhpd_opp_min_svs: opp2 {
opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
};
rpmhpd_opp_low_svs: opp3 {
opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
};
rpmhpd_opp_svs: opp4 {
opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
};
rpmhpd_opp_svs_l1: opp5 {
opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
};
rpmhpd_opp_nom: opp6 {
opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
};
rpmhpd_opp_nom_l1: opp7 {
opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
};
rpmhpd_opp_nom_l2: opp8 {
opp-level = <RPMH_REGULATOR_LEVEL_NOM_L2>;
};
rpmhpd_opp_turbo: opp9 {
opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
};
rpmhpd_opp_turbo_l1: opp10 {
opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
};
};
};
- |
// Example 2 (rpm power domain controller and OPP table):
rpmpd: power-controller {
compatible = "qcom,msm8996-rpmpd";
#power-domain-cells = <1>;
operating-points-v2 = <&rpmpd_opp_table>;
rpmpd_opp_table: opp-table {
compatible = "operating-points-v2";
rpmpd_opp_low: opp1 {
opp-level = <1>;
};
rpmpd_opp_ret: opp2 {
opp-level = <2>;
};
rpmpd_opp_svs: opp3 {
opp-level = <3>;
};
rpmpd_opp_normal: opp4 {
opp-level = <4>;
};
rpmpd_opp_high: opp5 {
opp-level = <5>;
};
rpmpd_opp_turbo: opp6 {
opp-level = <6>;
};
};
};
- |
// Example 3 (Client/Consumer device using OPP table):
leaky-device0@12350000 {
compatible = "foo,i-leak-current";
reg = <0x12350000 0x1000>;
power-domains = <&rpmhpd 0>;
operating-points-v2 = <&leaky_opp_table>;
};
leaky_opp_table: opp-table {
compatible = "operating-points-v2";
opp1 {
opp-hz = /bits/ 64 <144000>;
required-opps = <&rpmhpd_opp_low>;
};
opp2 {
opp-hz = /bits/ 64 <400000>;
required-opps = <&rpmhpd_opp_ret>;
};
opp3 {
opp-hz = /bits/ 64 <20000000>;
required-opps = <&rpmpd_opp_svs>;
};
opp4 {
opp-hz = /bits/ 64 <25000000>;
required-opps = <&rpmpd_opp_normal>;
};
};
...
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/raspberrypi,bcm2835-power.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom BCM2835 power domain
maintainers:
- Alexander Aring <alex.aring@gmail.com>
- Florian Fainelli <florian.fainelli@broadcom.com>
description:
The Raspberry Pi power domain manages power for various subsystems
in the Raspberry Pi BCM2835 SoC.
properties:
compatible:
enum:
- raspberrypi,bcm2835-power
firmware:
$ref: /schemas/types.yaml#/definitions/phandle
description: Reference to the RPi firmware device node
"#power-domain-cells":
const: 1
required:
- compatible
- firmware
- "#power-domain-cells"
unevaluatedProperties: false
examples:
- |
power-controller {
compatible = "raspberrypi,bcm2835-power";
firmware = <&firmware>;
#power-domain-cells = <1>;
};
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/renesas,apmu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas Advanced Power Management Unit
maintainers:
- Geert Uytterhoeven <geert+renesas@glider.be>
- Magnus Damm <magnus.damm@gmail.com>
description:
Renesas R-Car Gen2 and RZ/G1 SoCs utilize one or more APMU hardware units for
CPU core power domain control including SMP boot and CPU Hotplug.
properties:
compatible:
items:
- enum:
- renesas,r8a7742-apmu # RZ/G1H
- renesas,r8a7743-apmu # RZ/G1M
- renesas,r8a7744-apmu # RZ/G1N
- renesas,r8a7745-apmu # RZ/G1E
- renesas,r8a77470-apmu # RZ/G1C
- renesas,r8a7790-apmu # R-Car H2
- renesas,r8a7791-apmu # R-Car M2-W
- renesas,r8a7792-apmu # R-Car V2H
- renesas,r8a7793-apmu # R-Car M2-N
- renesas,r8a7794-apmu # R-Car E2
- const: renesas,apmu
reg:
maxItems: 1
cpus:
minItems: 1
maxItems: 4
description: |
Array of phandles pointing to CPU cores, which should match the order of
CPU cores used by the WUPCR and PSTR registers in the Advanced Power
Management Unit section of the device's datasheet.
required:
- compatible
- reg
- cpus
additionalProperties: false
examples:
- |
apmu@e6152000 {
compatible = "renesas,r8a7791-apmu", "renesas,apmu";
reg = <0xe6152000 0x188>;
cpus = <&cpu0>, <&cpu1>;
};
@@ -0,0 +1,71 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/renesas,rcar-sysc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Car and RZ/G System Controller
maintainers:
- Geert Uytterhoeven <geert+renesas@glider.be>
- Magnus Damm <magnus.damm@gmail.com>
description: |
The R-Car (RZ/G) System Controller provides power management for the CPU
cores and various coprocessors.
The power domain IDs for consumers are defined in header files::
include/dt-bindings/power/r8*-sysc.h
properties:
compatible:
enum:
- renesas,r8a7742-sysc # RZ/G1H
- renesas,r8a7743-sysc # RZ/G1M
- renesas,r8a7744-sysc # RZ/G1N
- renesas,r8a7745-sysc # RZ/G1E
- renesas,r8a77470-sysc # RZ/G1C
- renesas,r8a774a1-sysc # RZ/G2M
- renesas,r8a774a3-sysc # RZ/G2M v3.0
- renesas,r8a774b1-sysc # RZ/G2N
- renesas,r8a774c0-sysc # RZ/G2E
- renesas,r8a774e1-sysc # RZ/G2H
- renesas,r8a7779-sysc # R-Car H1
- renesas,r8a7790-sysc # R-Car H2
- renesas,r8a7791-sysc # R-Car M2-W
- renesas,r8a7792-sysc # R-Car V2H
- renesas,r8a7793-sysc # R-Car M2-N
- renesas,r8a7794-sysc # R-Car E2
- renesas,r8a7795-sysc # R-Car H3
- renesas,r8a77961-sysc # R-Car M3-W+
- renesas,r8a77965-sysc # R-Car M3-N
- renesas,r8a7796-sysc # R-Car M3-W
- renesas,r8a77970-sysc # R-Car V3M
- renesas,r8a77980-sysc # R-Car V3H
- renesas,r8a77990-sysc # R-Car E3
- renesas,r8a77995-sysc # R-Car D3
- renesas,r8a779a0-sysc # R-Car V3U
- renesas,r8a779f0-sysc # R-Car S4-8
- renesas,r8a779g0-sysc # R-Car V4H
- renesas,r8a779h0-sysc # R-Car V4M
reg:
maxItems: 1
'#power-domain-cells':
const: 1
required:
- compatible
- reg
- '#power-domain-cells'
additionalProperties: false
examples:
- |
// System Controller node
sysc: system-controller@e6180000 {
compatible = "renesas,r8a7791-sysc";
reg = <0xe6180000 0x0200>;
#power-domain-cells = <1>;
};
@@ -0,0 +1,121 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/renesas,sysc-rmobile.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Renesas R-Mobile System Controller
maintainers:
- Geert Uytterhoeven <geert+renesas@glider.be>
- Magnus Damm <magnus.damm@gmail.com>
description: |
The R-Mobile System Controller provides the following functions:
- Boot mode management,
- Reset generation,
- Power management.
properties:
compatible:
items:
- enum:
- renesas,sysc-r8a73a4 # R-Mobile APE6
- renesas,sysc-r8a7740 # R-Mobile A1
- renesas,sysc-sh73a0 # SH-Mobile AG5
- const: renesas,sysc-rmobile # Generic SH/R-Mobile
reg:
items:
- description: Normally accessible register block
- description: Register block protected by the HPB semaphore
pm-domains:
type: object
description: |
This node contains a hierarchy of PM domain nodes, which should match the
Power Area Hierarchy in the Power Domain Specifications section of the
device's datasheet.
properties:
'#address-cells':
const: 1
'#size-cells':
const: 0
additionalProperties:
$ref: '#/$defs/pd-node'
required:
- compatible
- reg
- pm-domains
additionalProperties: false
$defs:
pd-node:
type: object
description:
PM domain node representing a PM domain. This node should be named by
the real power area name, and thus its name should be unique.
properties:
reg:
maxItems: 1
description:
If the PM domain is not always-on, this property must contain the
bit index number for the corresponding power area in the various
Power Control and Status Registers.
If the PM domain is always-on, this property must be omitted.
'#address-cells':
const: 1
'#size-cells':
const: 0
'#power-domain-cells':
const: 0
required:
- '#power-domain-cells'
additionalProperties:
$ref: '#/$defs/pd-node'
examples:
- |
// This shows a subset of the r8a7740 PM domain hierarchy, containing the
// C5 "always-on" domain, 2 of its subdomains (A4S and A4SU), and the A3SP
// domain, which is a subdomain of A4S.
sysc: system-controller@e6180000 {
compatible = "renesas,sysc-r8a7740", "renesas,sysc-rmobile";
reg = <0xe6180000 0x8000>, <0xe6188000 0x8000>;
pm-domains {
pd_c5: c5 {
#address-cells = <1>;
#size-cells = <0>;
#power-domain-cells = <0>;
pd_a4s: a4s@10 {
reg = <10>;
#address-cells = <1>;
#size-cells = <0>;
#power-domain-cells = <0>;
pd_a3sp: a3sp@11 {
reg = <11>;
#power-domain-cells = <0>;
};
};
pd_a4su: a4su@20 {
reg = <20>;
#power-domain-cells = <0>;
};
};
};
};
@@ -0,0 +1,40 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/apple,smc-reboot.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Apple SMC Reboot Controller
description:
The Apple System Management Controller (SMC) provides reboot functionality
on Apple Silicon SoCs. It uses NVMEM cells to store and track various
system state information related to boot, shutdown, and panic events.
maintainers:
- Sven Peter <sven@kernel.org>
properties:
compatible:
const: apple,smc-reboot
nvmem-cells:
items:
- description: Flag indicating shutdown (as opposed to reboot)
- description: Stage at which the boot process stopped (0x30 for normal boot)
- description: Counter for boot errors
- description: Counter for system panics
nvmem-cell-names:
items:
- const: shutdown_flag
- const: boot_stage
- const: boot_error_count
- const: panic_count
required:
- compatible
- nvmem-cells
- nvmem-cell-names
additionalProperties: false
@@ -0,0 +1,82 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/atmel,at91sam9260-shdwc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip AT91 SHDWC Shutdown Controller
maintainers:
- Claudiu Beznea <claudiu.beznea@microchip.com>
description: |
Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
and VDDCORE and the wake-up detection on debounced input lines.
properties:
compatible:
enum:
- atmel,at91sam9260-shdwc
- atmel,at91sam9rl-shdwc
- atmel,at91sam9x5-shdwc
reg:
maxItems: 1
clocks:
maxItems: 1
atmel,wakeup-mode:
description: operation mode of the wakeup mode
$ref: /schemas/types.yaml#/definitions/string
enum: [ none, high, low, any ]
atmel,wakeup-counter:
description: counter on wake-up 0
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
atmel,wakeup-rtt-timer:
description: enable real-time timer wake-up
type: boolean
atmel,wakeup-rtc-timer:
description: enable real-time clock wake-up
type: boolean
required:
- compatible
- reg
- clocks
allOf:
- if:
properties:
compatible:
contains:
const: atmel,at91sam9x5-shdwc
then:
properties:
atmel,wakeup-rtt-timer: false
- if:
properties:
compatible:
contains:
const: atmel,at91sam9260-shdwc
then:
properties:
atmel,wakeup-rtc-timer: false
additionalProperties: false
examples:
- |
shdwc: poweroff@fffffd10 {
compatible = "atmel,at91sam9260-shdwc";
reg = <0xfffffd10 0x10>;
clocks = <&clk32k>;
};
...
@@ -0,0 +1,122 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/atmel,sama5d2-shdwc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip AT91 SAMA5D2 SHDWC Shutdown Controller
maintainers:
- Claudiu Beznea <claudiu.beznea@microchip.com>
description: |
Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO
and VDDCORE and the wake-up detection on debounced input lines.
properties:
compatible:
oneOf:
- items:
- enum:
- microchip,sama7d65-shdwc
- const: microchip,sama7g5-shdwc
- const: syscon
- items:
- const: microchip,sama7g5-shdwc
- const: syscon
- enum:
- atmel,sama5d2-shdwc
- microchip,sam9x60-shdwc
- items:
- const: microchip,sam9x7-shdwc
- const: microchip,sam9x60-shdwc
reg:
maxItems: 1
clocks:
maxItems: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
debounce-delay-us:
description:
Minimum wake-up inputs debouncer period in microseconds. It is usually a
board-related property.
atmel,wakeup-rtc-timer:
description: enable real-time clock wake-up
type: boolean
atmel,wakeup-rtt-timer:
description: enable real-time timer wake-up
type: boolean
patternProperties:
"^input@[0-15]$":
description:
Wake-up input nodes. These are usually described in the "board" part of
the Device Tree. Note also that input 0 is linked to the wake-up pin and
is frequently used.
type: object
properties:
reg:
description: contains the wake-up input index
minimum: 0
maximum: 15
atmel,wakeup-active-high:
description:
The corresponding wake-up input described by the child forces the
wake-up of the core power supply on a high level. The default is to
be active low.
type: boolean
required:
- reg
additionalProperties: false
required:
- compatible
- reg
- clocks
allOf:
- if:
properties:
compatible:
contains:
const: atmel,sama5d2-shdwc
then:
properties:
atmel,wakeup-rtt-timer: false
additionalProperties: false
examples:
- |
shdwc: poweroff@f8048010 {
compatible = "atmel,sama5d2-shdwc";
reg = <0xf8048010 0x10>;
clocks = <&clk32k>;
#address-cells = <1>;
#size-cells = <0>;
atmel,wakeup-rtc-timer;
debounce-delay-us = <976>;
input@0 {
reg = <0>;
};
input@1 {
reg = <1>;
atmel,wakeup-active-high;
};
};
...
@@ -0,0 +1,20 @@
Axxia Restart Driver
This driver can do reset of the Axxia SoC. It uses the registers in the syscon
block to initiate a chip reset.
Required Properties:
-compatible: "lsi,axm55xx-reset"
-syscon: phandle to the syscon node.
Example:
syscon: syscon@2010030000 {
compatible = "lsi,axxia-syscon", "syscon";
reg = <0x20 0x10030000 0 0x2000>;
};
reset: reset@2010031000 {
compatible = "lsi,axm55xx-reset";
syscon = <&syscon>;
};
@@ -0,0 +1,31 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/brcm,bcm21664-resetmgr.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom Kona family reset manager
maintainers:
- Florian Fainelli <f.fainelli@gmail.com>
properties:
compatible:
const: brcm,bcm21664-resetmgr
reg:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
reset-controller@35001f00 {
compatible = "brcm,bcm21664-resetmgr";
reg = <0x35001f00 0x24>;
};
...
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/cortina,gemini-power-controller.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Cortina Systems Gemini Poweroff Controller
maintainers:
- Linus Walleij <linusw@kernel.org>
description: |
The Gemini power controller is a dedicated IP block in the Cortina Gemini SoC that
controls system power-down operations.
properties:
compatible:
const: cortina,gemini-power-controller
reg:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
poweroff@4b000000 {
compatible = "cortina,gemini-power-controller";
reg = <0x4b000000 0x100>;
interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
};
...
@@ -0,0 +1,65 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/gpio-poweroff.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO controlled power off
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: >
System power off support via a GPIO line. When a shutdown is
executed the operating system is expected to switch the GPIO
from inactive to active. After a delay (active-delay-ms) it
is expected to be switched back to inactive. After another
delay (inactive-delay-ms) it is configured as active again.
Finally the operating system assumes the power off failed if
the system is still running after waiting some time (timeout-ms).
allOf:
- $ref: restart-handler.yaml#
properties:
compatible:
const: gpio-poweroff
gpios:
maxItems: 1
input:
type: boolean
description: >
Initially configure the GPIO line as an input. Only reconfigure
it to an output when the power-off sequence is initiated. If this optional
property is not specified, the GPIO is initialized as an output in its inactive state.
active-delay-ms:
default: 100
description: Delay to wait after driving gpio active
inactive-delay-ms:
default: 100
description: Delay to wait after driving gpio inactive
priority:
default: 0
timeout-ms:
default: 3000
description: Time to wait before assuming the power off sequence failed.
required:
- compatible
- gpios
additionalProperties: false
examples:
- |
gpio-poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio 4 0>;
timeout-ms = <3000>;
};
@@ -0,0 +1,79 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/gpio-restart.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: GPIO controlled reset
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: >
Drive a GPIO line that can be used to restart the system from a restart handler.
This binding supports level and edge triggered reset. At driver load time, the driver will
request the given gpio line and install a restart handler. If the optional properties
'open-source' is not found, the GPIO line will be driven in the inactive state. Otherwise its
not driven until the restart is initiated.
When the system is restarted, the restart handler will be invoked in priority order. The GPIO
is configured as an output, and driven active, triggering a level triggered reset condition.
This will also cause an inactive->active edge condition, triggering positive edge triggered
reset. After a delay specified by active-delay, the GPIO is set to inactive, thus causing an
active->inactive edge, triggering negative edge triggered reset. After a delay specified by
inactive-delay, the GPIO is driven active again. After a delay specified by wait-delay, the
restart handler completes allowing other restart handlers to be attempted.
allOf:
- $ref: restart-handler.yaml#
properties:
compatible:
const: gpio-restart
gpios:
description: The GPIO to set high/low, see "gpios property" in
Documentation/devicetree/bindings/gpio/gpio.txt. If the pin should be low to reset the board
set it to "Active Low", otherwise set GPIO to "Active High".
open-source:
$ref: /schemas/types.yaml#/definitions/flag
description: Treat the GPIO as being open source and defer driving it to when the restart is
initiated. If this optional property is not specified, the GPIO is initialized as an output
in its inactive state.
priority:
default: 129
active-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description: Delay (default 100) to wait after driving gpio active [ms]
default: 100
inactive-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description: Delay (default 100) to wait after driving gpio inactive [ms]
default: 100
wait-delay:
$ref: /schemas/types.yaml#/definitions/uint32
description: Delay (default 3000) to wait after completing restart sequence [ms]
default: 100
additionalProperties: false
required:
- compatible
- gpios
examples:
- |
gpio-restart {
compatible = "gpio-restart";
gpios = <&gpio 4 0>;
priority = <128>;
active-delay = <100>;
inactive-delay = <100>;
wait-delay = <3000>;
};
@@ -0,0 +1,67 @@
* Device tree bindings for Texas Instruments keystone reset
This node is intended to allow SoC reset in case of software reset
of selected watchdogs.
The Keystone SoCs can contain up to 4 watchdog timers to reset
SoC. Each watchdog timer event input is connected to the Reset Mux
block. The Reset Mux block can be configured to cause reset or not.
Additionally soft or hard reset can be configured.
Required properties:
- compatible: ti,keystone-reset
- ti,syscon-pll: phandle/offset pair. The phandle to syscon used to
access pll controller registers and the offset to use
reset control registers.
- ti,syscon-dev: phandle/offset pair. The phandle to syscon used to
access device state control registers and the offset
in order to use mux block registers for all watchdogs.
Optional properties:
- ti,soft-reset: Boolean option indicating soft reset.
By default hard reset is used.
- ti,wdt-list: WDT list that can cause SoC reset. It's not related
to WDT driver, it's just needed to enable a SoC related
reset that's triggered by one of WDTs. The list is
in format: <0>, <2>; It can be in random order and
begins from 0 to 3, as keystone can contain up to 4 SoC
reset watchdogs and can be in random order.
Example 1:
Setup keystone reset so that in case software reset or
WDT0 is triggered it issues hard reset for SoC.
pllctrl: pll-controller@2310000 {
compatible = "ti,keystone-pllctrl", "syscon";
reg = <0x02310000 0x200>;
};
devctrl: device-state-control@2620000 {
compatible = "ti,keystone-devctrl", "syscon";
reg = <0x02620000 0x1000>;
};
rstctrl: reset-controller {
compatible = "ti,keystone-reset";
ti,syscon-pll = <&pllctrl 0xe4>;
ti,syscon-dev = <&devctrl 0x328>;
ti,wdt-list = <0>;
};
Example 2:
Setup keystone reset so that in case of software reset or
WDT0 or WDT2 is triggered it issues soft reset for SoC.
rstctrl: reset-controller {
compatible = "ti,keystone-reset";
ti,syscon-pll = <&pllctrl 0xe4>;
ti,syscon-dev = <&devctrl 0x328>;
ti,wdt-list = <0>, <2>;
ti,soft-reset;
};
@@ -0,0 +1,33 @@
Binding for the LTC2952 PowerPath controller
This chip is used to externally trigger a system shut down. Once the trigger has
been sent, the chip's watchdog has to be reset to gracefully shut down.
A full powerdown can be triggered via the kill signal.
Required properties:
- compatible: Must contain: "lltc,ltc2952"
- watchdog-gpios: phandle + gpio-specifier for the GPIO connected to the
chip's watchdog line
- kill-gpios: phandle + gpio-specifier for the GPIO connected to the
chip's kill line
Optional properties:
- trigger-gpios: phandle + gpio-specifier for the GPIO connected to the
chip's trigger line. If this property is not set, the
trigger function is ignored and the chip is kept alive
until an explicit kill signal is received
- trigger-delay-ms The number of milliseconds to wait after trigger line
assertion before executing shut down procedure.
The default is 2500ms.
Example:
ltc2952 {
compatible = "lltc,ltc2952";
trigger-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
trigger-delay-ms = <2000>;
watchdog-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
kill-gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
};
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/nvmem-reboot-mode.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic NVMEM reboot mode
maintainers:
- Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
description:
This driver gets the reboot mode magic value from the reboot-mode driver
and stores it in the NVMEM cell named "reboot-mode". The bootloader can
then read it and take different action according to the value.
properties:
compatible:
const: nvmem-reboot-mode
nvmem-cells:
description:
A phandle pointing to the nvmem-cells node where the vendor-specific
magic value representing the reboot mode is stored.
maxItems: 1
nvmem-cell-names:
items:
- const: reboot-mode
allOf:
- $ref: reboot-mode.yaml#
patternProperties:
"^mode-.*$":
maxItems: 1
required:
- compatible
- nvmem-cells
- nvmem-cell-names
unevaluatedProperties: false
examples:
- |
reboot-mode {
compatible = "nvmem-reboot-mode";
nvmem-cells = <&reboot_reason>;
nvmem-cell-names = "reboot-mode";
mode-recovery = <0x01>;
mode-bootloader = <0x02>;
};
...
@@ -0,0 +1,19 @@
Microsemi Ocelot reset controller
The DEVCPU_GCB:CHIP_REGS have a SOFT_RST register that can be used to reset the
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", "mscc,luton-chip-reset",
"mscc,jaguar2-chip-reset" or "microchip,sparx5-chip-reset"
Example:
reset@1070008 {
compatible = "mscc,ocelot-chip-reset";
reg = <0x1070008 0x4>;
};
@@ -0,0 +1,154 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm PON Device
maintainers:
- Vinod Koul <vkoul@kernel.org>
description: |
The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
and resin along with the Android reboot-mode.
This DT node has pwrkey and resin as sub nodes.
properties:
compatible:
enum:
- qcom,pm8916-pon
- qcom,pm8941-pon
- qcom,pms405-pon
- qcom,pm8998-pon
- qcom,pmk8350-pon
reg:
description: |
Specifies the SPMI base address for the PON (power-on) peripheral. For
PMICs that have the PON peripheral (GEN3) split into PON_HLOS and PON_PBS
(e.g. PMK8350), this can hold addresses of both PON_HLOS and PON_PBS
peripherals. In that case, the PON_PBS address needs to be specified to
facilitate software debouncing on some PMIC.
minItems: 1
maxItems: 2
reg-names:
minItems: 1
maxItems: 2
pwrkey:
type: object
$ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
resin:
type: object
$ref: /schemas/input/qcom,pm8941-pwrkey.yaml#
watchdog:
type: object
$ref: /schemas/watchdog/qcom,pm8916-wdt.yaml
required:
- compatible
- reg
patternProperties:
"^mode-.*$":
maxItems: 1
unevaluatedProperties: false
allOf:
- if:
properties:
compatible:
contains:
enum:
- qcom,pm8916-pon
- qcom,pms405-pon
- qcom,pm8998-pon
then:
allOf:
- $ref: reboot-mode.yaml#
properties:
reg:
maxItems: 1
reg-names:
items:
- const: pon
else:
patternProperties:
"^mode-.*$": false
# Special case for pm8941, which doesn't store reset mode
- if:
properties:
compatible:
contains:
const: qcom,pm8941-pon
then:
properties:
reg:
maxItems: 1
reg-names:
items:
- const: pon
- if:
properties:
compatible:
contains:
const: qcom,pmk8350-pon
then:
properties:
reg:
minItems: 1
maxItems: 2
reg-names:
minItems: 1
items:
- const: hlos
- const: pbs
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/input/linux-event-codes.h>
#include <dt-bindings/spmi/spmi.h>
spmi@c440000 {
reg = <0x0c440000 0x1100>;
#address-cells = <2>;
#size-cells = <0>;
pmic@0 {
reg = <0x0 SPMI_USID>;
#address-cells = <1>;
#size-cells = <0>;
pon@800 {
compatible = "qcom,pm8998-pon";
reg = <0x800>;
pwrkey {
compatible = "qcom,pm8941-pwrkey";
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_POWER>;
};
resin {
compatible = "qcom,pm8941-resin";
interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
debounce = <15625>;
bias-pull-up;
linux,code = <KEY_VOLUMEDOWN>;
};
};
};
};
...
@@ -0,0 +1,35 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/qcom,pshold.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm SoC restart and power off
maintainers:
- Bjorn Andersson <bjorn.andersson@linaro.org>
description:
A power supply hold (ps-hold) bit is set to power the Qualcomm chipsets.
Clearing that bit allows us to restart/power off. The difference between
power off and restart is determined by unique power manager IC settings.
properties:
compatible:
const: qcom,pshold
reg:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
reset-controller@fc4ab000 {
compatible = "qcom,pshold";
reg = <0xfc4ab000 0x4>;
};
@@ -0,0 +1,15 @@
* QNAP Power Off
QNAP NAS devices have a microcontroller controlling the main power
supply. This microcontroller is connected to UART1 of the Kirkwood and
Orion5x SoCs. Sending the character 'A', at 19200 baud, tells the
microcontroller to turn the power off.
Synology NAS devices use a similar scheme, but a different baud rate,
9600, and a different character, '1'.
Required Properties:
- compatible: Should be "qnap,power-off" or "synology,power-off"
- reg: Address and length of the register set for UART1
- clocks: tclk clock
@@ -0,0 +1,49 @@
# 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-array
description:
Default value to set on a reboot if no command was provided.
patternProperties:
"^mode-.*$":
$ref: /schemas/types.yaml#/definitions/uint32-array
additionalProperties: true
examples:
- |
reboot-mode {
mode-normal = <0>;
mode-recovery = <1>;
mode-bootloader = <2>;
mode-loader = <3>;
};
...
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/regulator-poweroff.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Force-disable power regulator to turn the power off.
maintainers:
- Michael Klein <michael@fossekall.de>
description: |
When the power-off handler is called, a power regulator is disabled by
calling regulator_force_disable(). If the power is still on and the
CPU still running after a 3000ms delay, a warning is emitted.
properties:
compatible:
const: regulator-poweroff
cpu-supply:
description:
regulator to disable on power-down
required:
- compatible
- cpu-supply
additionalProperties: false
examples:
- |
regulator-poweroff {
compatible = "regulator-poweroff";
cpu-supply = <&reg_vcc1v2>;
};
...
@@ -0,0 +1,30 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/restart-handler.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Restart and shutdown handler Common Properties
maintainers:
- Sebastian Reichel <sre@kernel.org>
description:
Restart and shutdown handler device is responsible for powering off the
system, e.g. my cutting off the power. System might have several restart
handlers, which usually are tried from most precise to last resort.
properties:
priority:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
A priority ranging from 0 to 255 according to the following guidelines::
0:: Restart handler of last resort, with limited restart capabilities.
128:: Typical, default restart handler; use if no other restart handler
is expected to be available, and/or if restart functionality is
sufficient to restart the entire system.
255:: Highest priority restart handler, will preempt all other restart handlers.
minimum: 0
maximum: 255
additionalProperties: true
@@ -0,0 +1,8 @@
* Restart Power Off
Buffalo Linkstation LS-XHL and LS-CHLv2, and other devices power off
by restarting and letting u-boot keep hold of the machine until the
user presses a button.
Required Properties:
- compatible: Should be "restart-poweroff"
@@ -0,0 +1,11 @@
*Device-Tree bindings for ST SW reset functionality
Required properties:
- compatible: should be "stih407-restart".
- st,syscfg: should be a phandle of the syscfg node.
Example node:
restart {
compatible = "st,stih407-restart";
st,syscfg = <&syscfg_sbc_reg>;
};
@@ -0,0 +1,72 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/syscon-poweroff.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic SYSCON mapped register poweroff driver
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: |+
This is a generic poweroff driver using syscon to map the poweroff register.
The poweroff is generally performed with a write to the poweroff register
defined by the register map pointed by syscon reference plus the offset
with the value and mask defined in the poweroff node.
Default will be little endian mode, 32 bit access only.
The SYSCON register map is normally retrieved from the parental dt-node. So
the SYSCON poweroff node should be represented as a sub-node of a "syscon",
"simple-mfd" node.
properties:
compatible:
const: syscon-poweroff
reg:
maxItems: 1
mask:
$ref: /schemas/types.yaml#/definitions/uint32
description: Update only the register bits defined by the mask (32 bit).
offset:
$ref: /schemas/types.yaml#/definitions/uint32
description: Offset in the register map for the poweroff register (in bytes).
regmap:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description:
Phandle to the register map node. This property is deprecated in favor of
the syscon-poweroff node being a child of a system controller node.
value:
$ref: /schemas/types.yaml#/definitions/uint32
description: The poweroff value written to the poweroff register (32 bit access).
required:
- compatible
anyOf:
- required: [offset]
- required: [reg]
additionalProperties: false
allOf:
- if:
not:
required:
- mask
then:
required:
- value
examples:
- |
poweroff {
compatible = "syscon-poweroff";
offset = <0x0>;
mask = <0x7a>;
};
@@ -0,0 +1,57 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/syscon-reboot-mode.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic SYSCON reboot mode driver
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: |
This driver gets reboot mode magic value from reboot-mode driver
and stores it in a SYSCON mapped register. Then the bootloader
can read it and take different action according to the magic
value stored. The SYSCON mapped register is retrieved from the
parental dt-node plus the offset. So the SYSCON reboot-mode node
should be represented as a sub-node of a "syscon", "simple-mfd" node.
properties:
compatible:
const: syscon-reboot-mode
mask:
$ref: /schemas/types.yaml#/definitions/uint32
description: Update only the register bits defined by the mask (32 bit)
offset:
$ref: /schemas/types.yaml#/definitions/uint32
description: Offset in the register map for the mode register (in bytes)
allOf:
- $ref: reboot-mode.yaml#
patternProperties:
"^mode-.*$":
maxItems: 1
unevaluatedProperties: false
required:
- compatible
- offset
examples:
- |
#include <dt-bindings/soc/rockchip,boot-mode.h>
reboot-mode {
compatible = "syscon-reboot-mode";
offset = <0x40>;
mode-normal = <BOOT_NORMAL>;
mode-recovery = <BOOT_RECOVERY>;
mode-bootloader = <BOOT_FASTBOOT>;
mode-loader = <BOOT_BL_DOWNLOAD>;
};
...
@@ -0,0 +1,98 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/syscon-reboot.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic SYSCON mapped register reset driver
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: |+
This is a generic reset driver using syscon to map the reset register.
The reset is generally performed with a write to the reset register
defined by the SYSCON register map base plus the offset with the value and
mask defined in the reboot node. Default will be little endian mode, 32 bit
access only. The SYSCON registers map is normally retrieved from the
parental dt-node. So the SYSCON reboot node should be represented as a
sub-node of a "syscon", "simple-mfd" node. Though the regmap property
pointing to the system controller node is also supported.
properties:
compatible:
enum:
- syscon-reboot
- google,gs101-reboot
mask:
$ref: /schemas/types.yaml#/definitions/uint32
description: Update only the register bits defined by the mask (32 bit).
offset:
$ref: /schemas/types.yaml#/definitions/uint32
description: Offset in the register map for the reboot register (in bytes).
reg:
maxItems: 1
description: Base address and size for the reboot register.
regmap:
$ref: /schemas/types.yaml#/definitions/phandle
deprecated: true
description: |
Phandle to the register map node. This property is deprecated in favor of
the syscon-reboot node been a child of a system controller node.
value:
$ref: /schemas/types.yaml#/definitions/uint32
description: The reset value written to the reboot register (32 bit access).
priority:
default: 192
required:
- compatible
additionalProperties: false
allOf:
- $ref: restart-handler.yaml#
- if:
properties:
compatible:
contains:
const: google,gs101-reboot
then:
properties:
mask: false
offset: false
reg: false
value: false
else:
if:
not:
required:
- mask
then:
required:
- value
anyOf:
- required: [offset]
- required: [reg]
examples:
- |
reboot {
compatible = "syscon-reboot";
regmap = <&regmapnode>;
offset = <0x0>;
mask = <0x1>;
};
- |
reboot {
compatible = "google,gs101-reboot";
};
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/toradex,smarc-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Toradex Embedded Controller
maintainers:
- Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
- Francesco Dolcini <francesco.dolcini@toradex.com>
description: |
The Toradex Embedded Controller (EC) is used on Toradex SMARC modules,
primarily to manage power and reset functionalities.
The EC provides the following functions:
- Reads the SMARC POWER_BTN# and RESET_IN# signals and controls the PMIC accordingly.
- Controls the SoC boot mode signals based on the SMARC BOOT_SEL# and FORCE_RECOV# inputs.
- Manages the CARRIER_STDBY# signal in response to relevant SoC signals.
The EC runs a small firmware, factory programmed into its internal flash, and communicates over I2C.
It allows software to control power-off and reset functionalities of the module.
properties:
compatible:
items:
- enum:
- toradex,smarc-imx95-ec
- toradex,smarc-imx8mp-ec
- const: toradex,smarc-ec
reg:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
reset-controller@28 {
compatible = "toradex,smarc-imx95-ec", "toradex,smarc-ec";
reg = <0x28>;
};
};
@@ -0,0 +1,82 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/reset/xlnx,zynqmp-power.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Xilinx Zynq MPSoC Power Management
maintainers:
- Michal Simek <michal.simek@amd.com>
description: |
The zynqmp-power node describes the power management configurations.
It will control remote suspend/shutdown interfaces.
properties:
compatible:
const: xlnx,zynqmp-power
interrupts:
maxItems: 1
mboxes:
description: |
Standard property to specify a Mailbox. Each value of
the mboxes property should contain a phandle to the
mailbox controller device node and an args specifier
that will be the phandle to the intended sub-mailbox
child node to be used for communication. See
Documentation/devicetree/bindings/mailbox/mailbox.txt
for more details about the generic mailbox controller
and client driver bindings. Also see
Documentation/devicetree/bindings/mailbox/ \
xlnx,zynqmp-ipi-mailbox.txt for typical controller that
is used to communicate with this System controllers.
items:
- description: tx channel
- description: rx channel
mbox-names:
description:
Name given to channels seen in the 'mboxes' property.
items:
- const: tx
- const: rx
required:
- compatible
additionalProperties: false
examples:
- |+
// Example with interrupt method:
firmware {
zynqmp-firmware {
power-management {
compatible = "xlnx,zynqmp-power";
interrupts = <0 35 4>;
};
};
};
- |+
// Example with IPI mailbox method:
firmware {
zynqmp-firmware {
power-management {
compatible = "xlnx,zynqmp-power";
interrupt-parent = <&gic>;
interrupts = <0 35 4>;
mboxes = <&ipi_mailbox_pmu1 0>,
<&ipi_mailbox_pmu1 1>;
mbox-names = "tx", "rx";
};
};
};
...
@@ -0,0 +1,262 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip Power Domains
maintainers:
- Elaine Zhang <zhangqing@rock-chips.com>
- Heiko Stuebner <heiko@sntech.de>
description: |
Rockchip processors include support for multiple power domains
which can be powered up/down by software based on different
application scenarios to save power.
Power domains contained within power-controller node are
generic power domain providers documented in
Documentation/devicetree/bindings/power/power-domain.yaml.
IP cores belonging to a power domain should contain a
"power-domains" property that is a phandle for the
power domain node representing the domain.
properties:
$nodename:
const: power-controller
compatible:
enum:
- rockchip,px30-power-controller
- rockchip,rk3036-power-controller
- rockchip,rk3066-power-controller
- rockchip,rk3128-power-controller
- rockchip,rk3188-power-controller
- rockchip,rk3228-power-controller
- rockchip,rk3288-power-controller
- rockchip,rk3328-power-controller
- rockchip,rk3366-power-controller
- rockchip,rk3368-power-controller
- rockchip,rk3399-power-controller
- rockchip,rk3528-power-controller
- rockchip,rk3562-power-controller
- rockchip,rk3568-power-controller
- rockchip,rk3576-power-controller
- rockchip,rk3588-power-controller
- rockchip,rv1126-power-controller
- rockchip,rv1126b-power-controller
"#power-domain-cells":
const: 1
"#address-cells":
const: 1
"#size-cells":
const: 0
required:
- compatible
- "#power-domain-cells"
additionalProperties: false
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/pd-node"
unevaluatedProperties: false
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/pd-node"
unevaluatedProperties: false
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/pd-node"
unevaluatedProperties: false
properties:
"#power-domain-cells":
const: 0
$defs:
pd-node:
type: object
description: |
Represents the power domains within the power controller node.
properties:
reg:
maxItems: 1
description: |
Power domain index. Valid values are defined in
"include/dt-bindings/power/px30-power.h"
"include/dt-bindings/power/rk3036-power.h"
"include/dt-bindings/power/rk3066-power.h"
"include/dt-bindings/power/rk3128-power.h"
"include/dt-bindings/power/rk3188-power.h"
"include/dt-bindings/power/rk3228-power.h"
"include/dt-bindings/power/rk3288-power.h"
"include/dt-bindings/power/rk3328-power.h"
"include/dt-bindings/power/rk3366-power.h"
"include/dt-bindings/power/rk3368-power.h"
"include/dt-bindings/power/rk3399-power.h"
"include/dt-bindings/power/rk3568-power.h"
"include/dt-bindings/power/rk3588-power.h"
"include/dt-bindings/power/rockchip,rv1126-power.h"
"include/dt-bindings/power/rockchip,rv1126b-power-controller.h"
clocks:
minItems: 1
maxItems: 30
description: |
A number of phandles to clocks that need to be enabled
while power domain switches state.
domain-supply:
description: domain regulator supply.
pm_qos:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
maxItems: 1
description: |
A number of phandles to qos blocks which need to be saved and restored
while power domain switches state.
"#power-domain-cells":
enum: [0, 1]
description:
Must be 0 for nodes representing a single PM domain and 1 for nodes
providing multiple PM domains.
required:
- reg
- "#power-domain-cells"
examples:
- |
#include <dt-bindings/clock/rk3399-cru.h>
#include <dt-bindings/power/rk3399-power.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
qos_hdcp: qos@ffa90000 {
compatible = "rockchip,rk3399-qos", "syscon";
reg = <0x0 0xffa90000 0x0 0x20>;
};
qos_iep: qos@ffa98000 {
compatible = "rockchip,rk3399-qos", "syscon";
reg = <0x0 0xffa98000 0x0 0x20>;
};
qos_rga_r: qos@ffab0000 {
compatible = "rockchip,rk3399-qos", "syscon";
reg = <0x0 0xffab0000 0x0 0x20>;
};
qos_rga_w: qos@ffab0080 {
compatible = "rockchip,rk3399-qos", "syscon";
reg = <0x0 0xffab0080 0x0 0x20>;
};
qos_video_m0: qos@ffab8000 {
compatible = "rockchip,rk3399-qos", "syscon";
reg = <0x0 0xffab8000 0x0 0x20>;
};
qos_video_m1_r: qos@ffac0000 {
compatible = "rockchip,rk3399-qos", "syscon";
reg = <0x0 0xffac0000 0x0 0x20>;
};
qos_video_m1_w: qos@ffac0080 {
compatible = "rockchip,rk3399-qos", "syscon";
reg = <0x0 0xffac0080 0x0 0x20>;
};
power-management@ff310000 {
compatible = "rockchip,rk3399-pmu", "syscon", "simple-mfd";
reg = <0x0 0xff310000 0x0 0x1000>;
power-controller {
compatible = "rockchip,rk3399-power-controller";
#power-domain-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
/* These power domains are grouped by VD_CENTER */
power-domain@RK3399_PD_IEP {
reg = <RK3399_PD_IEP>;
clocks = <&cru ACLK_IEP>,
<&cru HCLK_IEP>;
pm_qos = <&qos_iep>;
#power-domain-cells = <0>;
};
power-domain@RK3399_PD_RGA {
reg = <RK3399_PD_RGA>;
clocks = <&cru ACLK_RGA>,
<&cru HCLK_RGA>;
pm_qos = <&qos_rga_r>,
<&qos_rga_w>;
#power-domain-cells = <0>;
};
power-domain@RK3399_PD_VCODEC {
reg = <RK3399_PD_VCODEC>;
clocks = <&cru ACLK_VCODEC>,
<&cru HCLK_VCODEC>;
pm_qos = <&qos_video_m0>;
#power-domain-cells = <0>;
};
power-domain@RK3399_PD_VDU {
reg = <RK3399_PD_VDU>;
clocks = <&cru ACLK_VDU>,
<&cru HCLK_VDU>;
pm_qos = <&qos_video_m1_r>,
<&qos_video_m1_w>;
#power-domain-cells = <0>;
};
power-domain@RK3399_PD_VIO {
reg = <RK3399_PD_VIO>;
#power-domain-cells = <1>;
#address-cells = <1>;
#size-cells = <0>;
power-domain@RK3399_PD_HDCP {
reg = <RK3399_PD_HDCP>;
clocks = <&cru ACLK_HDCP>,
<&cru HCLK_HDCP>,
<&cru PCLK_HDCP>;
pm_qos = <&qos_hdcp>;
#power-domain-cells = <0>;
};
};
};
};
};
@@ -0,0 +1,414 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/rockchip-io-domain.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Rockchip SRAM for IO Voltage Domains
maintainers:
- Heiko Stuebner <heiko@sntech.de>
description: |
IO domain voltages on some Rockchip SoCs are variable but need to be
kept in sync between the regulators and the SoC using a special
register.
A specific example using rk3288
If the regulator hooked up to a pin like SDMMC0_VDD is 3.3V then
bit 7 of GRF_IO_VSEL needs to be 0. If the regulator hooked up to
that same pin is 1.8V then bit 7 of GRF_IO_VSEL needs to be 1.
Said another way, this driver simply handles keeping bits in the SoCs
General Register File (GRF) in sync with the actual value of a voltage
hooked up to the pins.
Note that this driver specifically does not include
any logic for deciding what voltage we should set regulators to
any logic for deciding whether regulators (or internal SoC blocks)
should have power or not have power
If there were some other software that had the smarts of making
decisions about regulators, it would work in conjunction with this
driver. When that other software adjusted a regulators voltage then
this driver would handle telling the SoC about it. A good example is
vqmmc for SD. In that case the dw_mmc driver simply is told about a
regulator. It changes the regulator between 3.3V and 1.8V at the
right time. This driver notices the change and makes sure that the
SoC is on the same page.
You specify supplies using the standard regulator bindings by including
a phandle the relevant regulator. All specified supplies must be able
to report their voltage. The IO Voltage Domain for any non-specified
supplies will be not be touched.
properties:
compatible:
enum:
- rockchip,px30-io-voltage-domain
- rockchip,px30-pmu-io-voltage-domain
- rockchip,rk3188-io-voltage-domain
- rockchip,rk3228-io-voltage-domain
- rockchip,rk3288-io-voltage-domain
- rockchip,rk3308-io-voltage-domain
- rockchip,rk3328-io-voltage-domain
- rockchip,rk3368-io-voltage-domain
- rockchip,rk3368-pmu-io-voltage-domain
- rockchip,rk3399-io-voltage-domain
- rockchip,rk3399-pmu-io-voltage-domain
- rockchip,rk3568-pmu-io-voltage-domain
- rockchip,rv1108-io-voltage-domain
- rockchip,rv1108-pmu-io-voltage-domain
- rockchip,rv1126-pmu-io-voltage-domain
required:
- compatible
unevaluatedProperties: false
allOf:
- $ref: "#/$defs/px30"
- $ref: "#/$defs/px30-pmu"
- $ref: "#/$defs/rk3188"
- $ref: "#/$defs/rk3228"
- $ref: "#/$defs/rk3288"
- $ref: "#/$defs/rk3308"
- $ref: "#/$defs/rk3328"
- $ref: "#/$defs/rk3368"
- $ref: "#/$defs/rk3368-pmu"
- $ref: "#/$defs/rk3399"
- $ref: "#/$defs/rk3399-pmu"
- $ref: "#/$defs/rk3568-pmu"
- $ref: "#/$defs/rv1108"
- $ref: "#/$defs/rv1108-pmu"
- $ref: "#/$defs/rv1126-pmu"
$defs:
px30:
if:
properties:
compatible:
contains:
const: rockchip,px30-io-voltage-domain
then:
properties:
vccio1-supply:
description: The supply connected to VCCIO1.
vccio2-supply:
description: The supply connected to VCCIO2.
vccio3-supply:
description: The supply connected to VCCIO3.
vccio4-supply:
description: The supply connected to VCCIO4.
vccio5-supply:
description: The supply connected to VCCIO5.
vccio6-supply:
description: The supply connected to VCCIO6.
vccio-oscgpi-supply:
description: The supply connected to VCCIO_OSCGPI.
px30-pmu:
if:
properties:
compatible:
contains:
const: rockchip,px30-pmu-io-voltage-domain
then:
properties:
pmuio1-supply:
description: The supply connected to PMUIO1.
pmuio2-supply:
description: The supply connected to PMUIO2.
rk3188:
if:
properties:
compatible:
contains:
const: rockchip,rk3188-io-voltage-domain
then:
properties:
ap0-supply:
description: The supply connected to AP0_VCC.
ap1-supply:
description: The supply connected to AP1_VCC.
cif-supply:
description: The supply connected to CIF_VCC.
flash-supply:
description: The supply connected to FLASH_VCC.
lcdc0-supply:
description: The supply connected to LCD0_VCC.
lcdc1-supply:
description: The supply connected to LCD1_VCC.
vccio0-supply:
description: The supply connected to VCCIO0.
vccio1-supply:
description: The supply connected to VCCIO1. Also labeled as VCCIO2.
rk3228:
if:
properties:
compatible:
contains:
const: rockchip,rk3228-io-voltage-domain
then:
properties:
vccio1-supply:
description: The supply connected to VCCIO1.
vccio2-supply:
description: The supply connected to VCCIO2.
vccio3-supply:
description: The supply connected to VCCIO3.
vccio4-supply:
description: The supply connected to VCCIO4.
rk3288:
if:
properties:
compatible:
contains:
const: rockchip,rk3288-io-voltage-domain
then:
properties:
audio-supply:
description: The supply connected to APIO4_VDD.
bb-supply:
description: The supply connected to APIO5_VDD.
dvp-supply:
description: The supply connected to DVPIO_VDD.
flash0-supply:
description: The supply connected to FLASH0_VDD. Typically for eMMC.
flash1-supply:
description: The supply connected to FLASH1_VDD. Also known as SDIO1.
gpio30-supply:
description: The supply connected to APIO1_VDD.
gpio1830-supply:
description: The supply connected to APIO2_VDD.
lcdc-supply:
description: The supply connected to LCDC_VDD.
sdcard-supply:
description: The supply connected to SDMMC0_VDD.
wifi-supply:
description: The supply connected to APIO3_VDD. Also known as SDIO0.
rk3308:
if:
properties:
compatible:
contains:
const: rockchip,rk3308-io-voltage-domain
then:
properties:
vccio0-supply:
description: The supply connected to VCCIO0.
vccio1-supply:
description: The supply connected to VCCIO1.
vccio2-supply:
description: The supply connected to VCCIO2.
vccio3-supply:
description: The supply connected to VCCIO3.
vccio4-supply:
description: The supply connected to VCCIO4.
vccio5-supply:
description: The supply connected to VCCIO5.
rk3328:
if:
properties:
compatible:
contains:
const: rockchip,rk3328-io-voltage-domain
then:
properties:
vccio1-supply:
description: The supply connected to VCCIO1.
vccio2-supply:
description: The supply connected to VCCIO2.
vccio3-supply:
description: The supply connected to VCCIO3.
vccio4-supply:
description: The supply connected to VCCIO4.
vccio5-supply:
description: The supply connected to VCCIO5.
vccio6-supply:
description: The supply connected to VCCIO6.
pmuio-supply:
description: The supply connected to VCCIO_PMU.
rk3368:
if:
properties:
compatible:
contains:
const: rockchip,rk3368-io-voltage-domain
then:
properties:
audio-supply:
description: The supply connected to APIO3_VDD.
dvp-supply:
description: The supply connected to DVPIO_VDD.
flash0-supply:
description: The supply connected to FLASH0_VDD. Typically for eMMC.
gpio30-supply:
description: The supply connected to APIO1_VDD.
gpio1830-supply:
description: The supply connected to APIO4_VDD.
sdcard-supply:
description: The supply connected to SDMMC0_VDD.
wifi-supply:
description: The supply connected to APIO2_VDD. Also known as SDIO0.
rk3368-pmu:
if:
properties:
compatible:
contains:
const: rockchip,rk3368-pmu-io-voltage-domain
then:
properties:
pmu-supply:
description: The supply connected to PMUIO_VDD.
vop-supply:
description: The supply connected to LCDC_VDD.
rk3399:
if:
properties:
compatible:
contains:
const: rockchip,rk3399-io-voltage-domain
then:
properties:
audio-supply:
description: The supply connected to APIO5_VDD.
bt656-supply:
description: The supply connected to APIO2_VDD.
gpio1830-supply:
description: The supply connected to APIO4_VDD.
sdmmc-supply:
description: The supply connected to SDMMC0_VDD.
rk3399-pmu:
if:
properties:
compatible:
contains:
const: rockchip,rk3399-pmu-io-voltage-domain
then:
properties:
pmu1830-supply:
description: The supply connected to PMUIO2_VDD.
rk3568-pmu:
if:
properties:
compatible:
contains:
const: rockchip,rk3568-pmu-io-voltage-domain
then:
properties:
pmuio1-supply:
description: The supply connected to PMUIO1.
pmuio2-supply:
description: The supply connected to PMUIO2.
vccio1-supply:
description: The supply connected to VCCIO1.
vccio2-supply:
description: The supply connected to VCCIO2.
vccio3-supply:
description: The supply connected to VCCIO3.
vccio4-supply:
description: The supply connected to VCCIO4.
vccio5-supply:
description: The supply connected to VCCIO5.
vccio6-supply:
description: The supply connected to VCCIO6.
vccio7-supply:
description: The supply connected to VCCIO7.
rv1108:
if:
properties:
compatible:
contains:
const: rockchip,rv1108-io-voltage-domain
then:
properties:
vccio1-supply:
description: The supply connected to APIO1_VDD.
vccio2-supply:
description: The supply connected to APIO2_VDD.
vccio3-supply:
description: The supply connected to APIO3_VDD.
vccio5-supply:
description: The supply connected to APIO5_VDD.
vccio6-supply:
description: The supply connected to APIO6_VDD.
rv1108-pmu:
if:
properties:
compatible:
contains:
const: rockchip,rv1108-pmu-io-voltage-domain
then:
properties:
pmu-supply:
description: The supply connected to PMUIO_VDD.
rv1126-pmu:
if:
properties:
compatible:
contains:
const: rockchip,rv1126-pmu-io-voltage-domain
then:
properties:
vccio1-supply:
description: The supply connected to VCCIO1.
vccio2-supply:
description: The supply connected to VCCIO2.
vccio3-supply:
description: The supply connected to VCCIO3.
vccio4-supply:
description: The supply connected to VCCIO4.
vccio5-supply:
description: The supply connected to VCCIO5.
vccio6-supply:
description: The supply connected to VCCIO6.
vccio7-supply:
description: The supply connected to VCCIO7.
pmuio0-supply:
description: The supply connected to PMUIO0.
pmuio1-supply:
description: The supply connected to PMUIO1.
examples:
- |
io-domains {
compatible = "rockchip,rk3288-io-voltage-domain";
audio-supply = <&vcc18_codec>;
bb-supply = <&vcc33_io>;
dvp-supply = <&vcc_18>;
flash0-supply = <&vcc18_flashio>;
gpio1830-supply = <&vcc33_io>;
gpio30-supply = <&vcc33_pmuio>;
lcdc-supply = <&vcc33_lcd>;
sdcard-supply = <&vccio_sd>;
wifi-supply = <&vcc18_wl>;
};
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/starfive,jh7110-pmu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: StarFive JH7110 Power Management Unit
maintainers:
- Walker Chen <walker.chen@starfivetech.com>
description: |
StarFive JH7110 SoC includes support for multiple power domains which can be
powered on/off by software based on different application scenes to save power.
properties:
compatible:
enum:
- starfive,jh7110-pmu
reg:
maxItems: 1
interrupts:
maxItems: 1
"#power-domain-cells":
const: 1
required:
- compatible
- reg
- interrupts
- "#power-domain-cells"
additionalProperties: false
examples:
- |
pwrc: power-controller@17030000 {
compatible = "starfive,jh7110-pmu";
reg = <0x17030000 0x10000>;
interrupts = <111>;
#power-domain-cells = <1>;
};
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/adc-battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: ADC battery
maintainers:
- Sebastian Reichel <sre@kernel.org>
description:
Basic battery capacity meter, which only reports basic battery data
via ADC channels and optionally indicate that the battery is full by
polling a GPIO line.
The voltage is expected to be measured between the battery terminals
and mandatory. The optional current/power channel is expected to
monitor the current/power flowing out of the battery. Last but not
least the temperature channel is supposed to measure the battery
temperature.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: adc-battery
charged-gpios:
description:
GPIO which signals that the battery is fully charged. The GPIO is
often provided by charger ICs, that are not software controllable.
maxItems: 1
io-channels:
minItems: 1
maxItems: 4
io-channel-names:
minItems: 1
items:
- const: voltage
- enum: [ current, power, temperature ]
- enum: [ power, temperature ]
- const: temperature
monitored-battery: true
required:
- compatible
- io-channels
- io-channel-names
- monitored-battery
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
fuel-gauge {
compatible = "adc-battery";
charged-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
io-channels = <&adc 13>, <&adc 37>;
io-channel-names = "voltage", "current";
power-supplies = <&charger>;
monitored-battery = <&battery>;
};
@@ -0,0 +1,215 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Battery Characteristics
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: |
The devicetree battery node provides static battery characteristics.
In smart batteries, these are typically stored in non-volatile memory
on a fuel gauge chip. The battery node should be used where there is
no appropriate non-volatile memory, or it is unprogrammed/incorrect.
Upstream dts files should not include battery nodes, unless the battery
represented cannot easily be replaced in the system by one of a
different type. This prevents unpredictable, potentially harmful,
behavior should a replacement that changes the battery type occur
without a corresponding update to the dtb.
Battery properties are named, where possible, for the corresponding elements
in enum power_supply_property, defined in include/linux/power_supply.h
Batteries must be referenced by chargers and/or fuel-gauges using a phandle.
The phandle's property should be named "monitored-battery".
properties:
compatible:
const: simple-battery
device-chemistry:
description: This describes the chemical technology of the battery.
oneOf:
- const: nickel-cadmium
- const: nickel-metal-hydride
- const: lithium-ion
description: This is a blanket type for all lithium-ion batteries,
including those below. If possible, a precise compatible string
from below should be used, but sometimes it is unknown which specific
lithium ion battery is employed and this wide compatible can be used.
- const: lithium-ion-polymer
- const: lithium-ion-iron-phosphate
- const: lithium-ion-manganese-oxide
over-voltage-threshold-microvolt:
description: battery over-voltage limit
re-charge-voltage-microvolt:
description: limit to automatically start charging again
voltage-min-design-microvolt:
description: drained battery voltage
voltage-max-design-microvolt:
description: fully charged battery voltage
energy-full-design-microwatt-hours:
description: battery design energy
charge-full-design-microamp-hours:
description: battery design capacity
trickle-charge-current-microamp:
description: current for trickle-charge phase.
Please note that the trickle-charging here, refers "wake-up" or
"pre-pre" -charging, for very empty batteries. Similar term is also
used for "maintenance" or "top-off" -charging of batteries (like
NiMh bq24400) - that is different and not controlled by this
property.
tricklecharge-upper-limit-microvolt:
description: limit when to change to precharge from trickle charge
Trickle-charging here refers "wake-up" or "pre-pre" -charging.
precharge-current-microamp:
description: current for pre-charge phase
precharge-upper-limit-microvolt:
description: limit when to change to constant charging
charge-term-current-microamp:
description: current for charge termination phase
constant-charge-current-max-microamp:
description: maximum constant input current
constant-charge-voltage-max-microvolt:
description: maximum constant input voltage
factory-internal-resistance-micro-ohms:
description: battery factory internal resistance
resistance-temp-table:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
items:
- description: the temperature in degree Celsius
- description: battery internal resistance percent
description: |
A table 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 an
accurate batterty internal resistance in different temperatures.
ocv-capacity-celsius:
description: |
An array containing the temperature in degree Celsius,
for each of the battery capacity lookup table.
operating-range-celsius:
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:
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:
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
# The volt-drop* -properties describe voltage-drop for a battery, described
# as VDROP in:
# https://patentimages.storage.googleapis.com/6c/f5/17/c1d901c220f6a9/US20150032394A1.pdf
volt-drop-thresh-microvolt:
description: Threshold for starting the VDR correction
maximum: 48000000
volt-drop-soc-bp:
description: Table of capacity values matching the values in VDR tables.
The value should be given as basis points, 1/100 of a percent.
volt-drop-temperatures-millicelsius:
description: An array containing the temperature in milli celsius, for each
of the VDR lookup table.
required:
- compatible
patternProperties:
'^ocv-capacity-table-[0-9]+$':
$ref: /schemas/types.yaml#/definitions/uint32-matrix
description: |
An array providing the open circuit voltage (OCV)
of the battery and corresponding battery capacity percent, which is used
to look up battery capacity according to current OCV value. And the open
circuit voltage unit is microvolt.
maxItems: 100
items:
items:
- description: open circuit voltage (OCV) in microvolts
- description: battery capacity percent
maximum: 100
'^volt-drop-[0-9]-microvolt':
description: Table of the voltage drop rate (VDR) values. Each entry in the
table should match a capacity value in the volt-drop-soc table.
Furthermore, the values should be obtained for the temperature given in
volt-drop-temperatures-millicelsius table at index matching the
number in this table's name.
additionalProperties: false
examples:
- |
power {
#address-cells = <1>;
#size-cells = <0>;
battery: battery {
compatible = "simple-battery";
over-voltage-threshold-microvolt = <4500000>;
re-charge-voltage-microvolt = <250000>;
voltage-min-design-microvolt = <3200000>;
voltage-max-design-microvolt = <4200000>;
energy-full-design-microwatt-hours = <5290000>;
charge-full-design-microamp-hours = <1430000>;
precharge-current-microamp = <256000>;
precharge-upper-limit-microvolt = <2500000>;
charge-term-current-microamp = <128000>;
constant-charge-current-max-microamp = <900000>;
constant-charge-voltage-max-microvolt = <4200000>;
factory-internal-resistance-micro-ohms = <250000>;
ocv-capacity-celsius = <(-10) 0 10>;
/* table for -10 degree Celsius */
ocv-capacity-table-0 = <4185000 100>, <4113000 95>, <4066000 90>;
/* table for 0 degree Celsius */
ocv-capacity-table-1 = <4200000 100>, <4185000 95>, <4113000 90>;
/* 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 {
reg = <0x11>;
monitored-battery = <&battery>;
};
fuel-gauge@22 {
reg = <0x22>;
monitored-battery = <&battery>;
};
};
@@ -0,0 +1,97 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/bq2415x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI bq2415x Li-Ion Charger
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- ti,bq24150
- ti,bq24150a
- ti,bq24151
- ti,bq24151a
- ti,bq24152
- ti,bq24153
- ti,bq24153a
- ti,bq24155
- ti,bq24156
- ti,bq24156a
- ti,bq24158
reg:
maxItems: 1
ti,current-limit:
$ref: /schemas/types.yaml#/definitions/uint32
description: initial maximum current charger can pull from power supply in mA.
ti,weak-battery-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
weak battery voltage threshold in mV.
The chip will use slow precharge if battery voltage is below this value.
ti,battery-regulation-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum charging voltage in mV.
ti,charge-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum charging current in mA.
ti,termination-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
charge will be terminated when current in constant-voltage phase drops
below this value (in mA).
ti,resistor-sense:
$ref: /schemas/types.yaml#/definitions/uint32
description: value of sensing resistor in milliohm.
ti,usb-charger-detection:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to usb charger detection device (required for auto mode)
required:
- compatible
- reg
- ti,current-limit
- ti,weak-battery-voltage
- ti,battery-regulation-voltage
- ti,charge-current
- ti,termination-current
- ti,resistor-sense
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@6b {
compatible = "ti,bq24150a";
reg = <0x6b>;
ti,current-limit = <100>;
ti,weak-battery-voltage = <3400>;
ti,battery-regulation-voltage = <4200>;
ti,charge-current = <650>;
ti,termination-current = <100>;
ti,resistor-sense = <68>;
ti,usb-charger-detection = <&isp1704>;
};
};
@@ -0,0 +1,100 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/bq24190.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI BQ2419x Li-Ion Battery Charger
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- ti,bq24190
- ti,bq24192
- ti,bq24192i
- ti,bq24193
- ti,bq24196
- ti,bq24296
- ti,bq24297
reg:
maxItems: 1
interrupts:
maxItems: 1
ce-gpios:
description:
Active low Charge Enable pin. Battery charging is enabled when
REG01[5:4] = 01 and CE pin is Low. CE pin must be pulled high or low.
maxItems: 1
usb-otg-vbus:
$ref: /schemas/regulator/regulator.yaml#
description: |
Regulator that is used to control the VBUS voltage direction for
either USB host mode or for charging on the OTG port
ti,system-minimum-microvolt:
description: |
when power is connected and the battery is below minimum system voltage,
the system will be regulated above this setting.
omit-battery-class:
type: boolean
description: |
If this property is set, the operating system does not try to create a
battery device.
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:
- precharge-current-microamp: maximum charge current during precharge phase
(typically 20% of battery capacity).
- charge-term-current-microamp: a charge cycle terminates when the battery voltage is
above recharge threshold, and the current is below this
setting (typically 10% of battery capacity).
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
bat: battery {
compatible = "simple-battery";
precharge-current-microamp = <256000>;
charge-term-current-microamp = <128000>;
};
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@6a {
compatible = "ti,bq24190";
reg = <0x6a>;
interrupt-parent = <&gpiochip>;
interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
monitored-battery = <&bat>;
ti,system-minimum-microvolt = <3200000>;
usb_otg_vbus: usb-otg-vbus { };
};
};
@@ -0,0 +1,124 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/bq24257.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Bq24250, bq24251 and bq24257 Li-Ion Charger
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- ti,bq24250
- ti,bq24251
- ti,bq24257
reg:
maxItems: 1
interrupts:
maxItems: 1
ti,battery-regulation-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum charging voltage in uV
ti,charge-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum charging current in uA
ti,termination-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
charge will be terminated when current in constant-voltage phase
drops below this value (in uA)
pg-gpios:
description: |
GPIO used for connecting the bq2425x device PG (Power Good) pin.
This pin is not available on all devices however it should be used if
possible as this is the recommended way to obtain the charger's input PG
state. If this pin is not specified a software-based approach for PG
detection is used.
maxItems: 1
ti,current-limit:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
The maximum current to be drawn from the charger's input (in uA).
If this property is not specified, the input limit current is set
automatically using USB D+/D- signal based charger type detection.
If the hardware does not support the D+/D- based detection, a default
of 500,000 is used (=500mA) instead.
ti,ovp-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Configures the over voltage protection voltage (in uV).
If not specified a default of 6,5000,000 (=6.5V) is used.
ti,in-dpm-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Configures the threshold input voltage for the dynamic power path management (in uV).
If not specified a default of 4,360,000 (=4.36V) is used.
required:
- compatible
- reg
- interrupts
- ti,battery-regulation-voltage
- ti,charge-current
- ti,termination-current
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@6a {
compatible = "ti,bq24257";
reg = <0x6a>;
interrupt-parent = <&gpio1>;
interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
pg-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
ti,battery-regulation-voltage = <4200000>;
ti,charge-current = <1000000>;
ti,termination-current = <50000>;
};
};
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@6a {
compatible = "ti,bq24250";
reg = <0x6a>;
interrupt-parent = <&gpio1>;
interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
ti,battery-regulation-voltage = <4200000>;
ti,charge-current = <500000>;
ti,termination-current = <50000>;
ti,current-limit = <900000>;
ti,ovp-voltage = <9500000>;
ti,in-dpm-voltage = <4440000>;
};
};
@@ -0,0 +1,89 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/bq24735.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI BQ24735 Li-Ion Battery Charger
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: ti,bq24735
reg:
maxItems: 1
interrupts:
description: AC adapter plug event interrupt
maxItems: 1
ti,ac-detect-gpios:
maxItems: 1
description: |
This GPIO is optionally used to read the AC adapter status. This is a Host GPIO
that is configured as an input and connected to the ACOK pin on the bq24735.
Note: for backwards compatibility reasons, the GPIO must be active on AC adapter
absence despite ACOK being active (high) on AC adapter presence.
ti,charge-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Used to control and set the charging current.
This value must be between 128mA and 8.128A with a 64mA step resolution.
The POR value is 0x0000h. This number is in mA (e.g. 8192).
See spec for more information about the ChargeCurrent (0x14h) register.
ti,charge-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Used to control and set the charging voltage.
This value must be between 1.024V and 19.2V with a 16mV step resolution.
The POR value is 0x0000h. This number is in mV (e.g. 19200).
See spec for more information about the ChargeVoltage (0x15h) register.
ti,input-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Used to control and set the charger input current.
This value must be between 128mA and 8.064A with a 128mA step resolution.
The POR value is 0x1000h. This number is in mA (e.g. 8064).
See the spec for more information about the InputCurrent (0x3fh) register.
ti,external-control:
type: boolean
description: |
Indicates that the charger is configured externally and that the host should not
attempt to enable/disable charging or set the charge voltage/current.
poll-interval:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
If 'interrupts' is not specified, poll AC adapter presence with this interval (milliseconds).
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@9 {
compatible = "ti,bq24735";
reg = <0x9>;
ti,ac-detect-gpios = <&gpio 72 0x1>;
};
};
@@ -0,0 +1,92 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright (C) 2020 Texas Instruments Incorporated
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/bq2515x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI bq2515x 500-mA Linear charger family
maintainers:
- Andrew Davis <afd@ti.com>
description: |
The BQ2515x family is a highly integrated battery charge management IC that
integrates the most common functions for wearable devices, namely a charger,
an output voltage rail, ADC for battery and system monitoring, and
push-button controller.
Specifications about the charger can be found at:
http://www.ti.com/lit/ds/symlink/bq25150.pdf
http://www.ti.com/lit/ds/symlink/bq25155.pdf
properties:
compatible:
enum:
- ti,bq25150
- ti,bq25155
reg:
maxItems: 1
description: I2C address of the charger.
ac-detect-gpios:
description: |
GPIO used for connecting the bq2515x device PG (AC Detect)
pin.
maxItems: 1
reset-gpios:
description: GPIO used for hardware reset.
maxItems: 1
powerdown-gpios:
description: GPIO used for low power mode of IC.
maxItems: 1
charge-enable-gpios:
description: GPIO used to turn on and off charging.
maxItems: 1
input-current-limit-microamp:
description: Maximum input current in micro Amps.
minimum: 50000
maximum: 500000
monitored-battery: true
required:
- compatible
- reg
- monitored-battery
allOf:
- $ref: power-supply.yaml#
additionalProperties: false
examples:
- |
bat: battery {
compatible = "simple-battery";
constant-charge-current-max-microamp = <50000>;
precharge-current-microamp = <2500>;
constant-charge-voltage-max-microvolt = <4000000>;
};
#include <dt-bindings/gpio/gpio.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
bq25150: charger@6b {
compatible = "ti,bq25150";
reg = <0x6b>;
monitored-battery = <&bat>;
input-current-limit-microamp = <100000>;
ac-detect-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
powerdown-gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
charge-enable-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
};
@@ -0,0 +1,126 @@
# 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/bq256xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI bq256xx Switch Mode Buck Charger
maintainers:
- Andrew Davis <afd@ti.com>
description: |
The bq256xx devices are a family of highly-integrated battery charge
management and system power management ICs for single cell Li-ion and Li-
polymer batteries.
Datasheets:
- https://www.ti.com/lit/ds/symlink/bq25600.pdf
- https://www.ti.com/lit/ds/symlink/bq25601.pdf
- https://www.ti.com/lit/ds/symlink/bq25600d.pdf
- https://www.ti.com/lit/ds/symlink/bq25601d.pdf
- https://www.ti.com/lit/ds/symlink/bq25611d.pdf
- https://www.ti.com/lit/ds/symlink/bq25618.pdf
- https://www.ti.com/lit/ds/symlink/bq25619.pdf
properties:
compatible:
enum:
- ti,bq25600
- ti,bq25601
- ti,bq25600d
- ti,bq25601d
- ti,bq25611d
- ti,bq25618
- ti,bq25619
reg:
maxItems: 1
ti,watchdog-timeout-ms:
default: 0
description: |
Watchdog timer in ms. 0 (default) disables the watchdog
minimum: 0
maximum: 160000
enum: [ 0, 40000, 80000, 160000]
input-voltage-limit-microvolt:
description: |
Minimum input voltage limit in µV with a 100000 µV step
minimum: 3900000
maximum: 5400000
input-current-limit-microamp:
description: |
Maximum input current limit in µA with a 100000 µA step
minimum: 100000
maximum: 3200000
monitored-battery: true
interrupts:
maxItems: 1
description: |
Interrupt sends an active low, 256 μs pulse to host to report the charger
device status and faults.
ti,no-thermistor:
type: boolean
description: Indicates that no thermistor is connected to the TS pin
required:
- compatible
- reg
- monitored-battery
allOf:
- $ref: power-supply.yaml#
- if:
properties:
compatible:
contains:
enum:
- ti,bq25600
- ti,bq25601
- ti,bq25600d
- ti,bq25601d
then:
properties:
ti,no-thermistor: false
additionalProperties: false
examples:
- |
bat: battery {
compatible = "simple-battery";
constant-charge-current-max-microamp = <2040000>;
constant-charge-voltage-max-microvolt = <4352000>;
precharge-current-microamp = <180000>;
charge-term-current-microamp = <180000>;
};
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;
charger@6b {
compatible = "ti,bq25601";
reg = <0x6b>;
monitored-battery = <&bat>;
interrupt-parent = <&gpio1>;
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
ti,watchdog-timeout-ms = <40000>;
input-voltage-limit-microvolt = <4500000>;
input-current-limit-microamp = <2400000>;
};
};
...
@@ -0,0 +1,127 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/bq25890.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Bq25890, bq25892, bq25895 and bq25896 Li-Ion Charger
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
oneOf:
- enum:
- ti,bq25890
- items:
- enum:
- ti,bq25892
- ti,bq25895
- ti,bq25896
- const: ti,bq25890
reg:
maxItems: 1
interrupts:
maxItems: 1
ti,battery-regulation-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum charging voltage (in uV)
ti,charge-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum charging current (in uA)
ti,termination-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
charge will be terminated when current in constant-voltage phase
drops below this value (in uA)
ti,precharge-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum charge current during precharge phase (in uA)
ti,minimum-sys-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
when battery is charging and it is below minimum system voltage,
the system will be regulated above minimum-sys-voltage setting (in uV)
ti,boost-voltage:
$ref: /schemas/types.yaml#/definitions/uint32
description: VBUS voltage level in boost mode (in uV)
ti,boost-max-current:
$ref: /schemas/types.yaml#/definitions/uint32
description: maximum allowed current draw in boost mode (in uA)
ti,boost-low-freq:
description: boost mode frequency will be 500kHz, otherwise 1.5MHz
type: boolean
ti,use-ilim-pin:
description: |
ILIM resistor will be used and the input current will be the lower
between the resistor setting and the IINLIM register setting
type: boolean
ti,thermal-regulation-threshold:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
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:
description: value of a resistor in series with the battery (in Micro Ohms)
ti,ibatcomp-clamp-microvolt:
description: max. charging voltage adjustment due to expected voltage drop on in-series resistor
required:
- compatible
- reg
- interrupts
- ti,battery-regulation-voltage
- ti,charge-current
- ti,termination-current
- ti,precharge-current
- ti,minimum-sys-voltage
- ti,boost-voltage
- ti,boost-max-current
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@6a {
compatible = "ti,bq25890";
reg = <0x6a>;
interrupt-parent = <&gpio1>;
interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
ti,battery-regulation-voltage = <4200000>;
ti,charge-current = <1000000>;
ti,termination-current = <50000>;
ti,precharge-current = <128000>;
ti,minimum-sys-voltage = <3600000>;
ti,boost-voltage = <5000000>;
ti,boost-max-current = <1000000>;
ti,use-ilim-pin;
ti,thermal-regulation-threshold = <120>;
};
};
@@ -0,0 +1,112 @@
# 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:
- Andrew Davis <afd@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:
maxItems: 1
description: |
Indicates that the device state has changed.
monitored-battery: true
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>
i2c {
#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-timeout-ms = <0>;
ti,sc-ocp-limit-microamp = <2000000>;
ti,sc-ovp-limit-microvolt = <17800000>;
monitored-battery = <&bat>;
};
};
...
@@ -0,0 +1,125 @@
# 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
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
- ti,bq27z561
- ti,bq28z610
- ti,bq34z100
- ti,bq78z100
reg:
maxItems: 1
description: integer, I2C address of the fuel gauge.
interrupts:
maxItems: 1
description: the SOC_INT or GPOUT pin
monitored-battery:
description: |
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.
power-supplies: true
allOf:
- $ref: power-supply.yaml#
- if:
properties:
compatible:
contains:
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,bq27521
- ti,bq27541
- ti,bq27542
- ti,bq27546
- ti,bq27742
- ti,bq27545
- ti,bq27411
- ti,bq27z561
- ti,bq28z610
- ti,bq34z100
- ti,bq78z100
then:
properties:
interrupts: false
required:
- compatible
- reg
additionalProperties: false
examples:
- |
bat: battery {
compatible = "simple-battery";
voltage-min-design-microvolt = <3200000>;
energy-full-design-microwatt-hours = <5290000>;
charge-full-design-microamp-hours = <1430000>;
};
i2c {
#address-cells = <1>;
#size-cells = <0>;
bq27510g3: fuel-gauge@55 {
compatible = "ti,bq27510g3";
reg = <0x55>;
monitored-battery = <&bat>;
};
};
@@ -0,0 +1,217 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/charger-manager.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Charger Manager
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: |
Binding for the legacy charger manager driver.
Please do not use for new products.
properties:
compatible:
const: charger-manager
cm-chargers:
description: name of chargers
$ref: /schemas/types.yaml#/definitions/string-array
cm-num-chargers:
$ref: /schemas/types.yaml#/definitions/uint32
deprecated: true
cm-fuel-gauge:
description: name of battery fuel gauge
$ref: /schemas/types.yaml#/definitions/string
cm-name:
description: name of the charger manager
default: battery
$ref: /schemas/types.yaml#/definitions/string
cm-poll-mode:
description: polling mode
$ref: /schemas/types.yaml#/definitions/uint32
default: 0
enum:
- 0 # disabled
- 1 # always
- 2 # when external power is connected
- 3 # when charging
cm-poll-interval:
description: polling interval (in ms)
$ref: /schemas/types.yaml#/definitions/uint32
cm-battery-stat:
description: battery status
$ref: /schemas/types.yaml#/definitions/uint32
enum:
- 0 # battery always present
- 1 # no battery
- 2 # check presence via fuel gauge
- 3 # check presence via charger
cm-fullbatt-vchkdrop-volt:
description: voltage drop before restarting charging in uV
$ref: /schemas/types.yaml#/definitions/uint32
cm-fullbatt-vchkdrop-ms:
deprecated: true
cm-fullbatt-voltage:
description: voltage of full battery in uV
$ref: /schemas/types.yaml#/definitions/uint32
cm-fullbatt-soc:
description: state of charge to consider as full battery in %
$ref: /schemas/types.yaml#/definitions/uint32
cm-fullbatt-capacity:
description: capcity to consider as full battery in uAh
$ref: /schemas/types.yaml#/definitions/uint32
cm-thermal-zone:
description: name of external thermometer's thermal zone
$ref: /schemas/types.yaml#/definitions/string
cm-discharging-max:
description: limits of discharging duration in ms
$ref: /schemas/types.yaml#/definitions/uint32
cm-charging-max:
description: limits of charging duration in ms
$ref: /schemas/types.yaml#/definitions/uint32
cm-battery-cold:
description: critical cold temperature of battery for charging in deci-degree celsius
$ref: /schemas/types.yaml#/definitions/uint32
cm-battery-cold-in-minus:
description: if set cm-battery-cold temperature is in minus degrees
type: boolean
cm-battery-hot:
description: critical hot temperature of battery for charging in deci-degree celsius
$ref: /schemas/types.yaml#/definitions/uint32
cm-battery-temp-diff:
description: temperature difference to allow recharging in deci-degree celsius
$ref: /schemas/types.yaml#/definitions/uint32
patternProperties:
"-supply$":
description: regulator consumer, named according to cm-regulator-name
$ref: /schemas/types.yaml#/definitions/phandle
"^regulator[@-][0-9]$":
type: object
properties:
cm-regulator-name:
description: name of charger regulator
$ref: /schemas/types.yaml#/definitions/string
required:
- cm-regulator-name
additionalProperties: false
patternProperties:
"^cable[@-][0-9]$":
type: object
properties:
cm-cable-name:
description: name of charger cable
enum:
- USB
- USB-HOST
- SDP
- DCP
- CDP
- ACA
- FAST-CHARGER
- SLOW-CHARGER
- WPT
- PD
- DOCK
- JIG
- MECHANICAL
cm-cable-extcon:
description: name of extcon dev
$ref: /schemas/types.yaml#/definitions/string
cm-cable-min:
description: minimum current of cable in uA
$ref: /schemas/types.yaml#/definitions/uint32
cm-cable-max:
description: maximum current of cable in uA
$ref: /schemas/types.yaml#/definitions/uint32
required:
- cm-cable-name
- cm-cable-extcon
additionalProperties: false
required:
- compatible
- cm-chargers
- cm-fuel-gauge
additionalProperties: false
examples:
- |
charger-manager {
compatible = "charger-manager";
chg-reg-supply = <&charger_regulator>;
cm-name = "battery";
/* Always polling ON : 30s */
cm-poll-mode = <1>;
cm-poll-interval = <30000>;
cm-fullbatt-vchkdrop-volt = <150000>;
cm-fullbatt-soc = <100>;
cm-battery-stat = <3>;
cm-chargers = "charger0", "charger1", "charger2";
cm-fuel-gauge = "fuelgauge0";
cm-thermal-zone = "thermal_zone.1";
/* in deci centigrade */
cm-battery-cold = <50>;
cm-battery-cold-in-minus;
cm-battery-hot = <800>;
cm-battery-temp-diff = <100>;
/* Allow charging for 5hr */
cm-charging-max = <18000000>;
/* Allow discharging for 2hr */
cm-discharging-max = <7200000>;
regulator-0 {
cm-regulator-name = "chg-reg";
cable-0 {
cm-cable-name = "USB";
cm-cable-extcon = "extcon-dev.0";
cm-cable-min = <475000>;
cm-cable-max = <500000>;
};
cable-1 {
cm-cable-name = "SDP";
cm-cable-extcon = "extcon-dev.0";
cm-cable-min = <650000>;
cm-cable-max = <675000>;
};
};
};
@@ -0,0 +1,88 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/cpcap-battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Motorola CPCAP PMIC battery
maintainers:
- Tony Lindgren <tony@atomide.com>
- Sebastian Reichel <sre@kernel.org>
description: |
Motorola CPCAP is a PMIC found in some mobile phones, e.g.
the Droid 4. This binding describes its battery fuel gauge
sub-function.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: motorola,cpcap-battery
interrupts:
items:
- description: eol interrupt
- description: low battery percentage interrupt
- description: critical battery percentage interrupt
- description: charger detect interrupt
- description: battery detect interrupt
- description: coulomb counter calibration interrupt
interrupt-names:
items:
- const: eol
- const: lowbph
- const: lowbpl
- const: chrgcurr1
- const: battdetb
- const: cccal
io-channels:
items:
- description: battery temperature
- description: battery voltage
- description: battery charge current
- description: battery current
io-channel-names:
items:
- const: battdetb
- const: battp
- const: chg_isense
- const: batti
monitored-battery: true
power-supplies: true
required:
- compatible
- interrupts
- interrupt-names
- io-channels
- io-channel-names
- power-supplies
additionalProperties: false
examples:
- |
cpcap {
battery {
compatible = "motorola,cpcap-battery";
interrupts-extended =
<&cpcap 6 0>, <&cpcap 5 0>, <&cpcap 3 0>,
<&cpcap 20 0>, <&cpcap 54 0>, <&cpcap 57 0>;
interrupt-names =
"eol", "lowbph", "lowbpl",
"chrgcurr1", "battdetb", "cccal";
io-channels = <&cpcap_adc 0>, <&cpcap_adc 1>,
<&cpcap_adc 5>, <&cpcap_adc 6>;
io-channel-names = "battdetb", "battp",
"chg_isense", "batti";
power-supplies = <&cpcap_charger>;
};
};
@@ -0,0 +1,106 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/cpcap-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Motorola CPCAP PMIC charger
maintainers:
- Tony Lindgren <tony@atomide.com>
- Sebastian Reichel <sre@kernel.org>
description: |
Motorola CPCAP is a PMIC found in some mobile phones, e.g.
the Droid 4. This binding describes its battery charger
sub-function.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: motorola,mapphone-cpcap-charger
interrupts:
items:
- description: charger detection interrupt
- description: reverse charge interrupt
- description: SE1 charger detection interrupt
- description: SE0 charger detection interrupt
- description: reverse mode interrupt
- description: charge current 2 interrupt
- description: charge current 1 interrupt
- description: VBUS valid interrupt
- description: battery detect interrupt
interrupt-names:
items:
- const: chrg_det
- const: rvrs_chrg
- const: chrg_se1b
- const: se0conn
- const: rvrs_mode
- const: chrgcurr2
- const: chrgcurr1
- const: vbusvld
- const: battdetb
io-channels:
items:
- description: battery temperature
- description: battery voltage
- description: VBUS voltage
- description: battery charge current
- description: battery current
io-channel-names:
items:
- const: battdetb
- const: battp
- const: vbus
- const: chg_isense
- const: batti
mode-gpios:
description: |
Optionally CPCAP charger can have a companion wireless
charge controller that is controlled with two GPIOs
that are active low.
minItems: 2
maxItems: 2
required:
- compatible
- interrupts
- interrupt-names
- io-channels
- io-channel-names
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
cpcap {
charger {
compatible = "motorola,mapphone-cpcap-charger";
interrupts-extended =
<&cpcap 13 0>, <&cpcap 12 0>, <&cpcap 29 0>, <&cpcap 28 0>,
<&cpcap 22 0>, <&cpcap 21 0>, <&cpcap 20 0>, <&cpcap 19 0>,
<&cpcap 54 0>;
interrupt-names =
"chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
"rvrs_mode", "chrgcurr2", "chrgcurr1", "vbusvld",
"battdetb";
mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>,
<&gpio3 23 GPIO_ACTIVE_LOW>;
io-channels = <&cpcap_adc 0>, <&cpcap_adc 1>,
<&cpcap_adc 2>, <&cpcap_adc 5>,
<&cpcap_adc 6>;
io-channel-names = "battdetb", "battp",
"vbus", "chg_isense",
"batti";
};
};
@@ -0,0 +1,77 @@
# 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.
allOf:
- $ref: power-supply.yaml#
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:
minItems: 1
maxItems: 8 # Should be enough
monitored-battery: true
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
cw2015@62 {
compatible = "cellwise,cw2015";
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>;
};
};
@@ -0,0 +1,52 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/dlg,da9150-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dialog Semiconductor DA9150 Charger Power Supply
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: dlg,da9150-charger
io-channels:
items:
- description: ADC channel for current
- description: ADC channel for bus voltage
- description: ADC channel for junction temperature
- description: ADC channel for battery voltage
io-channel-names:
items:
- const: CHAN_IBUS
- const: CHAN_VBUS
- const: CHAN_TJUNC
- const: CHAN_VBAT
required:
- compatible
additionalProperties: false
examples:
- |
pmic {
charger {
compatible = "dlg,da9150-charger";
io-channels = <&gpadc 0>,
<&gpadc 2>,
<&gpadc 8>,
<&gpadc 5>;
io-channel-names = "CHAN_IBUS",
"CHAN_VBUS",
"CHAN_TJUNC",
"CHAN_VBAT";
};
};
@@ -0,0 +1,51 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/dlg,da9150-fuel-gauge.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Dialog Semiconductor DA9150 Fuel-Gauge Power Supply
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: dlg,da9150-fuel-gauge
dlg,update-interval:
$ref: /schemas/types.yaml#/definitions/uint32
description: Interval time (milliseconds) between battery level checks.
dlg,warn-soc-level:
$ref: /schemas/types.yaml#/definitions/uint8
minimum: 1
maximum: 100
description: Battery discharge level (%) where warning event raised.
dlg,crit-soc-level:
$ref: /schemas/types.yaml#/definitions/uint8
minimum: 1
maximum: 100
description: |
Battery discharge level (%) where critical event raised.
This value should be lower than the warning level.
required:
- compatible
additionalProperties: false
examples:
- |
pmic {
battery {
compatible = "dlg,da9150-fuel-gauge";
dlg,update-interval = <10000>;
dlg,warn-soc-level = /bits/ 8 <15>;
dlg,crit-soc-level = /bits/ 8 <5>;
};
};
@@ -0,0 +1,41 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/google,goldfish-battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Android Goldfish Battery
maintainers:
- Kuan-Wei Chiu <visitorckw@gmail.com>
allOf:
- $ref: power-supply.yaml#
description:
Android goldfish battery device generated by Android emulator.
properties:
compatible:
const: google,goldfish-battery
reg:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
battery@9020000 {
compatible = "google,goldfish-battery";
reg = <0x9020000 0x1000>;
interrupts = <3>;
};
@@ -0,0 +1,100 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/gpio-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: simple battery chargers only communicating through GPIOs
maintainers:
- Sebastian Reichel <sre@kernel.org>
description:
This binding is for all chargers, which are working more or less
autonomously, only providing some status GPIOs and possibly some
GPIOs for limited control over the charging process.
properties:
compatible:
const: gpio-charger
charger-type:
enum:
- unknown
- battery
- ups
- mains
- usb-sdp # USB standard downstream port
- usb-dcp # USB dedicated charging port
- usb-cdp # USB charging downstream port
- usb-aca # USB accessory charger adapter
description:
Type of the charger, e.g. "mains" for a wall charger.
gpios:
maxItems: 1
description: GPIO indicating the charger presence
charge-status-gpios:
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.
charge-current-limit-default-microamp:
description: Default charge current limit. Must be listed in
charge-current-limit-mapping.
required:
- compatible
anyOf:
- required:
- 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 ]
charge-current-limit-default-microamp: [charge-current-limit-mapping]
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
charger {
compatible = "gpio-charger";
charger-type = "usb-sdp";
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
charge-current-limit-default-microamp = <700000>;
};
@@ -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
maintainers:
- Artur Rojek <contact@artur-rojek.eu>
$ref: power-supply.yaml#
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: >
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>;
};
@@ -0,0 +1,42 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021 Sebastian Reichel
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/isp1704.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP ISP1704 USB Charger Detection
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: nxp,isp1704
nxp,enable-gpio:
maxItems: 1
description: GPIO connected to the chip's enable pin
usb-phy:
$ref: /schemas/types.yaml#/definitions/phandle
description: USB PHY the ISP1704 is connected to
required:
- compatible
- nxp,enable-gpio
- usb-phy
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
charger-detect {
compatible = "nxp,isp1704";
nxp,enable-gpio = <&gpio3 3 GPIO_ACTIVE_LOW>;
usb-phy = <&usb2_phy>;
};
@@ -0,0 +1,55 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/lego,ev3-battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LEGO MINDSTORMS EV3 Battery
maintainers:
- David Lechner <david@lechnology.com>
- Sebastian Reichel <sre@kernel.org>
description: |
LEGO MINDSTORMS EV3 has some built-in capability for monitoring the battery.
It uses 6 AA batteries or a special Li-ion rechargeable battery pack that is
detected by a key switch in the battery compartment.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: lego,ev3-battery
io-channels:
items:
- description: ADC channel for battery voltage
- description: ADC channel for battery current
io-channel-names:
items:
- const: voltage
- const: current
rechargeable-gpios:
maxItems: 1
description: Rechargeable battery indication gpio
required:
- compatible
- io-channels
- io-channel-names
- rechargeable-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
battery {
compatible = "lego,ev3-battery";
io-channels = <&adc 4>, <&adc 3>;
io-channel-names = "voltage", "current";
rechargeable-gpios = <&gpio 136 GPIO_ACTIVE_LOW>;
};
@@ -0,0 +1,44 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/lltc,lt3651-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Analog Devices LT3651 Charger Power Supply
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- lltc,lt3651-charger
- lltc,ltc3651-charger # deprecated, use lltc,lt3651-charger
lltc,acpr-gpios:
maxItems: 1
lltc,fault-gpios:
maxItems: 1
lltc,chrg-gpios:
maxItems: 1
required:
- compatible
- lltc,acpr-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
charger {
compatible = "lltc,lt3651-charger";
lltc,acpr-gpios = <&gpio0 68 GPIO_ACTIVE_LOW>;
lltc,fault-gpios = <&gpio0 64 GPIO_ACTIVE_LOW>;
lltc,chrg-gpios = <&gpio0 63 GPIO_ACTIVE_LOW>;
};
@@ -0,0 +1,66 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/lltc,ltc294x.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: LTC2941, LTC2942, LTC2943 and LTC2944 battery fuel gauges
description: |
All chips measure battery capacity.
The LTC2942 is pin compatible with the LTC2941, it adds voltage and
temperature monitoring, and is runtime detected. LTC2943 and LTC2944
are software compatible, uses a slightly different conversion formula
for the charge counter and adds voltage, current and temperature monitoring.
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- lltc,ltc2941
- lltc,ltc2942
- lltc,ltc2943
- lltc,ltc2944
reg:
maxItems: 1
lltc,resistor-sense:
$ref: /schemas/types.yaml#/definitions/int32
description: |
Sense resistor value in milli-ohms.
Can be negative value when the battery has been connected to the wrong end of the resistor.
lltc,prescaler-exponent:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
The prescaler exponent as explained in the datasheet.
This determines the range and accuracy of the gauge.
The value is programmed into the chip only if it differs from the current setting.
The setting is lost when the battery is disconnected.
required:
- compatible
- reg
- lltc,resistor-sense
- lltc,prescaler-exponent
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
battery@64 {
compatible = "lltc,ltc2943";
reg = <0x64>;
lltc,resistor-sense = <15>;
lltc,prescaler-exponent = <5>; /* 2^(2*5) = 1024 */
};
};
@@ -0,0 +1,73 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright (C) 2020 Topic Embedded Products
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/ltc4162-l.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Linear Technology (Analog Devices) LTC4162-L Charger
maintainers:
- Mike Looijmans <mike.looijmans@topic.nl>
description: |
The LTC ® 4162-L is an advanced monolithic synchronous step-down switching
battery charger and PowerPath (TM) manager that seamlessly manages power
distribution between input sources such as wall adapters, backplanes, solar
panels, etc., and a rechargeable Lithium-Ion/Polymer battery.
Specifications about the charger can be found at:
https://www.analog.com/en/products/ltc4162-l.html
https://www.analog.com/en/products/ltc4162-f.html
https://www.analog.com/en/products/ltc4162-s.html
https://www.analog.com/en/products/ltc4015.html
properties:
compatible:
enum:
- lltc,ltc4015
- lltc,ltc4162-f
- lltc,ltc4162-l
- lltc,ltc4162-s
reg:
maxItems: 1
description: I2C address of the charger.
lltc,rsnsb-micro-ohms:
description: Battery sense resistor in microohm.
minimum: 1000
lltc,rsnsi-micro-ohms:
description: Input current sense resistor in microohm.
minimum: 1000
lltc,cell-count:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Number of battery cells. If not provided, will be obtained from the chip
once the external power is applied. Omit this when the number of cells
is somewhat dynamic. Without it, several measurements will return 0 until
the charger is connected to an external supply.
required:
- compatible
- reg
- lltc,rsnsb-micro-ohms
- lltc,rsnsi-micro-ohms
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger: battery-charger@68 {
compatible = "lltc,ltc4162-l";
reg = <0x68>;
lltc,rsnsb-micro-ohms = <10000>;
lltc,rsnsi-micro-ohms = <16000>;
lltc,cell-count = <2>;
};
};
@@ -0,0 +1,37 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/max77650-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Battery charger driver for MAX77650 PMIC from Maxim Integrated.
maintainers:
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
description: |
This module is part of the MAX77650 MFD device. For more details
see Documentation/devicetree/bindings/mfd/max77650.yaml.
The charger is represented as a sub-node of the PMIC node on the device tree.
properties:
compatible:
const: maxim,max77650-charger
input-voltage-min-microvolt:
description:
Minimum CHGIN regulation voltage.
enum: [ 4000000, 4100000, 4200000, 4300000,
4400000, 4500000, 4600000, 4700000 ]
input-current-limit-microamp:
description:
CHGIN input current limit (in microamps).
enum: [ 95000, 190000, 285000, 380000, 475000 ]
required:
- compatible
additionalProperties: false
...
@@ -0,0 +1,43 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,ds2760.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim DS2760
maintainers:
- Sebastian Reichel <sre@kernel.org>
description: |
The ds2760 is a w1 slave device and must hence have its sub-node in
DT under a w1 bus master node.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: maxim,ds2760
maxim,pmod-enabled:
description: |
Allow the DS2760 to enter sleep mode when the DQ line goes low for more than 2 seconds
and leave sleep Mode when the DQ line goes high.
type: boolean
maxim,cache-time-ms:
description: |
Time im milliseconds to cache the data for.
When this time expires, the values are read again from the hardware.
Defaults to 1000.
rated-capacity-microamp-hours:
description: |
The rated capacity of the battery, in mAh.
If not specified, the value stored in the non-volatile chip memory is used.
required:
- compatible
unevaluatedProperties: false
@@ -0,0 +1,84 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max14577.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX14577/MAX77836 MicroUSB and Companion Power Management IC Charger
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
This is a part of device tree bindings for Maxim MAX14577/MAX77836 MicroUSB
Integrated Circuit (MUIC).
See also Documentation/devicetree/bindings/mfd/maxim,max14577.yaml for
additional information and example.
properties:
compatible:
enum:
- maxim,max14577-charger
- maxim,max77836-charger
maxim,constant-uvolt:
description:
Battery Constant Voltage in uV
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 4000000
maximum: 4350000
maxim,eoc-uamp:
description: |
Current in uA for End-Of-Charge mode.
MAX14577: 50000-20000
MAX77836: 5000-100000
$ref: /schemas/types.yaml#/definitions/uint32
maxim,fast-charge-uamp:
description: |
Current in uA for Fast Charge
MAX14577: 90000-950000
MAX77836: 45000-475000
$ref: /schemas/types.yaml#/definitions/uint32
maxim,ovp-uvolt:
description:
OverVoltage Protection Threshold in uV; In an overvoltage condition, INT
asserts and charging stops.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [6000000, 6500000, 7000000, 7500000]
required:
- compatible
- maxim,constant-uvolt
- maxim,eoc-uamp
- maxim,fast-charge-uamp
- maxim,ovp-uvolt
allOf:
- if:
properties:
compatible:
contains:
const: maxim,max14577-charger
then:
properties:
maxim,eoc-uamp:
minimum: 50000
maximum: 200000
maxim,fast-charge-uamp:
minimum: 90000
maximum: 950000
else:
# max77836
properties:
maxim,eoc-uamp:
minimum: 5000
maximum: 100000
maxim,fast-charge-uamp:
minimum: 45000
maximum: 475000
additionalProperties: false
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max14656.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX14656
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: maxim,max14656
reg:
maxItems: 1
interrupts:
maxItems: 1
required:
- compatible
- reg
- interrupts
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger-detector@35 {
compatible = "maxim,max14656";
reg = <0x35>;
interrupt-parent = <&gpio6>;
interrupts = <26 IRQ_TYPE_LEVEL_HIGH>;
};
};
@@ -0,0 +1,128 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max17040.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim 17040 fuel gauge series
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- maxim,max17040
- maxim,max17041
- maxim,max17043
- maxim,max17044
- maxim,max17048
- maxim,max17049
- maxim,max17058
- maxim,max17059
- maxim,max77836-battery
reg:
maxItems: 1
maxim,alert-low-soc-level:
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 1
maximum: 32
description: |
The alert threshold that sets the state of charge level (%) where an interrupt is generated.
If skipped the power up default value of 4 (%) will be used.
maxim,double-soc:
type: boolean
description: |
Certain devices return double the capacity.
Specify this to divide the reported value in 2 and thus normalize it.
SoC == State of Charge == Capacity.
maxim,rcomp:
$ref: /schemas/types.yaml#/definitions/uint8-array
minItems: 1
maxItems: 2
description: |
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:
maxItems: 1
io-channels:
items:
- description: battery temperature
io-channel-names:
items:
- const: temp
wakeup-source:
type: boolean
description: |
Use this property to use alert low SoC level interrupt as wake up source.
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
battery@36 {
compatible = "maxim,max17048";
reg = <0x36>;
maxim,rcomp = /bits/ 8 <0x56>;
maxim,alert-low-soc-level = <10>;
maxim,double-soc;
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
battery@36 {
compatible = "maxim,max77836-battery";
reg = <0x36>;
maxim,alert-low-soc-level = <10>;
interrupt-parent = <&gpio7>;
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
wakeup-source;
};
};
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
fuel-gauge@36 {
compatible = "maxim,max17043";
reg = <0x36>;
interrupt-parent = <&gpio>;
interrupts = <144 IRQ_TYPE_EDGE_FALLING>;
monitored-battery = <&battery>;
power-supplies = <&charger>;
io-channels = <&adc 8>;
io-channel-names = "temp";
maxim,alert-low-soc-level = <10>;
wakeup-source;
};
};
@@ -0,0 +1,91 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max17042.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim 17042 fuel gauge series
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- maxim,max17042
- maxim,max17047
- maxim,max17050
- maxim,max17055
- maxim,max77705-battery
- maxim,max77759-fg
- maxim,max77849-battery
reg:
maxItems: 1
interrupts:
maxItems: 1
description:
The ALRT pin (or FG_INTB pin on MAX77759), an open-drain interrupt.
shunt-resistor-micro-ohms:
description:
Resistance of rsns resistor in micro Ohms (datasheet-recommended value is 10000).
Defining this property enables current-sense functionality.
maxim,rsns-microohm:
deprecated: true
$ref: /schemas/types.yaml#/definitions/uint32
description:
Resistance of rsns resistor in micro Ohms (datasheet-recommended value is 10000).
Defining this property enables current-sense functionality.
maxim,cold-temp:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Temperature threshold to report battery as cold (in tenths of degree Celsius).
Default is not to report cold events.
maxim,over-heat-temp:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Temperature threshold to report battery as over heated (in tenths of degree Celsius).
Default is not to report over heating events.
maxim,dead-volt:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Voltage threshold to report battery as dead (in mV).
Default is not to report dead battery events.
maxim,over-volt:
$ref: /schemas/types.yaml#/definitions/uint32
description:
Voltage threshold to report battery as over voltage (in mV).
Default is not to report over-voltage events.
power-supplies: true
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
battery@36 {
compatible = "maxim,max17042";
reg = <0x36>;
maxim,rsns-microohm = <10000>;
maxim,over-heat-temp = <600>;
maxim,over-volt = <4300>;
};
};
@@ -0,0 +1,58 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max17201.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX17201 fuel gauge
maintainers:
- Dimitri Fedrau <dima.fedrau@gmail.com>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
oneOf:
- const: maxim,max17201
- items:
- enum:
- maxim,max17205
- const: maxim,max17201
reg:
items:
- description: ModelGauge m5 registers
- description: Nonvolatile registers
reg-names:
items:
- const: m5
- const: nvmem
interrupts:
maxItems: 1
required:
- compatible
- reg
- reg-names
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
fuel-gauge@36 {
compatible = "maxim,max17201";
reg = <0x36>, <0xb>;
reg-names = "m5", "nvmem";
interrupt-parent = <&gpio0>;
interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -0,0 +1,70 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max77693.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX77693 MicroUSB and Companion Power Management IC Charger
maintainers:
- Krzysztof Kozlowski <krzk@kernel.org>
description: |
This is a part of device tree bindings for Maxim MAX77693 MicroUSB Integrated
Circuit (MUIC).
See also Documentation/devicetree/bindings/mfd/maxim,max77693.yaml for
additional information and example.
properties:
compatible:
const: maxim,max77693-charger
maxim,constant-microvolt:
description: |
Battery constant voltage in uV. The charger will operate in fast
charge constant current mode till battery voltage reaches this level.
Then the charger will switch to fast charge constant voltage mode.
Also vsys (system voltage) will be set to this value when DC power is
supplied but charger is not enabled.
Valid values: 3650000 - 4400000, step by 25000 (rounded down)
minimum: 3650000
maximum: 4400000
default: 4200000
maxim,min-system-microvolt:
description: |
Minimal system voltage in uV.
enum: [3000000, 3100000, 3200000, 3300000, 3400000, 3500000,
3600000, 3700000]
default: 3600000
maxim,thermal-regulation-celsius:
description: |
Temperature in Celsius for entering high temperature charging mode.
If die temperature exceeds this value the charging current will be
reduced by 105 mA/Celsius.
enum: [70, 85, 100, 115]
default: 100
maxim,battery-overcurrent-microamp:
description: |
Overcurrent protection threshold in uA (current from battery to
system).
Valid values: 2000000 - 3500000, step by 250000 (rounded down)
minimum: 2000000
maximum: 3500000
default: 3500000
maxim,charge-input-threshold-microvolt:
description: |
Threshold voltage in uV for triggering input voltage regulation loop.
If input voltage decreases below this value, the input current will
be reduced to reach the threshold voltage.
enum: [4300000, 4700000, 4800000, 4900000]
default: 4300000
required:
- compatible
additionalProperties: false
@@ -0,0 +1,50 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max77705.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX777705 charger
maintainers:
- Dzmitry Sankouski <dsankouski@gmail.com>
description: |
This is a device tree bindings for charger found in Maxim MAX77705 chip.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: maxim,max77705-charger
interrupts:
maxItems: 1
reg:
maxItems: 1
required:
- compatible
- reg
- monitored-battery
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@69 {
compatible = "maxim,max77705-charger";
reg = <0x69>;
monitored-battery = <&battery>;
interrupt-parent = <&pm8998_gpios>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
};
};
@@ -0,0 +1,44 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max77976.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Integrated MAX77976 Battery charger
maintainers:
- Luca Ceresoli <luca.ceresoli@bootlin.com>
description: |
The Maxim MAX77976 is a 19Vin / 5.5A, 1-Cell Li+ battery charger
configured via I2C.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: maxim,max77976
reg:
maxItems: 1
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@6b {
compatible = "maxim,max77976";
reg = <0x6b>;
};
};
...
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max8903.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim Semiconductor MAX8903 Battery Charger
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: maxim,max8903
dok-gpios:
maxItems: 1
description: Valid DC power has been detected (active low, input)
uok-gpios:
maxItems: 1
description: Valid USB power has been detected (active low, input)
cen-gpios:
maxItems: 1
description: Charge enable pin (active low, output)
chg-gpios:
maxItems: 1
description: Charger status pin (active low, input)
flt-gpios:
maxItems: 1
description: Fault pin (active low, input)
dcm-gpios:
maxItems: 1
description: Current limit mode setting (DC=1 or USB=0, output)
usus-gpios:
maxItems: 1
description: USB suspend pin (active high, output)
required:
- compatible
anyOf:
- required:
- dok-gpios
- required:
- uok-gpios
additionalProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
charger {
compatible = "maxim,max8903";
dok-gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
flt-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
chg-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
cen-gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
};
@@ -0,0 +1,68 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/maxim,max8971.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Maxim MAX8971 IC charger
maintainers:
- Svyatoslav Ryhel <clamor95@gmail.com>
description:
The MAX8971 is a compact, high-frequency, high-efficiency switch-mode charger
for a one-cell lithium-ion (Li+) battery.
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: maxim,max8971
reg:
maxItems: 1
interrupts:
maxItems: 1
monitored-battery: true
port:
description:
An optional port node to link the extcon device to detect type of plug.
$ref: /schemas/graph.yaml#/properties/port
required:
- compatible
- reg
- interrupts
unevaluatedProperties: false
examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@35 {
compatible = "maxim,max8971";
reg = <0x35>;
interrupt-parent = <&gpio>;
interrupts = <74 IRQ_TYPE_LEVEL_LOW>;
monitored-battery = <&battery>;
port {
charger_input: endpoint {
remote-endpoint = <&extcon_output>;
};
};
};
};
...
@@ -0,0 +1,96 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek MT6370 Battery Charger
maintainers:
- ChiaEn Wu <chiaen_wu@richtek.com>
description: |
This module is part of the MT6370 MFD device.
Provides Battery Charger, Boost for OTG devices and BC1.2 detection.
properties:
compatible:
const: mediatek,mt6370-charger
interrupts:
description: |
Specify what irqs are needed to be handled by MT6370 Charger driver.
We need to use the IRQ "MT6370_IRQ_OVPCTRL_UVP_D" to know when USB
is plugged in, and then the driver will enable BC1.2 detection.
After the hardware of MT6370 completes the BC1.2 detection,
IRQ "MT6370_IRQ_ATTACH" will be triggered, and the driver will know
the result of BC1.2 detection.
When the IRQ "MT6370_IRQ_CHG_MIVR" is triggered, it means that the
hardware enters the "Minimum Input Voltage Regulation loop" and
a workaround needs to be applied at this time.
In summary, "MT6370_IRQ_OVPCTRL_UVP_D", "MT6370_IRQ_ATTACH" and
"MT6370_IRQ_CHG_MIVR" are required in this charger driver.
items:
- description: irq of "USB is plugged in"
- description: irq of "BC1.2 is done"
- description: irq of "Minimum Input Voltage Regulation loop is active"
interrupt-names:
items:
- const: uvp_d_evt
- const: attach_i
- const: mivr
io-channels:
description: |
Use ADC channel to read VBUS, IBUS, IBAT, etc., info.
minItems: 1
items:
- description: |
VBUS voltage with lower accuracy (+-75mV) but higher measure
range (1~22V)
- description: |
VBUS voltage with higher accuracy (+-30mV) but lower measure
range (1~9.76V)
- description: the main system input voltage
- description: battery voltage
- description: battery temperature-sense input voltage
- description: IBUS current (required)
- description: battery current
- description: |
regulated output voltage to supply for the PWM low-side gate driver
and the bootstrap capacitor
- description: IC junction temperature
io-channel-names:
minItems: 1
items:
- const: vbusdiv5
- const: vbusdiv2
- const: vsys
- const: vbat
- const: ts_bat
- const: ibus
- const: ibat
- const: chg_vddp
- const: temp_jc
usb-otg-vbus-regulator:
type: object
description: OTG boost regulator.
unevaluatedProperties: false
$ref: /schemas/regulator/regulator.yaml#
properties:
enable-gpios:
maxItems: 1
required:
- compatible
- interrupts
- interrupt-names
- io-channels
additionalProperties: false
...
@@ -0,0 +1,51 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/microchip,ucs1002.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip UCS1002 USB Port Power Controller
maintainers:
- Sebastian Reichel <sre@kernel.org>
properties:
compatible:
const: microchip,ucs1002
reg:
maxItems: 1
interrupts:
maxItems: 2
interrupt-names:
oneOf:
- items:
- const: a_det
- const: alert
- const: a_det
- const: alert
required:
- compatible
- reg
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;
charger@32 {
compatible = "microchip,ucs1002";
reg = <0x32>;
interrupts-extended = <&gpio5 2 IRQ_TYPE_EDGE_BOTH>,
<&gpio3 21 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "a_det", "alert";
};
};
@@ -0,0 +1,38 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/mitsumi,mm8013.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Mitsumi MM8013 fuel gauge
maintainers:
- Konrad Dybcio <konradybcio@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: mitsumi,mm8013
reg:
maxItems: 1
required:
- compatible
- reg
additionalProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
fuel-gauge@55 {
compatible = "mitsumi,mm8013";
reg = <0x55>;
};
};
@@ -0,0 +1,47 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/mt6360_charger.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Battery charger driver for MT6360 PMIC from MediaTek Integrated.
maintainers:
- Gene Chen <gene_chen@richtek.com>
description: |
This module is part of the MT6360 MFD device.
Provides Battery Charger, Boost for OTG devices and BC1.2 detection.
properties:
compatible:
const: mediatek,mt6360-chg
richtek,vinovp-microvolt:
description: Maximum CHGIN regulation voltage in uV.
enum: [ 5500000, 6500000, 11000000, 14500000 ]
usb-otg-vbus-regulator:
type: object
description: OTG boost regulator.
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
required:
- compatible
additionalProperties: false
examples:
- |
mt6360_charger: charger {
compatible = "mediatek,mt6360-chg";
richtek,vinovp-microvolt = <14500000>;
otg_vbus_regulator: usb-otg-vbus-regulator {
regulator-name = "usb-otg-vbus";
regulator-min-microvolt = <4425000>;
regulator-max-microvolt = <5825000>;
};
};
...
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/nokia,n900-battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Nokia N900 battery
maintainers:
- Pali Rohár <pali@kernel.org>
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
const: nokia,n900-battery
io-channels:
items:
- description: ADC channel for temperature reading
- description: ADC channel for battery size identification
- description: ADC channel to measure the battery voltage
io-channel-names:
items:
- const: temp
- const: bsi
- const: vbat
required:
- compatible
- io-channels
- io-channel-names
additionalProperties: false
examples:
- |
battery {
compatible = "nokia,n900-battery";
io-channels = <&twl4030_madc 0>,
<&twl4030_madc 4>,
<&twl4030_madc 12>;
io-channel-names = "temp",
"bsi",
"vbat";
};
@@ -0,0 +1,27 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/olpc-battery.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: OLPC Battery
maintainers:
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
oneOf:
- items:
- const: olpc,xo1.5-battery
- const: olpc,xo1-battery
- items:
- const: olpc,xo1-battery
required:
- compatible
additionalProperties: false
@@ -0,0 +1,49 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/supply/pegatron,chagall-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Pegatron Chagall EC
maintainers:
- Svyatoslav Ryhel <clamor95@gmail.com>
description:
Pegatron Chagall EC is based on an 8-bit programmable microcontroller from
Infineon/Cypress Semiconductor, it communicates over I2C and is used in the
Pegatron Chagall tablet for fuel gauge and battery control functions.
$ref: /schemas/power/supply/power-supply.yaml
properties:
compatible:
const: pegatron,chagall-ec
reg:
maxItems: 1
monitored-battery: true
power-supplies: true
required:
- compatible
- reg
unevaluatedProperties: false
examples:
- |
i2c {
#address-cells = <1>;
#size-cells = <0>;
embedded-controller@10 {
compatible = "pegatron,chagall-ec";
reg = <0x10>;
monitored-battery = <&battery>;
power-supplies = <&mains>;
};
};
...
@@ -0,0 +1,27 @@
# 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
items:
maxItems: 1
description:
This property is added to a supply in order to list the devices which
supply it power, referenced by their phandles.
monitored-battery:
$ref: /schemas/types.yaml#/definitions/phandle
description:
The battery (with "simple-battery" compatible) being monitored by this
power supply.
additionalProperties: true

Some files were not shown because too many files have changed in this diff Show More