mt7981b-jcg-q30-pro.dts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/leds/common.h>
  6. #include "mt7981.dtsi"
  7. / {
  8. model = "JCG Q30 PRO";
  9. compatible = "jcg,q30-pro", "mediatek,mt7981";
  10. aliases {
  11. serial0 = &uart0;
  12. label-mac-device = &gmac0;
  13. led-boot = &led_status_red;
  14. led-failsafe = &led_status_red;
  15. led-running = &led_status_blue;
  16. led-upgrade = &led_status_blue;
  17. };
  18. chosen {
  19. stdout-path = "serial0:115200n8";
  20. };
  21. memory {
  22. reg = <0 0x40000000 0 0x10000000>;
  23. };
  24. gpio-keys {
  25. compatible = "gpio-keys";
  26. reset {
  27. label = "reset";
  28. linux,code = <KEY_RESTART>;
  29. gpios = <&pio 1 GPIO_ACTIVE_LOW>;
  30. };
  31. };
  32. leds {
  33. compatible = "gpio-leds";
  34. led_status_red: red {
  35. function = LED_FUNCTION_STATUS;
  36. color = <LED_COLOR_ID_RED>;
  37. gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
  38. };
  39. led_status_blue: blue {
  40. function = LED_FUNCTION_STATUS;
  41. color = <LED_COLOR_ID_BLUE>;
  42. gpios = <&pio 13 GPIO_ACTIVE_LOW>;
  43. };
  44. };
  45. };
  46. &eth {
  47. status = "okay";
  48. gmac0: mac@0 {
  49. compatible = "mediatek,eth-mac";
  50. reg = <0>;
  51. phy-mode = "2500base-x";
  52. nvmem-cells = <&macaddr_lan>;
  53. nvmem-cell-names = "mac-address";
  54. fixed-link {
  55. speed = <2500>;
  56. full-duplex;
  57. pause;
  58. };
  59. };
  60. };
  61. &mdio_bus {
  62. switch: switch@1f {
  63. compatible = "mediatek,mt7531";
  64. reg = <31>;
  65. reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
  66. interrupt-controller;
  67. #interrupt-cells = <1>;
  68. interrupt-parent = <&pio>;
  69. interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
  70. };
  71. };
  72. &spi0 {
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&spi0_flash_pins>;
  75. status = "okay";
  76. spi_nand@0 {
  77. compatible = "spi-nand";
  78. #address-cells = <1>;
  79. #size-cells = <1>;
  80. reg = <0>;
  81. spi-max-frequency = <52000000>;
  82. spi-tx-bus-width = <4>;
  83. spi-rx-bus-width = <4>;
  84. partitions {
  85. compatible = "fixed-partitions";
  86. #address-cells = <1>;
  87. #size-cells = <1>;
  88. partition@0 {
  89. label = "bl2";
  90. reg = <0x0000000 0x0100000>;
  91. read-only;
  92. };
  93. partition@100000 {
  94. label = "u-boot-env";
  95. reg = <0x0100000 0x0080000>;
  96. };
  97. factory: partition@180000 {
  98. label = "Factory";
  99. reg = <0x0180000 0x0200000>;
  100. read-only;
  101. nvmem-layout {
  102. compatible = "fixed-layout";
  103. #address-cells = <1>;
  104. #size-cells = <1>;
  105. macaddr_wan: macaddr@a0024 {
  106. reg = <0xa0024 0x6>;
  107. };
  108. macaddr_lan: macaddr@a002a {
  109. reg = <0xa002a 0x6>;
  110. };
  111. };
  112. };
  113. partition@380000 {
  114. label = "fip";
  115. reg = <0x0380000 0x0200000>;
  116. read-only;
  117. };
  118. partition@580000 {
  119. label = "ubi";
  120. reg = <0x0580000 0x7000000>;
  121. };
  122. };
  123. };
  124. };
  125. &switch {
  126. ports {
  127. #address-cells = <1>;
  128. #size-cells = <0>;
  129. port@0 {
  130. reg = <0>;
  131. label = "wan";
  132. nvmem-cells = <&macaddr_wan>;
  133. nvmem-cell-names = "mac-address";
  134. };
  135. port@1 {
  136. reg = <1>;
  137. label = "lan1";
  138. };
  139. port@2 {
  140. reg = <2>;
  141. label = "lan2";
  142. };
  143. port@3 {
  144. reg = <3>;
  145. label = "lan3";
  146. };
  147. port@6 {
  148. reg = <6>;
  149. ethernet = <&gmac0>;
  150. phy-mode = "2500base-x";
  151. fixed-link {
  152. speed = <2500>;
  153. full-duplex;
  154. pause;
  155. };
  156. };
  157. };
  158. };
  159. &pio {
  160. spi0_flash_pins: spi0-pins {
  161. mux {
  162. function = "spi";
  163. groups = "spi0", "spi0_wp_hold";
  164. };
  165. conf-pu {
  166. pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
  167. drive-strength = <8>;
  168. mediatek,pull-up-adv = <0>; /* bias-disable */
  169. };
  170. conf-pd {
  171. pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
  172. drive-strength = <8>;
  173. mediatek,pull-up-adv = <0>; /* bias-disable */
  174. };
  175. };
  176. };
  177. &uart0 {
  178. status = "okay";
  179. };
  180. &watchdog {
  181. status = "okay";
  182. };
  183. &wifi {
  184. status = "okay";
  185. mediatek,mtd-eeprom = <&factory 0x0>;
  186. };