leds-bcm6328.txt 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. LEDs connected to Broadcom BCM6328 controller
  2. This controller is present on BCM6318, BCM6328, BCM6362 and BCM63268.
  3. In these SoCs it's possible to control LEDs both as GPIOs or by hardware.
  4. However, on some devices there are Serial LEDs (LEDs connected to a 74x164
  5. controller), which can either be controlled by software (exporting the 74x164
  6. as spi-gpio. See Documentation/devicetree/bindings/gpio/gpio-74x164.txt), or
  7. by hardware using this driver.
  8. Some of these Serial LEDs are hardware controlled (e.g. ethernet LEDs) and
  9. exporting the 74x164 as spi-gpio prevents those LEDs to be hardware
  10. controlled, so the only chance to keep them working is by using this driver.
  11. Required properties:
  12. - compatible : should be "brcm,bcm6328-leds".
  13. - #address-cells : must be 1.
  14. - #size-cells : must be 0.
  15. - reg : BCM6328 LED controller address and size.
  16. Optional properties:
  17. - brcm,serial-leds : Boolean, enables Serial LEDs.
  18. Default : false
  19. - brcm,serial-mux : Boolean, enables Serial LEDs multiplexing.
  20. Default : false
  21. - brcm,serial-clk-low : Boolean, makes clock signal active low.
  22. Default : false
  23. - brcm,serial-dat-low : Boolean, makes data signal active low.
  24. Default : false
  25. - brcm,serial-shift-inv : Boolean, inverts Serial LEDs shift direction.
  26. Default : false
  27. Each LED is represented as a sub-node of the brcm,bcm6328-leds device.
  28. LED sub-node required properties:
  29. - reg : LED pin number (only LEDs 0 to 23 are valid).
  30. LED sub-node optional properties:
  31. - label : see Documentation/devicetree/bindings/leds/common.txt
  32. - active-low : Boolean, makes LED active low.
  33. Default : false
  34. Examples:
  35. Scenario 1 : BCM6328 with 4 GPIO LEDs
  36. leds0: led-controller@10000800 {
  37. compatible = "brcm,bcm6328-leds";
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. reg = <0x10000800 0x24>;
  41. alarm_red@2 {
  42. reg = <2>;
  43. active-low;
  44. label = "red:alarm";
  45. };
  46. inet_green@3 {
  47. reg = <3>;
  48. active-low;
  49. label = "green:inet";
  50. };
  51. power_green@4 {
  52. reg = <4>;
  53. active-low;
  54. label = "green:power";
  55. };
  56. };
  57. Scenario 2 : BCM63268 with Serial LEDs
  58. leds0: led-controller@10001900 {
  59. compatible = "brcm,bcm6328-leds";
  60. #address-cells = <1>;
  61. #size-cells = <0>;
  62. reg = <0x10001900 0x24>;
  63. brcm,serial-leds;
  64. brcm,serial-dat-low;
  65. brcm,serial-shift-inv;
  66. inet_red@2 {
  67. reg = <2>;
  68. active-low;
  69. label = "red:inet";
  70. };
  71. dsl_green@3 {
  72. reg = <3>;
  73. active-low;
  74. label = "green:dsl";
  75. };
  76. usb_green@4 {
  77. reg = <4>;
  78. active-low;
  79. label = "green:usb";
  80. };
  81. wps_green@7 {
  82. reg = <7>;
  83. active-low;
  84. label = "green:wps";
  85. };
  86. inet_green@8 {
  87. reg = <8>;
  88. active-low;
  89. label = "green:inet";
  90. };
  91. power_green@20 {
  92. reg = <20>;
  93. active-low;
  94. label = "green:power";
  95. };
  96. };