ar9341_tplink_tl-wr842n-v2.dts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include "ar9341.dtsi"
  6. / {
  7. model = "TP-Link TL-WR842N/ND v2";
  8. compatible = "tplink,tl-wr842n-v2", "qca,ar9341";
  9. aliases {
  10. serial0 = &uart;
  11. led-boot = &system;
  12. led-failsafe = &system;
  13. led-running = &system;
  14. led-upgrade = &system;
  15. };
  16. keys {
  17. compatible = "gpio-keys-polled";
  18. poll-interval = <20>;
  19. pinctrl-names = "default";
  20. pinctrl-0 = <&jtag_disable_pins>;
  21. reset {
  22. label = "Reset";
  23. linux,code = <KEY_RESTART>;
  24. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  25. debounce-interval = <60>;
  26. };
  27. rfkill {
  28. label = "WiFi";
  29. linux,code = <KEY_RFKILL>;
  30. gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
  31. debounce-interval = <60>;
  32. };
  33. };
  34. leds {
  35. compatible = "gpio-leds";
  36. system: power {
  37. label = "tp-link:green:power";
  38. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  39. default-state = "on";
  40. };
  41. wlan {
  42. label = "tp-link:green:wlan";
  43. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  44. linux,default-trigger = "phy0tpt";
  45. };
  46. qss {
  47. label = "tp-link:green:qss";
  48. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  49. };
  50. wan {
  51. label = "tp-link:green:wan";
  52. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  53. };
  54. lan1 {
  55. label = "tp-link:green:lan1";
  56. gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
  57. };
  58. lan2 {
  59. label = "tp-link:green:lan2";
  60. gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
  61. };
  62. lan3 {
  63. label = "tp-link:green:lan3";
  64. gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
  65. };
  66. lan4 {
  67. label = "tp-link:green:lan4";
  68. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  69. };
  70. usb {
  71. label = "tp-link:green:usb";
  72. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  73. trigger-sources = <&hub_port>;
  74. linux,default-trigger = "usbport";
  75. };
  76. };
  77. gpio-export {
  78. compatible = "gpio-export";
  79. gpio_usb_power {
  80. gpio-export,name = "tp-link:power:usb";
  81. gpio-export,output = <1>;
  82. gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
  83. };
  84. };
  85. };
  86. &ref {
  87. clock-frequency = <25000000>;
  88. };
  89. &uart {
  90. status = "okay";
  91. };
  92. &gpio {
  93. status = "okay";
  94. };
  95. &spi {
  96. num-cs = <1>;
  97. status = "okay";
  98. flash@0 {
  99. compatible = "jedec,spi-nor";
  100. reg = <0>;
  101. spi-max-frequency = <25000000>;
  102. partitions {
  103. compatible = "fixed-partitions";
  104. #address-cells = <1>;
  105. #size-cells = <1>;
  106. uboot: partition@0 {
  107. label = "u-boot";
  108. reg = <0x000000 0x020000>;
  109. read-only;
  110. };
  111. partition@20000 {
  112. compatible = "tplink,firmware";
  113. label = "firmware";
  114. reg = <0x020000 0x7d0000>;
  115. };
  116. art: partition@7f0000 {
  117. label = "art";
  118. reg = <0x7f0000 0x010000>;
  119. read-only;
  120. };
  121. };
  122. };
  123. };
  124. &usb {
  125. #address-cells = <1>;
  126. #size-cells = <0>;
  127. status = "okay";
  128. hub_port: port@1 {
  129. reg = <1>;
  130. #trigger-source-cells = <0>;
  131. };
  132. };
  133. &usb_phy {
  134. status = "okay";
  135. };
  136. &eth0 {
  137. status = "okay";
  138. phy-handle = <&swphy0>;
  139. mtd-mac-address = <&uboot 0x1fc00>;
  140. mtd-mac-address-increment = <(-1)>;
  141. };
  142. &eth1 {
  143. status = "okay";
  144. phy-handle = <&swphy4>;
  145. mtd-mac-address = <&uboot 0x1fc00>;
  146. phy-mode = "gmii";
  147. pll-data = <0x06000000 0x00000101 0x00001616>;
  148. gmac-config {
  149. device = <&gmac>;
  150. switch-phy-swap = <1>;
  151. };
  152. };
  153. &wmac {
  154. status = "okay";
  155. mtd-cal-data = <&art 0x1000>;
  156. mtd-mac-address = <&uboot 0x1fc00>;
  157. };