mt7621_totolink_a7000r.dts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "totolink,a7000r", "mediatek,mt7621-soc";
  7. model = "TOTOLINK A7000R";
  8. aliases {
  9. led-boot = &led_sys;
  10. led-failsafe = &led_sys;
  11. led-running = &led_sys;
  12. led-upgrade = &led_sys;
  13. };
  14. leds {
  15. compatible = "gpio-leds";
  16. led_sys: sys {
  17. label = "blue:sys";
  18. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  19. };
  20. };
  21. keys {
  22. compatible = "gpio-keys";
  23. reset {
  24. label = "reset";
  25. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  26. debounce-interval = <60>;
  27. linux,code = <KEY_RESTART>;
  28. };
  29. };
  30. };
  31. &spi0 {
  32. status = "okay";
  33. flash@0 {
  34. compatible = "jedec,spi-nor";
  35. reg = <0>;
  36. spi-max-frequency = <40000000>;
  37. partitions {
  38. compatible = "fixed-partitions";
  39. #address-cells = <1>;
  40. #size-cells = <1>;
  41. partition@0 {
  42. label = "u-boot";
  43. reg = <0x0 0x30000>;
  44. read-only;
  45. };
  46. partition@30000 {
  47. label = "u-boot-env";
  48. reg = <0x30000 0x10000>;
  49. read-only;
  50. };
  51. partition@40000 {
  52. label = "factory";
  53. reg = <0x40000 0x10000>;
  54. read-only;
  55. nvmem-layout {
  56. compatible = "fixed-layout";
  57. #address-cells = <1>;
  58. #size-cells = <1>;
  59. eeprom_factory_0: eeprom@0 {
  60. reg = <0x0 0x4da8>;
  61. };
  62. eeprom_factory_8000: eeprom@8000 {
  63. reg = <0x8000 0x4da8>;
  64. };
  65. macaddr_factory_e000: macaddr@e000 {
  66. compatible = "mac-base";
  67. reg = <0xe000 0x6>;
  68. #nvmem-cell-cells = <1>;
  69. };
  70. };
  71. };
  72. partition@50000 {
  73. compatible = "denx,uimage";
  74. label = "firmware";
  75. reg = <0x50000 0xfb0000>;
  76. };
  77. };
  78. };
  79. };
  80. &pcie {
  81. status = "okay";
  82. };
  83. &pcie0 {
  84. wifi@0,0 {
  85. compatible = "mediatek,mt76";
  86. reg = <0x0000 0 0 0 0>;
  87. nvmem-cells = <&eeprom_factory_0>;
  88. nvmem-cell-names = "eeprom";
  89. ieee80211-freq-limit = <2400000 2500000>;
  90. };
  91. };
  92. &pcie1 {
  93. wifi@0,0 {
  94. compatible = "mediatek,mt76";
  95. reg = <0x0000 0 0 0 0>;
  96. nvmem-cells = <&eeprom_factory_8000>;
  97. nvmem-cell-names = "eeprom";
  98. ieee80211-freq-limit = <5000000 6000000>;
  99. };
  100. };
  101. &gmac0 {
  102. nvmem-cells = <&macaddr_factory_e000 0>;
  103. nvmem-cell-names = "mac-address";
  104. };
  105. &gmac1 {
  106. status = "okay";
  107. label = "wan";
  108. phy-handle = <&ethphy4>;
  109. nvmem-cells = <&macaddr_factory_e000 1>;
  110. nvmem-cell-names = "mac-address";
  111. };
  112. &ethphy4 {
  113. /delete-property/ interrupts;
  114. };
  115. &switch0 {
  116. ports {
  117. port@0 {
  118. status = "okay";
  119. label = "lan1";
  120. };
  121. port@1 {
  122. status = "okay";
  123. label = "lan2";
  124. };
  125. port@2 {
  126. status = "okay";
  127. label = "lan3";
  128. };
  129. port@3 {
  130. status = "okay";
  131. label = "lan4";
  132. };
  133. };
  134. };
  135. &state_default {
  136. gpio {
  137. groups = "i2c", "wdt";
  138. function = "gpio";
  139. };
  140. };