mt7621_asus_rt-ax54.dts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. #include <dt-bindings/leds/common.h>
  6. / {
  7. compatible = "asus,rt-ax54", "mediatek,mt7621-soc";
  8. model = "ASUS RT-AX54";
  9. aliases {
  10. led-boot = &led_power;
  11. led-failsafe = &led_power;
  12. led-running = &led_power;
  13. led-upgrade = &led_power;
  14. label-mac-device = &gmac0;
  15. };
  16. chosen {
  17. bootargs = "console=ttyS0,115200";
  18. bootargs-override = "console=ttyS0,115200";
  19. };
  20. leds {
  21. compatible = "gpio-leds";
  22. led_power: power {
  23. label = "blue:power";
  24. color = <LED_COLOR_ID_BLUE>;
  25. function = LED_FUNCTION_POWER;
  26. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  27. };
  28. };
  29. keys {
  30. compatible = "gpio-keys";
  31. key-restart {
  32. label = "reset";
  33. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  34. linux,code = <KEY_RESTART>;
  35. };
  36. key-wps {
  37. label = "wps";
  38. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  39. linux,code = <KEY_WPS_BUTTON>;
  40. };
  41. };
  42. };
  43. &nand {
  44. status = "okay";
  45. mediatek,nmbm;
  46. mediatek,bmt-max-ratio = <1>;
  47. mediatek,bmt-max-reserved-blocks = <64>;
  48. mediatek,bmt-remap-range = <0x000000 0x7e0000>;
  49. partitions {
  50. compatible = "fixed-partitions";
  51. #address-cells = <1>;
  52. #size-cells = <1>;
  53. partition@0 {
  54. label = "u-boot";
  55. reg = <0x0 0x80000>;
  56. read-only;
  57. };
  58. /*
  59. * u-boot gets split here while keeping u-boot read-only,
  60. * which allows safe usage of fw_setenv
  61. */
  62. partition@80000 {
  63. label = "u-boot-env";
  64. reg = <0x80000 0x60000>;
  65. };
  66. partition@e0000 {
  67. label = "nvram";
  68. reg = <0xe0000 0x100000>;
  69. read-only;
  70. };
  71. factory: partition@1e0000 {
  72. label = "factory";
  73. reg = <0x1e0000 0x100000>;
  74. read-only;
  75. nvmem-layout {
  76. compatible = "fixed-layout";
  77. #address-cells = <1>;
  78. #size-cells = <1>;
  79. eeprom_factory_0: eeprom@0 {
  80. reg = <0x0 0xe00>;
  81. };
  82. macaddr_factory_4: macaddr@4 {
  83. reg = <0x4 0x6>;
  84. };
  85. precal_factory_e10: precal@e10 {
  86. reg = <0xe10 0x19c10>;
  87. };
  88. };
  89. };
  90. factory2: partition@2e0000 {
  91. label = "factory2";
  92. reg = <0x2e0000 0x100000>;
  93. read-only;
  94. };
  95. partition@3e0000 {
  96. label = "kernel";
  97. reg = <0x3e0000 0x400000>;
  98. };
  99. partition@7e0000 {
  100. label = "ubi";
  101. reg = <0x7e0000 0x7020000>;
  102. };
  103. /* Last 8M are reserved for NMBM management (bad blocks) */
  104. };
  105. };
  106. &pcie {
  107. status = "okay";
  108. };
  109. &pcie1 {
  110. wifi@0,0 {
  111. compatible = "mediatek,mt76";
  112. reg = <0x0000 0 0 0 0>;
  113. nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
  114. nvmem-cell-names = "eeprom", "precal";
  115. mediatek,disable-radar-background;
  116. };
  117. };
  118. &gmac0 {
  119. nvmem-cells = <&macaddr_factory_4>;
  120. nvmem-cell-names = "mac-address";
  121. };
  122. &gmac1 {
  123. status = "okay";
  124. label = "wan";
  125. phy-handle = <&ethphy4>;
  126. nvmem-cells = <&macaddr_factory_4>;
  127. nvmem-cell-names = "mac-address";
  128. };
  129. &mdio {
  130. ethphy4: ethernet-phy@4 {
  131. reg = <4>;
  132. };
  133. };
  134. &switch0 {
  135. ports {
  136. port@0 {
  137. status = "okay";
  138. label = "lan4";
  139. };
  140. port@1 {
  141. status = "okay";
  142. label = "lan3";
  143. };
  144. port@2 {
  145. status = "okay";
  146. label = "lan2";
  147. };
  148. port@3 {
  149. status = "okay";
  150. label = "lan1";
  151. };
  152. };
  153. };
  154. &state_default {
  155. gpio {
  156. groups = "i2c", "uart2", "uart3", "jtag", "wdt";
  157. function = "gpio";
  158. };
  159. };