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