leds-bcm63138.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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-bcm63138.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Broadcom's BCM63138 LEDs controller
  7. maintainers:
  8. - Rafał Miłecki <rafal@milecki.pl>
  9. description: |
  10. This LEDs controller was first used on BCM63138 and later reused on BCM4908,
  11. BCM6848, BCM6858, BCM63138, BCM63148, BCM63381 and BCM68360 SoCs.
  12. It supports up to 32 LEDs that can be connected parallelly or serially. It
  13. also includes limited support for hardware blinking.
  14. Binding serially connected LEDs isn't documented yet.
  15. properties:
  16. compatible:
  17. oneOf:
  18. - items:
  19. - enum:
  20. - brcm,bcm4908-leds
  21. - brcm,bcm6848-leds
  22. - brcm,bcm6858-leds
  23. - brcm,bcm63148-leds
  24. - brcm,bcm63381-leds
  25. - brcm,bcm68360-leds
  26. - const: brcm,bcm63138-leds
  27. - const: brcm,bcm63138-leds
  28. reg:
  29. maxItems: 1
  30. "#address-cells":
  31. const: 1
  32. "#size-cells":
  33. const: 0
  34. brcm,serial-shift-bits:
  35. minimum: 1
  36. maximum: 32
  37. description:
  38. This describes the number of 8-bit serial shifters connected to the LED
  39. controller block. The hardware is typically using 8-bit shift registers
  40. with 8 LEDs per shift register, so 4 shifters results in 32 LEDs or 2
  41. shifters give 16 LEDs etc, but the hardware supports any odd number of
  42. registers. If left unspecified, the hardware boot-time default is used.
  43. patternProperties:
  44. "^led@[a-f0-9]+$":
  45. type: object
  46. $ref: common.yaml#
  47. properties:
  48. reg:
  49. maxItems: 1
  50. description: LED pin number
  51. required:
  52. - reg
  53. unevaluatedProperties: false
  54. required:
  55. - reg
  56. - "#address-cells"
  57. - "#size-cells"
  58. additionalProperties: false
  59. examples:
  60. - |
  61. #include <dt-bindings/leds/common.h>
  62. leds@ff800800 {
  63. compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds";
  64. reg = <0xff800800 0xdc>;
  65. brcm,serial-shift-bits = <16>;
  66. #address-cells = <1>;
  67. #size-cells = <0>;
  68. led@0 {
  69. reg = <0x0>;
  70. function = LED_FUNCTION_POWER;
  71. color = <LED_COLOR_ID_GREEN>;
  72. default-state = "on";
  73. };
  74. led@3 {
  75. reg = <0x3>;
  76. function = LED_FUNCTION_STATUS;
  77. color = <LED_COLOR_ID_GREEN>;
  78. active-low;
  79. };
  80. };