lm3630a-backlight.yaml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: TI LM3630A High-Efficiency Dual-String White LED
  7. maintainers:
  8. - Lee Jones <lee@kernel.org>
  9. - Daniel Thompson <daniel.thompson@linaro.org>
  10. - Jingoo Han <jingoohan1@gmail.com>
  11. description: |
  12. The LM3630A is a current-mode boost converter which supplies the power and
  13. controls the current in up to two strings of 10 LEDs per string.
  14. https://www.ti.com/product/LM3630A
  15. properties:
  16. compatible:
  17. const: ti,lm3630a
  18. reg:
  19. maxItems: 1
  20. '#address-cells':
  21. const: 1
  22. '#size-cells':
  23. const: 0
  24. enable-gpios:
  25. description: GPIO to use to enable/disable the backlight (HWEN pin).
  26. maxItems: 1
  27. required:
  28. - compatible
  29. - reg
  30. - '#address-cells'
  31. - '#size-cells'
  32. patternProperties:
  33. "^led@[01]$":
  34. type: object
  35. description: |
  36. Properties for a string of connected LEDs.
  37. properties:
  38. reg:
  39. description: |
  40. The control bank that is used to program the two current sinks. The
  41. LM3630A has two control banks (A and B) and are represented as 0 or 1
  42. in this property. The two current sinks can be controlled
  43. independently with both banks, or bank A can be configured to control
  44. both sinks with the led-sources property.
  45. minimum: 0
  46. maximum: 1
  47. label:
  48. maxItems: 1
  49. led-sources:
  50. allOf:
  51. - minItems: 1
  52. maxItems: 2
  53. items:
  54. minimum: 0
  55. maximum: 1
  56. default-brightness:
  57. description: Default brightness level on boot.
  58. minimum: 0
  59. maximum: 255
  60. max-brightness:
  61. description: Maximum brightness that is allowed during runtime.
  62. minimum: 0
  63. maximum: 255
  64. ti,linear-mapping-mode:
  65. description: |
  66. Enable linear mapping mode. If disabled, then it will use exponential
  67. mapping mode in which the ramp up/down appears to have a more uniform
  68. transition to the human eye.
  69. type: boolean
  70. required:
  71. - reg
  72. additionalProperties: false
  73. additionalProperties: false
  74. examples:
  75. - |
  76. #include <dt-bindings/gpio/gpio.h>
  77. i2c {
  78. #address-cells = <1>;
  79. #size-cells = <0>;
  80. led-controller@38 {
  81. compatible = "ti,lm3630a";
  82. reg = <0x38>;
  83. enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
  84. #address-cells = <1>;
  85. #size-cells = <0>;
  86. led@0 {
  87. reg = <0>;
  88. led-sources = <0 1>;
  89. label = "lcd-backlight";
  90. default-brightness = <200>;
  91. max-brightness = <255>;
  92. };
  93. };
  94. };
  95. - |
  96. i2c {
  97. #address-cells = <1>;
  98. #size-cells = <0>;
  99. led-controller@38 {
  100. compatible = "ti,lm3630a";
  101. reg = <0x38>;
  102. #address-cells = <1>;
  103. #size-cells = <0>;
  104. led@0 {
  105. reg = <0>;
  106. default-brightness = <150>;
  107. ti,linear-mapping-mode;
  108. };
  109. led@1 {
  110. reg = <1>;
  111. default-brightness = <225>;
  112. ti,linear-mapping-mode;
  113. };
  114. };
  115. };