ath79: add support for indicating the boot state using multiple leds
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7241_ubnt_xm.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 "ar7241.dtsi"
7
8 / {
9         compatible = "ubnt,xm", "qca,ar7241";
10         model = "Ubiquiti Networks XM (rev 1.0) board";
11
12 /*      extosc: ref {
13                 compatible = "fixed-clock";
14                 #clock-cells = <0>;
15                 clock-frequency = <40000000>;
16         };
17 */
18         keys {
19                 compatible = "gpio-keys-polled";
20                 poll-interval = <20>;
21                 reset {
22                         linux,code = <KEY_RESTART>;
23                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
24                         debounce-interval = <60>;
25                 };
26         };
27
28         leds {
29                 compatible = "gpio-leds";
30                 link1 {
31                         label = "ubnt:red:link1";
32                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
33                 };
34
35                 link2 {
36                         label = "ubnt:orange:link2";
37                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
38                 };
39
40                 link3 {
41                         label = "ubnt:green:link3";
42                         gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
43                 };
44
45                 link4 {
46                         label = "ubnt:green:link4";
47                         gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
48                 };
49         };
50 };
51
52 &uart {
53         status = "okay";
54 };
55
56 /*&pll {
57         clocks = <&extosc>;
58 };*/
59
60 &spi {
61         status = "okay";
62         num-cs = <1>;
63
64         flash@0 {
65                 compatible = "jedec,spi-nor";
66                 reg = <0>;
67                 spi-max-frequency = <25000000>;
68
69                 partitions {
70                         compatible = "fixed-partitions";
71                         #address-cells = <1>;
72                         #size-cells = <1>;
73
74                         partition@0 {
75                                 label = "u-boot";
76                                 reg = <0x000000 0x040000>;
77                                 read-only;
78                         };
79
80                         partition@1 {
81                                 label = "u-boot-env";
82                                 reg = <0x040000 0x010000>;
83                         };
84
85                         partition@2 {
86                                 label = "firmware";
87                                 reg = <0x050000 0x750000>;
88                         };
89
90                         partition@3 {
91                                 label = "board_config";
92                                 reg = <0x7a0000 0x010000>;
93                                 read-only;
94                         };
95
96                         partition@4 {
97                                 label = "cfg";
98                                 reg = <0x7b0000 0x040000>;
99                                 read-only;
100                         };
101
102                         art: partition@5 {
103                                 label = "art";
104                                 reg = <0x7f0000 0x010000>;
105                                 read-only;
106                         };
107                 };
108         };
109 };
110
111 &pcie {
112         status = "okay";
113
114         wifi@0,0 {
115                 reg = <0x0000 0 0 0 0>;
116                 qca,no-eeprom;
117         };
118 };
119
120 &eth0 {
121         status = "okay";
122
123         mtd-mac-address = <&art 0x0>;
124 };
125
126 &eth1 {
127         status = "okay";
128
129         mtd-mac-address = <&art 0x6>;
130 };