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    description:
46      Properties for single display bias regulator.
47
48    properties:
49      enable-gpios:
50        description:
51          GPIO to use to enable DSVP/DSVN regulator. One GPIO can be configured
52          for controlling both regulators.  If this property not specified for
53          any regulator, treat both as always-on regulators.
54        maxItems: 1
55
56required:
57  - compatible
58  - reg
59
60additionalProperties: false
61
62examples:
63  - |
64    i2c {
65        #address-cells = <1>;
66        #size-cells = <0>;
67
68        rt4801@73 {
69            compatible = "richtek,rt4801";
70            reg = <0x73>;
71
72            dsvp: DSVP {
73                regulator-name = "rt4801,dsvp";
74                regulator-min-microvolt = <4000000>;
75                regulator-max-microvolt = <6000000>;
76                regulator-boot-on;
77                enable-gpios = <&gpio26 2 0>;
78            };
79            dsvn: DSVN {
80                regulator-name = "rt4801,dsvn";
81                regulator-min-microvolt = <4000000>;
82                regulator-max-microvolt = <6000000>;
83                regulator-boot-on;
84                enable-gpios = <&gpio26 3 0>;
85            };
86
87        };
88    };
89