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