WHR-1166D.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. / {
  4. compatible = "ralink,mt7620a-soc";
  5. model = "Buffalo WHR-1166D";
  6. gpio-leds {
  7. compatible = "gpio-leds";
  8. power {
  9. label = "whr-1166d:red:power";
  10. gpios = <&gpio0 7 1>;
  11. };
  12. wifi {
  13. label = "whr-1166d:green:wifi";
  14. gpios = <&gpio0 8 1>;
  15. };
  16. power2 {
  17. label = "whr-1166d:green:power";
  18. gpios = <&gpio0 9 1>;
  19. };
  20. wifi2 {
  21. label = "whr-1166d:orange:wifi";
  22. gpios = <&gpio0 10 1>;
  23. };
  24. internet {
  25. label = "whr-1166d:green:internet";
  26. gpios = <&gpio2 17 1>;
  27. };
  28. router {
  29. label = "whr-1166d:orange:router";
  30. gpios = <&gpio2 18 1>;
  31. };
  32. router2 {
  33. label = "whr-1166d:green:router";
  34. gpios = <&gpio2 19 1>;
  35. };
  36. };
  37. gpio-keys-polled {
  38. compatible = "gpio-keys-polled";
  39. #address-cells = <1>;
  40. #size-cells = <0>;
  41. poll-interval = <20>;
  42. reset {
  43. label = "reset";
  44. gpios = <&gpio2 12 1>;
  45. linux,code = <0x198>;
  46. };
  47. aoss {
  48. label = "aoss";
  49. gpios = <&gpio2 13 1>;
  50. linux,code = <0x211>;
  51. };
  52. ap {
  53. label = "ap";
  54. gpios = <&gpio2 14 1>;
  55. linux,code = <0x100>;
  56. linux,input-type = <5>; /* EV_SW */
  57. };
  58. bridge {
  59. label = "bridge";
  60. gpios = <&gpio2 15 1>;
  61. linux,code = <0x100>;
  62. linux,input-type = <5>; /* EV_SW */
  63. };
  64. };
  65. };
  66. &gpio2 {
  67. status = "okay";
  68. };
  69. &spi0 {
  70. status = "okay";
  71. m25p80@0 {
  72. #address-cells = <1>;
  73. #size-cells = <1>;
  74. compatible = "jedec,spi-nor";
  75. reg = <0>;
  76. linux,modalias = "m25p80", "mx25l6405d";
  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";
  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. mt76@0,0 {
  133. reg = <0x0000 0 0 0 0>;
  134. device_type = "pci";
  135. mediatek,mtd-eeprom = <&factory 32768>;
  136. mediatek,2ghz = <0>;
  137. };
  138. };
  139. };