1
0

AC1200RM.dts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. /*
  2. * BSD LICENSE
  3. *
  4. * Copyright (C) 2018 Piotr Dymacz <pepe2k@gmail.com>
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * 1. Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * 2. Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in the
  15. * documentation and/or other materials provided with the distribution.
  16. * 3. Neither the names of the copyright holders nor the names of any
  17. * contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. */
  32. /dts-v1/;
  33. #include "mt7620a.dtsi"
  34. #include <dt-bindings/gpio/gpio.h>
  35. #include <dt-bindings/input/input.h>
  36. / {
  37. compatible = "alfa-network,ac1200rm", "ralink,mt7620a-soc";
  38. model = "ALFA Network AC1200RM";
  39. aliases {
  40. led-boot = &led_wps;
  41. led-failsafe = &led_wps;
  42. };
  43. chosen {
  44. bootargs = "console=ttyS0,115200";
  45. };
  46. gpio-keys-polled {
  47. compatible = "gpio-keys-polled";
  48. poll-interval = <20>;
  49. reset {
  50. label = "reset";
  51. gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
  52. linux,code = <KEY_RESTART>;
  53. };
  54. };
  55. gpio-leds {
  56. compatible = "gpio-leds";
  57. wlan2g {
  58. label = "ac1200rm:green:wlan2g";
  59. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  60. };
  61. led_wps: wps {
  62. label = "ac1200rm:green:wps";
  63. gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
  64. };
  65. };
  66. };
  67. &ehci {
  68. status = "okay";
  69. };
  70. &ethernet {
  71. mtd-mac-address = <&factory 0x28>;
  72. mediatek,portmap = "llllw";
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&ephy_pins>;
  75. };
  76. &gpio1 {
  77. status = "okay";
  78. };
  79. &gpio2 {
  80. status = "okay";
  81. };
  82. &gpio3 {
  83. status = "okay";
  84. };
  85. &gsw {
  86. mediatek,port4 = "ephy";
  87. };
  88. &ohci {
  89. status = "okay";
  90. };
  91. &pcie {
  92. status = "okay";
  93. };
  94. &pcie0 {
  95. mt76@0,0 {
  96. reg = <0x0000 0 0 0 0>;
  97. mediatek,mtd-eeprom = <&factory 0x8000>;
  98. ieee80211-freq-limit = <5000000 6000000>;
  99. led {
  100. led-sources = <2>;
  101. led-active-low;
  102. };
  103. };
  104. };
  105. &pinctrl {
  106. state_default: pinctrl0 {
  107. gpio {
  108. ralink,group = "nd_sd", "spi refclk", "wled";
  109. ralink,function = "gpio";
  110. };
  111. };
  112. };
  113. &spi0 {
  114. status = "okay";
  115. m25p80@0 {
  116. compatible = "jedec,spi-nor";
  117. reg = <0>;
  118. spi-max-frequency = <10000000>;
  119. partitions {
  120. compatible = "fixed-partitions";
  121. #address-cells = <1>;
  122. #size-cells = <1>;
  123. partition@0 {
  124. label = "u-boot";
  125. reg = <0x0 0x30000>;
  126. read-only;
  127. };
  128. partition@30000 {
  129. label = "u-boot-env";
  130. reg = <0x30000 0x1000>;
  131. };
  132. partition@31000 {
  133. label = "config";
  134. reg = <0x31000 0xf000>;
  135. read-only;
  136. };
  137. factory: partition@40000 {
  138. label = "factory";
  139. reg = <0x40000 0x10000>;
  140. read-only;
  141. };
  142. partition@50000 {
  143. label = "firmware";
  144. reg = <0x50000 0xfb0000>;
  145. };
  146. };
  147. };
  148. };
  149. &wmac {
  150. ralink,mtd-eeprom = <&factory 0>;
  151. };