054-ARM-BCM5301X-Add-LEDs-for-Buffalo-devices.patch 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. From 8115a4e8d687427fbc1aa3774f50551563bf87f9 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  3. Date: Wed, 14 Jan 2015 08:20:49 +0100
  4. Subject: [PATCH] ARM: BCM5301X: Add LEDs for Buffalo devices
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  9. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  10. ---
  11. arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts | 67 ++++++++++++++++++++++
  12. arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 67 ++++++++++++++++++++++
  13. 2 files changed, 134 insertions(+)
  14. --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
  15. +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
  16. @@ -23,6 +23,73 @@
  17. reg = <0x00000000 0x08000000>;
  18. };
  19. + spi {
  20. + compatible = "spi-gpio";
  21. + num-chipselects = <1>;
  22. + gpio-sck = <&chipcommon 7 0>;
  23. + gpio-mosi = <&chipcommon 4 0>;
  24. + cs-gpios = <&chipcommon 6 0>;
  25. + #address-cells = <1>;
  26. + #size-cells = <0>;
  27. +
  28. + hc595: gpio_spi@0 {
  29. + compatible = "fairchild,74hc595";
  30. + reg = <0>;
  31. + registers-number = <1>;
  32. + spi-max-frequency = <100000>;
  33. +
  34. + gpio-controller;
  35. + #gpio-cells = <2>;
  36. +
  37. + };
  38. + };
  39. +
  40. + leds {
  41. + compatible = "gpio-leds";
  42. +
  43. + power0 {
  44. + label = "bcm53xx:red:power";
  45. + gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
  46. + linux,default-trigger = "default-off";
  47. + };
  48. +
  49. + power1 {
  50. + label = "bcm53xx:white:power";
  51. + gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
  52. + linux,default-trigger = "default-on";
  53. + };
  54. +
  55. + router0 {
  56. + label = "bcm53xx:blue:router";
  57. + gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
  58. + linux,default-trigger = "default-on";
  59. + };
  60. +
  61. + router1 {
  62. + label = "bcm53xx:amber:router";
  63. + gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
  64. + linux,default-trigger = "default-off";
  65. + };
  66. +
  67. + wan {
  68. + label = "bcm53xx:blue:wan";
  69. + gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
  70. + linux,default-trigger = "default-on";
  71. + };
  72. +
  73. + wireless0 {
  74. + label = "bcm53xx:blue:wireless";
  75. + gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
  76. + linux,default-trigger = "default-off";
  77. + };
  78. +
  79. + wireless1 {
  80. + label = "bcm53xx:amber:wireless";
  81. + gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
  82. + linux,default-trigger = "default-off";
  83. + };
  84. + };
  85. +
  86. gpio-keys {
  87. compatible = "gpio-keys";
  88. #address-cells = <1>;
  89. --- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
  90. +++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
  91. @@ -23,6 +23,73 @@
  92. reg = <0x00000000 0x08000000>;
  93. };
  94. + spi {
  95. + compatible = "spi-gpio";
  96. + num-chipselects = <1>;
  97. + gpio-sck = <&chipcommon 7 0>;
  98. + gpio-mosi = <&chipcommon 4 0>;
  99. + cs-gpios = <&chipcommon 6 0>;
  100. + #address-cells = <1>;
  101. + #size-cells = <0>;
  102. +
  103. + hc595: gpio_spi@0 {
  104. + compatible = "fairchild,74hc595";
  105. + reg = <0>;
  106. + registers-number = <1>;
  107. + spi-max-frequency = <100000>;
  108. +
  109. + gpio-controller;
  110. + #gpio-cells = <2>;
  111. +
  112. + };
  113. + };
  114. +
  115. + leds {
  116. + compatible = "gpio-leds";
  117. +
  118. + power0 {
  119. + label = "bcm53xx:green:power";
  120. + gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
  121. + linux,default-trigger = "default-on";
  122. + };
  123. +
  124. + power1 {
  125. + label = "bcm53xx:red:power";
  126. + gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
  127. + linux,default-trigger = "default-off";
  128. + };
  129. +
  130. + router0 {
  131. + label = "bcm53xx:green:router";
  132. + gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
  133. + linux,default-trigger = "default-on";
  134. + };
  135. +
  136. + router1 {
  137. + label = "bcm53xx:amber:router";
  138. + gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
  139. + linux,default-trigger = "default-off";
  140. + };
  141. +
  142. + wan {
  143. + label = "bcm53xx:green:wan";
  144. + gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
  145. + linux,default-trigger = "default-on";
  146. + };
  147. +
  148. + wireless0 {
  149. + label = "bcm53xx:green:wireless";
  150. + gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
  151. + linux,default-trigger = "default-off";
  152. + };
  153. +
  154. + wireless1 {
  155. + label = "bcm53xx:amber:wireless";
  156. + gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
  157. + linux,default-trigger = "default-off";
  158. + };
  159. + };
  160. +
  161. gpio-keys {
  162. compatible = "gpio-keys";
  163. #address-cells = <1>;