mt7621_rostelecom_rt-fe-1a.dts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. #include <dt-bindings/leds/common.h>
  6. / {
  7. compatible = "rostelecom,rt-fe-1a", "mediatek,mt7621-soc";
  8. model = "Rostelecom RT-FE-1A";
  9. aliases {
  10. label-mac-device = &gmac0;
  11. led-boot = &led_status_green;
  12. led-failsafe = &led_status_green;
  13. led-running = &led_status_green;
  14. led-upgrade = &led_status_green;
  15. };
  16. leds {
  17. compatible = "gpio-leds";
  18. led-0 {
  19. color = <LED_COLOR_ID_BLUE>;
  20. function = LED_FUNCTION_WLAN;
  21. function-enumerator = <50>;
  22. gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
  23. linux,default-trigger = "phy1tpt";
  24. };
  25. led-1 {
  26. color = <LED_COLOR_ID_BLUE>;
  27. function = LED_FUNCTION_WLAN;
  28. function-enumerator = <24>;
  29. gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
  30. linux,default-trigger = "phy0tpt";
  31. };
  32. led_status_green: led-2 {
  33. color = <LED_COLOR_ID_GREEN>;
  34. function = LED_FUNCTION_STATUS;
  35. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  36. };
  37. };
  38. keys {
  39. compatible = "gpio-keys";
  40. button-0 {
  41. label = "wps";
  42. gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
  43. linux,code = <KEY_WPS_BUTTON>;
  44. };
  45. button-1 {
  46. label = "reset";
  47. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  48. linux,code = <KEY_RESTART>;
  49. };
  50. };
  51. ubi-concat {
  52. compatible = "mtd-concat";
  53. devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2 \
  54. &ubiconcat3>;
  55. partitions {
  56. compatible = "fixed-partitions";
  57. #address-cells = <1>;
  58. #size-cells = <1>;
  59. partition@0 {
  60. label = "ubi";
  61. reg = <0x0 0x5420000>;
  62. };
  63. };
  64. };
  65. };
  66. &nand {
  67. status = "okay";
  68. partitions {
  69. compatible = "sercomm,sc-partitions", "fixed-partitions";
  70. #address-cells = <1>;
  71. #size-cells = <1>;
  72. partition@0 {
  73. label = "u-boot";
  74. reg = <0x0 0x100000>;
  75. sercomm,scpart-id = <0>;
  76. read-only;
  77. };
  78. partition@100000 {
  79. label = "dynamic partition map";
  80. reg = <0x100000 0x100000>;
  81. sercomm,scpart-id = <1>;
  82. read-only;
  83. };
  84. partition@200000 {
  85. label = "Factory";
  86. reg = <0x200000 0x100000>;
  87. sercomm,scpart-id = <2>;
  88. read-only;
  89. nvmem-layout {
  90. compatible = "fixed-layout";
  91. #address-cells = <1>;
  92. #size-cells = <1>;
  93. eeprom_2g: eeprom@0 {
  94. reg = <0x0 0x400>;
  95. };
  96. eeprom_5g: eeprom@8000 {
  97. reg = <0x8000 0x4da8>;
  98. };
  99. macaddr_label: macaddr@21000 {
  100. compatible = "mac-base";
  101. reg = <0x21000 0x6>;
  102. #nvmem-cell-cells = <1>;
  103. };
  104. };
  105. };
  106. partition@300000 {
  107. label = "Boot Flag";
  108. reg = <0x300000 0x100000>;
  109. sercomm,scpart-id = <3>;
  110. };
  111. partition@400000 {
  112. label = "kernel";
  113. reg = <0x400000 0x600000>;
  114. sercomm,scpart-id = <4>;
  115. };
  116. partition@a00000 {
  117. label = "Kernel 2";
  118. reg = <0xa00000 0x600000>;
  119. sercomm,scpart-id = <5>;
  120. read-only;
  121. };
  122. ubiconcat0: partition@1000000 {
  123. label = "File System 1";
  124. reg = <0x1000000 0x1800000>;
  125. sercomm,scpart-id = <6>;
  126. };
  127. partition@2800000 {
  128. label = "File System 2";
  129. reg = <0x2800000 0x1800000>;
  130. sercomm,scpart-id = <7>;
  131. read-only;
  132. };
  133. ubiconcat1: partition@4000000 {
  134. label = "Configuration/log";
  135. reg = <0x4000000 0x800000>;
  136. sercomm,scpart-id = <8>;
  137. };
  138. ubiconcat2: partition@4800000 {
  139. label = "application tmp buffer (Ftool)";
  140. reg = <0x4800000 0xc00000>;
  141. sercomm,scpart-id = <9>;
  142. };
  143. ubiconcat3: partition@5400000 {
  144. label = "free space (in stock firmware)";
  145. reg = <0x5400000 0x2820000>;
  146. sercomm,scpart-id = <10>;
  147. };
  148. };
  149. };
  150. &pcie {
  151. status = "okay";
  152. };
  153. &pcie0 {
  154. wifi@0,0 {
  155. compatible = "mediatek,mt76";
  156. reg = <0x0000 0 0 0 0>;
  157. ieee80211-freq-limit = <5000000 6000000>;
  158. nvmem-cells = <&eeprom_5g>, <&macaddr_label 3>;
  159. nvmem-cell-names = "eeprom", "mac-address";
  160. led {
  161. led-active-low;
  162. };
  163. };
  164. };
  165. &pcie1 {
  166. wifi@0,0 {
  167. compatible = "mediatek,mt76";
  168. reg = <0x0000 0 0 0 0>;
  169. ieee80211-freq-limit = <2400000 2500000>;
  170. nvmem-cells = <&eeprom_2g>, <&macaddr_label 2>;
  171. nvmem-cell-names = "eeprom", "mac-address";
  172. led {
  173. led-active-low;
  174. };
  175. };
  176. };
  177. &gmac0 {
  178. nvmem-cells = <&macaddr_label 0>;
  179. nvmem-cell-names = "mac-address";
  180. };
  181. &gmac1 {
  182. status = "okay";
  183. label = "wan";
  184. phy-handle = <&ethphy0>;
  185. nvmem-cells = <&macaddr_label 11>;
  186. nvmem-cell-names = "mac-address";
  187. };
  188. &ethphy0 {
  189. /delete-property/ interrupts;
  190. };
  191. &switch0 {
  192. ports {
  193. port@1 {
  194. status = "okay";
  195. label = "lan1";
  196. };
  197. port@2 {
  198. status = "okay";
  199. label = "lan2";
  200. };
  201. port@3 {
  202. status = "okay";
  203. label = "lan3";
  204. };
  205. port@4 {
  206. status = "okay";
  207. label = "lan4";
  208. };
  209. };
  210. };
  211. &state_default {
  212. gpio {
  213. groups = "jtag", "uart2", "uart3", "wdt";
  214. function = "gpio";
  215. };
  216. };