ath79: add generic dtsi for Ubiquiti SW boards
[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         keys {
13                 compatible = "gpio-keys";
14
15                 reset {
16                         linux,code = <KEY_RESTART>;
17                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
18                         debounce-interval = <60>;
19                 };
20         };
21 };
22
23 &uart {
24         status = "okay";
25 };
26
27 &spi {
28         status = "okay";
29
30         num-cs = <1>;
31
32         flash@0 {
33                 compatible = "jedec,spi-nor";
34                 reg = <0>;
35                 spi-max-frequency = <25000000>;
36
37                 partitions {
38                         compatible = "fixed-partitions";
39                         #address-cells = <1>;
40                         #size-cells = <1>;
41
42                         partition@0 {
43                                 label = "u-boot";
44                                 reg = <0x000000 0x040000>;
45                                 read-only;
46                         };
47
48                         partition@40000 {
49                                 label = "u-boot-env";
50                                 reg = <0x040000 0x010000>;
51                         };
52
53                         partition@50000 {
54                                 compatible = "denx,uimage";
55                                 label = "firmware";
56                                 reg = <0x050000 0x750000>;
57                         };
58
59                         partition@7a0000 {
60                                 label = "board_config";
61                                 reg = <0x7a0000 0x010000>;
62                                 read-only;
63                         };
64
65                         partition@7b0000 {
66                                 label = "cfg";
67                                 reg = <0x7b0000 0x040000>;
68                                 read-only;
69                         };
70
71                         art: partition@7f0000 {
72                                 label = "art";
73                                 reg = <0x7f0000 0x010000>;
74                                 read-only;
75                         };
76                 };
77         };
78 };
79
80 &pcie {
81         status = "okay";
82
83         wifi: wifi@0,0 {
84                 reg = <0x0000 0 0 0 0>;
85                 qca,no-eeprom;
86         };
87 };
88
89 &eth0 {
90         status = "okay";
91
92         mtd-mac-address = <&art 0x0>;
93 };
94
95 &eth1 {
96         status = "okay";
97
98         mtd-mac-address = <&art 0x6>;
99 };