WHR-1166D.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. / {
  5. compatible = "ralink,mt7620a-soc";
  6. model = "Buffalo WHR-1166D";
  7. gpio-leds {
  8. compatible = "gpio-leds";
  9. power {
  10. label = "whr-1166d:red:power";
  11. gpios = <&gpio0 7 1>;
  12. };
  13. wifi {
  14. label = "whr-1166d:green:wifi";
  15. gpios = <&gpio0 8 1>;
  16. };
  17. power2 {
  18. label = "whr-1166d:green:power";
  19. gpios = <&gpio0 9 1>;
  20. };
  21. wifi2 {
  22. label = "whr-1166d:orange:wifi";
  23. gpios = <&gpio0 10 1>;
  24. };
  25. internet {
  26. label = "whr-1166d:green:internet";
  27. gpios = <&gpio2 17 1>;
  28. };
  29. router {
  30. label = "whr-1166d:orange:router";
  31. gpios = <&gpio2 18 1>;
  32. };
  33. router2 {
  34. label = "whr-1166d:green:router";
  35. gpios = <&gpio2 19 1>;
  36. };
  37. };
  38. gpio-keys-polled {
  39. compatible = "gpio-keys-polled";
  40. #address-cells = <1>;
  41. #size-cells = <0>;
  42. poll-interval = <20>;
  43. reset {
  44. label = "reset";
  45. gpios = <&gpio2 12 1>;
  46. linux,code = <KEY_RESTART>;
  47. };
  48. aoss {
  49. label = "aoss";
  50. gpios = <&gpio2 13 1>;
  51. linux,code = <KEY_WPS_BUTTON>;
  52. };
  53. ap {
  54. label = "ap";
  55. gpios = <&gpio2 14 1>;
  56. linux,code = <BTN_0>;
  57. linux,input-type = <EV_SW>;
  58. };
  59. bridge {
  60. label = "bridge";
  61. gpios = <&gpio2 15 1>;
  62. linux,code = <BTN_0>;
  63. linux,input-type = <EV_SW>;
  64. };
  65. };
  66. };
  67. &gpio2 {
  68. status = "okay";
  69. };
  70. &spi0 {
  71. status = "okay";
  72. m25p80@0 {
  73. #address-cells = <1>;
  74. #size-cells = <1>;
  75. compatible = "jedec,spi-nor";
  76. reg = <0>;
  77. linux,modalias = "m25p80", "mx25l6405d";
  78. spi-max-frequency = <10000000>;
  79. partition@0 {
  80. label = "u-boot";
  81. reg = <0x0 0x30000>;
  82. read-only;
  83. };
  84. partition@30000 {
  85. label = "u-boot-env";
  86. reg = <0x30000 0x10000>;
  87. read-only;
  88. };
  89. factory: partition@40000 {
  90. label = "factory";
  91. reg = <0x40000 0x10000>;
  92. read-only;
  93. };
  94. partition@50000 {
  95. label = "firmware";
  96. reg = <0x50000 0xfb0000>;
  97. };
  98. };
  99. };
  100. &pinctrl {
  101. state_default: pinctrl0 {
  102. gpio {
  103. ralink,group = "i2c", "uartf", "wled", "nd_sd";
  104. ralink,function = "gpio";
  105. };
  106. };
  107. };
  108. &ethernet {
  109. pinctrl-names = "default";
  110. pinctrl-0 = <&rgmii1_pins &mdio_pins>;
  111. port@5 {
  112. status = "okay";
  113. phy-handle = <&phy5>;
  114. phy-mode = "rgmii";
  115. };
  116. mdio-bus {
  117. status = "okay";
  118. phy5: ethernet-phy@5 {
  119. reg = <5>;
  120. phy-mode = "rgmii";
  121. };
  122. };
  123. };
  124. &gsw {
  125. mediatek,port4 = "ephy";
  126. };
  127. &wmac {
  128. ralink,mtd-eeprom = <&factory 0>;
  129. };
  130. &pcie {
  131. status = "okay";
  132. pcie-bridge {
  133. wifi@0,0 {
  134. compatible = "pci0,0";
  135. reg = <0x0000 0 0 0 0>;
  136. mediatek,mtd-eeprom = <&factory 0x8000>;
  137. mediatek,2ghz = <0>;
  138. };
  139. };
  140. };