bcm4708-buffalo-wzr-1166dhp-common.dtsi 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /*
  3. * Broadcom BCM470X / BCM5301X ARM platform code.
  4. * DTS for Buffalo WZR-1166DHP and WZR-1166DHP2
  5. *
  6. * Copyright (C) 2014 Rafał Miłecki <[email protected]>
  7. * Copyright (C) 2022 SHIMAMOTO Takayoshi <[email protected]>
  8. */
  9. #include "bcm4708.dtsi"
  10. #include "bcm5301x-nand-cs0-bch8.dtsi"
  11. #include <dt-bindings/leds/common.h>
  12. / {
  13. spi {
  14. compatible = "spi-gpio";
  15. num-chipselects = <1>;
  16. gpio-sck = <&chipcommon 7 0>;
  17. gpio-mosi = <&chipcommon 4 0>;
  18. cs-gpios = <&chipcommon 6 0>;
  19. #address-cells = <1>;
  20. #size-cells = <0>;
  21. hc595: gpio_spi@0 {
  22. compatible = "fairchild,74hc595";
  23. reg = <0>;
  24. registers-number = <1>;
  25. spi-max-frequency = <100000>;
  26. gpio-controller;
  27. #gpio-cells = <2>;
  28. };
  29. };
  30. leds {
  31. compatible = "gpio-leds";
  32. usb {
  33. /* label = "bcm53xx:blue:usb"; */
  34. function = LED_FUNCTION_USB;
  35. color = <LED_COLOR_ID_BLUE>;
  36. gpios = <&hc595 0 GPIO_ACTIVE_HIGH>;
  37. trigger-sources = <&ohci_port1>, <&ehci_port1>,
  38. <&xhci_port1>, <&ohci_port2>,
  39. <&ehci_port2>;
  40. linux,default-trigger = "usbport";
  41. };
  42. power0 {
  43. /* label = "bcm53xx:red:power"; */
  44. function = LED_FUNCTION_FAULT;
  45. color = <LED_COLOR_ID_RED>;
  46. gpios = <&hc595 1 GPIO_ACTIVE_HIGH>;
  47. };
  48. power1 {
  49. /* label = "bcm53xx:white:power"; */
  50. function = LED_FUNCTION_POWER;
  51. color = <LED_COLOR_ID_WHITE>;
  52. gpios = <&hc595 2 GPIO_ACTIVE_HIGH>;
  53. linux,default-trigger = "default-on";
  54. };
  55. router0 {
  56. /* label = "bcm53xx:blue:router"; */
  57. function = LED_FUNCTION_STATUS;
  58. color = <LED_COLOR_ID_BLUE>;
  59. gpios = <&hc595 3 GPIO_ACTIVE_HIGH>;
  60. linux,default-trigger = "default-on";
  61. };
  62. router1 {
  63. /* label = "bcm53xx:amber:router"; */
  64. function = LED_FUNCTION_STATUS;
  65. color = <LED_COLOR_ID_AMBER>;
  66. gpios = <&hc595 4 GPIO_ACTIVE_HIGH>;
  67. };
  68. wan {
  69. /* label = "bcm53xx:blue:wan"; */
  70. function = LED_FUNCTION_WAN;
  71. color = <LED_COLOR_ID_BLUE>;
  72. gpios = <&hc595 5 GPIO_ACTIVE_HIGH>;
  73. linux,default-trigger = "default-on";
  74. };
  75. wireless0 {
  76. /* label = "bcm53xx:blue:wireless"; */
  77. function = LED_FUNCTION_WLAN;
  78. color = <LED_COLOR_ID_BLUE>;
  79. gpios = <&hc595 6 GPIO_ACTIVE_HIGH>;
  80. };
  81. wireless1 {
  82. /* label = "bcm53xx:amber:wireless"; */
  83. function = LED_FUNCTION_WLAN;
  84. color = <LED_COLOR_ID_AMBER>;
  85. gpios = <&hc595 7 GPIO_ACTIVE_HIGH>;
  86. };
  87. };
  88. gpio-keys {
  89. compatible = "gpio-keys";
  90. button-restart {
  91. label = "Reset";
  92. linux,code = <KEY_RESTART>;
  93. gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
  94. };
  95. button-aoss {
  96. label = "AOSS";
  97. linux,code = <KEY_WPS_BUTTON>;
  98. gpios = <&chipcommon 12 GPIO_ACTIVE_LOW>;
  99. };
  100. /* Commit mode set by switch? */
  101. button-mode {
  102. label = "Mode";
  103. linux,code = <KEY_SETUP>;
  104. gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
  105. };
  106. /* Switch: AP mode */
  107. button-sw-ap {
  108. label = "AP";
  109. linux,code = <BTN_0>;
  110. gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
  111. };
  112. button-eject {
  113. label = "USB eject";
  114. linux,code = <KEY_EJECTCD>;
  115. gpios = <&chipcommon 15 GPIO_ACTIVE_LOW>;
  116. };
  117. };
  118. };
  119. &usb2 {
  120. vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
  121. };
  122. &usb3 {
  123. vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>;
  124. };
  125. &spi_nor {
  126. status = "okay";
  127. };
  128. &usb3_phy {
  129. status = "okay";
  130. };
  131. &srab {
  132. status = "okay";
  133. ports {
  134. port@0 {
  135. reg = <0>;
  136. label = "lan1";
  137. };
  138. port@1 {
  139. reg = <1>;
  140. label = "lan2";
  141. };
  142. port@2 {
  143. reg = <2>;
  144. label = "lan3";
  145. };
  146. port@3 {
  147. reg = <3>;
  148. label = "lan4";
  149. };
  150. port@4 {
  151. reg = <4>;
  152. label = "wan";
  153. };
  154. port@5 {
  155. reg = <5>;
  156. label = "cpu";
  157. ethernet = <&gmac0>;
  158. };
  159. };
  160. };