xref: /linux/Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/regulator/richtek,rtmv20-regulator.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Richtek RTMV20 laser diode regulator
8
9maintainers:
10  - ChiYuan Huang <cy_huang@richtek.com>
11
12description: |
13  Richtek RTMV20 is a load switch current regulator that can supply up to 6A.
14  It is used to drive laser diode. There're two signals for chip controls
15  (Enable/Fail), Enable pin to turn chip on, and Fail pin as fault indication.
16  There're still four pins for camera control, two inputs (strobe and vsync),
17  the others for outputs (fsin1 and fsin2). Strobe input to start the current
18  supply, vsync input from IR camera, and fsin1/fsin2 output for the optional.
19
20properties:
21  compatible:
22    const: richtek,rtmv20
23
24  reg:
25    maxItems: 1
26
27  wakeup-source: true
28
29  interrupts:
30    maxItems: 1
31
32  enable-gpios:
33    description: A connection of the 'enable' gpio line.
34    maxItems: 1
35
36  richtek,ld-pulse-delay-us:
37    description: |
38      load current pulse delay in microsecond after strobe pin pulse high.
39    minimum: 0
40    maximum: 100000
41    default: 0
42
43  richtek,ld-pulse-width-us:
44    description: |
45      Load current pulse width in microsecond after strobe pin pulse high.
46    minimum: 0
47    maximum: 10000
48    default: 1200
49
50  richtek,fsin1-delay-us:
51    description: |
52      Fsin1 pulse high delay in microsecond after vsync signal pulse high.
53    minimum: 0
54    maximum: 100000
55    default: 23000
56
57  richtek,fsin1-width-us:
58    description: |
59      Fsin1 pulse high width in microsecond after vsync signal pulse high.
60    minimum: 40
61    maximum: 10000
62    default: 160
63
64  richtek,fsin2-delay-us:
65    description: |
66      Fsin2 pulse high delay in microsecond after vsync signal pulse high.
67    minimum: 0
68    maximum: 100000
69    default: 23000
70
71  richtek,fsin2-width-us:
72    description: |
73      Fsin2 pulse high width in microsecond after vsync signal pulse high.
74    minimum: 40
75    maximum: 10000
76    default: 160
77
78  richtek,es-pulse-width-us:
79    description: Eye safety function pulse width limit in microsecond.
80    minimum: 0
81    maximum: 10000
82    default: 1200
83
84  richtek,es-ld-current-microamp:
85    description: Eye safety function load current limit in microamp.
86    minimum: 0
87    maximum: 6000000
88    default: 3000000
89
90  richtek,lbp-level-microvolt:
91    description: Low battery protection level in microvolt.
92    minimum: 2400000
93    maximum: 3700000
94    default: 2700000
95
96  richtek,lbp-enable:
97    description: Low battery protection function enable control.
98    type: boolean
99
100  richtek,strobe-polarity-high:
101    description: Strobe pin active polarity control.
102    type: boolean
103
104  richtek,vsync-polarity-high:
105    description: Vsync pin active polarity control.
106    type: boolean
107
108  richtek,fsin-enable:
109    description: Fsin function enable control.
110    type: boolean
111
112  richtek,fsin-output:
113    description: Fsin function output control.
114    type: boolean
115
116  richtek,es-enable:
117    description: Eye safety function enable control.
118    type: boolean
119
120  lsw:
121    description: load switch current regulator description.
122    type: object
123    $ref: regulator.yaml#
124    unevaluatedProperties: false
125
126required:
127  - compatible
128  - reg
129  - wakeup-source
130  - interrupts
131  - enable-gpios
132  - lsw
133
134additionalProperties: false
135
136examples:
137  - |
138    #include <dt-bindings/interrupt-controller/irq.h>
139    i2c {
140      #address-cells = <1>;
141      #size-cells = <0>;
142
143      rtmv20@34 {
144        compatible = "richtek,rtmv20";
145        reg = <0x34>;
146        wakeup-source;
147        interrupts-extended = <&gpio26 2 IRQ_TYPE_LEVEL_LOW>;
148        enable-gpios = <&gpio26 3 0>;
149
150        richtek,strobe-polarity-high;
151        richtek,vsync-polarity-high;
152
153        lsw {
154                regulator-name = "rtmv20,lsw";
155                regulator-min-microamp = <0>;
156                regulator-max-microamp = <6000000>;
157        };
158      };
159    };
160...
161