ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_netgear_pgzng1.dts
1 // SPDX-License-Identifier: GPL-2.0-only
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/leds/leds-pca955x.h>
9
10 / {
11 model = "Netgear PGZNG1";
12 compatible = "netgear,pgzng1", "qca,ar9344";
13
14 aliases {
15 led-boot = &led_power_green;
16 led-failsafe = &led_power_red;
17 led-running = &led_power_green;
18 led-upgrade = &led_power_green;
19 label-mac-device = &eth0;
20 };
21
22 chosen {
23 bootargs = "console=ttyS0,115200";
24 };
25
26 keys {
27 compatible = "gpio-keys";
28
29 reset {
30 label = "Reset button";
31 linux,code = <KEY_RESTART>;
32 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
33 debounce-interval = <60>;
34 };
35 };
36
37 i2c {
38 compatible = "i2c-gpio";
39 sda-gpios = <&gpio 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
40 scl-gpios = <&gpio 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
41 #address-cells = <1>;
42 #size-cells = <0>;
43
44 expander0: pca9551@60 {
45 compatible = "nxp,pca9551";
46 reg = <0x60>;
47 #address-cells = <1>;
48 #size-cells = <0>;
49
50 led_power_green: led@0 {
51 reg = <0>;
52 color = <LED_COLOR_ID_GREEN>;
53 function = LED_FUNCTION_BOOT;
54 type = <PCA955X_TYPE_LED>;
55 chan-name = "green:boot";
56 };
57
58 led_power_red: led@1 {
59 reg = <1>;
60 color = <LED_COLOR_ID_RED>;
61 function = LED_FUNCTION_BOOT;
62 type = <PCA955X_TYPE_LED>;
63 chan-name = "red:boot";
64 };
65
66 led@2 {
67 reg = <2>;
68 color = <LED_COLOR_ID_GREEN>;
69 function = LED_FUNCTION_WAN;
70 function-enumerator = <1>;
71 type = <PCA955X_TYPE_LED>;
72 };
73
74 led@3 {
75 reg = <3>;
76 color = <LED_COLOR_ID_RED>;
77 function = LED_FUNCTION_WAN;
78 type = <PCA955X_TYPE_LED>;
79 };
80
81 led@4 {
82 reg = <4>;
83 color = <LED_COLOR_ID_GREEN>;
84 function = LED_FUNCTION_WLAN;
85 type = <PCA955X_TYPE_LED>;
86 };
87
88 led@5 {
89 reg = <5>;
90 color = <LED_COLOR_ID_RED>;
91 function = LED_FUNCTION_WLAN;
92 type = <PCA955X_TYPE_LED>;
93 };
94
95 led@6 {
96 reg = <6>;
97 color = <LED_COLOR_ID_GREEN>;
98 function = LED_FUNCTION_INDICATOR;
99 type = <PCA955X_TYPE_LED>;
100 };
101
102 led@7 {
103 reg = <7>;
104 color = <LED_COLOR_ID_RED>;
105 function = LED_FUNCTION_INDICATOR;
106 type = <PCA955X_TYPE_LED>;
107 };
108 };
109
110 expander1: pca9551@61 {
111 compatible = "nxp,pca9551";
112 reg = <0x61>;
113 #address-cells = <1>;
114 #size-cells = <0>;
115
116 gpio-controller;
117 #gpio-cells = <2>;
118
119 /* zwave_rst - Resets ZWave */
120 gpio@4 {
121 reg = <4>;
122 type = <PCA955X_TYPE_GPIO>;
123 };
124
125 /* em_rst - Unknown */
126 gpio@5 {
127 reg = <5>;
128 type = <PCA955X_TYPE_GPIO>;
129 };
130
131 /* tp34 - Test point on PCB? */
132 gpio@6 {
133 reg = <6>;
134 type = <PCA955X_TYPE_GPIO>;
135 };
136
137 /* sw_rst - resets SoC */
138 gpio@7 {
139 reg = <7>;
140 type = <PCA955X_TYPE_GPIO>;
141 };
142 };
143
144 rtc@6f {
145 compatible = "isil,isl1208";
146 reg = <0x6f>;
147 };
148 };
149
150 leds {
151 compatible = "gpio-leds";
152
153 eth1_link {
154 color = <LED_COLOR_ID_GREEN>;
155 function = LED_FUNCTION_LAN;
156 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
157 };
158
159 eth1_act {
160 color = <LED_COLOR_ID_AMBER>;
161 function = LED_FUNCTION_LAN;
162 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
163 };
164
165 eth0_link {
166 color = <LED_COLOR_ID_GREEN>;
167 function = LED_FUNCTION_WAN;
168 function-enumerator = <0>;
169 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
170 };
171
172 eth0_act {
173 color = <LED_COLOR_ID_AMBER>;
174 function = LED_FUNCTION_WAN;
175 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
176 };
177 };
178 };
179
180 &eth0 {
181 status = "okay";
182 phy-handle = <&swphy0>;
183
184 nvmem-cells = <&macaddr_caldata_6>;
185 nvmem-cell-names = "mac-address";
186 };
187
188 &eth1 {
189 status = "okay";
190 phy-handle = <&swphy4>;
191
192 nvmem-cells = <&macaddr_caldata_0>;
193 nvmem-cell-names = "mac-address";
194
195 gmac-config {
196 device = <&gmac>;
197 switch-phy-swap = <1>;
198 switch-only-mode = <1>;
199 };
200 };
201
202 &gpio {
203 gpio_ext_lna0 {
204 gpio-hog;
205 line-name = "ext:lna0";
206 gpios = <18 GPIO_ACTIVE_HIGH>;
207 output-high;
208 };
209
210 gpio_ext_lna1 {
211 gpio-hog;
212 line-name = "ext:lna1";
213 gpios = <19 GPIO_ACTIVE_HIGH>;
214 output-high;
215 };
216
217 gpio_enable_rs422 {
218 gpio-hog;
219 line-name = "power:rs422";
220 gpios = <20 GPIO_ACTIVE_HIGH>;
221 output-high;
222 };
223 };
224
225 &nand {
226 status = "okay";
227
228 partitions {
229 compatible = "fixed-partitions";
230 #address-cells = <1>;
231 #size-cells = <1>;
232
233 partition@0 {
234 label = "u-boot";
235 reg = <0x0 0x40000>;
236 read-only;
237 };
238
239 partition@40000 {
240 label = "u-boot-env";
241 reg = <0x40000 0x40000>;
242 read-only;
243 };
244
245 /* factory kernel used to be reg = <0x80000 0x200000> */
246 partition@80000 {
247 label = "kernel";
248 reg = <0x80000 0x500000>;
249 };
250
251 /* factory rootfs used to be reg = <0x280000 0x5000000> */
252 partition@580000 {
253 label = "ubi";
254 reg = <0x580000 0x4d00000>;
255 };
256
257 partition@5280000 {
258 label = "uImage2";
259 reg = <0x5280000 0x200000>;
260 read-only;
261 };
262
263 partition@5480000 {
264 label = "rootfs_bak";
265 reg = <0x5480000 0x5000000>;
266 read-only;
267 };
268
269 partition@a480000 {
270 label = "config";
271 reg = <0xa480000 0x1400000>;
272 read-only;
273 };
274
275 partition@b880000 {
276 label = "storage";
277 reg = <0xb880000 0x4700000>;
278 read-only;
279 };
280
281 partition@ff80000 {
282 label = "dummy";
283 reg = <0xff80000 0x60000>;
284 read-only;
285 };
286
287 caldata: partition@ffe0000 {
288 label = "caldata";
289 reg = <0xffe0000 0x20000>;
290 read-only;
291
292 nvmem-layout {
293 compatible = "fixed-layout";
294 #address-cells = <1>;
295 #size-cells = <1>;
296
297 macaddr_caldata_0: macaddr@0 {
298 reg = <0x0 0x6>;
299 };
300
301 macaddr_caldata_6: macaddr@6 {
302 reg = <0x6 0x6>;
303 };
304
305 cal_caldata_1000: cal@1000 {
306 reg = <0x1000 0x440>;
307 };
308 };
309 };
310 };
311 };
312
313 &ref {
314 clock-frequency = <40000000>;
315 };
316
317 /* zWave is wired up via SPI and UART1 (no idea on pins sadly) */
318 &spi {
319 status = "okay";
320 };
321
322 &wmac {
323 status = "okay";
324
325 nvmem-cells = <&cal_caldata_1000>;
326 nvmem-cell-names = "calibration";
327 };
328
329 &usb {
330 status = "okay";
331 };
332
333 &usb_phy {
334 status = "okay";
335 };