leds-lp5860.yaml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/leds-lp5860.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: LED driver for LP5860 RGB LED from Texas Instruments.
  7. maintainers:
  8. - Steffen Trumtrar <kernel@pengutronix.de>
  9. description: |
  10. The LP5860 is multi-channel, I2C and SPI RGB LED Driver that can group RGB LEDs
  11. into a LED group or control them individually.
  12. For more product information please see the link below:
  13. https://www.ti.com/lit/ds/symlink/lp5860.pdf
  14. allOf:
  15. - $ref: /schemas/spi/spi-peripheral-props.yaml#
  16. properties:
  17. compatible:
  18. enum:
  19. - ti,lp5860
  20. reg:
  21. maxItems: 1
  22. '#address-cells':
  23. const: 1
  24. '#size-cells':
  25. const: 0
  26. patternProperties:
  27. '^multi-led@[0-9a-f]+$':
  28. type: object
  29. $ref: leds-class-multicolor.yaml#
  30. unevaluatedProperties: false
  31. properties:
  32. reg:
  33. minimum: 0
  34. maximum: 198
  35. description:
  36. This property denotes the LED module number that is used
  37. for the child node.
  38. '#address-cells':
  39. const: 1
  40. '#size-cells':
  41. const: 0
  42. patternProperties:
  43. "^led@[0-9a-f]+$":
  44. type: object
  45. $ref: common.yaml#
  46. unevaluatedProperties: false
  47. properties:
  48. reg:
  49. maxItems: 1
  50. required:
  51. - reg
  52. required:
  53. - compatible
  54. - reg
  55. unevaluatedProperties: false
  56. examples:
  57. - |
  58. #include <dt-bindings/leds/common.h>
  59. spi {
  60. #address-cells = <1>;
  61. #size-cells = <0>;
  62. led-controller@0 {
  63. compatible = "ti,lp5860";
  64. reg = <0x0>;
  65. #address-cells = <1>;
  66. #size-cells = <0>;
  67. multi-led@0 {
  68. #address-cells = <1>;
  69. #size-cells = <0>;
  70. reg = <0x0>;
  71. color = <LED_COLOR_ID_RGB>;
  72. led@0 {
  73. reg = <0x0>;
  74. color = <LED_COLOR_ID_RED>;
  75. };
  76. led@1 {
  77. reg = <0x1>;
  78. color = <LED_COLOR_ID_GREEN>;
  79. };
  80. led@2 {
  81. reg = <0x2>;
  82. color = <LED_COLOR_ID_BLUE>;
  83. };
  84. };
  85. };
  86. };