ar9331_tplink_tl-mr3020-v1.dts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. // SPDX-License-Identifier: GPL-2.0
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include "ar9331.dtsi"
  6. / {
  7. model = "TP-Link TL-MR3020 V1";
  8. compatible = "tplink,tl-mr3020-v1", "qca,ar9331";
  9. aliases {
  10. serial0 = &uart;
  11. led-boot = &system;
  12. led-failsafe = &system;
  13. led-running = &system;
  14. led-upgrade = &system;
  15. };
  16. leds {
  17. compatible = "gpio-leds";
  18. wlan {
  19. label = "tp-link:green:wlan";
  20. gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
  21. linux,default-trigger = "phy0tpt";
  22. };
  23. lan {
  24. label = "tp-link:green:lan";
  25. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  26. };
  27. system: wps {
  28. label = "tp-link:green:wps";
  29. gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
  30. };
  31. led3g {
  32. label = "tp-link:green:3g";
  33. gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
  34. trigger-sources = <&hub_port>;
  35. linux,default-trigger = "usbport";
  36. };
  37. };
  38. keys {
  39. compatible = "gpio-keys";
  40. button0 {
  41. label = "reset";
  42. linux,code = <KEY_RESTART>;
  43. gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
  44. debounce-interval = <60>;
  45. };
  46. button1 {
  47. label = "sw1";
  48. linux,input-type = <EV_SW>;
  49. linux,code = <BTN_0>;
  50. gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
  51. debounce-interval = <60>;
  52. };
  53. button2 {
  54. label = "sw2";
  55. linux,input-type = <EV_SW>;
  56. linux,code = <BTN_1>;
  57. gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
  58. debounce-interval = <60>;
  59. };
  60. };
  61. reg_usb_vbus: reg_usb_vbus {
  62. compatible = "regulator-fixed";
  63. regulator-name = "usb_vbus";
  64. regulator-min-microvolt = <5000000>;
  65. regulator-max-microvolt = <5000000>;
  66. gpio = <&gpio 8 GPIO_ACTIVE_HIGH>;
  67. enable-active-high;
  68. };
  69. };
  70. &ref {
  71. clock-frequency = <25000000>;
  72. };
  73. &uart {
  74. status = "okay";
  75. };
  76. &gpio {
  77. status = "okay";
  78. };
  79. &usb {
  80. #address-cells = <1>;
  81. #size-cells = <0>;
  82. dr_mode = "host";
  83. vbus-supply = <&reg_usb_vbus>;
  84. status = "okay";
  85. hub_port: port@1 {
  86. reg = <1>;
  87. #trigger-source-cells = <0>;
  88. };
  89. };
  90. &usb_phy {
  91. status = "okay";
  92. };
  93. &spi {
  94. num-chipselects = <1>;
  95. status = "okay";
  96. /* Spansion S25FL032PIF SPI flash */
  97. flash@0 {
  98. compatible = "jedec,spi-nor";
  99. spi-max-frequency = <104000000>;
  100. reg = <0>;
  101. partitions {
  102. compatible = "fixed-partitions";
  103. #address-cells = <1>;
  104. #size-cells = <1>;
  105. uboot: partition@0 {
  106. label = "u-boot";
  107. reg = <0x000000 0x020000>;
  108. read-only;
  109. };
  110. partition@20000 {
  111. compatible = "tplink,firmware";
  112. label = "firmware";
  113. reg = <0x020000 0x3c0000>;
  114. };
  115. partition@3e0000 {
  116. label = "config";
  117. reg = <0x3e0000 0x010000>;
  118. read-only;
  119. };
  120. art: partition@3f0000 {
  121. label = "art";
  122. reg = <0x3f0000 0x010000>;
  123. read-only;
  124. };
  125. };
  126. };
  127. };
  128. &eth0 {
  129. status = "okay";
  130. mtd-mac-address = <&uboot 0x1fc00>;
  131. gmac-config {
  132. device = <&gmac>;
  133. switch-phy-addr-swap = <0>;
  134. switch-phy-swap = <0>;
  135. };
  136. };
  137. &eth1 {
  138. status = "okay";
  139. compatible = "syscon", "simple-mfd";
  140. };
  141. &wmac {
  142. status = "okay";
  143. mtd-cal-data = <&art 0x1000>;
  144. mtd-mac-address = <&uboot 0x1fc00>;
  145. };