richtek,rtmv20-regulator.yaml 3.9 KB

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