ath79: add support for Ubiquiti UniFi AP Pro
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9344_ubnt_unifi-ap-pro.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 "ar9344.dtsi"
8
9 / {
10 model = "Ubiquiti UniFi AP Pro";
11 compatible = "ubnt,unifi-ap-pro";
12
13 aliases {
14 led-boot = &led_white;
15 led-failsafe = &led_white;
16 led-running = &led_blue;
17 led-upgrade = &led_blue;
18 label-mac-device = &eth0;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_white: led-white {
25 label = "ubnt:white:dome";
26 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
27 };
28
29 led_blue: led-blue {
30 label = "ubnt:blue:dome";
31 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 linux,code = <KEY_RESTART>;
40 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
41 debounce-interval = <60>;
42 };
43 };
44 };
45
46 &ref {
47 clock-frequency = <40000000>;
48 };
49
50 &uart {
51 status = "okay";
52 };
53
54 &spi {
55 status = "okay";
56
57 num-cs = <1>;
58
59 flash@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <50000000>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 uboot: partition@0 {
70 label = "u-boot";
71 reg = <0x0 0x40000>;
72 read-only;
73 };
74
75 partition@40000 {
76 label = "u-boot-env";
77 reg = <0x40000 0x10000>;
78 read-only;
79 };
80
81 partition@50000 {
82 label = "firmware";
83 reg = <0x50000 0xf60000>;
84
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "kernel";
91 reg = <0x0 0x300000>;
92 /* Can be resized w/o issues.
93 * U-Boot can load kernel from the
94 * entirety of the "firmware" partition space.
95 */
96 };
97
98 partition@300000 {
99 label = "rootfs";
100 reg = <0x300000 0xc60000>;
101 };
102 };
103
104 partition@fb0000 {
105 label = "cfg";
106 reg = <0xfb0000 0x40000>;
107 read-only;
108 };
109
110 art: partition@ff0000 {
111 label = "art";
112 reg = <0xff0000 0x10000>;
113 read-only;
114 };
115 };
116 };
117 };
118
119 &pcie {
120 status = "okay";
121
122 wifi@0,0 {
123 compatible = "pci168c,0033";
124 reg = <0 0 0 0 0>;
125 qca,no-eeprom;
126 };
127 };
128
129 &wmac {
130 status = "okay";
131
132 mtd-cal-data = <&art 0x1000>;
133 };
134
135 &mdio0 {
136 status = "okay";
137
138 phy0: ethernet-phy@0 {
139 reg = <0>;
140
141 qca,ar8327-initvals = <
142 0x4 0x7600000 /* PORT0 PAD MODE CTRL */
143 0x10 0x80000080 /* POWER_ON_STRAP */
144 0x7c 0x7e /* PORT0_STATUS */
145 >;
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 pll-data = <0x6000000 0x101 0x1616>;
153
154 mtd-mac-address = <&art 0x0>;
155
156 phy-mode = "rgmii";
157 phy-handle = <&phy0>;
158 };