AWUSFREE1.dts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*
  2. * BSD LICENSE
  3. *
  4. * Copyright (C) 2018 Piotr Dymacz <[email protected]>
  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 "mt7628an.dtsi"
  34. #include <dt-bindings/gpio/gpio.h>
  35. #include <dt-bindings/input/input.h>
  36. / {
  37. compatible = "alfa-network,awusfree1", "mediatek,mt7628an-soc";
  38. model = "ALFA Network AWUSFREE1";
  39. aliases {
  40. led-boot = &led_system;
  41. led-failsafe = &led_system;
  42. led-running = &led_system;
  43. led-upgrade = &led_system;
  44. };
  45. chosen {
  46. bootargs = "console=ttyS0,115200";
  47. };
  48. keys {
  49. compatible = "gpio-keys-polled";
  50. poll-interval = <20>;
  51. reset {
  52. label = "reset";
  53. gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
  54. linux,code = <KEY_RESTART>;
  55. };
  56. };
  57. leds {
  58. compatible = "gpio-leds";
  59. led_system: system {
  60. label = "awusfree1:orange:system";
  61. gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
  62. };
  63. wlan {
  64. label = "awusfree1:blue:wlan";
  65. gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
  66. };
  67. };
  68. memory@0 {
  69. device_type = "memory";
  70. reg = <0x0 0x4000000>;
  71. };
  72. };
  73. &ehci {
  74. status = "disabled";
  75. };
  76. &esw {
  77. mediatek,portdisable = <0x1e>;
  78. };
  79. &ethernet {
  80. mtd-mac-address = <&factory 0x2e>;
  81. };
  82. &gpio1 {
  83. status = "okay";
  84. };
  85. &ohci {
  86. status = "disabled";
  87. };
  88. &pinctrl {
  89. state_default: pinctrl0 {
  90. gpio {
  91. ralink,group = "p0led_an", "wdt", "wled_an";
  92. ralink,function = "gpio";
  93. };
  94. ext_lna {
  95. ralink,group = "uart1";
  96. ralink,function = "sw_r";
  97. };
  98. ext_pa {
  99. ralink,group = "i2s";
  100. ralink,function = "antenna";
  101. };
  102. };
  103. };
  104. &spi0 {
  105. status = "okay";
  106. m25p80@0 {
  107. compatible = "jedec,spi-nor";
  108. reg = <0>;
  109. spi-max-frequency = <10000000>;
  110. m25p,chunked-io = <32>;
  111. partitions {
  112. compatible = "fixed-partitions";
  113. #address-cells = <1>;
  114. #size-cells = <1>;
  115. partition@0 {
  116. label = "u-boot";
  117. reg = <0x0 0x30000>;
  118. read-only;
  119. };
  120. partition@30000 {
  121. label = "u-boot-env";
  122. reg = <0x30000 0x1000>;
  123. };
  124. partition@31000 {
  125. label = "config";
  126. reg = <0x31000 0xf000>;
  127. read-only;
  128. };
  129. factory: partition@40000 {
  130. label = "factory";
  131. reg = <0x40000 0x10000>;
  132. read-only;
  133. };
  134. partition@50000 {
  135. compatible = "denx,uimage";
  136. label = "firmware";
  137. reg = <0x50000 0x7b0000>;
  138. };
  139. };
  140. };
  141. };
  142. &wmac {
  143. status = "okay";
  144. mediatek,mtd-eeprom = <&factory 0x0>;
  145. };