summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/mfd/richtek,rt5120.yaml
blob: f73b8b25d7d50303c8cfed043babcdc8305ec2ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/richtek,rt5120.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Richtek RT5120 PMIC

maintainers:
  - ChiYuan Huang <cy_huang@richtek.com>

description: |
  The RT5120 provides four high-efficiency buck converters and one LDO voltage
  regulator. The device is targeted at providingthe processor voltage, memory,
  I/O, and peripheral rails in home entertainment devices. The I2C interface is
  used for dynamic voltage scaling of the processor voltage, power rails on/off
  sequence control, operation mode selection.

properties:
  compatible:
    enum:
      - richtek,rt5120

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  interrupt-controller: true

  "#interrupt-cells":
    const: 1

  wakeup-source: true

  richtek,enable-undervolt-hiccup:
    type: boolean
    description: |
      If used, under voltage protection trigger hiccup behavior, else latchup as
      default

  richtek,enable-overvolt-hiccup:
    type: boolean
    description:
      Like as 'enable-uv-hiccup', it configures over voltage protection to
      hiccup, else latchup as default

  vin1-supply:
    description: phandle for buck1 input power source

  vin2-supply:
    description: phandle for buck2 input power source

  vin3-supply:
    description: phandle for buck3 input power source

  vin4-supply:
    description: phandle for buck4 input power source

  vinldo-supply:
    description: phandle for ldo input power source

  regulators:
    type: object

    patternProperties:
      "^buck[1-4]$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

        properties:
          regulator-allowed-modes:
            description: |
              Used to specify the allowed buck converter operating mode
              mode mapping:
                0: auto mode
                1: force pwm mode
            items:
              enum: [0, 1]

      "^(ldo|exten)$":
        type: object
        $ref: /schemas/regulator/regulator.yaml#
        unevaluatedProperties: false

    additionalProperties: false

  powerkey:
    type: object
    description:
      PON key that connected to RT5120 PMIC.

    properties:
      compatible:
        enum:
          - richtek,rt5120-pwrkey

    required:
      - compatible

    additionalProperties: false

required:
  - compatible
  - reg
  - interrupts
  - '#interrupt-cells'
  - interrupt-controller
  - regulators
  - powerkey

additionalProperties: false

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>

    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      pmic@62 {
        compatible = "richtek,rt5120";
        reg = <0x62>;
        interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>;
        interrupt-controller;
        #interrupt-cells = <1>;
        wakeup-source;

        regulators {
          buck1 {
            regulator-name = "rt5120-buck1";
            regulator-min-microvolt = <600000>;
            regulator-max-microvolt = <1393750>;
            regulator-allowed-modes = <0 1>;
            regulator-boot-on;
          };
          buck2 {
            regulator-name = "rt5120-buck2";
            regulator-min-microvolt = <1100000>;
            regulator-max-microvolt = <1100000>;
            regulator-allowed-modes = <0 1>;
            regulator-always-on;
          };
          buck3 {
            regulator-name = "rt5120-buck3";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-allowed-modes = <0 1>;
            regulator-always-on;
          };
          buck4 {
            regulator-name = "rt5120-buck4";
            regulator-min-microvolt = <3300000>;
            regulator-max-microvolt = <3300000>;
            regulator-allowed-modes = <0 1>;
            regulator-always-on;
          };
          ldo {
            regulator-name = "rt5120-ldo";
            regulator-min-microvolt = <1800000>;
            regulator-max-microvolt = <1800000>;
            regulator-always-on;
          };
          exten {
            regulator-name = "rt5120-exten";
            regulator-min-microvolt = <3000000>;
            regulator-max-microvolt = <3000000>;
            regulator-always-on;
          };
        };
        powerkey {
          compatible = "richtek,rt5120-pwrkey";
        };
      };
    };