WSR-1166.dts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /dts-v1/;
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.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. memory@0 {
  15. device_type = "memory";
  16. reg = <0x0 0x8000000>;
  17. };
  18. chosen {
  19. bootargs = "console=ttyS0,57600";
  20. };
  21. gpio-leds {
  22. compatible = "gpio-leds";
  23. internet_g {
  24. label = "wsr-1166:green:internet";
  25. gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
  26. };
  27. router_g {
  28. label = "wsr-1166:green:router";
  29. gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
  30. };
  31. router_o {
  32. label = "wsr-1166:orange:router";
  33. gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
  34. };
  35. internet_o {
  36. label = "wsr-1166:orange:internet";
  37. gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
  38. };
  39. wifi_o {
  40. label = "wsr-1166:orange:wifi";
  41. gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
  42. };
  43. led_power: power {
  44. label = "wsr-1166:green:power";
  45. gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
  46. };
  47. diag {
  48. label = "wsr-1166:orange:diag";
  49. gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
  50. };
  51. wifi_g {
  52. label = "wsr-1166:green:wifi";
  53. gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
  54. };
  55. };
  56. gpio-keys-polled {
  57. compatible = "gpio-keys-polled";
  58. poll-interval = <20>;
  59. power {
  60. label = "power";
  61. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  62. linux,code = <KEY_POWER>;
  63. };
  64. reset {
  65. label = "reset";
  66. gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
  67. linux,code = <KEY_RESTART>;
  68. };
  69. aoss {
  70. label = "aoss";
  71. gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
  72. linux,code = <KEY_WPS_BUTTON>;
  73. };
  74. auto {
  75. label = "mode";
  76. gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
  77. linux,code = <BTN_0>;
  78. linux,input-type = <EV_SW>;
  79. };
  80. ap {
  81. label = "ap";
  82. gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
  83. linux,code = <BTN_0>;
  84. linux,input-type = <EV_SW>;
  85. };
  86. router {
  87. label = "router";
  88. gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  89. linux,code = <BTN_0>;
  90. linux,input-type = <EV_SW>;
  91. };
  92. };
  93. gpio_poweroff {
  94. compatible = "gpio-poweroff";
  95. gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  96. };
  97. };
  98. &spi0 {
  99. status = "okay";
  100. m25p80@0 {
  101. compatible = "jedec,spi-nor";
  102. reg = <0>;
  103. spi-max-frequency = <10000000>;
  104. m25p,chunked-io = <32>;
  105. partitions {
  106. compatible = "fixed-partitions";
  107. #address-cells = <1>;
  108. #size-cells = <1>;
  109. partition@0 {
  110. label = "u-boot";
  111. reg = <0x0 0x30000>;
  112. read-only;
  113. };
  114. partition@30000 {
  115. label = "u-boot-env";
  116. reg = <0x30000 0x10000>;
  117. read-only;
  118. };
  119. factory: partition@40000 {
  120. label = "factory";
  121. reg = <0x40000 0x10000>;
  122. read-only;
  123. };
  124. partition@50000 {
  125. label = "firmware";
  126. reg = <0x50000 0xf90000>;
  127. };
  128. partition@fe0000 {
  129. label = "board_data";
  130. reg = <0xfe0000 0x20000>;
  131. };
  132. };
  133. };
  134. };
  135. &pinctrl {
  136. state_default: pinctrl0 {
  137. gpio {
  138. ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
  139. ralink,function = "gpio";
  140. };
  141. };
  142. };
  143. &pcie {
  144. status = "okay";
  145. };
  146. &pcie0 {
  147. mt76@0,0 {
  148. reg = <0x0000 0 0 0 0>;
  149. mediatek,mtd-eeprom = <&factory 0x8000>;
  150. ieee80211-freq-limit = <5000000 6000000>;
  151. };
  152. };
  153. &pcie1 {
  154. mt76@0,0 {
  155. reg = <0x0000 0 0 0 0>;
  156. mediatek,mtd-eeprom = <&factory 0x0000>;
  157. };
  158. };
  159. &xhci {
  160. status = "disabled";
  161. };