Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: rtmv20: Add DT-binding document for Richtek RTMV20

Add DT-binding document for Richtek RTMV20

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Link: https://lore.kernel.org/r/1601277584-5526-2-git-send-email-u0084500@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

ChiYuan Huang and committed by
Mark Brown
9f4366ec b8c054a5

+168
+168
Documentation/devicetree/bindings/regulator/richtek,rtmv20-regulator.yaml
··· 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 + 7 + title: Richtek RTMV20 laser diode regulator 8 + 9 + maintainers: 10 + - ChiYuan Huang <cy_huang@richtek.com> 11 + 12 + description: | 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 + 20 + properties: 21 + compatible: 22 + const: richtek,rtmv20 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + wakeup-source: true 28 + 29 + interrupts-extend: 30 + maxItems: 1 31 + 32 + enable-gpios: 33 + description: A connection of the 'enable' gpio line. 34 + maxItems: 1 35 + 36 + ld-pulse-delay-us: 37 + description: | 38 + load current pulse delay in microsecond after strobe pin pulse high. 39 + $ref: "/schemas/types.yaml#/definitions/uint32" 40 + minimum: 0 41 + maximum: 100000 42 + default: 0 43 + 44 + ld-pulse-width-us: 45 + description: | 46 + Load current pulse width in microsecond after strobe pin pulse high. 47 + $ref: "/schemas/types.yaml#/definitions/uint32" 48 + minimum: 0 49 + maximum: 10000 50 + default: 1200 51 + 52 + fsin1-delay-us: 53 + description: | 54 + Fsin1 pulse high delay in microsecond after vsync signal pulse high. 55 + $ref: "/schemas/types.yaml#/definitions/uint32" 56 + minimum: 0 57 + maximum: 100000 58 + default: 23000 59 + 60 + fsin1-width-us: 61 + description: | 62 + Fsin1 pulse high width in microsecond after vsync signal pulse high. 63 + $ref: "/schemas/types.yaml#/definitions/uint32" 64 + minimum: 40 65 + maximum: 10000 66 + default: 160 67 + 68 + fsin2-delay-us: 69 + description: | 70 + Fsin2 pulse high delay in microsecond after vsync signal pulse high. 71 + $ref: "/schemas/types.yaml#/definitions/uint32" 72 + minimum: 0 73 + maximum: 100000 74 + default: 23000 75 + 76 + fsin2-width-us: 77 + description: | 78 + Fsin2 pulse high width in microsecond after vsync signal pulse high. 79 + $ref: "/schemas/types.yaml#/definitions/uint32" 80 + minimum: 40 81 + maximum: 10000 82 + default: 160 83 + 84 + es-pulse-width-us: 85 + description: Eye safety function pulse width limit in microsecond. 86 + $ref: "/schemas/types.yaml#/definitions/uint32" 87 + minimum: 0 88 + maximum: 10000 89 + default: 1200 90 + 91 + es-ld-current-microamp: 92 + description: Eye safety function load current limit in microamp. 93 + $ref: "/schemas/types.yaml#/definitions/uint32" 94 + minimum: 0 95 + maximum: 6000000 96 + default: 3000000 97 + 98 + lbp-level-microvolt: 99 + description: Low battery protection level in microvolt. 100 + $ref: "/schemas/types.yaml#/definitions/uint32" 101 + minimum: 2400000 102 + maximum: 3700000 103 + default: 2700000 104 + 105 + lbp-enable: 106 + description: Low battery protection function enable control. 107 + type: boolean 108 + 109 + strobe-polarity-high: 110 + description: Strobe pin active polarity control. 111 + type: boolean 112 + 113 + vsync-polarity-high: 114 + description: Vsync pin active polarity control. 115 + type: boolean 116 + 117 + fsin-enable: 118 + description: Fsin function enable control. 119 + type: boolean 120 + 121 + fsin-output: 122 + description: Fsin function output control. 123 + type: boolean 124 + 125 + es-enable: 126 + description: Eye safety function enable control. 127 + type: boolean 128 + 129 + patternProperties: 130 + "lsw": 131 + type: object 132 + $ref: "regulator.yaml#" 133 + 134 + required: 135 + - compatible 136 + - reg 137 + - wakeup-source 138 + - interrupts-extend 139 + - enable-gpios 140 + - lsw 141 + 142 + additionalProperties: false 143 + 144 + examples: 145 + - | 146 + #include <dt-bindings/interrupt-controller/irq.h> 147 + i2c { 148 + #address-cells = <1>; 149 + #size-cells = <0>; 150 + 151 + rtmv20@34 { 152 + compatible = "richtek,rtmv20"; 153 + reg = <0x34>; 154 + wakeup-source; 155 + interrupts-extend = <&gpio26 2 IRQ_TYPE_LEVEL_LOW>; 156 + enable-gpios = <&gpio26 3 0>; 157 + 158 + strobe-polarity-high; 159 + vsync-polarity-high; 160 + 161 + lsw { 162 + regulator-name = "rtmv20,lsw"; 163 + regulator-min-microamp = <0>; 164 + regulator-max-microamp = <6000000>; 165 + }; 166 + }; 167 + }; 168 + ...