ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.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 = &led_router;
15 led-failsafe = &led_router;
16 led-running = &led_router;
17 led-upgrade = &led_router;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_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";
59
60 eco {
61 label = "eco";
62 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
63 linux,code = <BTN_1>;
64 debounce-interval = <60>;
65 };
66
67 router {
68 label = "router";
69 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
70 linux,code = <BTN_0>;
71 linux,input-type = <EV_SW>;
72 debounce-interval = <60>;
73 };
74
75 auto {
76 label = "auto";
77 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
78 linux,code = <BTN_0>;
79 linux,input-type = <EV_SW>;
80 debounce-interval = <60>;
81 };
82
83 wps {
84 label = "wps";
85 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
86 linux,code = <KEY_WPS_BUTTON>;
87 debounce-interval = <60>;
88 };
89
90 reset {
91 label = "reset";
92 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
93 linux,code = <KEY_RESTART>;
94 debounce-interval = <60>;
95 };
96
97 children {
98 label = "children";
99 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
100 linux,code = <BTN_1>;
101 debounce-interval = <60>;
102 };
103 };
104 };
105
106 &ref {
107 clock-frequency = <25000000>;
108 };
109
110 &spi {
111 status = "okay";
112
113 num-cs = <1>;
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
217 qca,no-eeprom;
218 };