Create YAML bindings for the Active-semi PMICs and remove the old text files. The bindings aren't perfect, for instance I couldn't find good descriptions for the vendor properties in the "charger" node of the ACT8945A because I am not familiar with the hardware and these properties were not documented anywhere. The YAML schemas are a bit different than what is described in the old text files, because these were sometimes wrong or had missing information. This is the case for the ACT8600 documentation, which specified the valid node names for the regulators, while the driver was expecting different names. This led to the current situation where we have two different boards using different names for the regulators: - arch/mips/boot/dts/ingenic/ci20.dts uses the names documented in the text file, - arch/mips/boot/dts/ingenic/gcw0.dts uses the names that the driver expects. In theory, the driver should be fixed to follow the documentation, and accept both naming schemes. In practice though, when the PMIC node was added to the ci20.dts board file, the names were already wrong in regards to what the driver expected, so it never really worked correctly and wasn't tested properly. Furthermore, in that board the consumers of the regulators aren't working for various other reasons (invalid GPIOs, etc.). For that reason, for the ACT8600 bindings I decided to only use the node names that the driver expects (and that gcw0.dts uses), instead of accepting both old and new names. A follow-up patch will update the CI20 board to use the new regulator names. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20221214155152.14349-1-paul@crapouillou.net Signed-off-by: Mark Brown <broonie@kernel.org>
259 lines
7.5 KiB
YAML
259 lines
7.5 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/regulator/active-semi,act8945a.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Active-semi ACT8945a regulator
|
|
|
|
maintainers:
|
|
- Paul Cercueil <paul@crapouillou.net>
|
|
|
|
properties:
|
|
compatible:
|
|
const: active-semi,act8945a
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
system-power-controller:
|
|
description:
|
|
Indicates that the ACT8945a is responsible for powering OFF
|
|
the system.
|
|
type: boolean
|
|
|
|
active-semi,vsel-high:
|
|
description:
|
|
Indicates the VSEL pin is high. If this property is missing,
|
|
the VSEL pin is assumed to be low.
|
|
type: boolean
|
|
|
|
regulators:
|
|
type: object
|
|
additionalProperties: false
|
|
|
|
properties:
|
|
REG_DCDC1:
|
|
type: object
|
|
$ref: /schemas/regulator/regulator.yaml#
|
|
unevaluatedProperties: false
|
|
|
|
properties:
|
|
vp1-supply:
|
|
description: Handle to the VP1 input supply
|
|
|
|
REG_DCDC2:
|
|
type: object
|
|
$ref: /schemas/regulator/regulator.yaml#
|
|
unevaluatedProperties: false
|
|
|
|
properties:
|
|
vp2-supply:
|
|
description: Handle to the VP2 input supply
|
|
|
|
REG_DCDC3:
|
|
type: object
|
|
$ref: /schemas/regulator/regulator.yaml#
|
|
unevaluatedProperties: false
|
|
|
|
properties:
|
|
vp3-supply:
|
|
description: Handle to the VP3 input supply
|
|
|
|
patternProperties:
|
|
"^REG_LDO[1-2]$":
|
|
type: object
|
|
$ref: /schemas/regulator/regulator.yaml#
|
|
unevaluatedProperties: false
|
|
|
|
properties:
|
|
inl45-supply:
|
|
description: Handle to the INL45 input supply
|
|
|
|
"^REG_LDO[3-4]$":
|
|
type: object
|
|
$ref: /schemas/regulator/regulator.yaml#
|
|
unevaluatedProperties: false
|
|
|
|
properties:
|
|
inl67-supply:
|
|
description: Handle to the INL67 input supply
|
|
|
|
charger:
|
|
type: object
|
|
additionalProperties: false
|
|
|
|
properties:
|
|
compatible:
|
|
const: active-semi,act8945a-charger
|
|
|
|
interrupts:
|
|
maxItems: 1
|
|
|
|
active-semi,chglev-gpios:
|
|
description: CGHLEV GPIO
|
|
maxItems: 1
|
|
|
|
active-semi,lbo-gpios:
|
|
description: LBO GPIO
|
|
maxItems: 1
|
|
|
|
active-semi,input-voltage-threshold-microvolt:
|
|
description: Input voltage threshold
|
|
maxItems: 1
|
|
|
|
active-semi,precondition-timeout:
|
|
description: Precondition timeout
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
|
|
active-semi,total-timeout:
|
|
description: Total timeout
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
|
|
required:
|
|
- compatible
|
|
- interrupts
|
|
|
|
additionalProperties: false
|
|
|
|
required:
|
|
- reg
|
|
- compatible
|
|
- regulators
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/interrupt-controller/irq.h>
|
|
#include <dt-bindings/mfd/atmel-flexcom.h>
|
|
#include <dt-bindings/regulator/active-semi,8945a-regulator.h>
|
|
|
|
i2c {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
pmic@5b {
|
|
compatible = "active-semi,act8945a";
|
|
reg = <0x5b>;
|
|
active-semi,vsel-high;
|
|
|
|
regulators {
|
|
REG_DCDC1 {
|
|
regulator-name = "VDD_1V35";
|
|
regulator-min-microvolt = <1350000>;
|
|
regulator-max-microvolt = <1350000>;
|
|
regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
|
|
<ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
|
|
regulator-always-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-on-in-suspend;
|
|
regulator-suspend-min-microvolt = <1400000>;
|
|
regulator-suspend-max-microvolt = <1400000>;
|
|
regulator-changeable-in-suspend;
|
|
regulator-mode = <ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
};
|
|
};
|
|
|
|
REG_DCDC2 {
|
|
regulator-name = "VDD_1V2";
|
|
regulator-min-microvolt = <1100000>;
|
|
regulator-max-microvolt = <1300000>;
|
|
regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
|
|
<ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
|
|
regulator-always-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-off-in-suspend;
|
|
};
|
|
};
|
|
|
|
REG_DCDC3 {
|
|
regulator-name = "VDD_3V3";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_FIXED>,
|
|
<ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
regulator-initial-mode = <ACT8945A_REGULATOR_MODE_FIXED>;
|
|
regulator-always-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-off-in-suspend;
|
|
};
|
|
};
|
|
|
|
REG_LDO1 {
|
|
regulator-name = "VDD_FUSE";
|
|
regulator-min-microvolt = <2500000>;
|
|
regulator-max-microvolt = <2500000>;
|
|
regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
|
|
<ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
|
|
regulator-always-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-off-in-suspend;
|
|
};
|
|
};
|
|
|
|
REG_LDO2 {
|
|
regulator-name = "VDD_3V3_LP";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
|
|
<ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
|
|
regulator-always-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-off-in-suspend;
|
|
};
|
|
};
|
|
|
|
REG_LDO3 {
|
|
regulator-name = "VDD_LED";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
|
|
<ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
|
|
regulator-always-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-off-in-suspend;
|
|
};
|
|
};
|
|
|
|
REG_LDO4 {
|
|
regulator-name = "VDD_SDHC_1V8";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
regulator-allowed-modes = <ACT8945A_REGULATOR_MODE_NORMAL>,
|
|
<ACT8945A_REGULATOR_MODE_LOWPOWER>;
|
|
regulator-initial-mode = <ACT8945A_REGULATOR_MODE_NORMAL>;
|
|
regulator-always-on;
|
|
|
|
regulator-state-mem {
|
|
regulator-off-in-suspend;
|
|
};
|
|
};
|
|
};
|
|
|
|
charger {
|
|
compatible = "active-semi,act8945a-charger";
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&pinctrl_charger_chglev &pinctrl_charger_lbo &pinctrl_charger_irq>;
|
|
interrupt-parent = <&pioA>;
|
|
interrupts = <45 IRQ_TYPE_EDGE_RISING>;
|
|
|
|
active-semi,chglev-gpios = <&pioA 12 GPIO_ACTIVE_HIGH>;
|
|
active-semi,lbo-gpios = <&pioA 72 GPIO_ACTIVE_LOW>;
|
|
active-semi,input-voltage-threshold-microvolt = <6600>;
|
|
active-semi,precondition-timeout = <40>;
|
|
active-semi,total-timeout = <3>;
|
|
};
|
|
};
|
|
};
|