3089e6b341fb9aa63d1b3b19f004b4b53870d532
[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 &spi {
61 status = "okay";
62
63 flash@0 {
64 compatible = "jedec,spi-nor";
65 reg = <0>;
66 spi-max-frequency = <25000000>;
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "u-boot";
75 reg = <0x000000 0x040000>;
76 read-only;
77 };
78
79 partition@40000 {
80 label = "u-boot-env";
81 reg = <0x040000 0x010000>;
82 read-only;
83 };
84
85 partition@50000 {
86 compatible = "denx,uimage";
87 label = "firmware";
88 reg = <0x050000 0x760000>;
89 };
90
91 partition@7b0000 {
92 label = "cfg";
93 reg = <0x7b0000 0x040000>;
94 read-only;
95 };
96
97 art: partition@7f0000 {
98 label = "art";
99 reg = <0x7f0000 0x010000>;
100 read-only;
101 };
102 };
103 };
104 };
105
106 &wmac {
107 status = "okay";
108
109 mtd-cal-data = <&art 0x1000>;
110 };
111
112 &eth0 {
113 mtd-mac-address = <&art 0x0>;
114 };