1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/regulator/richtek,rt4801-regulator.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Richtek RT4801 Display Bias regulators
8
9maintainers:
10  - ChiYuan Huang <cy_huang@richtek.com>
11
12description: |
13  Regulator nodes should be named to DSVP and DSVN. The
14  definition for each of these nodes is defined using the standard
15  binding for regulators at
16  Documentation/devicetree/bindings/regulator/regulator.txt.
17  Datasheet is available at
18  https://www.richtek.com/assets/product_file/RT4801H/DS4801H-00.pdf
19
20properties:
21  compatible:
22    enum:
23      - richtek,rt4801
24
25  reg:
26    maxItems: 1
27
28  enable-gpios:
29    description: GPIOs to use to enable DSVP/DSVN regulator.
30      The first one is ENP to enable DSVP, and second one is ENM to enable DSVN.
31      Number of GPIO in the array list could be 1 or 2.
32      If only one gpio is specified, only one gpio used to control ENP/ENM.
33      Else if both are specified, DSVP/DSVN could be controlled individually.
34      If this property not specified, treat both as always-on regulators.
35
36      Property is deprecated. Use enable-gpios in each regulator.
37    minItems: 1
38    maxItems: 2
39    deprecated: true
40
41patternProperties:
42  "^DSV(P|N)$":
43    type: object
44    $ref: regulator.yaml#
45    unevaluatedProperties: false
46    description:
47      Properties for single display bias regulator.
48
49    properties:
50      enable-gpios:
51        description:
52          GPIO to use to enable DSVP/DSVN regulator. One GPIO can be configured
53          for controlling both regulators.  If this property not specified for
54          any regulator, treat both as always-on regulators.
55        maxItems: 1
56
57required:
58  - compatible
59  - reg
60
61additionalProperties: false
62
63examples:
64  - |
65    i2c {
66        #address-cells = <1>;
67        #size-cells = <0>;
68
69        rt4801@73 {
70            compatible = "richtek,rt4801";
71            reg = <0x73>;
72
73            dsvp: DSVP {
74                regulator-name = "rt4801,dsvp";
75                regulator-min-microvolt = <4000000>;
76                regulator-max-microvolt = <6000000>;
77                regulator-boot-on;
78                enable-gpios = <&gpio26 2 0>;
79            };
80            dsvn: DSVN {
81                regulator-name = "rt4801,dsvn";
82                regulator-min-microvolt = <4000000>;
83                regulator-max-microvolt = <6000000>;
84                regulator-boot-on;
85                enable-gpios = <&gpio26 3 0>;
86            };
87
88        };
89    };
90