923b3df77053a29ad07da954fd4340b80cb30f93
[openwrt/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-status = &dome_green;
15 };
16
17 memory@0 {
18 device_type = "memory";
19 reg = <0x0 0x4000000>;
20 };
21
22 extosc: ref {
23 compatible = "fixed-clock";
24 #clock-cells = <0>;
25 clock-frequency = <40000000>;
26 };
27
28 keys {
29 compatible = "gpio-keys-polled";
30 #address-cells = <1>;
31 #size-cells = <0>;
32
33 poll-interval = <20>;
34 reset {
35 linux,code = <KEY_RESTART>;
36 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
37 debounce-interval = <60>;
38 };
39 };
40
41 leds {
42 compatible = "gpio-leds";
43 dome_green: dome-green {
44 label = "ubnt:green:dome";
45 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
46 };
47
48 dome-orange {
49 label = "ubnt:orange:dome";
50 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
51 };
52 };
53 };
54
55 &uart {
56 status = "okay";
57 };
58
59 &pll {
60 clocks = <&extosc>;
61 };
62
63 &spi {
64 status = "okay";
65 num-cs = <1>;
66
67 flash@0 {
68 #address-cells = <1>;
69 #size-cells = <1>;
70 compatible = "mx25l6405d";
71 reg = <0>;
72 spi-max-frequency = <25000000>;
73
74 partitions {
75 compatible = "fixed-partitions";
76 #address-cells = <1>;
77 #size-cells = <1>;
78
79 partition@0 {
80 label = "u-boot";
81 reg = <0x000000 0x040000>;
82 read-only;
83 };
84
85 partition@1 {
86 label = "u-boot-env";
87 reg = <0x040000 0x010000>;
88 };
89
90 partition@2 {
91 label = "firmware";
92 reg = <0x050000 0x750000>;
93 };
94
95 partition@3 {
96 label = "board_config";
97 reg = <0x7a0000 0x010000>;
98 read-only;
99 };
100
101 partition@4 {
102 label = "cfg";
103 reg = <0x7b0000 0x040000>;
104 read-only;
105 };
106
107 art: partition@5 {
108 label = "art";
109 reg = <0x7f0000 0x010000>;
110 read-only;
111 };
112 };
113 };
114 };
115
116 &pcie {
117 status = "okay";
118
119 ath9k@0 {
120 reg = <0x0000 0 0 0 0>;
121 qca,no-eeprom;
122 };
123 };
124
125 &mdio0 {
126 status = "okay";
127
128 phy4: ethernet-phy@4 {
129 reg = <4>;
130 phy-mode = "mii";
131 };
132 };
133
134 &eth0 {
135 status = "okay";
136
137 mtd-mac-address = <&art 0x0>;
138 phy-handle = <&phy4>;
139 };
140
141 &eth1 {
142 status = "okay";
143
144 compatible = "syscon";
145 };