Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / staging / hikey9xx / hisilicon,hi6421-spmi-pmic.yaml
blob80e74c261e0536ec12628395dabed51d833d08d3
1 # SPDX-License-Identifier: GPL-2.0
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mfd/hisilicon,hi6421-spmi-pmic.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: HiSilicon 6421v600 SPMI PMIC
9 maintainers:
10   - Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
12 description: |
13   HiSilicon 6421v600 should be connected inside a MIPI System Power Management
14   (SPMI) bus. It provides interrupts and power supply.
16   The GPIO and interrupt settings are represented as part of the top-level PMIC
17   node.
19   The SPMI controller part is provided by
20   drivers/staging/hikey9xx/hisilicon,hisi-spmi-controller.yaml.
22 properties:
23   $nodename:
24     pattern: "pmic@[0-9a-f]"
26   compatible:
27     const: hisilicon,hi6421v600-spmi
29   reg:
30     maxItems: 1
32   '#interrupt-cells':
33     const: 2
35   interrupt-controller:
36     description:
37       Identify that the PMIC is capable of behaving as an interrupt controller.
39   gpios:
40     maxItems: 1
42   regulators:
43     type: object
45     properties:
46       '#address-cells':
47         const: 1
49       '#size-cells':
50         const: 0
52     patternProperties:
53       '^ldo[0-9]+@[0-9a-f]$':
54         type: object
56         $ref: "/schemas/regulator/regulator.yaml#"
58         properties:
59           reg:
60             description: Enable register.
62           '#address-cells':
63             const: 1
65           '#size-cells':
66             const: 0
68           vsel-reg:
69             description: Voltage selector register.
71           enable-mask:
72             description: Bitmask used to enable the regulator.
74           voltage-table:
75             description: Table with the selector items for the voltage regulator.
76             minItems: 2
77             maxItems: 16
79           off-on-delay-us:
80             description: Time required for changing state to enabled in microseconds.
82           startup-delay-us:
83             description: Startup time in microseconds.
85           idle-mode-mask:
86             description: Bitmask used to put the regulator on idle mode.
88           eco-microamp:
89             description: Maximum current while on idle mode.
91         required:
92           - reg
93           - vsel-reg
94           - enable-mask
95           - voltage-table
96           - off-on-delay-us
97           - startup-delay-us
99 required:
100   - compatible
101   - reg
102   - regulators
104 examples:
105   - |
106     /* pmic properties */
108     pmic: pmic@0 {
109       compatible = "hisilicon,hi6421-spmi";
110       reg = <0 0>;
112       #interrupt-cells = <2>;
113       interrupt-controller;
114       gpios = <&gpio28 0 0>;
116       regulators {
117         #address-cells = <1>;
118         #size-cells = <0>;
120         ldo3: ldo3@16 {
121           reg = <0x16>;
122           vsel-reg = <0x51>;
124           regulator-name = "ldo3";
125           regulator-min-microvolt = <1500000>;
126           regulator-max-microvolt = <2000000>;
127           regulator-boot-on;
129           enable-mask = <0x01>;
131           voltage-table = <1500000>, <1550000>, <1600000>, <1650000>,
132                           <1700000>, <1725000>, <1750000>, <1775000>,
133                           <1800000>, <1825000>, <1850000>, <1875000>,
134                           <1900000>, <1925000>, <1950000>, <2000000>;
135           off-on-delay-us = <20000>;
136           startup-delay-us = <120>;
137         };
139         ldo4: ldo4@17 { /* 40 PIN */
140           reg = <0x17>;
141           vsel-reg = <0x52>;
143           regulator-name = "ldo4";
144           regulator-min-microvolt = <1725000>;
145           regulator-max-microvolt = <1900000>;
146           regulator-boot-on;
148           enable-mask = <0x01>;
149           idle-mode-mask = <0x10>;
150           eco-microamp = <10000>;
152           hi6421-vsel = <0x52 0x07>;
153           voltage-table = <1725000>, <1750000>, <1775000>, <1800000>,
154                           <1825000>, <1850000>, <1875000>, <1900000>;
155           off-on-delay-us = <20000>;
156           startup-delay-us = <120>;
157         };
158       };
159     };