ath79: convert devices to interrupt-driven gpio-keys
[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                 label-mac-device = &wifi;
19         };
20
21         extosc: ref {
22                 compatible = "fixed-clock";
23                 #clock-cells = <0>;
24                 clock-frequency = <40000000>;
25         };
26
27         keys {
28                 compatible = "gpio-keys";
29
30                 reset {
31                         linux,code = <KEY_RESTART>;
32                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
33                         debounce-interval = <60>;
34                 };
35         };
36
37         leds {
38                 compatible = "gpio-leds";
39                 dome_green: dome-green {
40                         label = "ubnt:green:dome";
41                         gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
42                 };
43
44                 dome-orange {
45                         label = "ubnt:orange:dome";
46                         gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
47                 };
48         };
49 };
50
51 &uart {
52         status = "okay";
53 };
54
55 &pll {
56         clocks = <&extosc>;
57 };
58
59 &spi {
60         status = "okay";
61         num-cs = <1>;
62
63         flash@0 {
64                 compatible = "jedec,spi-nor";
65                 reg = <0>;
66                 spi-max-frequency = <25000000>;
67
68                 partitions {
69                         compatible = "fixed-partitions";
70                         #address-cells = <1>;
71                         #size-cells = <1>;
72
73                         partition@0 {
74                                 label = "u-boot";
75                                 reg = <0x000000 0x040000>;
76                                 read-only;
77                         };
78
79                         partition@1 {
80                                 label = "u-boot-env";
81                                 reg = <0x040000 0x010000>;
82                         };
83
84                         partition@2 {
85                                 compatible = "denx,uimage";
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: 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         compatible = "syscon", "simple-mfd";
130 };