c5fbdb94c4d6a6c3b9ce8fc45f11eddc5a148d7d
[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 "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
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 = "red:link1";
25 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26 };
27
28 link2 {
29 label = "orange:link2";
30 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
31 };
32
33 link3 {
34 label = "green:link3";
35 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
36 };
37
38 led_link4: link4 {
39 label = "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
67 flash@0 {
68 compatible = "jedec,spi-nor";
69 reg = <0>;
70 spi-max-frequency = <25000000>;
71
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 partition@0 {
78 label = "u-boot";
79 reg = <0x000000 0x040000>;
80 read-only;
81 };
82
83 partition@40000 {
84 label = "u-boot-env";
85 reg = <0x040000 0x010000>;
86 read-only;
87 };
88
89 partition@50000 {
90 compatible = "denx,uimage";
91 label = "firmware";
92 reg = <0x050000 0x760000>;
93 };
94
95 partition@7b0000 {
96 label = "cfg";
97 reg = <0x7b0000 0x040000>;
98 read-only;
99 };
100
101 art: partition@7f0000 {
102 label = "art";
103 reg = <0x7f0000 0x010000>;
104 read-only;
105 };
106 };
107 };
108 };
109
110 &wmac {
111 status = "okay";
112
113 mtd-cal-data = <&art 0x1000>;
114 };
115
116 &eth0 {
117 mtd-mac-address = <&art 0x0>;
118 };