1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/regulator/dlg,slg51000.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Dialog Semiconductor SLG51000 Voltage Regulator
8
9maintainers:
10  - Eric Jeong <eric.jeong.opensource@diasemi.com>
11  - Support Opensource <support.opensource@diasemi.com>
12
13properties:
14  compatible:
15    const: dlg,slg51000
16
17  reg:
18    maxItems: 1
19
20  interrupts:
21    maxItems: 1
22
23  dlg,cs-gpios:
24    maxItems: 1
25    description:
26      GPIO for chip select
27
28  vin3-supply:
29    description:
30      Input supply for ldo3, required if regulator is enabled
31
32  vin4-supply:
33    description:
34      Input supply for ldo4, required if regulator is enabled
35
36  vin5-supply:
37    description:
38      Input supply for ldo5, required if regulator is enabled
39
40  vin6-supply:
41    description:
42      Input supply for ldo6, required if regulator is enabled
43
44  vin7-supply:
45    description:
46      Input supply for ldo7, required if regulator is enabled
47
48  regulators:
49    type: object
50    additionalProperties: false
51
52    patternProperties:
53      "^ldo[1-7]$":
54        type: object
55        $ref: /schemas/regulator/regulator.yaml#
56        unevaluatedProperties: false
57
58        properties:
59          enable-gpios:
60            maxItems: 1
61
62        required:
63          - regulator-name
64
65required:
66  - compatible
67  - reg
68  - regulators
69
70additionalProperties: false
71
72examples:
73  - |
74    #include <dt-bindings/gpio/gpio.h>
75    #include <dt-bindings/interrupt-controller/irq.h>
76    #include <dt-bindings/regulator/dlg,da9121-regulator.h>
77    i2c {
78        #address-cells = <1>;
79        #size-cells = <0>;
80
81        pmic@75 {
82            compatible = "dlg,slg51000";
83            reg = <0x75>;
84            dlg,cs-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
85            vin5-supply = <&vreg_s1f_1p2>;
86            vin6-supply = <&vreg_s1f_1p2>;
87
88            regulators {
89                ldo1 {
90                    regulator-name = "slg51000_b_ldo1";
91                    regulator-min-microvolt = <2400000>;
92                    regulator-max-microvolt = <3300000>;
93                };
94
95                ldo2 {
96                    regulator-name = "slg51000_b_ldo2";
97                    regulator-min-microvolt = <2400000>;
98                    regulator-max-microvolt = <3300000>;
99                };
100
101                ldo3 {
102                    regulator-name = "slg51000_b_ldo3";
103                    regulator-min-microvolt = <1200000>;
104                    regulator-max-microvolt = <3750000>;
105                };
106
107                ldo4 {
108                    regulator-name = "slg51000_b_ldo4";
109                    regulator-min-microvolt = <1200000>;
110                    regulator-max-microvolt = <3750000>;
111                };
112
113                ldo5 {
114                    regulator-name = "slg51000_b_ldo5";
115                    regulator-min-microvolt = <500000>;
116                    regulator-max-microvolt = <1200000>;
117                };
118
119                ldo6 {
120                    regulator-name = "slg51000_b_ldo6";
121                    regulator-min-microvolt = <500000>;
122                    regulator-max-microvolt = <1200000>;
123                };
124
125                ldo7 {
126                    regulator-name = "slg51000_b_ldo7";
127                    regulator-min-microvolt = <1200000>;
128                    regulator-max-microvolt = <3750000>;
129                };
130            };
131        };
132    };
133