qca9563_tplink_tl-wr1043n.dtsi 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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 "qca956x.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. gpio_leds: leds {
  17. compatible = "gpio-leds";
  18. system: system {
  19. label = "tp-link:green:system";
  20. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  21. linux,default-trigger = "heartbeat";
  22. };
  23. wifi_green {
  24. label = "tp-link:green:wlan";
  25. gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
  26. linux,default-trigger = "phy0tpt";
  27. };
  28. wifi_wps {
  29. label = "tp-link:green:wps";
  30. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  31. };
  32. wan {
  33. label = "tp-link:green:wan";
  34. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  35. };
  36. wan_fail {
  37. label = "tp-link:orange:wan";
  38. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  39. };
  40. lan1 {
  41. label = "tp-link:green:lan1";
  42. gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
  43. };
  44. lan2 {
  45. label = "tp-link:green:lan2";
  46. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  47. };
  48. lan3 {
  49. label = "tp-link:green:lan3";
  50. gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
  51. };
  52. lan4 {
  53. label = "tp-link:green:lan4";
  54. gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
  55. };
  56. };
  57. keys {
  58. compatible = "gpio-keys";
  59. reset {
  60. label = "Reset button";
  61. linux,code = <KEY_RESTART>;
  62. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  63. debounce-interval = <60>;
  64. };
  65. wifi {
  66. label = "RFKILL button";
  67. linux,code = <KEY_RFKILL>;
  68. gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
  69. debounce-interval = <60>;
  70. };
  71. };
  72. gpio-export {
  73. compatible = "gpio-export";
  74. #size-cells = <0>;
  75. gpio_usb_power {
  76. gpio-export,name = "tp-link:power:usb";
  77. gpio-export,output = <1>;
  78. gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
  79. };
  80. };
  81. };
  82. &uart {
  83. status = "okay";
  84. };
  85. &gpio {
  86. status = "okay";
  87. };
  88. &spi {
  89. status = "okay";
  90. num-cs = <1>;
  91. flash@0 {
  92. compatible = "jedec,spi-nor";
  93. reg = <0>;
  94. spi-max-frequency = <25000000>;
  95. partitions {
  96. compatible = "fixed-partitions";
  97. #address-cells = <1>;
  98. #size-cells = <1>;
  99. partition@0 {
  100. label = "u-boot";
  101. reg = <0x000000 0x020000>;
  102. read-only;
  103. };
  104. partition@20000 {
  105. compatible = "tplink,firmware";
  106. label = "firmware";
  107. reg = <0x020000 0xf30000>;
  108. };
  109. info: partition@f50000 {
  110. label = "product-info";
  111. reg = <0xf50000 0x020000>;
  112. read-only;
  113. };
  114. partition@f70000 {
  115. label = "config";
  116. reg = <0xf70000 0x050000>;
  117. read-only;
  118. };
  119. partition@fc0000 {
  120. label = "partition-table";
  121. reg = <0xfc0000 0x010000>;
  122. read-only;
  123. };
  124. partition@fd0000 {
  125. label = "logs";
  126. reg = <0xfd0000 0x020000>;
  127. read-only;
  128. };
  129. art: partition@ff0000 {
  130. label = "ART";
  131. reg = <0xff0000 0x010000>;
  132. read-only;
  133. };
  134. };
  135. };
  136. };
  137. &mdio0 {
  138. status = "okay";
  139. phy-mask = <0>;
  140. phy0: ethernet-phy@0 {
  141. reg = <0>;
  142. phy-mode = "sgmii";
  143. qca,ar8327-initvals = <
  144. 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
  145. 0x7c 0x0000007e /* PORT0_STATUS */
  146. >;
  147. };
  148. };
  149. &eth0 {
  150. status = "okay";
  151. mtd-mac-address = <&info 0x8>;
  152. phy-mode = "sgmii";
  153. phy-handle = <&phy0>;
  154. };
  155. &wmac {
  156. status = "okay";
  157. mtd-cal-data = <&art 0x1000>;
  158. mtd-mac-address = <&info 0x8>;
  159. };