mt7621_netis_wf2881.dts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. #include "mt7621.dtsi"
  2. #include <dt-bindings/gpio/gpio.h>
  3. #include <dt-bindings/input/input.h>
  4. / {
  5. compatible = "netis,wf2881", "mediatek,mt7621-soc";
  6. model = "NETIS WF2881";
  7. aliases {
  8. led-boot = &led_wps;
  9. led-failsafe = &led_wps;
  10. led-running = &led_wps;
  11. led-upgrade = &led_wps;
  12. label-mac-device = &gmac0;
  13. };
  14. leds {
  15. compatible = "gpio-leds";
  16. usb {
  17. label = "green:usb";
  18. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  19. trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>;
  20. linux,default-trigger = "usbport";
  21. };
  22. led_wps: wps {
  23. label = "green:wps";
  24. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  25. };
  26. };
  27. keys {
  28. compatible = "gpio-keys";
  29. reset {
  30. label = "reset";
  31. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  32. linux,code = <KEY_RESTART>;
  33. };
  34. };
  35. };
  36. &nand {
  37. status = "okay";
  38. partitions {
  39. compatible = "fixed-partitions";
  40. #address-cells = <1>;
  41. #size-cells = <1>;
  42. partition@0 {
  43. label = "u-boot";
  44. reg = <0x0 0x80000>;
  45. read-only;
  46. };
  47. partition@80000 {
  48. label = "config";
  49. reg = <0x80000 0x80000>;
  50. read-only;
  51. };
  52. factory: partition@100000 {
  53. label = "factory";
  54. reg = <0x100000 0x40000>;
  55. read-only;
  56. };
  57. partition@140000 {
  58. label = "firmware";
  59. reg = <0x140000 0x7e40000>;
  60. compatible = "fixed-partitions";
  61. #address-cells = <1>;
  62. #size-cells = <1>;
  63. partition@0 {
  64. label = "kernel";
  65. reg = <0x0 0x400000>;
  66. };
  67. partition@400000 {
  68. label = "ubi";
  69. reg = <0x400000 0x7a40000>;
  70. };
  71. };
  72. };
  73. };
  74. &pcie {
  75. status = "okay";
  76. };
  77. &pcie0 {
  78. wifi@0,0 {
  79. compatible = "mediatek,mt76";
  80. reg = <0x0000 0 0 0 0>;
  81. mediatek,mtd-eeprom = <&factory 0x8000>;
  82. ieee80211-freq-limit = <5000000 6000000>;
  83. led {
  84. led-sources = <2>;
  85. led-active-low;
  86. };
  87. };
  88. };
  89. &pcie1 {
  90. wifi@0,0 {
  91. compatible = "mediatek,mt76";
  92. reg = <0x0000 0 0 0 0>;
  93. mediatek,mtd-eeprom = <&factory 0x0000>;
  94. ieee80211-freq-limit = <2400000 2500000>;
  95. led {
  96. led-sources = <2>;
  97. led-active-low;
  98. };
  99. };
  100. };
  101. &gmac0 {
  102. nvmem-cells = <&macaddr_factory_e000>;
  103. nvmem-cell-names = "mac-address";
  104. };
  105. &gmac1 {
  106. status = "okay";
  107. label = "wan";
  108. phy-handle = <&ethphy4>;
  109. nvmem-cells = <&macaddr_factory_e006>;
  110. nvmem-cell-names = "mac-address";
  111. };
  112. &mdio {
  113. ethphy4: ethernet-phy@4 {
  114. reg = <4>;
  115. };
  116. };
  117. &switch0 {
  118. ports {
  119. port@0 {
  120. status = "okay";
  121. label = "lan4";
  122. };
  123. port@1 {
  124. status = "okay";
  125. label = "lan3";
  126. };
  127. port@2 {
  128. status = "okay";
  129. label = "lan2";
  130. };
  131. port@3 {
  132. status = "okay";
  133. label = "lan1";
  134. };
  135. };
  136. };
  137. &state_default {
  138. gpio {
  139. groups = "uart3", "uart2";
  140. function = "gpio";
  141. };
  142. };
  143. &factory {
  144. compatible = "nvmem-cells";
  145. #address-cells = <1>;
  146. #size-cells = <1>;
  147. macaddr_factory_e000: macaddr@e000 {
  148. reg = <0xe000 0x6>;
  149. };
  150. macaddr_factory_e006: macaddr@e006 {
  151. reg = <0xe006 0x6>;
  152. };
  153. };