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