allwinner,sun50i-a100-ledc.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/allwinner,sun50i-a100-ledc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Allwinner A100 LED Controller
  7. maintainers:
  8. - Samuel Holland <samuel@sholland.org>
  9. description:
  10. The LED controller found in Allwinner sunxi SoCs uses a one-wire serial
  11. interface to drive up to 1024 RGB LEDs.
  12. properties:
  13. compatible:
  14. oneOf:
  15. - const: allwinner,sun50i-a100-ledc
  16. - items:
  17. - enum:
  18. - allwinner,sun20i-d1-ledc
  19. - allwinner,sun50i-r329-ledc
  20. - const: allwinner,sun50i-a100-ledc
  21. reg:
  22. maxItems: 1
  23. "#address-cells":
  24. const: 1
  25. "#size-cells":
  26. const: 0
  27. interrupts:
  28. maxItems: 1
  29. clocks:
  30. items:
  31. - description: Bus clock
  32. - description: Module clock
  33. clock-names:
  34. items:
  35. - const: bus
  36. - const: mod
  37. resets:
  38. maxItems: 1
  39. dmas:
  40. maxItems: 1
  41. description: TX DMA channel
  42. dma-names:
  43. const: tx
  44. allwinner,pixel-format:
  45. description: Pixel format (subpixel transmission order), default is "grb"
  46. enum:
  47. - bgr
  48. - brg
  49. - gbr
  50. - grb
  51. - rbg
  52. - rgb
  53. allwinner,t0h-ns:
  54. default: 336
  55. description: Length of high pulse when transmitting a "0" bit
  56. allwinner,t0l-ns:
  57. default: 840
  58. description: Length of low pulse when transmitting a "0" bit
  59. allwinner,t1h-ns:
  60. default: 882
  61. description: Length of high pulse when transmitting a "1" bit
  62. allwinner,t1l-ns:
  63. default: 294
  64. description: Length of low pulse when transmitting a "1" bit
  65. allwinner,treset-ns:
  66. default: 300000
  67. description: Minimum delay between transmission frames
  68. patternProperties:
  69. "^multi-led@[0-9a-f]+$":
  70. type: object
  71. $ref: leds-class-multicolor.yaml#
  72. unevaluatedProperties: false
  73. properties:
  74. reg:
  75. minimum: 0
  76. maximum: 1023
  77. description: Index of the LED in the series (must be contiguous)
  78. required:
  79. - reg
  80. required:
  81. - compatible
  82. - reg
  83. - interrupts
  84. - clocks
  85. - clock-names
  86. - resets
  87. additionalProperties: false
  88. examples:
  89. - |
  90. #include <dt-bindings/interrupt-controller/irq.h>
  91. #include <dt-bindings/leds/common.h>
  92. ledc: led-controller@2008000 {
  93. compatible = "allwinner,sun20i-d1-ledc",
  94. "allwinner,sun50i-a100-ledc";
  95. reg = <0x2008000 0x400>;
  96. interrupts = <36 IRQ_TYPE_LEVEL_HIGH>;
  97. clocks = <&ccu 12>, <&ccu 34>;
  98. clock-names = "bus", "mod";
  99. resets = <&ccu 12>;
  100. dmas = <&dma 42>;
  101. dma-names = "tx";
  102. #address-cells = <1>;
  103. #size-cells = <0>;
  104. multi-led@0 {
  105. reg = <0x0>;
  106. color = <LED_COLOR_ID_RGB>;
  107. function = LED_FUNCTION_INDICATOR;
  108. };
  109. };
  110. ...