1
0

ar7241_tplink_tl-wr842n-v1.dts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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 "ar7241.dtsi"
  6. / {
  7. compatible = "tplink,tl-wr842n-v1", "qca,ar7241";
  8. model = "TP-Link TL-WR842N/ND v1";
  9. aliases {
  10. led-boot = &led_system;
  11. led-failsafe = &led_system;
  12. led-running = &led_system;
  13. led-upgrade = &led_system;
  14. };
  15. keys {
  16. compatible = "gpio-keys-polled";
  17. poll-interval = <20>;
  18. rfkill {
  19. label = "rfkill";
  20. linux,code = <KEY_RFKILL>;
  21. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  22. debounce-interval = <60>;
  23. };
  24. reset {
  25. label = "reset";
  26. linux,code = <KEY_RESTART>;
  27. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  28. debounce-interval = <60>;
  29. };
  30. };
  31. gpio-leds {
  32. compatible = "gpio-leds";
  33. led_system: system {
  34. label = "tp-link:green:system";
  35. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  36. };
  37. qss {
  38. label = "tp-link:green:qss";
  39. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  40. };
  41. led3g {
  42. label = "tp-link:green:3g";
  43. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  44. trigger-sources = <&hub_port>;
  45. linux,default-trigger = "usbport";
  46. };
  47. };
  48. ath9k-leds {
  49. compatible = "gpio-leds";
  50. wlan {
  51. label = "tp-link:green:wlan";
  52. gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
  53. linux,default-trigger = "phy0tpt";
  54. };
  55. };
  56. gpio-export {
  57. compatible = "gpio-export";
  58. gpio_usb_power {
  59. gpio-export,name = "tp-link:power:usb";
  60. gpio-export,output = <1>;
  61. gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
  62. };
  63. };
  64. };
  65. &usb {
  66. #address-cells = <1>;
  67. #size-cells = <0>;
  68. status = "okay";
  69. hub_port: port@1 {
  70. reg = <1>;
  71. #trigger-source-cells = <0>;
  72. };
  73. };
  74. &usb_phy {
  75. status = "okay";
  76. };
  77. &spi {
  78. status = "okay";
  79. num-cs = <1>;
  80. flash@0 {
  81. compatible = "jedec,spi-nor";
  82. reg = <0>;
  83. spi-max-frequency = <25000000>;
  84. partitions {
  85. compatible = "fixed-partitions";
  86. #address-cells = <1>;
  87. #size-cells = <1>;
  88. uboot: partition@0 {
  89. reg = <0x0 0x20000>;
  90. label = "u-boot";
  91. read-only;
  92. };
  93. partition@20000 {
  94. compatible = "tplink,firmware";
  95. reg = <0x20000 0x7d0000>;
  96. label = "firmware";
  97. };
  98. partition@7f0000 {
  99. reg = <0x7f0000 0x10000>;
  100. label = "art";
  101. read-only;
  102. };
  103. };
  104. };
  105. };
  106. &pcie {
  107. status = "okay";
  108. ath9k: wifi@0,0 {
  109. compatible = "pci168c,002e";
  110. reg = <0x0000 0 0 0 0>;
  111. #gpio-cells = <2>;
  112. gpio-controller;
  113. qca,no-eeprom;
  114. mtd-mac-address = <&uboot 0x1fc00>;
  115. };
  116. };
  117. &eth0 {
  118. status = "okay";
  119. mtd-mac-address = <&uboot 0x1fc00>;
  120. mtd-mac-address-increment = <(-1)>;
  121. };
  122. &eth1 {
  123. status = "okay";
  124. mtd-mac-address = <&uboot 0x1fc00>;
  125. mtd-mac-address-increment = <1>;
  126. };
  127. &gpio {
  128. status = "okay";
  129. };
  130. &uart {
  131. status = "okay";
  132. };