1
0

qca9558_tplink_tl-wdr4900-v2.dts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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. compatible = "tplink,tl-wdr4900-v2", "qca,qca9558";
  8. model = "TP-Link TL-WDR4900 v2";
  9. chosen {
  10. bootargs = "console=ttyS0,115200n8";
  11. };
  12. aliases {
  13. led-boot = &led_system;
  14. led-failsafe = &led_system;
  15. led-running = &led_system;
  16. led-upgrade = &led_system;
  17. };
  18. gpio_leds: leds {
  19. compatible = "gpio-leds";
  20. led_system: system {
  21. label = "tp-link:blue:system";
  22. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  23. default-state = "on";
  24. };
  25. usb1 {
  26. label = "tp-link:green:usb1";
  27. gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
  28. trigger-sources = <&hub_port1>;
  29. linux,default-trigger = "usbport";
  30. };
  31. usb2 {
  32. label = "tp-link:green:usb2";
  33. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  34. trigger-sources = <&hub_port0>;
  35. linux,default-trigger = "usbport";
  36. };
  37. wlan2g {
  38. label = "tp-link:blue:wlan2g";
  39. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  40. linux,default-trigger = "phy0tpt";
  41. };
  42. qss {
  43. label = "tp-link:blue:qss";
  44. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  45. };
  46. };
  47. ath9k-leds {
  48. compatible = "gpio-leds";
  49. wlan5g {
  50. label = "tp-link:blue:wlan5g";
  51. gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
  52. linux,default-trigger = "phy1tpt";
  53. };
  54. };
  55. keys {
  56. compatible = "gpio-keys";
  57. reset {
  58. label = "Reset button";
  59. linux,code = <KEY_RESTART>;
  60. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  61. debounce-interval = <60>;
  62. };
  63. };
  64. gpio-export {
  65. compatible = "gpio-export";
  66. gpio_usb1_power {
  67. gpio-export,name = "tp-link:power:usb1";
  68. gpio-export,output = <1>;
  69. gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
  70. };
  71. gpio_usb2_power {
  72. gpio-export,name = "tp-link:power:usb2";
  73. gpio-export,output = <1>;
  74. gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
  75. };
  76. };
  77. };
  78. &pcie1 {
  79. status = "okay";
  80. ath9k: wifi@0,0 {
  81. compatible = "pci168c,0033";
  82. reg = <0x0000 0 0 0 0>;
  83. mtd-mac-address = <&uboot 0x1fc00>;
  84. mtd-mac-address-increment = <(-2)>;
  85. qca,no-eeprom;
  86. #gpio-cells = <2>;
  87. gpio-controller;
  88. };
  89. };
  90. &uart {
  91. status = "okay";
  92. };
  93. &usb_phy0 {
  94. status = "okay";
  95. };
  96. &usb0 {
  97. #address-cells = <1>;
  98. #size-cells = <0>;
  99. status = "okay";
  100. hub_port0: port@1 {
  101. reg = <1>;
  102. #trigger-source-cells = <0>;
  103. };
  104. };
  105. &usb_phy1 {
  106. status = "okay";
  107. };
  108. &usb1 {
  109. #address-cells = <1>;
  110. #size-cells = <0>;
  111. status = "okay";
  112. hub_port1: port@1 {
  113. reg = <1>;
  114. #trigger-source-cells = <0>;
  115. };
  116. };
  117. &spi {
  118. status = "okay";
  119. num-cs = <1>;
  120. flash@0 {
  121. compatible = "jedec,spi-nor";
  122. reg = <0>;
  123. spi-max-frequency = <25000000>;
  124. partitions {
  125. compatible = "fixed-partitions";
  126. #address-cells = <1>;
  127. #size-cells = <1>;
  128. uboot: partition@0 {
  129. label = "u-boot";
  130. reg = <0x000000 0x020000>;
  131. read-only;
  132. };
  133. partition@20000 {
  134. compatible = "tplink,firmware";
  135. label = "firmware";
  136. reg = <0x020000 0x7d0000>;
  137. };
  138. art: partition@7f0000 {
  139. label = "art";
  140. reg = <0x7f0000 0x010000>;
  141. read-only;
  142. };
  143. };
  144. };
  145. };
  146. &mdio0 {
  147. status = "okay";
  148. phy0: ethernet-phy@0 {
  149. reg = <0>;
  150. qca,ar8327-initvals = <
  151. 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
  152. 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
  153. 0x50 0xc737c737 /* LED_CTRL0 */
  154. 0x54 0x00000000 /* LED_CTRL1 */
  155. 0x58 0x00000000 /* LED_CTRL2 */
  156. 0x5c 0x0030c300 /* LED_CTRL3 */
  157. 0x7c 0x0000007e /* PORT0_STATUS */
  158. 0x94 0x0000007e /* PORT6 STATUS */
  159. >;
  160. };
  161. };
  162. &eth0 {
  163. status = "okay";
  164. mtd-mac-address = <&uboot 0x1fc00>;
  165. mtd-mac-address-increment = <1>;
  166. phy-handle = <&phy0>;
  167. pll-data = <0x56000000 0x00000101 0x00001616>;
  168. gmac-config {
  169. device = <&gmac>;
  170. rgmii-enabled = <1>;
  171. };
  172. };
  173. &eth1 {
  174. status = "okay";
  175. mtd-mac-address = <&uboot 0x1fc00>;
  176. pll-data = <0x03000101 0x00000101 0x00001616>;
  177. fixed-link {
  178. speed = <1000>;
  179. full-duplex;
  180. };
  181. };
  182. &wmac {
  183. status = "okay";
  184. mtd-cal-data = <&art 0x1000>;
  185. mtd-mac-address = <&uboot 0x1fc00>;
  186. mtd-mac-address-increment = <(-1)>;
  187. };