leds-bcm6358.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. LEDs connected to Broadcom BCM6358 controller
  2. This controller is present on BCM6358 and BCM6368.
  3. In these SoCs there are Serial LEDs (LEDs connected to a 74x164 controller),
  4. which can either be controlled by software (exporting the 74x164 as spi-gpio.
  5. See Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml), or
  6. by hardware using this driver.
  7. Required properties:
  8. - compatible : should be "brcm,bcm6358-leds".
  9. - #address-cells : must be 1.
  10. - #size-cells : must be 0.
  11. - reg : BCM6358 LED controller address and size.
  12. Optional properties:
  13. - brcm,clk-div : SCK signal divider. Possible values are 1, 2, 4 and 8.
  14. Default : 1
  15. - brcm,clk-dat-low : Boolean, makes clock and data signals active low.
  16. Default : false
  17. Each LED is represented as a sub-node of the brcm,bcm6358-leds device.
  18. LED sub-node required properties:
  19. - reg : LED pin number (only LEDs 0 to 31 are valid).
  20. LED sub-node optional properties:
  21. - label : see Documentation/devicetree/bindings/leds/common.txt
  22. - default-state : see
  23. Documentation/devicetree/bindings/leds/common.txt
  24. - linux,default-trigger : see
  25. Documentation/devicetree/bindings/leds/common.txt
  26. Examples:
  27. Scenario 1 : BCM6358
  28. leds0: led-controller@fffe00d0 {
  29. compatible = "brcm,bcm6358-leds";
  30. #address-cells = <1>;
  31. #size-cells = <0>;
  32. reg = <0xfffe00d0 0x8>;
  33. alarm_white {
  34. reg = <0>;
  35. active-low;
  36. label = "white:alarm";
  37. };
  38. tv_white {
  39. reg = <2>;
  40. active-low;
  41. label = "white:tv";
  42. };
  43. tel_white {
  44. reg = <3>;
  45. active-low;
  46. label = "white:tel";
  47. };
  48. adsl_white {
  49. reg = <4>;
  50. active-low;
  51. label = "white:adsl";
  52. };
  53. };
  54. Scenario 2 : BCM6368
  55. leds0: led-controller@100000d0 {
  56. compatible = "brcm,bcm6358-leds";
  57. #address-cells = <1>;
  58. #size-cells = <0>;
  59. reg = <0x100000d0 0x8>;
  60. brcm,pol-low;
  61. brcm,clk-div = <4>;
  62. power_red {
  63. reg = <0>;
  64. active-low;
  65. label = "red:power";
  66. };
  67. power_green {
  68. reg = <1>;
  69. active-low;
  70. label = "green:power";
  71. default-state = "on";
  72. };
  73. power_blue {
  74. reg = <2>;
  75. label = "blue:power";
  76. };
  77. broadband_red {
  78. reg = <3>;
  79. active-low;
  80. label = "red:broadband";
  81. };
  82. broadband_green {
  83. reg = <4>;
  84. label = "green:broadband";
  85. };
  86. broadband_blue {
  87. reg = <5>;
  88. active-low;
  89. label = "blue:broadband";
  90. };
  91. wireless_red {
  92. reg = <6>;
  93. active-low;
  94. label = "red:wireless";
  95. };
  96. wireless_green {
  97. reg = <7>;
  98. active-low;
  99. label = "green:wireless";
  100. };
  101. wireless_blue {
  102. reg = <8>;
  103. label = "blue:wireless";
  104. };
  105. phone_red {
  106. reg = <9>;
  107. active-low;
  108. label = "red:phone";
  109. };
  110. phone_green {
  111. reg = <10>;
  112. active-low;
  113. label = "green:phone";
  114. };
  115. phone_blue {
  116. reg = <11>;
  117. label = "blue:phone";
  118. };
  119. upgrading_red {
  120. reg = <12>;
  121. active-low;
  122. label = "red:upgrading";
  123. };
  124. upgrading_green {
  125. reg = <13>;
  126. active-low;
  127. label = "green:upgrading";
  128. };
  129. upgrading_blue {
  130. reg = <14>;
  131. label = "blue:upgrading";
  132. };
  133. };