mt7622-ruijie-rg-ew3200.dtsi 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include "mt7622.dtsi"
  6. #include "mt6380.dtsi"
  7. / {
  8. aliases {
  9. ethernet0 = &gmac0;
  10. label-mac-device = &gmac0;
  11. led-boot = &led_system;
  12. led-failsafe = &led_system;
  13. led-running = &led_system;
  14. led-upgrade = &led_system;
  15. serial0 = &uart0;
  16. };
  17. chosen {
  18. stdout-path = "serial0:115200n1";
  19. bootargs = "console=ttyS0,115200n1 swiotlb=512";
  20. };
  21. cpus {
  22. cpu@0 {
  23. proc-supply = <&mt6380_vcpu_reg>;
  24. sram-supply = <&mt6380_vm_reg>;
  25. };
  26. cpu@1 {
  27. proc-supply = <&mt6380_vcpu_reg>;
  28. sram-supply = <&mt6380_vm_reg>;
  29. };
  30. };
  31. gpio-keys {
  32. compatible = "gpio-keys";
  33. reset {
  34. label = "reset";
  35. linux,code = <KEY_RESTART>;
  36. gpios = <&pio 0 GPIO_ACTIVE_LOW>;
  37. };
  38. wps {
  39. label = "wps";
  40. linux,code = <KEY_WPS_BUTTON>;
  41. gpios = <&pio 102 GPIO_ACTIVE_LOW>;
  42. };
  43. };
  44. gpio-leds {
  45. compatible = "gpio-leds";
  46. mesh_green {
  47. label = "green:mesh";
  48. gpios = <&pio 79 GPIO_ACTIVE_LOW>;
  49. };
  50. mesh_red {
  51. label = "red:mesh";
  52. gpios = <&pio 82 GPIO_ACTIVE_LOW>;
  53. };
  54. led_system: system_blue {
  55. label = "blue:system";
  56. gpios = <&pio 81 GPIO_ACTIVE_LOW>;
  57. default-state = "on";
  58. };
  59. };
  60. memory {
  61. reg = <0 0x40000000 0 0x40000000>;
  62. };
  63. };
  64. &eth {
  65. status = "okay";
  66. pinctrl-names = "default";
  67. pinctrl-0 = <&eth_pins>;
  68. gmac0: mac@0 {
  69. compatible = "mediatek,eth-mac";
  70. reg = <0>;
  71. phy-connection-type = "2500base-x";
  72. fixed-link {
  73. speed = <2500>;
  74. full-duplex;
  75. pause;
  76. };
  77. };
  78. mdio: mdio-bus {
  79. #address-cells = <1>;
  80. #size-cells = <0>;
  81. switch@0 {
  82. compatible = "mediatek,mt7531";
  83. reg = <0>;
  84. reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
  85. interrupt-controller;
  86. #interrupt-cells = <2>;
  87. interrupt-parent = <&pio>;
  88. interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
  89. ports {
  90. #address-cells = <1>;
  91. #size-cells = <0>;
  92. port@0 {
  93. reg = <0>;
  94. label = "lan1";
  95. };
  96. port@1 {
  97. reg = <1>;
  98. label = "lan2";
  99. };
  100. port@2 {
  101. reg = <2>;
  102. label = "lan3";
  103. };
  104. port@3 {
  105. reg = <3>;
  106. label = "lan4";
  107. };
  108. wan: port@4 {
  109. reg = <4>;
  110. label = "wan";
  111. };
  112. port@6 {
  113. reg = <6>;
  114. ethernet = <&gmac0>;
  115. phy-mode = "2500base-x";
  116. fixed-link {
  117. speed = <2500>;
  118. full-duplex;
  119. pause;
  120. };
  121. };
  122. };
  123. };
  124. };
  125. };
  126. &pcie0 {
  127. status = "okay";
  128. pinctrl-names = "default";
  129. pinctrl-0 = <&pcie0_pins>;
  130. };
  131. &pio {
  132. epa_elna_pins: epa-elna-pins {
  133. mux {
  134. function = "antsel";
  135. groups = "antsel0", "antsel1", "antsel2", "antsel3",
  136. "antsel4", "antsel5", "antsel6", "antsel7",
  137. "antsel8", "antsel9", "antsel12", "antsel13",
  138. "antsel14", "antsel15", "antsel16", "antsel17";
  139. };
  140. };
  141. eth_pins: eth-pins {
  142. mux {
  143. function = "eth";
  144. groups = "mdc_mdio", "rgmii_via_gmac2";
  145. };
  146. };
  147. pcie0_pins: pcie0-pins {
  148. mux {
  149. function = "pcie";
  150. groups = "pcie0_pad_perst",
  151. "pcie0_0_waken",
  152. "pcie0_0_clkreq";
  153. };
  154. };
  155. pmic_bus_pins: pmic-bus-pins {
  156. mux {
  157. function = "pmic";
  158. groups = "pmic_bus";
  159. };
  160. };
  161. spi_nor_pins: spi-nor-pins {
  162. mux {
  163. function = "flash";
  164. groups = "spi_nor";
  165. };
  166. };
  167. uart0_pins: uart0-pins {
  168. mux {
  169. function = "uart";
  170. groups = "uart0_0_tx_rx";
  171. };
  172. };
  173. watchdog_pins: watchdog-pins {
  174. mux {
  175. function = "watchdog";
  176. groups = "watchdog";
  177. };
  178. };
  179. };
  180. &pwrap {
  181. status = "okay";
  182. pinctrl-names = "default";
  183. pinctrl-0 = <&pmic_bus_pins>;
  184. };
  185. &rtc {
  186. status = "disabled";
  187. };
  188. &uart0 {
  189. status = "okay";
  190. pinctrl-names = "default";
  191. pinctrl-0 = <&uart0_pins>;
  192. };
  193. &watchdog {
  194. status = "okay";
  195. pinctrl-names = "default";
  196. pinctrl-0 = <&watchdog_pins>;
  197. };