linux-stable/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
Johan Hovold 1aa77a7ed0 dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Clean up example
The SPMI PMIC sits on an SPMI bus which and has two address cells with
no size.

Clean up the example by adding a parent SPMI bus node with proper
'#address-cells' and '#size-cells' properties, using a define for the
second register value, dropping the unnecessary label and increasing the
indentation to four spaces.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231206111754.7410-4-johan+linaro@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-12-07 17:01:49 +00:00

133 lines
3.4 KiB
YAML

# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/hisilicon,hi6421-spmi-pmic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: HiSilicon 6421v600 SPMI PMIC
maintainers:
- Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
description: |
HiSilicon 6421v600 should be connected inside a MIPI System Power Management
(SPMI) bus. It provides interrupts and power supply.
The GPIO and interrupt settings are represented as part of the top-level PMIC
node.
The SPMI controller part is provided by
Documentation/devicetree/bindings/spmi/hisilicon,hisi-spmi-controller.yaml
properties:
$nodename:
pattern: "pmic@[0-9a-f]"
compatible:
const: hisilicon,hi6421v600-spmi
reg:
maxItems: 1
'#interrupt-cells':
const: 2
interrupt-controller: true
interrupts:
maxItems: 1
regulators:
type: object
additionalProperties: false
patternProperties:
'^ldo[0-9]+$':
type: object
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
required:
- compatible
- reg
- regulators
additionalProperties: false
examples:
- |
#include <dt-bindings/spmi/spmi.h>
spmi {
#address-cells = <2>;
#size-cells = <0>;
pmic@0 {
compatible = "hisilicon,hi6421v600-spmi";
reg = <0 SPMI_USID>;
#interrupt-cells = <2>;
interrupt-controller;
interrupt-parent = <&gpio28>;
interrupts = <0 0>;
regulators {
ldo3 {
regulator-name = "ldo3";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <2000000>;
regulator-boot-on;
};
ldo4 {
regulator-name = "ldo4";
regulator-min-microvolt = <1725000>;
regulator-max-microvolt = <1900000>;
regulator-boot-on;
};
ldo9 {
regulator-name = "ldo9";
regulator-min-microvolt = <1750000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
};
ldo15 {
regulator-name = "ldo15";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
regulator-always-on;
};
ldo16 {
regulator-name = "ldo16";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
regulator-boot-on;
};
ldo17 {
regulator-name = "ldo17";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <3300000>;
};
ldo33 {
regulator-name = "ldo33";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
};
ldo34 {
regulator-name = "ldo34";
regulator-min-microvolt = <2600000>;
regulator-max-microvolt = <3300000>;
};
};
};
};