ath79: add support for TP-Link WDR3500 v1
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_trendnet_tew-823dru.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca9557.dtsi"
8
9 / {
10 compatible = "trendnet,tew-823dru", "qca,qca9558";
11 model = "TRENDNET TEW-823DRU";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &system;
19 led-failsafe = &system;
20 led-running = &system;
21 led-upgrade = &system;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 power_orange {
28 label = "trendnet:orange:power";
29 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
30 };
31
32 system: power_green {
33 label = "trendnet:green:power";
34 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
35 };
36
37 planet_green {
38 label = "trendnet:green:planet";
39 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
40 };
41
42 planet_orange {
43 label = "trendnet:orange:planet";
44 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 reset {
52 label = "Reset button";
53 linux,code = <KEY_RESTART>;
54 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
55 debounce-interval = <60>;
56 };
57
58 wps {
59 label = "WPS button";
60 linux,code = <KEY_WPS_BUTTON>;
61 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
62 debounce-interval = <60>;
63 };
64 };
65
66 };
67
68 &pcie0 {
69 status = "okay";
70 };
71
72 &pcie1 {
73 status = "okay";
74 };
75
76 &uart {
77 status = "okay";
78 };
79
80 &gpio {
81 status = "okay";
82 };
83
84 &usb_phy0 {
85 status = "okay";
86 };
87
88 &usb0 {
89 #address-cells = <1>;
90 #size-cells = <0>;
91 status = "okay";
92
93 hub_port0: port@1 {
94 reg = <1>;
95 #trigger-source-cells = <0>;
96 };
97 };
98
99 &usb_phy1 {
100 status = "okay";
101 };
102
103 &usb1 {
104 #address-cells = <1>;
105 #size-cells = <0>;
106 status = "okay";
107
108 hub_port1: port@1 {
109 reg = <1>;
110 #trigger-source-cells = <0>;
111 };
112 };
113
114 &spi {
115 status = "okay";
116 num-cs = <1>;
117
118 flash@0 {
119 compatible = "jedec,spi-nor";
120 reg = <0>;
121 spi-max-frequency = <25000000>;
122
123 partitions {
124 compatible = "fixed-partitions";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 uboot: partition@0 {
129 label = "u-boot";
130 reg = <0x000000 0x030000>;
131 read-only;
132 };
133
134 partition@30000 {
135 label = "nvram";
136 reg = <0x030000 0x010000>;
137 read-only;
138 };
139
140 partition@40000 {
141 compatible = "denx,uimage";
142 label = "firmware";
143 reg = <0x040000 0xef0000>;
144 };
145
146 partition@f30000 {
147 label = "lang";
148 reg = <0xf30000 0x030000>;
149 read-only;
150 };
151
152 partition@f60000 {
153 label = "my-dlink";
154 reg = <0xf60000 0x080000>;
155 read-only;
156 };
157
158 mac: partition@fe0000 {
159 label = "mac";
160 reg = <0xfe0000 0x010000>;
161 read-only;
162 };
163
164 art: partition@ff0000 {
165 label = "art";
166 reg = <0xff0000 0x010000>;
167 read-only;
168 };
169
170 };
171 };
172 };
173
174 &mdio0 {
175 status = "okay";
176
177 phy0: ethernet-phy@0 {
178 reg = <0>;
179 qca,ar8327-initvals = <
180 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
181 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
182 0x10 0x81000080 /* POWER_ON_STRIP */
183 0x7c 0x0000007e /* PORT0_STATUS */
184 0x94 0x0000007e /* PORT6 STATUS */
185 >;
186 };
187 };
188
189 &eth0 {
190 status = "okay";
191
192 phy-handle = <&phy0>;
193 pll-data = <0x56000000 0x00000101 0x00001616>;
194
195 gmac-config {
196 device = <&gmac>;
197 rgmii-enabled = <1>;
198 };
199 };
200
201 &eth1 {
202 status = "okay";
203
204 pll-data = <0x03000101 0x00000101 0x00001616>;
205
206 fixed-link {
207 speed = <1000>;
208 full-duplex;
209 };
210 };
211
212
213 &wmac {
214 status = "okay";
215 mtd-cal-data = <&art 0x1000>;
216 };