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