ath79: fix MAC address setup for TP-Link TL-WDR3600/TL-WDR4300
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar1022_iodata_wn-ag300dgr.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 "ar9344.dtsi"
8
9 / {
10 compatible = "iodata,wn-ag300dgr", "qca,ar9344";
11 model = "I-O DATA WN-AG300DGR";
12
13 aliases {
14 led-boot = &router;
15 led-failsafe = &router;
16 led-running = &router;
17 led-upgrade = &router;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 router: router {
24 label = "wn-ag300dgr:green:router";
25 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
26 default-state = "on";
27 };
28
29 children {
30 label = "wn-ag300dgr:green:children";
31 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
32 };
33
34 eco {
35 label = "wn-ag300dgr:green:eco";
36 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
37 };
38
39 notification {
40 label = "wn-ag300dgr:amber:notification";
41 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
42 };
43
44 wlan2g {
45 label = "wn-ag300dgr:green:wlan2g";
46 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
47 linux,default-trigger = "phy0tpt";
48 };
49
50 wlan5g {
51 label = "wn-ag300dgr:green:wlan5g";
52 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
53 linux,default-trigger = "phy1tpt";
54 };
55 };
56
57 keys {
58 compatible = "gpio-keys-polled";
59 poll-interval = <20>;
60
61 eco {
62 label = "eco";
63 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
64 linux,code = <BTN_1>;
65 debounce-interval = <60>;
66 };
67
68 router {
69 label = "router";
70 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
71 linux,code = <BTN_0>;
72 linux,input-type = <EV_SW>;
73 debounce-interval = <60>;
74 };
75
76 auto {
77 label = "auto";
78 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
79 linux,code = <BTN_0>;
80 linux,input-type = <EV_SW>;
81 debounce-interval = <60>;
82 };
83
84 wps {
85 label = "wps";
86 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
87 linux,code = <KEY_WPS_BUTTON>;
88 debounce-interval = <60>;
89 };
90
91 reset {
92 label = "reset";
93 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
94 linux,code = <KEY_RESTART>;
95 debounce-interval = <60>;
96 };
97
98 children {
99 label = "children";
100 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
101 linux,code = <BTN_1>;
102 debounce-interval = <60>;
103 };
104 };
105 };
106
107 &ref {
108 clock-frequency = <25000000>;
109 };
110
111 &spi {
112 num-cs = <1>;
113 status = "okay";
114
115 flash@0 {
116 compatible = "jedec,spi-nor";
117 reg = <0>;
118 spi-max-frequency = <25000000>;
119
120 partitions {
121 compatible = "fixed-partitions";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 partition@0 {
126 label = "u-boot";
127 reg = <0x000000 0x030000>;
128 read-only;
129 };
130
131 partition@30000 {
132 label = "u-boot-env";
133 reg = <0x030000 0x010000>;
134 read-only;
135 };
136
137 partition@40000 {
138 compatible = "denx,uimage";
139 label = "firmware";
140 reg = <0x040000 0xf10000>;
141 };
142
143 partition@f50000 {
144 label = "manufacture";
145 reg = <0xf50000 0x40000>;
146 read-only;
147 };
148
149 partition@f90000 {
150 label = "backup";
151 reg = <0xf90000 0x10000>;
152 read-only;
153 };
154
155 partition@fa0000 {
156 label = "storage";
157 reg = <0xfa0000 0x50000>;
158 read-only;
159 };
160
161 partition@ff0000 {
162 label = "art";
163 reg = <0xff0000 0x010000>;
164 read-only;
165 };
166 };
167 };
168 };
169
170 &mdio0 {
171 status = "okay";
172
173 phy0: ethernet-phy@0 {
174 reg = <0>;
175 phy-mode = "rgmii";
176
177 qca,ar8327-initvals = <
178 0x04 0x07a00000 /* PORT0 PAD MODE CTRL */
179 0x7c 0x000000fe /* PORT0_STATUS */
180 >;
181 };
182 };
183
184 &eth0 {
185 status = "okay";
186
187 pll-data = <0x06000000 0x00000101 0x00001616>;
188
189 phy-mode = "rgmii";
190 phy-handle = <&phy0>;
191
192 gmac-config {
193 device = <&gmac>;
194 rgmii-gmac0 = <1>;
195 };
196 };
197
198 &pcie {
199 status = "okay";
200 };
201
202 &uart {
203 status = "okay";
204 };
205
206 &usb {
207 status = "okay";
208 };
209
210 &usb_phy {
211 status = "okay";
212 };
213
214 &wmac {
215 status = "okay";
216 qca,no-eeprom;
217 };