ath79: add support for D-Link DCH-G020 Rev. A1
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9342_ubnt_xw.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar9344.dtsi"
7
8 / {
9 compatible = "ubnt,xw", "qca,ar9342";
10 model = "Ubiquiti Networks XW board";
11
12 aliases {
13 led-boot = &led_link4;
14 led-running = &led_link4;
15 led-upgrade = &led_link4;
16 led-failsafe = &led_link4;
17 label-mac-device = &wmac;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 link1 {
24 label = "ubnt:red:link1";
25 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26 };
27
28 link2 {
29 label = "ubnt:orange:link2";
30 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
31 };
32
33 link3 {
34 label = "ubnt:green:link3";
35 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
36 };
37
38 led_link4: link4 {
39 label = "ubnt:green:link4";
40 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys";
46
47 reset {
48 label = "Reset button";
49 linux,code = <KEY_RESTART>;
50 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
51 debounce-interval = <60>;
52 };
53 };
54 };
55
56 &ref {
57 clock-frequency = <40000000>;
58 };
59
60 &uart {
61 status = "okay";
62 };
63
64 &spi {
65 status = "okay";
66 num-cs = <1>;
67
68 flash@0 {
69 compatible = "jedec,spi-nor";
70 reg = <0>;
71 spi-max-frequency = <25000000>;
72
73 partitions {
74 compatible = "fixed-partitions";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 partition@0 {
79 label = "u-boot";
80 reg = <0x000000 0x040000>;
81 read-only;
82 };
83
84 partition@40000 {
85 label = "u-boot-env";
86 reg = <0x040000 0x010000>;
87 read-only;
88 };
89
90 partition@50000 {
91 compatible = "denx,uimage";
92 label = "firmware";
93 reg = <0x050000 0x760000>;
94 };
95
96 partition@7b0000 {
97 label = "cfg";
98 reg = <0x7b0000 0x040000>;
99 read-only;
100 };
101
102 art: partition@7f0000 {
103 label = "art";
104 reg = <0x7f0000 0x010000>;
105 read-only;
106 };
107 };
108 };
109 };
110
111 &wmac {
112 status = "okay";
113
114 mtd-cal-data = <&art 0x1000>;
115 };
116
117 &eth0 {
118 mtd-mac-address = <&art 0x0>;
119 };