1
0

qca9558_tplink_tl-wr1043nd.dtsi 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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 "qca9557.dtsi"
  6. / {
  7. chosen {
  8. bootargs = "console=ttyS0,115200n8";
  9. };
  10. aliases {
  11. led-boot = &system;
  12. led-failsafe = &system;
  13. led-running = &system;
  14. led-upgrade = &system;
  15. };
  16. leds {
  17. compatible = "gpio-leds";
  18. system: system {
  19. label = "tp-link:green:system";
  20. gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
  21. linux,default-trigger = "heartbeat";
  22. };
  23. usb {
  24. label = "tp-link:green:usb";
  25. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  26. trigger-sources = <&hub_port0>;
  27. linux,default-trigger = "usbport";
  28. };
  29. wifi_green {
  30. label = "tp-link:green:wlan";
  31. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  32. linux,default-trigger = "phy0tpt";
  33. };
  34. wifi_wps {
  35. label = "tp-link:green:wps";
  36. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  37. };
  38. };
  39. keys {
  40. compatible = "gpio-keys";
  41. reset {
  42. label = "Reset button";
  43. linux,code = <KEY_RESTART>;
  44. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  45. debounce-interval = <60>;
  46. };
  47. wifi {
  48. label = "RFKILL button";
  49. linux,code = <KEY_RFKILL>;
  50. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  51. debounce-interval = <60>;
  52. };
  53. };
  54. gpio-export {
  55. compatible = "gpio-export";
  56. #size-cells = <0>;
  57. gpio_usb_power {
  58. gpio-export,name = "tp-link:power:usb";
  59. gpio-export,output = <1>;
  60. gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
  61. };
  62. };
  63. };
  64. &uart {
  65. status = "okay";
  66. };
  67. &gpio {
  68. status = "okay";
  69. };
  70. &usb_phy0 {
  71. status = "okay";
  72. };
  73. &usb0 {
  74. #address-cells = <1>;
  75. #size-cells = <0>;
  76. status = "okay";
  77. hub_port0: port@1 {
  78. reg = <1>;
  79. #trigger-source-cells = <0>;
  80. };
  81. };
  82. &spi {
  83. status = "okay";
  84. num-cs = <1>;
  85. flash@0 {
  86. compatible = "jedec,spi-nor";
  87. reg = <0>;
  88. spi-max-frequency = <25000000>;
  89. partitions {
  90. compatible = "fixed-partitions";
  91. #address-cells = <1>;
  92. #size-cells = <1>;
  93. uboot: partition@0 {
  94. label = "u-boot";
  95. reg = <0x000000 0x020000>;
  96. read-only;
  97. };
  98. partition@20000 {
  99. compatible = "tplink,firmware";
  100. label = "firmware";
  101. reg = <0x020000 0x7d0000>;
  102. };
  103. art: partition@7f0000 {
  104. label = "art";
  105. reg = <0x7f0000 0x010000>;
  106. read-only;
  107. };
  108. };
  109. };
  110. };
  111. &mdio0 {
  112. status = "okay";
  113. phy0: ethernet-phy@0 {
  114. reg = <0>;
  115. qca,ar8327-initvals = <
  116. 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
  117. 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
  118. 0x10 0x81000080 /* POWER_ON_STRIP */
  119. 0x50 0xcc35cc35 /* LED_CTRL0 */
  120. 0x54 0xca35ca35 /* LED_CTRL1 */
  121. 0x58 0xc935c935 /* LED_CTRL2 */
  122. 0x5c 0x03ffff00 /* LED_CTRL3 */
  123. 0x7c 0x0000007e /* PORT0_STATUS */
  124. 0x94 0x0000007e /* PORT6 STATUS */
  125. >;
  126. };
  127. };
  128. &eth0 {
  129. status = "okay";
  130. pll-data = <0x56000000 0x00000101 0x00001616>;
  131. mtd-mac-address = <&uboot 0x1fc00>;
  132. mtd-mac-address-increment = <1>;
  133. phy-handle = <&phy0>;
  134. };
  135. &eth1 {
  136. status = "okay";
  137. pll-data = <0x03000101 0x00000101 0x00001616>;
  138. mtd-mac-address = <&uboot 0x1fc00>;
  139. fixed-link {
  140. speed = <1000>;
  141. full-duplex;
  142. };
  143. };
  144. &wmac {
  145. status = "okay";
  146. mtd-cal-data = <&art 0x1000>;
  147. mtd-mac-address = <&uboot 0x1fc00>;
  148. };