mt7621_buffalo_wsr-600dhp.dts 3.5 KB

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