WSR-1166.dts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. /dts-v1/;
  2. #include "mt7621.dtsi"
  3. / {
  4. compatible = "ralink,mt7621-eval-board", "ralink,mt7621-soc";
  5. model = "Buffalo WSR-1166DHP";
  6. memory@0 {
  7. device_type = "memory";
  8. reg = <0x0 0x8000000>;
  9. };
  10. chosen {
  11. bootargs = "console=ttyS0,57600";
  12. };
  13. gpio-leds {
  14. compatible = "gpio-leds";
  15. internet_g {
  16. label = "wsr-1166:green:internet";
  17. gpios = <&gpio1 9 1>;
  18. };
  19. router_g {
  20. label = "wsr-1166:green:router";
  21. gpios = <&gpio1 10 1>;
  22. };
  23. router_o {
  24. label = "wsr-1166:orange:router";
  25. gpios = <&gpio1 11 1>;
  26. };
  27. internet_o {
  28. label = "wsr-1166:orange:internet";
  29. gpios = <&gpio1 12 1>;
  30. };
  31. wifi_o {
  32. label = "wsr-1166:orange:wifi";
  33. gpios = <&gpio1 13 1>;
  34. };
  35. power {
  36. label = "wsr-1166:green:power";
  37. gpios = <&gpio1 14 1>;
  38. };
  39. diag {
  40. label = "wsr-1166:orange:diag";
  41. gpios = <&gpio1 15 1>;
  42. };
  43. wifi_g {
  44. label = "wsr-1166:green:wifi";
  45. gpios = <&gpio1 16 1>;
  46. };
  47. };
  48. gpio-keys-polled {
  49. compatible = "gpio-keys-polled";
  50. #address-cells = <1>;
  51. #size-cells = <0>;
  52. poll-interval = <20>;
  53. power {
  54. label = "power";
  55. gpios = <&gpio0 18 1>;
  56. linux,code = <0x74>;
  57. };
  58. reset {
  59. label = "reset";
  60. gpios = <&gpio0 3 1>;
  61. linux,code = <0x198>;
  62. };
  63. aoss {
  64. label = "aoss";
  65. gpios = <&gpio0 6 1>;
  66. linux,code = <0x211>;
  67. };
  68. auto {
  69. label = "mode";
  70. gpios = <&gpio0 7 0>;
  71. linux,code = <0x100>;
  72. linux,input-type = <5>; /* EV_SW */
  73. };
  74. ap {
  75. label = "ap";
  76. gpios = <&gpio0 10 0>;
  77. linux,code = <0x100>;
  78. linux,input-type = <5>; /* EV_SW */
  79. };
  80. router {
  81. label = "router";
  82. gpios = <&gpio0 12 0>;
  83. linux,code = <0x100>;
  84. linux,input-type = <5>; /* EV_SW */
  85. };
  86. };
  87. gpio_poweroff {
  88. compatible = "gpio-poweroff";
  89. gpios = <&gpio0 0 1>;
  90. };
  91. };
  92. &spi0 {
  93. status = "okay";
  94. m25p80@0 {
  95. #address-cells = <1>;
  96. #size-cells = <1>;
  97. compatible = "jedec,spi-nor";
  98. reg = <0>;
  99. linux,modalias = "m25p80";
  100. spi-max-frequency = <10000000>;
  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. factory: partition@40000 {
  112. label = "factory";
  113. reg = <0x40000 0x10000>;
  114. read-only;
  115. };
  116. partition@50000 {
  117. label = "firmware";
  118. reg = <0x50000 0xf90000>;
  119. };
  120. partition@fe0000 {
  121. label = "board_data";
  122. reg = <0xfe0000 0x20000>;
  123. };
  124. };
  125. };
  126. &pinctrl {
  127. state_default: pinctrl0 {
  128. gpio {
  129. ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
  130. ralink,function = "gpio";
  131. };
  132. };
  133. };
  134. &pcie {
  135. status = "okay";
  136. pcie0 {
  137. mt76@0,0 {
  138. reg = <0x0000 0 0 0 0>;
  139. device_type = "pci";
  140. mediatek,mtd-eeprom = <&factory 0x8000>;
  141. mediatek,2ghz = <0>;
  142. };
  143. };
  144. pcie1 {
  145. mt76@1,0 {
  146. reg = <0x0000 0 0 0 0>;
  147. device_type = "pci";
  148. mediatek,mtd-eeprom = <&factory 0x0000>;
  149. mediatek,5ghz = <0>;
  150. };
  151. };
  152. };