mt7621_buffalo_wsr-1166dhp.dts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. #include "mt7621.dtsi"
  2. #include <dt-bindings/gpio/gpio.h>
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/leds/common.h>
  5. / {
  6. compatible = "buffalo,wsr-1166dhp", "mediatek,mt7621-soc";
  7. model = "Buffalo WSR-1166DHP";
  8. aliases {
  9. led-boot = &led_power;
  10. led-failsafe = &led_power;
  11. led-running = &led_power;
  12. led-upgrade = &led_power;
  13. };
  14. leds {
  15. compatible = "gpio-leds";
  16. internet_g {
  17. label = "green:internet";
  18. gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
  19. };
  20. router_g {
  21. label = "green:router";
  22. gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
  23. };
  24. router_o {
  25. label = "orange:router";
  26. gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
  27. };
  28. internet_o {
  29. label = "orange:internet";
  30. gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
  31. };
  32. wifi_o {
  33. label = "orange:wifi";
  34. gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
  35. };
  36. led_power: power {
  37. function = LED_FUNCTION_POWER;
  38. color = <LED_COLOR_ID_GREEN>;
  39. gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
  40. };
  41. diag {
  42. label = "orange:diag";
  43. gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
  44. };
  45. wifi_g {
  46. label = "green:wifi";
  47. gpios = <&gpio 48 GPIO_ACTIVE_LOW>;
  48. };
  49. };
  50. keys {
  51. compatible = "gpio-keys";
  52. power {
  53. label = "power";
  54. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  55. linux,code = <KEY_POWER>;
  56. };
  57. reset {
  58. label = "reset";
  59. gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
  60. linux,code = <KEY_RESTART>;
  61. };
  62. aoss {
  63. label = "aoss";
  64. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  65. linux,code = <KEY_WPS_BUTTON>;
  66. };
  67. auto {
  68. label = "mode";
  69. gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
  70. linux,code = <BTN_0>;
  71. linux,input-type = <EV_SW>;
  72. };
  73. ap {
  74. label = "ap";
  75. gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
  76. linux,code = <BTN_0>;
  77. linux,input-type = <EV_SW>;
  78. };
  79. router {
  80. label = "router";
  81. gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
  82. linux,code = <BTN_0>;
  83. linux,input-type = <EV_SW>;
  84. };
  85. };
  86. gpio_poweroff {
  87. compatible = "gpio-poweroff";
  88. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  89. };
  90. };
  91. &spi0 {
  92. status = "okay";
  93. flash@0 {
  94. compatible = "jedec,spi-nor";
  95. reg = <0>;
  96. spi-max-frequency = <10000000>;
  97. partitions {
  98. compatible = "fixed-partitions";
  99. #address-cells = <1>;
  100. #size-cells = <1>;
  101. partition@0 {
  102. label = "u-boot";
  103. reg = <0x0 0x30000>;
  104. read-only;
  105. };
  106. partition@30000 {
  107. label = "u-boot-env";
  108. reg = <0x30000 0x10000>;
  109. read-only;
  110. };
  111. partition@40000 {
  112. label = "factory";
  113. reg = <0x40000 0x10000>;
  114. read-only;
  115. nvmem-layout {
  116. compatible = "fixed-layout";
  117. #address-cells = <1>;
  118. #size-cells = <1>;
  119. eeprom_factory_0: eeprom@0 {
  120. reg = <0x0 0x400>;
  121. };
  122. eeprom_factory_8000: eeprom@8000 {
  123. reg = <0x8000 0x200>;
  124. };
  125. };
  126. };
  127. partition@50000 {
  128. compatible = "brcm,trx";
  129. label = "firmware";
  130. reg = <0x50000 0xf90000>;
  131. };
  132. partition@fe0000 {
  133. label = "board_data";
  134. reg = <0xfe0000 0x20000>;
  135. };
  136. };
  137. };
  138. };
  139. &gmac1 {
  140. status = "okay";
  141. label = "wan";
  142. phy-handle = <&ethphy4>;
  143. };
  144. &ethphy4 {
  145. /delete-property/ interrupts;
  146. };
  147. &switch0 {
  148. ports {
  149. port@0 {
  150. status = "okay";
  151. label = "lan1";
  152. };
  153. port@1 {
  154. status = "okay";
  155. label = "lan2";
  156. };
  157. port@2 {
  158. status = "okay";
  159. label = "lan3";
  160. };
  161. port@3 {
  162. status = "okay";
  163. label = "lan4";
  164. };
  165. };
  166. };
  167. &state_default {
  168. gpio {
  169. groups = "i2c", "uart2", "uart3", "sdhci";
  170. function = "gpio";
  171. };
  172. };
  173. &pcie {
  174. status = "okay";
  175. };
  176. &pcie0 {
  177. mt76@0,0 {
  178. reg = <0x0000 0 0 0 0>;
  179. nvmem-cells = <&eeprom_factory_8000>;
  180. nvmem-cell-names = "eeprom";
  181. ieee80211-freq-limit = <5000000 6000000>;
  182. };
  183. };
  184. &pcie1 {
  185. mt76@0,0 {
  186. reg = <0x0000 0 0 0 0>;
  187. nvmem-cells = <&eeprom_factory_0>;
  188. nvmem-cell-names = "eeprom";
  189. };
  190. };
  191. &xhci {
  192. status = "disabled";
  193. };