WHR-1166D.dts 2.9 KB

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