RE350.dts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. /dts-v1/;
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "tplink,re350-v1", "mediatek,mt7621-soc";
  7. model = "TP-LINK RE350 v1";
  8. aliases {
  9. led-boot = &led_power;
  10. led-failsafe = &led_power;
  11. led-running = &led_power;
  12. led-upgrade = &led_power;
  13. };
  14. memory@0 {
  15. device_type = "memory";
  16. reg = <0x0 0x4000000>;
  17. };
  18. chosen {
  19. bootargs = "console=ttyS0,57600";
  20. };
  21. gpio-leds {
  22. compatible = "gpio-leds";
  23. led_power: power {
  24. label = "re350-v1:blue:power";
  25. gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
  26. };
  27. wifi2g {
  28. label = "re350-v1:blue:wifi2G";
  29. gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
  30. };
  31. wifi5g {
  32. label = "re350-v1:blue:wifi5G";
  33. gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  34. };
  35. wps_r {
  36. label = "re350-v1:red:wps";
  37. gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
  38. };
  39. wps_b {
  40. label = "re350-v1:blue:wps";
  41. gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
  42. };
  43. eth {
  44. label = "re350-v1:green:eth_act";
  45. gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
  46. };
  47. eth2 {
  48. label = "re350-v1:green:eth_link";
  49. gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
  50. };
  51. };
  52. gpio-keys-polled {
  53. compatible = "gpio-keys-polled";
  54. poll-interval = <20>;
  55. led {
  56. label = "led";
  57. gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
  58. linux,code = <BTN_0>;
  59. };
  60. reset {
  61. label = "reset";
  62. gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
  63. linux,code = <KEY_RESTART>;
  64. };
  65. power {
  66. label = "power";
  67. gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
  68. linux,code = <KEY_POWER>;
  69. };
  70. wps {
  71. label = "wps";
  72. gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
  73. linux,code = <KEY_WPS_BUTTON>;
  74. };
  75. };
  76. };
  77. &spi0 {
  78. status = "okay";
  79. w25q64@0 {
  80. compatible = "jedec,spi-nor";
  81. reg = <0>;
  82. spi-max-frequency = <10000000>;
  83. m25p,chunked-io = <32>;
  84. partitions {
  85. compatible = "fixed-partitions";
  86. #address-cells = <1>;
  87. #size-cells = <1>;
  88. partition@0 {
  89. label = "u-boot";
  90. reg = <0x0 0x20000>;
  91. read-only;
  92. };
  93. partition@20000 {
  94. label = "firmware";
  95. reg = <0x20000 0x5e0000>;
  96. };
  97. config: partition@600000 {
  98. label = "config";
  99. reg = <0x600000 0x50000>;
  100. read-only;
  101. };
  102. radio: partition@7f0000 {
  103. label = "radio";
  104. reg = <0x7f0000 0x10000>;
  105. read-only;
  106. };
  107. };
  108. };
  109. };
  110. &pcie {
  111. status = "okay";
  112. };
  113. &pcie0 {
  114. mt76@0,0 {
  115. reg = <0x0000 0 0 0 0>;
  116. mediatek,mtd-eeprom = <&radio 0>;
  117. mtd-mac-address = <&config 0x10008>;
  118. mtd-mac-address-increment = <1>;
  119. };
  120. };
  121. &pcie1 {
  122. mt76@0,0 {
  123. reg = <0x0000 0 0 0 0>;
  124. mediatek,mtd-eeprom = <&radio 0x8000>;
  125. ieee80211-freq-limit = <5000000 6000000>;
  126. mtd-mac-address = <&config 0x10008>;
  127. mtd-mac-address-increment = <2>;
  128. };
  129. };
  130. &ethernet {
  131. mtd-mac-address = <&config 0x10008>;
  132. };
  133. &pinctrl {
  134. state_default: pinctrl0 {
  135. gpio {
  136. ralink,group = "rgmii2", "wdt";
  137. ralink,function = "gpio";
  138. };
  139. };
  140. };