mt7981b-cudy-re3000-v1.dts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. /dts-v1/;
  3. #include <dt-bindings/leds/common.h>
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/input/input.h>
  6. #include "mt7981.dtsi"
  7. / {
  8. model = "Cudy RE3000 v1";
  9. compatible = "cudy,re3000-v1", "mediatek,mt7981";
  10. aliases {
  11. serial0 = &uart0;
  12. label-mac-device = &gmac1;
  13. led-boot = &led_status;
  14. led-failsafe = &led_status;
  15. led-running = &led_status;
  16. led-upgrade = &led_status;
  17. };
  18. chosen {
  19. stdout-path = "serial0:115200n8";
  20. };
  21. gpio-keys {
  22. compatible = "gpio-keys";
  23. reset {
  24. label = "reset";
  25. linux,code = <KEY_RESTART>;
  26. gpios = <&pio 1 GPIO_ACTIVE_LOW>;
  27. };
  28. wps {
  29. label = "wps";
  30. linux,code = <KEY_WPS_BUTTON>;
  31. gpios = <&pio 0 GPIO_ACTIVE_LOW>;
  32. };
  33. };
  34. leds {
  35. compatible = "gpio-leds";
  36. led_status: led@0 {
  37. function = LED_FUNCTION_STATUS;
  38. color = <LED_COLOR_ID_WHITE>;
  39. gpios = <&pio 10 GPIO_ACTIVE_LOW>;
  40. };
  41. led@1 {
  42. label = "red:wifi5";
  43. gpios = <&pio 7 GPIO_ACTIVE_LOW>;
  44. linux,default-trigger = "phy1tpt";
  45. };
  46. led@2 {
  47. label = "white:wifi2";
  48. gpios = <&pio 6 GPIO_ACTIVE_LOW>;
  49. linux,default-trigger = "phy0tpt";
  50. };
  51. led@3 {
  52. function = LED_FUNCTION_LAN;
  53. color = <LED_COLOR_ID_GREEN>;
  54. gpios = <&pio 9 GPIO_ACTIVE_LOW>;
  55. };
  56. led@4 {
  57. function = LED_FUNCTION_WPS;
  58. color = <LED_COLOR_ID_WHITE>;
  59. gpios = <&pio 11 GPIO_ACTIVE_LOW>;
  60. };
  61. };
  62. };
  63. &uart0 {
  64. status = "okay";
  65. };
  66. &watchdog {
  67. status = "okay";
  68. };
  69. &eth {
  70. pinctrl-names = "default";
  71. pinctrl-0 = <&mdio_pins>;
  72. status = "okay";
  73. gmac1: mac@1 {
  74. compatible = "mediatek,eth-mac";
  75. reg = <1>;
  76. phy-mode = "gmii";
  77. phy-handle = <&int_gbe_phy>;
  78. nvmem-cell-names = "mac-address";
  79. nvmem-cells = <&macaddr_bdinfo_de00 0>;
  80. };
  81. };
  82. &mdio_bus {
  83. switch: switch@1f {
  84. compatible = "mediatek,mt7531";
  85. reg = <31>;
  86. reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
  87. };
  88. };
  89. &spi0 {
  90. status = "disabled";
  91. };
  92. &spi2 {
  93. pinctrl-names = "default";
  94. pinctrl-0 = <&spi2_flash_pins>;
  95. status = "okay";
  96. flash@0 {
  97. #address-cells = <1>;
  98. #size-cells = <1>;
  99. compatible = "jedec,spi-nor";
  100. reg = <0>;
  101. spi-max-frequency = <25000000>;
  102. spi-tx-bus-width = <4>;
  103. spi-rx-bus-width = <4>;
  104. partitions {
  105. compatible = "fixed-partitions";
  106. #address-cells = <1>;
  107. #size-cells = <1>;
  108. partition@00000 {
  109. label = "BL2";
  110. reg = <0x00000 0x40000>;
  111. read-only;
  112. };
  113. partition@40000 {
  114. label = "u-boot-env";
  115. reg = <0x40000 0x10000>;
  116. read-only;
  117. };
  118. factory: partition@50000 {
  119. label = "Factory";
  120. reg = <0x50000 0x10000>;
  121. read-only;
  122. nvmem-layout {
  123. compatible = "fixed-layout";
  124. #address-cells = <1>;
  125. #size-cells = <1>;
  126. eeprom_factory_0: eeprom@0 {
  127. reg = <0x0 0x1000>;
  128. };
  129. };
  130. };
  131. bdinfo: partition@60000 {
  132. label = "bdinfo";
  133. reg = <0x60000 0x10000>;
  134. read-only;
  135. nvmem-layout {
  136. compatible = "fixed-layout";
  137. #address-cells = <1>;
  138. #size-cells = <1>;
  139. macaddr_bdinfo_de00: macaddr@de00 {
  140. compatible = "mac-base";
  141. reg = <0xde00 0x6>;
  142. #nvmem-cell-cells = <1>;
  143. };
  144. };
  145. };
  146. partition@70000 {
  147. label = "FIP";
  148. reg = <0x70000 0x80000>;
  149. read-only;
  150. };
  151. partition@f0000 {
  152. compatible = "denx,fit";
  153. label = "firmware";
  154. reg = <0xf0000 0xf10000>;
  155. };
  156. };
  157. };
  158. };
  159. &pio {
  160. spi2_flash_pins: spi2-pins {
  161. mux {
  162. function = "spi";
  163. groups = "spi2", "spi2_wp_hold";
  164. };
  165. conf-pu {
  166. pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
  167. drive-strength = <8>;
  168. bias-pull-up = <103>;
  169. };
  170. conf-pd {
  171. pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
  172. drive-strength = <8>;
  173. bias-pull-down = <103>;
  174. };
  175. };
  176. };
  177. &wifi {
  178. status = "okay";
  179. nvmem-cells = <&eeprom_factory_0>;
  180. nvmem-cell-names = "eeprom";
  181. };