qualcommax: move switch tick mode setting to ESS DTSI
[openwrt/staging/jow.git] / target / linux / qualcommax / files / arch / arm64 / boot / dts / qcom / ipq8072-haze.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include "ipq8074.dtsi"
6 #include "ipq8074-hk-cpu.dtsi"
7 #include "ipq8074-ess.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
11
12 / {
13 model = "prpl Foundation Haze";
14 compatible = "prpl,haze", "qcom,ipq8074";
15
16 aliases {
17 serial0 = &blsp1_uart5;
18 /* Aliases are required by U-Boot to patch MAC addresses */
19 ethernet0 = &dp6_syn;
20 ethernet1 = &dp4;
21 ethernet2 = &dp3;
22 ethernet3 = &dp2;
23 label-mac-device = &dp6_syn;
24 };
25
26 chosen {
27 stdout-path = "serial0:115200n8";
28 };
29
30 keys {
31 compatible = "gpio-keys";
32 pinctrl-0 = <&button_pins>;
33 pinctrl-names = "default";
34
35 wps-button {
36 label = "wps";
37 gpios = <&tlmm 42 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40
41 reset-button {
42 label = "reset";
43 gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_RESTART>;
45 };
46 };
47 };
48
49 &tlmm {
50 mdio_pins: mdio-state {
51 mdc-pins {
52 pins = "gpio68";
53 function = "mdc";
54 drive-strength = <8>;
55 bias-pull-up;
56 };
57
58 mdio-pins {
59 pins = "gpio69";
60 function = "mdio";
61 drive-strength = <8>;
62 bias-pull-up;
63 };
64 };
65
66 button_pins: button-state {
67 wps-pins {
68 pins = "gpio42";
69 function = "gpio";
70 drive-strength = <8>;
71 bias-pull-up;
72 };
73
74 rst-pins {
75 pins = "gpio44";
76 function = "gpio";
77 drive-strength = <8>;
78 bias-pull-up;
79 };
80 };
81 };
82
83 &blsp1_uart5 {
84 status = "okay";
85 };
86
87 &prng {
88 status = "okay";
89 };
90
91 &ssphy_0 {
92 status = "okay";
93 };
94
95 &qusb_phy_0 {
96 status = "okay";
97 };
98
99 &ssphy_1 {
100 status = "okay";
101 };
102
103 &qusb_phy_1 {
104 status = "okay";
105 };
106
107 &usb_0 {
108 status = "okay";
109 };
110
111 &usb_1 {
112 status = "okay";
113 };
114
115 &cryptobam {
116 status = "okay";
117 };
118
119 &crypto {
120 status = "okay";
121 };
122
123 &qpic_bam {
124 status = "okay";
125 };
126
127 &blsp1_spi1 { /* BLSP1 QUP1 */
128 pinctrl-0 = <&spi_0_pins>;
129 pinctrl-names = "default";
130 cs-gpios = <0>;
131 status = "okay";
132
133 flash@0 {
134 #address-cells = <1>;
135 #size-cells = <1>;
136 reg = <0>;
137 compatible = "jedec,spi-nor";
138 spi-max-frequency = <50000000>;
139
140 partitions {
141 compatible = "qcom,smem-part";
142 };
143 };
144 };
145
146 &mdio {
147 status = "okay";
148
149 pinctrl-0 = <&mdio_pins>;
150 pinctrl-names = "default";
151 reset-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
152
153 qca8075_1: ethernet-phy@0 {
154 compatible = "ethernet-phy-ieee802.3-c22";
155 reg = <0>;
156 };
157
158 qca8075_2: ethernet-phy@1 {
159 compatible = "ethernet-phy-ieee802.3-c22";
160 reg = <1>;
161 };
162
163 qca8075_3: ethernet-phy@2 {
164 compatible = "ethernet-phy-ieee802.3-c22";
165 reg = <2>;
166 };
167
168 qca8075_4: ethernet-phy@3 {
169 compatible = "ethernet-phy-ieee802.3-c22";
170 reg = <3>;
171 };
172
173 aqr113c: ethernet-phy@5 {
174 compatible ="ethernet-phy-ieee802.3-c45";
175 reg = <8>;
176 reset-gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
177 };
178 };
179
180 &sdhc_1 {
181 status = "okay";
182
183 vqmmc-supply = <&l11>;
184 };
185
186 &switch {
187 status = "okay";
188
189 switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
190 switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
191 switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
192 switch_mac_mode1 = <MAC_MODE_10GBASE_R>; /* mac mode for uniphy instance1*/
193 switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
194
195 qcom,port_phyinfo {
196 port@0 {
197 port_id = <1>;
198 phy_address = <0>;
199 };
200 port@1 {
201 port_id = <2>;
202 phy_address = <1>;
203 };
204 port@2 {
205 port_id = <3>;
206 phy_address = <2>;
207 };
208 port@3 {
209 port_id = <4>;
210 phy_address = <3>;
211 };
212 port@4 {
213 port_id = <6>;
214 phy_address = <8>;
215 compatible = "ethernet-phy-ieee802.3-c45";
216 ethernet-phy-ieee802.3-c45;
217 };
218 };
219 };
220
221 &edma {
222 status = "okay";
223 };
224
225 /* Dummy LAN port */
226 &dp1 {
227 status = "disabled";
228 phy-handle = <&qca8075_1>;
229 label = "lan4";
230 };
231
232 &dp2 {
233 status = "okay";
234 phy-handle = <&qca8075_2>;
235 label = "lan3";
236 };
237
238 &dp3 {
239 status = "okay";
240 phy-handle = <&qca8075_3>;
241 label = "lan2";
242 };
243
244 &dp4 {
245 status = "okay";
246 phy-handle = <&qca8075_4>;
247 label = "lan1";
248 };
249
250 &dp6_syn {
251 status = "okay";
252 qcom,mactype = <1>;
253 phy-handle = <&aqr113c>;
254 label = "wan";
255 };
256
257 &pcie_qmp0 {
258 status = "okay";
259 };
260
261 &pcie0 {
262 status = "okay";
263
264 perst-gpio = <&tlmm 58 GPIO_ACTIVE_LOW>;
265
266 bridge@0,0 {
267 reg = <0x00020000 0 0 0 0>;
268 #address-cells = <3>;
269 #size-cells = <2>;
270 ranges;
271 };
272 };
273
274 &pcie_qmp1 {
275 status = "okay";
276 };
277
278 &pcie1 {
279 status = "okay";
280
281 perst-gpio = <&tlmm 61 GPIO_ACTIVE_LOW>;
282
283 bridge@1,0 {
284 reg = <0x00010000 0 0 0 0>;
285 #address-cells = <3>;
286 #size-cells = <2>;
287 ranges;
288
289 wifi@1,0 {
290 status = "okay";
291
292 /* ath11k has no DT compatible for PCI cards */
293 compatible = "pci17cb,1104";
294 reg = <0x00010000 0 0 0 0>;
295
296 qcom,ath11k-calibration-variant = "prpl-Haze";
297 };
298 };
299 };
300
301 &wifi {
302 status = "okay";
303
304 qcom,ath11k-calibration-variant = "prpl-Haze";
305 };