ipq806x: ubnt,unifi-ac-hd: reorder eth0 and eth1
[openwrt/openwrt.git] / target / linux / ipq806x / files / arch / arm / boot / dts / qcom-ipq8064-unifi-ac-hd.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq8064-v2.0.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Ubiquiti UniFi AC HD";
10 compatible = "ubnt,unifi-ac-hd", "qcom,ipq8064";
11
12 aliases {
13 label-mac-device = &gmac2;
14 led-boot = &led_dome_white;
15 led-failsafe = &led_dome_white;
16 led-running = &led_dome_blue;
17 led-upgrade = &led_dome_blue;
18 mdio-gpio0 = &mdio0;
19 ethernet0 = &gmac2;
20 ethernet1 = &gmac1;
21 };
22
23 leds {
24 compatible = "gpio-leds";
25 pinctrl-0 = <&led_pins>;
26 pinctrl-names = "default";
27
28 led_dome_blue: dome_blue {
29 label = "blue:dome";
30 gpios = <&qcom_pinmux 9 GPIO_ACTIVE_HIGH>;
31 };
32
33 led_dome_white: dome_white {
34 label = "white:dome";
35 gpios = <&qcom_pinmux 53 GPIO_ACTIVE_HIGH>;
36 };
37 };
38
39 keys {
40 compatible = "gpio-keys";
41 pinctrl-0 = <&button_pins>;
42 pinctrl-names = "default";
43
44 reset {
45 label = "reset";
46 gpios = <&qcom_pinmux 68 GPIO_ACTIVE_LOW>;
47 linux,code = <KEY_RESTART>;
48 debounce-interval = <60>;
49 };
50 };
51 };
52
53 &qcom_pinmux {
54 button_pins: button_pins {
55 mux {
56 pins = "gpio68";
57 function = "gpio";
58 drive-strength = <2>;
59 bias-pull-up;
60 };
61 };
62
63 led_pins: led_pins {
64 mux {
65 pins = "gpio9", "gpio53";
66 function = "gpio";
67 drive-strength = <2>;
68 bias-pull-down;
69 output-low;
70 };
71 };
72
73 spi_pins: spi_pins {
74 mux {
75 pins = "gpio18", "gpio19", "gpio21";
76 function = "gsbi5";
77 drive-strength = <10>;
78 bias-none;
79 };
80
81 cs {
82 pins = "gpio20";
83 drive-strength = <12>;
84 };
85 };
86 };
87
88 &CPU_SPC {
89 status = "disabled";
90 };
91
92 &gsbi5 {
93 status = "okay";
94
95 qcom,mode = <GSBI_PROT_SPI>;
96
97 spi@1a280000 {
98 status = "okay";
99
100 pinctrl-0 = <&spi_pins>;
101 pinctrl-names = "default";
102 cs-gpios = <&qcom_pinmux 20 0>;
103
104 flash@0 {
105 compatible = "mx25u25635f", "jedec,spi-nor";
106 #address-cells = <1>;
107 #size-cells = <1>;
108 spi-max-frequency = <50000000>;
109 reg = <0>;
110 m25p,fast-read;
111
112 partitions {
113 compatible = "fixed-partitions";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 partition@0 {
118 label = "SBL1";
119 reg = <0x0 0x20000>;
120 read-only;
121 };
122
123 partition@20000 {
124 label = "MIBIB";
125 reg = <0x20000 0x10000>;
126 read-only;
127 };
128
129 partition@30000 {
130 label = "SBL2";
131 reg = <0x30000 0x20000>;
132 read-only;
133 };
134
135 partition@50000 {
136 label = "SBL3";
137 reg = <0x50000 0x30000>;
138 read-only;
139 };
140
141 partition@80000 {
142 label = "DDRCONFIG";
143 reg = <0x80000 0x10000>;
144 read-only;
145 };
146
147 partition@90000 {
148 label = "SSD";
149 reg = <0x90000 0x10000>;
150 read-only;
151 };
152
153 partition@a0000 {
154 label = "TZ";
155 reg = <0xa0000 0x30000>;
156 read-only;
157 };
158
159 partition@d0000 {
160 label = "RPM";
161 reg = <0xd0000 0x20000>;
162 read-only;
163 };
164
165 partition@f0000 {
166 label = "APPSBL";
167 reg = <0xf0000 0xc0000>;
168 read-only;
169 };
170
171 partition@1b0000 {
172 label = "APPSBLENV";
173 reg = <0x1b0000 0x10000>;
174 read-only;
175 };
176
177 eeprom: partition@1c0000 {
178 label = "EEPROM";
179 reg = <0x1c0000 0x10000>;
180 read-only;
181 };
182
183 partition@1d0000 {
184 label = "bootselect";
185 reg = <0x1d0000 0x10000>;
186 };
187
188 partition@1e0000 {
189 compatible = "denx,fit";
190 label = "firmware";
191 reg = <0x1e0000 0xe70000>;
192 };
193
194 partition@1050000 {
195 label = "kernel1";
196 reg = <0x1050000 0xe70000>;
197 read-only;
198 };
199
200 partition@1ec0000 {
201 label = "debug";
202 reg = <0x1ec0000 0x100000>;
203 read-only;
204 };
205
206 partition@1fc0000 {
207 label = "cfg";
208 reg = <0x1fc0000 0x40000>;
209 read-only;
210 };
211 };
212 };
213 };
214 };
215
216 &adm_dma {
217 status = "okay";
218 };
219
220 &nand_controller {
221 status = "okay";
222
223 pinctrl-0 = <&nand_pins>;
224 pinctrl-names = "default";
225 nand-ecc-strength = <4>;
226 nand-bus-width = <8>;
227 };
228
229 &mdio0 {
230 status = "okay";
231
232 pinctrl-0 = <&mdio0_pins>;
233 pinctrl-names = "default";
234
235 phy4: ethernet-phy@4 {
236 reg = <4>;
237 };
238
239 phy5: ethernet-phy@5 {
240 reg = <5>;
241 };
242 };
243
244 &gmac1 {
245 status = "okay";
246
247 mdiobus = <&mdio0>;
248 phy-handle = <&phy5>;
249 phy-mode = "sgmii";
250 qcom,id = <1>;
251
252 mtd-mac-address = <&eeprom 0x6>;
253 };
254
255 &gmac2 {
256 status = "okay";
257
258 mdiobus = <&mdio0>;
259 phy-handle = <&phy4>;
260 phy-mode = "sgmii";
261 qcom,id = <2>;
262
263 mtd-mac-address = <&eeprom 0x0>;
264 };
265
266 &pcie0 {
267 status = "okay";
268 };
269
270 &pcie1 {
271 status = "okay";
272 };
273
274 &tcsr {
275 status = "okay";
276 };
277
278 &hs_phy_0 {
279 status = "okay";
280 };
281
282 &ss_phy_0 {
283 status = "okay";
284 };
285
286 &usb3_0 {
287 status = "okay";
288 };
289
290 &hs_phy_1 {
291 status = "okay";
292 };
293
294 &ss_phy_1 {
295 status = "okay";
296 };
297
298 &usb3_1 {
299 status = "okay";
300 };