ath79: improve common DTSI name for TP-Link Archer C5, C7 v1/v2
[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 = &led_power_green;
19 led-failsafe = &led_power_green;
20 led-running = &led_power_green;
21 led-upgrade = &led_power_green;
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 led_power_green: 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 &pcie0 {
68 status = "okay";
69 };
70
71 &pcie1 {
72 status = "okay";
73 };
74
75 &uart {
76 status = "okay";
77 };
78
79 &gpio {
80 status = "okay";
81 };
82
83 &usb_phy0 {
84 status = "okay";
85 };
86
87 &usb0 {
88 #address-cells = <1>;
89 #size-cells = <0>;
90 status = "okay";
91
92 hub_port0: port@1 {
93 reg = <1>;
94 #trigger-source-cells = <0>;
95 };
96 };
97
98 &usb_phy1 {
99 status = "okay";
100 };
101
102 &usb1 {
103 #address-cells = <1>;
104 #size-cells = <0>;
105 status = "okay";
106
107 hub_port1: port@1 {
108 reg = <1>;
109 #trigger-source-cells = <0>;
110 };
111 };
112
113 &spi {
114 status = "okay";
115
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 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 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 &mdio0 {
174 status = "okay";
175
176 phy0: ethernet-phy@0 {
177 reg = <0>;
178 qca,ar8327-initvals = <
179 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
180 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */
181 0x10 0x81000080 /* POWER_ON_STRIP */
182 0x7c 0x0000007e /* PORT0_STATUS */
183 0x94 0x0000007e /* PORT6 STATUS */
184 >;
185 };
186 };
187
188 &eth0 {
189 status = "okay";
190
191 phy-handle = <&phy0>;
192 pll-data = <0x56000000 0x00000101 0x00001616>;
193
194 gmac-config {
195 device = <&gmac>;
196 rgmii-enabled = <1>;
197 };
198 };
199
200 &eth1 {
201 status = "okay";
202
203 pll-data = <0x03000101 0x00000101 0x00001616>;
204
205 fixed-link {
206 speed = <1000>;
207 full-duplex;
208 };
209 };
210
211 &wmac {
212 status = "okay";
213
214 mtd-cal-data = <&art 0x1000>;
215 };