ath79: add support for TP-Link WDR3500 v1
[openwrt/staging/mkresin.git] / target / linux / ath79 / dts / ar9344_tplink_tl-wdr4300.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344_tplink_tl-wdrxxxx.dtsi"
4
5 &leds {
6 usb1 {
7 label = "tp-link:green:usb1";
8 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
9 trigger-sources = <&hub_port1>;
10 linux,default-trigger = "usbport";
11 };
12
13 usb2 {
14 label = "tp-link:green:usb2";
15 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
16 trigger-sources = <&hub_port2>;
17 linux,default-trigger = "usbport";
18 };
19 };
20
21 &gpio {
22 lna0 {
23 gpio-hog;
24 gpios = <18 GPIO_ACTIVE_HIGH>;
25 output-high;
26 line-name = "tp-link:ext:lna0";
27 };
28
29 lna1 {
30 gpio-hog;
31 gpios = <19 GPIO_ACTIVE_HIGH>;
32 output-high;
33 line-name = "tp-link:ext:lna1";
34 };
35
36 usb1_power {
37 gpio-hog;
38 gpios = <22 GPIO_ACTIVE_HIGH>;
39 output-high;
40 line-name = "tp-link:power:usb1";
41 };
42
43 usb2_power {
44 gpio-hog;
45 gpios = <21 GPIO_ACTIVE_HIGH>;
46 output-high;
47 line-name = "tp-link:power:usb2";
48 };
49 };
50
51 &usb {
52 #address-cells = <1>;
53 #size-cells = <0>;
54 status = "okay";
55
56 port@1 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 reg = <1>;
60 #trigger-source-cells = <0>;
61
62 hub_port1: port@1 {
63 reg = <1>;
64 #trigger-source-cells = <0>;
65 };
66
67 hub_port2: port@2 {
68 reg = <2>;
69 #trigger-source-cells = <0>;
70 };
71 };
72 };
73
74 &usb_phy {
75 status = "okay";
76 };
77
78 &ath9k {
79 mtd-mac-address = <&uboot 0x1fc00>;
80 };
81
82 &wmac {
83 mtd-mac-address = <&uboot 0x1fc00>;
84 mtd-mac-address-increment = <(-1)>;
85 };
86
87 &mdio0 {
88 status = "okay";
89
90 phy-mask = <0>;
91
92 phy0: ethernet-phy@0 {
93 reg = <0>;
94 phy-mode = "rgmii";
95
96 qca,ar8327-initvals = <
97 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
98 0x10 0x80000080 /* POWER_ON_STRIP */
99 0x50 0xc737c737 /* LED_CTRL0 */
100 0x54 0x00000000 /* LED_CTRL1 */
101 0x58 0x00000000 /* LED_CTRL2 */
102 0x5c 0x0030c300 /* LED_CTRL3 */
103 0x7c 0x0000007e /* PORT0_STATUS */
104 >;
105 };
106 };
107
108 &eth0 {
109 status = "okay";
110
111 /* default for ar934x, except for 1000M */
112 pll-data = <0x06000000 0x00000101 0x00001616>;
113
114 mtd-mac-address = <&uboot 0x1fc00>;
115 mtd-mac-address-increment = <(-2)>;
116
117 phy-mode = "rgmii";
118 phy-handle = <&phy0>;
119 };