mt7981b-cmcc-rax3000m.dts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /*
  3. * Copyright (C) 2023 Tianling Shen <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/input/input.h>
  8. #include <dt-bindings/leds/common.h>
  9. #include "mt7981.dtsi"
  10. / {
  11. model = "CMCC RAX3000M";
  12. compatible = "cmcc,rax3000m", "mediatek,mt7981";
  13. aliases {
  14. led-boot = &red_led;
  15. led-failsafe = &red_led;
  16. led-running = &green_led;
  17. led-upgrade = &green_led;
  18. serial0 = &uart0;
  19. };
  20. chosen {
  21. stdout-path = "serial0:115200n8";
  22. };
  23. memory {
  24. reg = <0 0x40000000 0 0x20000000>;
  25. };
  26. gpio-keys {
  27. compatible = "gpio-keys";
  28. button-reset {
  29. label = "reset";
  30. linux,code = <KEY_RESTART>;
  31. gpios = <&pio 1 GPIO_ACTIVE_LOW>;
  32. };
  33. button-mesh {
  34. label = "mesh";
  35. linux,code = <BTN_9>;
  36. linux,input-type = <EV_SW>;
  37. gpios = <&pio 0 GPIO_ACTIVE_LOW>;
  38. };
  39. };
  40. gpio-leds {
  41. compatible = "gpio-leds";
  42. green_led: led-0 {
  43. function = LED_FUNCTION_STATUS;
  44. color = <LED_COLOR_ID_GREEN>;
  45. gpios = <&pio 9 GPIO_ACTIVE_LOW>;
  46. };
  47. led-1 {
  48. function = LED_FUNCTION_STATUS;
  49. color = <LED_COLOR_ID_BLUE>;
  50. gpios = <&pio 12 GPIO_ACTIVE_LOW>;
  51. };
  52. red_led: led-2 {
  53. function = LED_FUNCTION_STATUS;
  54. color = <LED_COLOR_ID_RED>;
  55. gpios = <&pio 35 GPIO_ACTIVE_LOW>;
  56. };
  57. };
  58. };
  59. &eth {
  60. status = "okay";
  61. gmac0: mac@0 {
  62. compatible = "mediatek,eth-mac";
  63. reg = <0>;
  64. phy-mode = "2500base-x";
  65. fixed-link {
  66. speed = <2500>;
  67. full-duplex;
  68. pause;
  69. };
  70. };
  71. gmac1: mac@1 {
  72. compatible = "mediatek,eth-mac";
  73. reg = <1>;
  74. phy-mode = "gmii";
  75. phy-handle = <&int_gbe_phy>;
  76. };
  77. };
  78. &mdio_bus {
  79. switch: switch@1f {
  80. compatible = "mediatek,mt7531";
  81. reg = <31>;
  82. reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
  83. interrupt-controller;
  84. #interrupt-cells = <1>;
  85. interrupt-parent = <&pio>;
  86. interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
  87. };
  88. };
  89. &switch {
  90. ports {
  91. #address-cells = <1>;
  92. #size-cells = <0>;
  93. port@0 {
  94. reg = <0>;
  95. label = "lan3";
  96. };
  97. port@1 {
  98. reg = <1>;
  99. label = "lan2";
  100. };
  101. port@2 {
  102. reg = <2>;
  103. label = "lan1";
  104. };
  105. port@6 {
  106. reg = <6>;
  107. ethernet = <&gmac0>;
  108. phy-mode = "2500base-x";
  109. fixed-link {
  110. speed = <2500>;
  111. full-duplex;
  112. pause;
  113. };
  114. };
  115. };
  116. };
  117. &uart0 {
  118. status = "okay";
  119. };
  120. &usb_phy {
  121. status = "okay";
  122. };
  123. &watchdog {
  124. status = "okay";
  125. };
  126. &wifi {
  127. status = "okay";
  128. };
  129. &xhci {
  130. status = "okay";
  131. };