18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/regulator/richtek,rt4801-regulator.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: Richtek RT4801 Display Bias regulators
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - ChiYuan Huang <cy_huang@richtek.com>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cidescription: |
138c2ecf20Sopenharmony_ci  Regulator nodes should be named to DSVP and DSVN. The
148c2ecf20Sopenharmony_ci  definition for each of these nodes is defined using the standard
158c2ecf20Sopenharmony_ci  binding for regulators at
168c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/regulator/regulator.txt.
178c2ecf20Sopenharmony_ci  Datasheet is available at
188c2ecf20Sopenharmony_ci  https://www.richtek.com/assets/product_file/RT4801H/DS4801H-00.pdf
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#The valid names for RT4801 regulator nodes are:
218c2ecf20Sopenharmony_ci#DSVP, DSVN
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciproperties:
248c2ecf20Sopenharmony_ci  compatible:
258c2ecf20Sopenharmony_ci    enum:
268c2ecf20Sopenharmony_ci      - richtek,rt4801
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci  reg:
298c2ecf20Sopenharmony_ci    maxItems: 1
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci  enable-gpios:
328c2ecf20Sopenharmony_ci    description: GPIOs to use to enable DSVP/DSVN regulator.
338c2ecf20Sopenharmony_ci      The first one is ENP to enable DSVP, and second one is ENM to enable DSVN.
348c2ecf20Sopenharmony_ci      Number of GPIO in the array list could be 1 or 2.
358c2ecf20Sopenharmony_ci      If only one gpio is specified, only one gpio used to control ENP/ENM.
368c2ecf20Sopenharmony_ci      Else both are spefied, DSVP/DSVN could be controlled individually.
378c2ecf20Sopenharmony_ci      Othersie, this property not specified. treat both as always-on regulator.
388c2ecf20Sopenharmony_ci    minItems: 1
398c2ecf20Sopenharmony_ci    maxItems: 2
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_cipatternProperties:
428c2ecf20Sopenharmony_ci  "^DSV(P|N)$":
438c2ecf20Sopenharmony_ci    type: object
448c2ecf20Sopenharmony_ci    $ref: regulator.yaml#
458c2ecf20Sopenharmony_ci    description:
468c2ecf20Sopenharmony_ci      Properties for single display bias regulator.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_cirequired:
498c2ecf20Sopenharmony_ci  - compatible
508c2ecf20Sopenharmony_ci  - reg
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciadditionalProperties: false
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ciexamples:
558c2ecf20Sopenharmony_ci  - |
568c2ecf20Sopenharmony_ci    i2c {
578c2ecf20Sopenharmony_ci        #address-cells = <1>;
588c2ecf20Sopenharmony_ci        #size-cells = <0>;
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci        rt4801@73 {
618c2ecf20Sopenharmony_ci            compatible = "richtek,rt4801";
628c2ecf20Sopenharmony_ci            reg = <0x73>;
638c2ecf20Sopenharmony_ci            enable-gpios = <&gpio26 2 0>, <&gpio26 3 0>;
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci            dsvp: DSVP {
668c2ecf20Sopenharmony_ci                regulator-name = "rt4801,dsvp";
678c2ecf20Sopenharmony_ci                regulator-min-microvolt = <4000000>;
688c2ecf20Sopenharmony_ci                regulator-max-microvolt = <6000000>;
698c2ecf20Sopenharmony_ci                regulator-boot-on;
708c2ecf20Sopenharmony_ci            };
718c2ecf20Sopenharmony_ci            dsvn: DSVN {
728c2ecf20Sopenharmony_ci                regulator-name = "rt4801,dsvn";
738c2ecf20Sopenharmony_ci                regulator-min-microvolt = <4000000>;
748c2ecf20Sopenharmony_ci                regulator-max-microvolt = <6000000>;
758c2ecf20Sopenharmony_ci                regulator-boot-on;
768c2ecf20Sopenharmony_ci            };
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci        };
798c2ecf20Sopenharmony_ci    };
80