mt7621_iptime_ax2004m.dts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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 = "iptime,ax2004m", "mediatek,mt7621-soc";
  7. model = "ipTIME AX2004M";
  8. aliases {
  9. led-boot = &led_cpu;
  10. led-failsafe = &led_cpu;
  11. led-running = &led_cpu;
  12. led-upgrade = &led_cpu;
  13. };
  14. chosen {
  15. bootargs = "console=ttyS0,115200";
  16. };
  17. leds {
  18. compatible = "gpio-leds";
  19. led_cpu: cpu {
  20. label = "amber:cpu";
  21. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  22. };
  23. wlan2g {
  24. label = "amber:wlan2g";
  25. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  26. linux,default-trigger = "phy0radio";
  27. };
  28. wlan5g {
  29. label = "amber:wlan5g";
  30. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  31. linux,default-trigger = "phy1radio";
  32. };
  33. };
  34. keys {
  35. compatible = "gpio-keys";
  36. reset {
  37. label = "reset";
  38. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  39. linux,code = <KEY_RESTART>;
  40. };
  41. };
  42. };
  43. &nand {
  44. status = "okay";
  45. partitions {
  46. compatible = "fixed-partitions";
  47. #address-cells = <1>;
  48. #size-cells = <1>;
  49. partition@0 {
  50. label = "u-boot";
  51. reg = <0x0 0x80000>;
  52. read-only;
  53. };
  54. partition@80000 {
  55. label = "config";
  56. reg = <0x80000 0x80000>;
  57. read-only;
  58. };
  59. factory: partition@100000 {
  60. label = "factory";
  61. reg = <0x100000 0x80000>;
  62. read-only;
  63. nvmem-layout {
  64. compatible = "fixed-layout";
  65. #address-cells = <1>;
  66. #size-cells = <1>;
  67. eeprom_factory_0: eeprom@0 {
  68. reg = <0x0 0xe00>;
  69. };
  70. macaddr_factory_4: macaddr@4 {
  71. compatible = "mac-base";
  72. reg = <0x4 0x6>;
  73. #nvmem-cell-cells = <1>;
  74. };
  75. precal_factory_e10: precal@e10 {
  76. reg = <0xe10 0x19c10>;
  77. };
  78. };
  79. };
  80. partition@180000 {
  81. label = "firmware";
  82. reg = <0x180000 0x7680000>;
  83. compatible = "fixed-partitions";
  84. #address-cells = <1>;
  85. #size-cells = <1>;
  86. partition@0 {
  87. label = "kernel";
  88. reg = <0x0 0x400000>;
  89. };
  90. partition@400000 {
  91. label = "ubi";
  92. reg = <0x400000 0x7280000>;
  93. };
  94. };
  95. };
  96. };
  97. &state_default {
  98. gpio {
  99. groups = "i2c", "jtag", "wdt";
  100. function = "gpio";
  101. };
  102. };
  103. &gmac0 {
  104. nvmem-cells = <&macaddr_factory_4 3>;
  105. nvmem-cell-names = "mac-address";
  106. };
  107. &gmac1 {
  108. status = "okay";
  109. label = "wan";
  110. phy-handle = <&ethphy0>;
  111. nvmem-cells = <&macaddr_factory_4 1>;
  112. nvmem-cell-names = "mac-address";
  113. };
  114. &mdio {
  115. ethphy0: ethernet-phy@0 {
  116. reg = <0>;
  117. };
  118. };
  119. &switch0 {
  120. ports {
  121. port@1 {
  122. status = "okay";
  123. label = "lan4";
  124. };
  125. port@2 {
  126. status = "okay";
  127. label = "lan3";
  128. };
  129. port@3 {
  130. status = "okay";
  131. label = "lan2";
  132. };
  133. port@4 {
  134. status = "okay";
  135. label = "lan1";
  136. };
  137. };
  138. };
  139. &pcie {
  140. status = "okay";
  141. };
  142. &pcie1 {
  143. wifi@0,0 {
  144. compatible = "mediatek,mt76";
  145. reg = <0x0000 0 0 0 0>;
  146. nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
  147. nvmem-cell-names = "eeprom", "precal";
  148. };
  149. };