1
0

ar9331_tplink_tl-mr3040-v2.dts 2.7 KB

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