dt-bindings: power: supply: axp20x: Convert to DT schema format

Convert the binding to DT schema format.

Cc: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Sebastian Reichel 2021-03-17 14:48:54 +01:00 committed by Sebastian Reichel
parent ee123ad978
commit a3388d750c
6 changed files with 95 additions and 86 deletions

View File

@ -1,25 +0,0 @@
AXP20X and AXP22X PMICs' AC power supply
Required Properties:
- compatible: One of:
"x-powers,axp202-ac-power-supply"
"x-powers,axp221-ac-power-supply"
"x-powers,axp813-ac-power-supply"
This node is a subnode of the axp20x PMIC.
The AXP20X can read the current current and voltage supplied by AC by
reading ADC channels from the AXP20X ADC.
The AXP22X is only able to tell if an AC power supply is present and
usable.
AXP813/AXP803 are able to limit current and supply voltage
Example:
&axp209 {
ac_power_supply: ac-power-supply {
compatible = "x-powers,axp202-ac-power-supply";
};
};

View File

@ -1,20 +0,0 @@
AXP20x and AXP22x battery power supply
Required Properties:
- compatible, one of:
"x-powers,axp209-battery-power-supply"
"x-powers,axp221-battery-power-supply"
"x-powers,axp813-battery-power-supply"
This node is a subnode of its respective PMIC DT node.
The supported devices can read the battery voltage, charge and discharge
currents of the battery by reading ADC channels from the ADC.
Example:
&axp209 {
battery_power_supply: battery-power-supply {
compatible = "x-powers,axp209-battery-power-supply";
}
};

View File

@ -1,41 +0,0 @@
AXP20x USB power supply
Required Properties:
-compatible: One of: "x-powers,axp202-usb-power-supply"
"x-powers,axp221-usb-power-supply"
"x-powers,axp223-usb-power-supply"
"x-powers,axp813-usb-power-supply"
The AXP223 PMIC shares most of its behaviour with the AXP221 but has slight
variations such as the former being able to set the VBUS power supply max
current to 100mA, unlike the latter.
This node is a subnode of the axp20x PMIC.
Example:
axp209: pmic@34 {
compatible = "x-powers,axp209";
reg = <0x34>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
#interrupt-cells = <1>;
regulators {
x-powers,dcdc-freq = <1500>;
vdd_cpu: dcdc2 {
regulator-always-on;
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1450000>;
regulator-name = "vdd-cpu";
};
...
};
usb-power-supply: usb-power-supply {
compatible = "x-powers,axp202-usb-power-supply";
};
};

View File

@ -0,0 +1,32 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: "http://devicetree.org/schemas/power/supply/x-powers,axp20x-ac-power-supply.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: AXP20x AC power-supply
description: |
The AXP20X can read the current current and voltage supplied by AC by
reading ADC channels from the AXP20X ADC. The AXP22X is only able to
tell if an AC power supply is present and usable. AXP813/AXP803 are
able to limit current and supply voltage
maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- x-powers,axp202-ac-power-supply
- x-powers,axp221-ac-power-supply
- x-powers,axp813-ac-power-supply
required:
- compatible
additionalProperties: false

View File

@ -0,0 +1,30 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: "http://devicetree.org/schemas/power/supply/x-powers,axp20x-battery-power-supply.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: AXP20x Battery power-supply
description: |
The supported devices can read the battery voltage, charge and discharge
currents of the battery by reading ADC channels from the ADC.
maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- x-powers,axp209-battery-power-supply
- x-powers,axp221-battery-power-supply
- x-powers,axp813-battery-power-supply
required:
- compatible
additionalProperties: false

View File

@ -0,0 +1,33 @@
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: "http://devicetree.org/schemas/power/supply/x-powers,axp20x-usb-power-supply.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: AXP20x USB power-supply
description: |
The AXP223 PMIC shares most of its behaviour with the AXP221 but has slight
variations such as the former being able to set the VBUS power supply max
current to 100mA, unlike the latter.
maintainers:
- Chen-Yu Tsai <wens@csie.org>
- Sebastian Reichel <sre@kernel.org>
allOf:
- $ref: power-supply.yaml#
properties:
compatible:
enum:
- x-powers,axp202-usb-power-supply
- x-powers,axp221-usb-power-supply
- x-powers,axp223-usb-power-supply
- x-powers,axp813-usb-power-supply
required:
- compatible
additionalProperties: false