WHR-1166D.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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. spi-max-frequency = <10000000>;
  78. partition@0 {
  79. label = "u-boot";
  80. reg = <0x0 0x30000>;
  81. read-only;
  82. };
  83. partition@30000 {
  84. label = "u-boot-env";
  85. reg = <0x30000 0x10000>;
  86. read-only;
  87. };
  88. factory: partition@40000 {
  89. label = "factory";
  90. reg = <0x40000 0x10000>;
  91. read-only;
  92. };
  93. partition@50000 {
  94. label = "firmware";
  95. reg = <0x50000 0xfb0000>;
  96. };
  97. };
  98. };
  99. &pinctrl {
  100. state_default: pinctrl0 {
  101. gpio {
  102. ralink,group = "i2c", "uartf", "wled", "nd_sd";
  103. ralink,function = "gpio";
  104. };
  105. };
  106. };
  107. &ethernet {
  108. pinctrl-names = "default";
  109. pinctrl-0 = <&rgmii1_pins &mdio_pins>;
  110. port@5 {
  111. status = "okay";
  112. phy-handle = <&phy5>;
  113. phy-mode = "rgmii";
  114. };
  115. mdio-bus {
  116. status = "okay";
  117. phy5: ethernet-phy@5 {
  118. reg = <5>;
  119. phy-mode = "rgmii-rxid";
  120. };
  121. };
  122. };
  123. &gsw {
  124. mediatek,port4 = "ephy";
  125. };
  126. &wmac {
  127. ralink,mtd-eeprom = <&factory 0>;
  128. };
  129. &pcie {
  130. status = "okay";
  131. pcie-bridge {
  132. wifi@0,0 {
  133. compatible = "pci0,0";
  134. reg = <0x0000 0 0 0 0>;
  135. mediatek,mtd-eeprom = <&factory 0x8000>;
  136. mediatek,2ghz = <0>;
  137. };
  138. };
  139. };