2cb02503b72b702430dfa230b3e869615d1631c1
[oweals/openwrt.git] / target / linux / ath79 / dts / ar7241_ubnt_unifi.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar7241.dtsi"
8
9 / {
10         compatible = "ubnt,unifi", "qca,ar7241";
11         model = "Ubiquiti UniFi AP";
12
13         aliases {
14                 led-boot = &dome_green;
15                 led-failsafe = &dome_green;
16                 led-running = &dome_green;
17                 led-upgrade = &dome_green;
18         };
19
20         extosc: ref {
21                 compatible = "fixed-clock";
22                 #clock-cells = <0>;
23                 clock-frequency = <40000000>;
24         };
25
26         keys {
27                 compatible = "gpio-keys-polled";
28                 poll-interval = <20>;
29                 reset {
30                         linux,code = <KEY_RESTART>;
31                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
32                         debounce-interval = <60>;
33                 };
34         };
35
36         leds {
37                 compatible = "gpio-leds";
38                 dome_green: dome-green {
39                         label = "ubnt:green:dome";
40                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
41                 };
42
43                 dome-orange {
44                         label = "ubnt:orange:dome";
45                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
46                 };
47         };
48 };
49
50 &uart {
51         status = "okay";
52 };
53
54 &pll {
55         clocks = <&extosc>;
56 };
57
58 &spi {
59         status = "okay";
60         num-cs = <1>;
61
62         flash@0 {
63                 compatible = "jedec,spi-nor";
64                 reg = <0>;
65                 spi-max-frequency = <25000000>;
66
67                 partitions {
68                         compatible = "fixed-partitions";
69                         #address-cells = <1>;
70                         #size-cells = <1>;
71
72                         partition@0 {
73                                 label = "u-boot";
74                                 reg = <0x000000 0x040000>;
75                                 read-only;
76                         };
77
78                         partition@1 {
79                                 label = "u-boot-env";
80                                 reg = <0x040000 0x010000>;
81                         };
82
83                         partition@2 {
84                                 label = "firmware";
85                                 reg = <0x050000 0x750000>;
86                         };
87
88                         partition@3 {
89                                 label = "board_config";
90                                 reg = <0x7a0000 0x010000>;
91                                 read-only;
92                         };
93
94                         partition@4 {
95                                 label = "cfg";
96                                 reg = <0x7b0000 0x040000>;
97                                 read-only;
98                         };
99
100                         art: partition@5 {
101                                 label = "art";
102                                 reg = <0x7f0000 0x010000>;
103                                 read-only;
104                         };
105                 };
106         };
107 };
108
109 &pcie {
110         status = "okay";
111
112         wifi@0,0 {
113                 reg = <0x0000 0 0 0 0>;
114                 qca,no-eeprom;
115         };
116 };
117
118 &eth0 {
119         status = "okay";
120
121         mtd-mac-address = <&art 0x0>;
122 };
123
124 &eth1 {
125         status = "okay";
126
127         compatible = "syscon", "simple-mfd";
128 };