1
0

qca9533_tplink_tl-wr842n-v3.dts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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 "qca953x.dtsi"
  6. / {
  7. compatible = "tplink,tl-wr842n-v3", "qca,qca9533";
  8. model = "TP-Link TL-WR842N v3";
  9. aliases {
  10. led-boot = &qss_led;
  11. led-failsafe = &qss_led;
  12. led-running = &qss_led;
  13. led-upgrade = &qss_led;
  14. };
  15. gpio_leds: leds {
  16. compatible = "gpio-leds";
  17. system: power {
  18. label = "tp-link:green:power";
  19. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  20. default-state = "on";
  21. };
  22. wifi {
  23. label = "tp-link:green:wlan";
  24. gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
  25. linux,default-trigger = "phy0tpt";
  26. };
  27. qss_led: qss {
  28. label = "tp-link:green:qss";
  29. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  30. };
  31. wan_green {
  32. label = "tp-link:green:wan";
  33. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  34. };
  35. wan_red {
  36. label = "tp-link:red:wan";
  37. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  38. };
  39. lan1 {
  40. label = "tp-link:green:lan1";
  41. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  42. };
  43. lan2 {
  44. label = "tp-link:green:lan2";
  45. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  46. };
  47. lan3 {
  48. label = "tp-link:green:lan3";
  49. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  50. };
  51. lan4 {
  52. label = "tp-link:green:lan4";
  53. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  54. };
  55. usb {
  56. label = "tp-link:green:usb";
  57. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  58. linux,default-trigger = "usbport";
  59. trigger-sources = <&hub_port>;
  60. };
  61. };
  62. keys {
  63. compatible = "gpio-keys";
  64. reset {
  65. label = "Reset button";
  66. linux,code = <KEY_RESTART>;
  67. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  68. debounce-interval = <60>;
  69. };
  70. rfkill {
  71. label = "RFKILL button";
  72. linux,code = <KEY_RFKILL>;
  73. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  74. debounce-interval = <60>;
  75. };
  76. };
  77. };
  78. &uart {
  79. status = "okay";
  80. };
  81. &usb0 {
  82. #address-cells = <1>;
  83. #size-cells = <0>;
  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. status = "okay";
  95. num-cs = <1>;
  96. flash@0 {
  97. compatible = "jedec,spi-nor";
  98. reg = <0>;
  99. spi-max-frequency = <25000000>;
  100. partitions {
  101. compatible = "fixed-partitions";
  102. #address-cells = <1>;
  103. #size-cells = <1>;
  104. uboot: partition@0 {
  105. label = "u-boot";
  106. reg = <0x000000 0x020000>;
  107. read-only;
  108. };
  109. partition@20000 {
  110. compatible = "tplink,firmware";
  111. label = "firmware";
  112. reg = <0x020000 0xfd0000>;
  113. };
  114. art: partition@ff0000 {
  115. label = "art";
  116. reg = <0xff0000 0x010000>;
  117. read-only;
  118. };
  119. };
  120. };
  121. };
  122. &eth1 {
  123. mtd-mac-address = <&uboot 0x1fc00>;
  124. };
  125. &eth0 {
  126. status = "okay";
  127. phy-handle = <&swphy4>;
  128. mtd-mac-address = <&uboot 0x1fc00>;
  129. mtd-mac-address-increment = <1>;
  130. };
  131. &wmac {
  132. status = "okay";
  133. mtd-cal-data = <&art 0x1000>;
  134. mtd-mac-address = <&uboot 0x1fc00>;
  135. };