xref: /linux/Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
19f4366ecSChiYuan Huang# SPDX-License-Identifier: GPL-2.0
29f4366ecSChiYuan Huang%YAML 1.2
39f4366ecSChiYuan Huang---
49f4366ecSChiYuan Huang$id: http://devicetree.org/schemas/regulator/richtek,rtmv20-regulator.yaml#
59f4366ecSChiYuan Huang$schema: http://devicetree.org/meta-schemas/core.yaml#
69f4366ecSChiYuan Huang
79f4366ecSChiYuan Huangtitle: Richtek RTMV20 laser diode regulator
89f4366ecSChiYuan Huang
99f4366ecSChiYuan Huangmaintainers:
109f4366ecSChiYuan Huang  - ChiYuan Huang <cy_huang@richtek.com>
119f4366ecSChiYuan Huang
129f4366ecSChiYuan Huangdescription: |
139f4366ecSChiYuan Huang  Richtek RTMV20 is a load switch current regulator that can supply up to 6A.
149f4366ecSChiYuan Huang  It is used to drive laser diode. There're two signals for chip controls
159f4366ecSChiYuan Huang  (Enable/Fail), Enable pin to turn chip on, and Fail pin as fault indication.
169f4366ecSChiYuan Huang  There're still four pins for camera control, two inputs (strobe and vsync),
179f4366ecSChiYuan Huang  the others for outputs (fsin1 and fsin2). Strobe input to start the current
189f4366ecSChiYuan Huang  supply, vsync input from IR camera, and fsin1/fsin2 output for the optional.
199f4366ecSChiYuan Huang
209f4366ecSChiYuan Huangproperties:
219f4366ecSChiYuan Huang  compatible:
229f4366ecSChiYuan Huang    const: richtek,rtmv20
239f4366ecSChiYuan Huang
249f4366ecSChiYuan Huang  reg:
259f4366ecSChiYuan Huang    maxItems: 1
269f4366ecSChiYuan Huang
279f4366ecSChiYuan Huang  wakeup-source: true
289f4366ecSChiYuan Huang
2989a5f77eSChiYuan Huang  interrupts:
309f4366ecSChiYuan Huang    maxItems: 1
319f4366ecSChiYuan Huang
329f4366ecSChiYuan Huang  enable-gpios:
339f4366ecSChiYuan Huang    description: A connection of the 'enable' gpio line.
349f4366ecSChiYuan Huang    maxItems: 1
359f4366ecSChiYuan Huang
3689a5f77eSChiYuan Huang  richtek,ld-pulse-delay-us:
379f4366ecSChiYuan Huang    description: |
389f4366ecSChiYuan Huang      load current pulse delay in microsecond after strobe pin pulse high.
399f4366ecSChiYuan Huang    minimum: 0
409f4366ecSChiYuan Huang    maximum: 100000
419f4366ecSChiYuan Huang    default: 0
429f4366ecSChiYuan Huang
4389a5f77eSChiYuan Huang  richtek,ld-pulse-width-us:
449f4366ecSChiYuan Huang    description: |
459f4366ecSChiYuan Huang      Load current pulse width in microsecond after strobe pin pulse high.
469f4366ecSChiYuan Huang    minimum: 0
479f4366ecSChiYuan Huang    maximum: 10000
489f4366ecSChiYuan Huang    default: 1200
499f4366ecSChiYuan Huang
5089a5f77eSChiYuan Huang  richtek,fsin1-delay-us:
519f4366ecSChiYuan Huang    description: |
529f4366ecSChiYuan Huang      Fsin1 pulse high delay in microsecond after vsync signal pulse high.
539f4366ecSChiYuan Huang    minimum: 0
549f4366ecSChiYuan Huang    maximum: 100000
559f4366ecSChiYuan Huang    default: 23000
569f4366ecSChiYuan Huang
5789a5f77eSChiYuan Huang  richtek,fsin1-width-us:
589f4366ecSChiYuan Huang    description: |
599f4366ecSChiYuan Huang      Fsin1 pulse high width in microsecond after vsync signal pulse high.
609f4366ecSChiYuan Huang    minimum: 40
619f4366ecSChiYuan Huang    maximum: 10000
629f4366ecSChiYuan Huang    default: 160
639f4366ecSChiYuan Huang
6489a5f77eSChiYuan Huang  richtek,fsin2-delay-us:
659f4366ecSChiYuan Huang    description: |
669f4366ecSChiYuan Huang      Fsin2 pulse high delay in microsecond after vsync signal pulse high.
679f4366ecSChiYuan Huang    minimum: 0
689f4366ecSChiYuan Huang    maximum: 100000
699f4366ecSChiYuan Huang    default: 23000
709f4366ecSChiYuan Huang
7189a5f77eSChiYuan Huang  richtek,fsin2-width-us:
729f4366ecSChiYuan Huang    description: |
739f4366ecSChiYuan Huang      Fsin2 pulse high width in microsecond after vsync signal pulse high.
749f4366ecSChiYuan Huang    minimum: 40
759f4366ecSChiYuan Huang    maximum: 10000
769f4366ecSChiYuan Huang    default: 160
779f4366ecSChiYuan Huang
7889a5f77eSChiYuan Huang  richtek,es-pulse-width-us:
799f4366ecSChiYuan Huang    description: Eye safety function pulse width limit in microsecond.
809f4366ecSChiYuan Huang    minimum: 0
819f4366ecSChiYuan Huang    maximum: 10000
829f4366ecSChiYuan Huang    default: 1200
839f4366ecSChiYuan Huang
8489a5f77eSChiYuan Huang  richtek,es-ld-current-microamp:
859f4366ecSChiYuan Huang    description: Eye safety function load current limit in microamp.
869f4366ecSChiYuan Huang    minimum: 0
879f4366ecSChiYuan Huang    maximum: 6000000
889f4366ecSChiYuan Huang    default: 3000000
899f4366ecSChiYuan Huang
9089a5f77eSChiYuan Huang  richtek,lbp-level-microvolt:
919f4366ecSChiYuan Huang    description: Low battery protection level in microvolt.
929f4366ecSChiYuan Huang    minimum: 2400000
939f4366ecSChiYuan Huang    maximum: 3700000
949f4366ecSChiYuan Huang    default: 2700000
959f4366ecSChiYuan Huang
9689a5f77eSChiYuan Huang  richtek,lbp-enable:
979f4366ecSChiYuan Huang    description: Low battery protection function enable control.
989f4366ecSChiYuan Huang    type: boolean
999f4366ecSChiYuan Huang
10089a5f77eSChiYuan Huang  richtek,strobe-polarity-high:
1019f4366ecSChiYuan Huang    description: Strobe pin active polarity control.
1029f4366ecSChiYuan Huang    type: boolean
1039f4366ecSChiYuan Huang
10489a5f77eSChiYuan Huang  richtek,vsync-polarity-high:
1059f4366ecSChiYuan Huang    description: Vsync pin active polarity control.
1069f4366ecSChiYuan Huang    type: boolean
1079f4366ecSChiYuan Huang
10889a5f77eSChiYuan Huang  richtek,fsin-enable:
1099f4366ecSChiYuan Huang    description: Fsin function enable control.
1109f4366ecSChiYuan Huang    type: boolean
1119f4366ecSChiYuan Huang
11289a5f77eSChiYuan Huang  richtek,fsin-output:
1139f4366ecSChiYuan Huang    description: Fsin function output control.
1149f4366ecSChiYuan Huang    type: boolean
1159f4366ecSChiYuan Huang
11689a5f77eSChiYuan Huang  richtek,es-enable:
1179f4366ecSChiYuan Huang    description: Eye safety function enable control.
1189f4366ecSChiYuan Huang    type: boolean
1199f4366ecSChiYuan Huang
12089a5f77eSChiYuan Huang  lsw:
12189a5f77eSChiYuan Huang    description: load switch current regulator description.
1229f4366ecSChiYuan Huang    type: object
123cff5c895SRob Herring    $ref: regulator.yaml#
124*d2d54819SKrzysztof Kozlowski    unevaluatedProperties: false
1259f4366ecSChiYuan Huang
1269f4366ecSChiYuan Huangrequired:
1279f4366ecSChiYuan Huang  - compatible
1289f4366ecSChiYuan Huang  - reg
1299f4366ecSChiYuan Huang  - wakeup-source
13089a5f77eSChiYuan Huang  - interrupts
1319f4366ecSChiYuan Huang  - enable-gpios
1329f4366ecSChiYuan Huang  - lsw
1339f4366ecSChiYuan Huang
1349f4366ecSChiYuan HuangadditionalProperties: false
1359f4366ecSChiYuan Huang
1369f4366ecSChiYuan Huangexamples:
1379f4366ecSChiYuan Huang  - |
1389f4366ecSChiYuan Huang    #include <dt-bindings/interrupt-controller/irq.h>
1399f4366ecSChiYuan Huang    i2c {
1409f4366ecSChiYuan Huang      #address-cells = <1>;
1419f4366ecSChiYuan Huang      #size-cells = <0>;
1429f4366ecSChiYuan Huang
1439f4366ecSChiYuan Huang      rtmv20@34 {
1449f4366ecSChiYuan Huang        compatible = "richtek,rtmv20";
1459f4366ecSChiYuan Huang        reg = <0x34>;
1469f4366ecSChiYuan Huang        wakeup-source;
14789a5f77eSChiYuan Huang        interrupts-extended = <&gpio26 2 IRQ_TYPE_LEVEL_LOW>;
1489f4366ecSChiYuan Huang        enable-gpios = <&gpio26 3 0>;
1499f4366ecSChiYuan Huang
15089a5f77eSChiYuan Huang        richtek,strobe-polarity-high;
15189a5f77eSChiYuan Huang        richtek,vsync-polarity-high;
1529f4366ecSChiYuan Huang
1539f4366ecSChiYuan Huang        lsw {
1549f4366ecSChiYuan Huang                regulator-name = "rtmv20,lsw";
1559f4366ecSChiYuan Huang                regulator-min-microamp = <0>;
1569f4366ecSChiYuan Huang                regulator-max-microamp = <6000000>;
1579f4366ecSChiYuan Huang        };
1589f4366ecSChiYuan Huang      };
1599f4366ecSChiYuan Huang    };
1609f4366ecSChiYuan Huang...
161