ath79: ubnt-xw: Add LED aliases for diag and status LED support
[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 = &system;
14 led-running = &system;
15 led-upgrade = &system;
16 led-failsafe = &system;
17 };
18
19 gpio-leds {
20 compatible = "gpio-leds";
21
22 link1 {
23 label = "ubnt:red:link1";
24 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
25 };
26
27 link2 {
28 label = "ubnt:orange:link2";
29 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
30 };
31
32 link3 {
33 label = "ubnt:green:link3";
34 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
35 };
36
37 system: link4 {
38 label = "ubnt:green:link4";
39 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys";
45
46 reset {
47 label = "Reset button";
48 linux,code = <KEY_RESTART>;
49 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
50 debounce-interval = <60>;
51 };
52 };
53 };
54
55 &ref {
56 clock-frequency = <40000000>;
57 };
58
59 &uart {
60 status = "okay";
61 };
62
63 &gpio {
64 status = "okay";
65 };
66
67 &spi {
68 status = "okay";
69 num-cs = <1>;
70
71 flash@0 {
72 compatible = "jedec,spi-nor";
73 reg = <0>;
74 spi-max-frequency = <25000000>;
75
76 partitions {
77 compatible = "fixed-partitions";
78 #address-cells = <1>;
79 #size-cells = <1>;
80
81 partition@0 {
82 label = "u-boot";
83 reg = <0x000000 0x040000>;
84 read-only;
85 };
86
87 partition@40000 {
88 label = "u-boot-env";
89 reg = <0x040000 0x010000>;
90 read-only;
91 };
92
93 partition@50000 {
94 compatible = "denx,uimage";
95 label = "firmware";
96 reg = <0x050000 0x760000>;
97 };
98
99 partition@fb0000 {
100 label = "cfg";
101 reg = <0x7b0000 0x040000>;
102 read-only;
103 };
104
105 eeprom: partition@ff0000 {
106 label = "EEPROM";
107 reg = <0x7f0000 0x010000>;
108 read-only;
109 };
110 };
111 };
112 };
113
114 &wmac {
115 status = "okay";
116
117 mtd-cal-data = <&eeprom 0x1000>;
118 mtd-mac-address = <&eeprom 0x1002>;
119 };