bb42017c5417e159f7a7c614c53a68946ddbe079
[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 memory@0 {
14 device_type = "memory";
15 reg = <0x0 0x4000000>;
16 };
17
18 extosc: ref {
19 compatible = "fixed-clock";
20 #clock-cells = <0>;
21 clock-frequency = <40000000>;
22 };
23
24 keys {
25 compatible = "gpio-keys-polled";
26 #address-cells = <1>;
27 #size-cells = <0>;
28
29 poll-interval = <20>;
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 {
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 #address-cells = <1>;
65 #size-cells = <1>;
66 compatible = "mx25l6405d";
67 reg = <0>;
68 spi-max-frequency = <25000000>;
69
70 partitions {
71 compatible = "fixed-partitions";
72 #address-cells = <1>;
73 #size-cells = <1>;
74
75 partition@0 {
76 label = "u-boot";
77 reg = <0x000000 0x040000>;
78 read-only;
79 };
80
81 partition@1 {
82 label = "u-boot-env";
83 reg = <0x040000 0x010000>;
84 };
85
86 partition@2 {
87 label = "firmware";
88 reg = <0x050000 0x750000>;
89 };
90
91 partition@3 {
92 label = "board_config";
93 reg = <0x7a0000 0x010000>;
94 read-only;
95 };
96
97 partition@4 {
98 label = "cfg";
99 reg = <0x7b0000 0x040000>;
100 read-only;
101 };
102
103 art: partition@5 {
104 label = "art";
105 reg = <0x7f0000 0x010000>;
106 read-only;
107 };
108 };
109 };
110 };
111
112 &pcie {
113 status = "okay";
114
115 ath9k@0 {
116 reg = <0x0000 0 0 0 0>;
117 qca,no-eeprom;
118 };
119 };
120
121 &mdio0 {
122 status = "okay";
123
124 phy4: ethernet-phy@4 {
125 reg = <4>;
126 phy-mode = "mii";
127 };
128 };
129
130 &eth0 {
131 status = "okay";
132
133 mtd-mac-address = <&art 0x0>;
134 phy-handle = <&phy4>;
135 };
136
137 &eth1 {
138 status = "okay";
139
140 compatible = "syscon";
141 };