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