xref: /freebsd/sys/contrib/device-tree/src/arm64/apple/t6022-j180d.dts (revision 0cd4430a9320c916a84617b6bbf400f5c64a09c7)
1// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
3 * Mac Pro (M2 Ultra, 2023)
4 *
5 * target-type: J180d
6 *
7 * Copyright The Asahi Linux Contributors
8 */
9
10/dts-v1/;
11
12#include "t6022.dtsi"
13#include "t6022-jxxxd.dtsi"
14
15/ {
16	compatible = "apple,j180d", "apple,t6022", "apple,arm-platform";
17	model = "Apple Mac Pro (M2 Ultra, 2023)";
18	chassis-type = "server";
19
20	aliases {
21		atcphy0 = &atcphy0;
22		atcphy1 = &atcphy1;
23		atcphy2 = &atcphy2;
24		atcphy3 = &atcphy3;
25		atcphy4 = &atcphy0_die1;
26		atcphy5 = &atcphy1_die1;
27		atcphy6 = &atcphy2_die1;
28		atcphy7 = &atcphy3_die1;
29		nvram = &nvram;
30		serial0 = &serial0;
31	};
32
33	chosen {
34		#address-cells = <2>;
35		#size-cells = <2>;
36		ranges;
37
38		stdout-path = "serial0";
39
40		framebuffer0: framebuffer@0 {
41			compatible = "apple,simple-framebuffer", "simple-framebuffer";
42			reg = <0 0 0 0>; /* To be filled by loader */
43			/* Format properties will be added by loader */
44			status = "disabled";
45			power-domains = <&ps_dispext0_cpu0_die1>, <&ps_dptx_phy_ps_die1>;
46		};
47	};
48
49	memory@10000000000 {
50		device_type = "memory";
51		reg = <0x100 0 0x2 0>; /* To be filled by loader */
52	};
53};
54
55&serial0 {
56	status = "okay";
57};
58
59/* USB Type C Rear */
60&i2c0 {
61	hpm2: usb-pd@3b {
62		compatible = "apple,cd321x";
63		reg = <0x3b>;
64		interrupt-parent = <&pinctrl_ap>;
65		interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
66		interrupt-names = "irq";
67
68		typec2: connector {
69			compatible = "usb-c-connector";
70			label = "USB-C Back 1";
71			power-role = "dual";
72			data-role = "dual";
73
74			ports {
75				#address-cells = <1>;
76				#size-cells = <0>;
77				port@0 {
78					reg = <0>;
79					typec2_connector_hs: endpoint {
80						remote-endpoint = <&dwc3_2_hs>;
81					};
82				};
83				port@1 {
84					reg = <1>;
85					typec2_connector_ss: endpoint {
86						remote-endpoint = <&atcphy2_typec_lanes>;
87					};
88				};
89			};
90		};
91	};
92
93	hpm3: usb-pd@3c {
94		compatible = "apple,cd321x";
95		reg = <0x3c>;
96		interrupt-parent = <&pinctrl_ap>;
97		interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
98		interrupt-names = "irq";
99
100		typec3: connector {
101			compatible = "usb-c-connector";
102			label = "USB-C Back 2";
103			power-role = "dual";
104			data-role = "dual";
105
106			ports {
107				#address-cells = <1>;
108				#size-cells = <0>;
109				port@0 {
110					reg = <0>;
111					typec3_connector_hs: endpoint {
112						remote-endpoint = <&dwc3_3_hs>;
113					};
114				};
115				port@1 {
116					reg = <1>;
117					typec3_connector_ss: endpoint {
118						remote-endpoint = <&atcphy3_typec_lanes>;
119					};
120				};
121			};
122		};
123	};
124
125	/* hpm4 and hpm5 included from t6022-jxxxd.dtsi */
126
127	hpm6: usb-pd@3d {
128		compatible = "apple,cd321x";
129		reg = <0x3d>;
130		interrupt-parent = <&pinctrl_ap>;
131		interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
132		interrupt-names = "irq";
133
134		typec6: connector {
135			compatible = "usb-c-connector";
136			label = "USB-C Back 5";
137			power-role = "dual";
138			data-role = "dual";
139
140			ports {
141				#address-cells = <1>;
142				#size-cells = <0>;
143				port@0 {
144					reg = <0>;
145					typec6_connector_hs: endpoint {
146						remote-endpoint = <&dwc3_6_hs>;
147					};
148				};
149				port@1 {
150					reg = <1>;
151					typec6_connector_ss: endpoint {
152						remote-endpoint = <&atcphy6_typec_lanes>;
153					};
154				};
155			};
156		};
157	};
158
159	hpm7: usb-pd@3e {
160		compatible = "apple,cd321x";
161		reg = <0x3e>;
162		interrupt-parent = <&pinctrl_ap>;
163		interrupts = <44 IRQ_TYPE_LEVEL_LOW>;
164		interrupt-names = "irq";
165
166		typec7: connector {
167			compatible = "usb-c-connector";
168			label = "USB-C Back 6";
169			power-role = "dual";
170			data-role = "dual";
171
172			ports {
173				#address-cells = <1>;
174				#size-cells = <0>;
175				port@0 {
176					reg = <0>;
177					typec7_connector_hs: endpoint {
178						remote-endpoint = <&dwc3_7_hs>;
179					};
180				};
181				port@1 {
182					reg = <1>;
183					typec7_connector_ss: endpoint {
184						remote-endpoint = <&atcphy7_typec_lanes>;
185					};
186				};
187			};
188		};
189	};
190};
191
192&typec4 {
193	label = "USB-C Back 3";
194};
195
196&typec5 {
197	label = "USB-C Back 4";
198};
199
200/* USB Type C Front */
201&i2c3 {
202	status = "okay";
203
204	hpm0: usb-pd@38 {
205		compatible = "apple,cd321x";
206		reg = <0x38>;
207		interrupt-parent = <&pinctrl_ap>;
208		interrupts = <60 IRQ_TYPE_LEVEL_LOW>;
209		interrupt-names = "irq";
210
211		typec0: connector {
212			compatible = "usb-c-connector";
213			label = "USB-C Top Right";
214			power-role = "dual";
215			data-role = "dual";
216
217			ports {
218				#address-cells = <1>;
219				#size-cells = <0>;
220				port@0 {
221					reg = <0>;
222					typec0_connector_hs: endpoint {
223						remote-endpoint = <&dwc3_0_hs>;
224					};
225				};
226				port@1 {
227					reg = <1>;
228					typec0_connector_ss: endpoint {
229						remote-endpoint = <&atcphy0_typec_lanes>;
230					};
231				};
232			};
233		};
234	};
235
236	hpm1: usb-pd@3f {
237		compatible = "apple,cd321x";
238		reg = <0x3f>;
239		interrupt-parent = <&pinctrl_ap>;
240		interrupts = <60 IRQ_TYPE_LEVEL_LOW>;
241		interrupt-names = "irq";
242
243		typec1: connector {
244			compatible = "usb-c-connector";
245			label = "USB-C Top Left";
246			power-role = "dual";
247			data-role = "dual";
248
249			ports {
250				#address-cells = <1>;
251				#size-cells = <0>;
252				port@0 {
253					reg = <0>;
254					typec1_connector_hs: endpoint {
255						remote-endpoint = <&dwc3_1_hs>;
256					};
257				};
258				port@1 {
259					reg = <1>;
260					typec1_connector_ss: endpoint {
261						remote-endpoint = <&atcphy1_typec_lanes>;
262					};
263				};
264			};
265		};
266	};
267};
268
269/* USB controllers */
270&dwc3_0 {
271	ports {
272		#address-cells = <1>;
273		#size-cells = <0>;
274
275		port@0 {
276			reg = <0>;
277			dwc3_0_hs: endpoint {
278				remote-endpoint = <&typec0_connector_hs>;
279			};
280		};
281
282		port@1 {
283			reg = <1>;
284			dwc3_0_ss: endpoint {
285				remote-endpoint = <&atcphy0_usb3>;
286			};
287		};
288	};
289};
290
291&dwc3_1 {
292	ports {
293		#address-cells = <1>;
294		#size-cells = <0>;
295
296		port@0 {
297			reg = <0>;
298			dwc3_1_hs: endpoint {
299				remote-endpoint = <&typec1_connector_hs>;
300			};
301		};
302
303		port@1 {
304			reg = <1>;
305			dwc3_1_ss: endpoint {
306				remote-endpoint = <&atcphy1_usb3>;
307			};
308		};
309	};
310};
311
312&dwc3_2 {
313	ports {
314		#address-cells = <1>;
315		#size-cells = <0>;
316
317		port@0 {
318			reg = <0>;
319			dwc3_2_hs: endpoint {
320				remote-endpoint = <&typec2_connector_hs>;
321			};
322		};
323
324		port@1 {
325			reg = <1>;
326			dwc3_2_ss: endpoint {
327				remote-endpoint = <&atcphy2_usb3>;
328			};
329		};
330	};
331};
332
333&dwc3_3 {
334	ports {
335		#address-cells = <1>;
336		#size-cells = <0>;
337
338		port@0 {
339			reg = <0>;
340			dwc3_3_hs: endpoint {
341				remote-endpoint = <&typec3_connector_hs>;
342			};
343		};
344
345		port@1 {
346			reg = <1>;
347			dwc3_3_ss: endpoint {
348				remote-endpoint = <&atcphy3_usb3>;
349			};
350		};
351	};
352};
353
354/* USB controllers on die 1 */
355&dwc3_2_die1 {
356	ports {
357		#address-cells = <1>;
358		#size-cells = <0>;
359
360		port@0 {
361			reg = <0>;
362			dwc3_6_hs: endpoint {
363				remote-endpoint = <&typec6_connector_hs>;
364			};
365		};
366
367		port@1 {
368			reg = <1>;
369			dwc3_6_ss: endpoint {
370				remote-endpoint = <&atcphy6_usb3>;
371			};
372		};
373	};
374};
375
376&dwc3_3_die1 {
377	ports {
378		#address-cells = <1>;
379		#size-cells = <0>;
380
381		port@0 {
382			reg = <0>;
383			dwc3_7_hs: endpoint {
384				remote-endpoint = <&typec7_connector_hs>;
385			};
386		};
387
388		port@1 {
389			reg = <1>;
390			dwc3_7_ss: endpoint {
391				remote-endpoint = <&atcphy7_usb3>;
392			};
393		};
394	};
395};
396
397/* Type-C PHYs */
398&atcphy0 {
399	ports {
400		#address-cells = <1>;
401		#size-cells = <0>;
402
403		port@0 {
404			reg = <0>;
405			atcphy0_typec_lanes: endpoint {
406				remote-endpoint = <&typec0_connector_ss>;
407			};
408		};
409
410		port@1 {
411			reg = <1>;
412			atcphy0_usb3: endpoint {
413				remote-endpoint = <&dwc3_0_ss>;
414			};
415		};
416	};
417};
418
419&atcphy1 {
420	ports {
421		#address-cells = <1>;
422		#size-cells = <0>;
423
424		port@0 {
425			reg = <0>;
426			atcphy1_typec_lanes: endpoint {
427				remote-endpoint = <&typec1_connector_ss>;
428			};
429		};
430
431		port@1 {
432			reg = <1>;
433			atcphy1_usb3: endpoint {
434				remote-endpoint = <&dwc3_1_ss>;
435			};
436		};
437	};
438};
439
440&atcphy2 {
441	ports {
442		#address-cells = <1>;
443		#size-cells = <0>;
444
445		port@0 {
446			reg = <0>;
447			atcphy2_typec_lanes: endpoint {
448				remote-endpoint = <&typec2_connector_ss>;
449			};
450		};
451
452		port@1 {
453			reg = <1>;
454			atcphy2_usb3: endpoint {
455				remote-endpoint = <&dwc3_2_ss>;
456			};
457		};
458	};
459};
460
461&atcphy3 {
462	ports {
463		#address-cells = <1>;
464		#size-cells = <0>;
465
466		port@0 {
467			reg = <0>;
468			atcphy3_typec_lanes: endpoint {
469				remote-endpoint = <&typec3_connector_ss>;
470			};
471		};
472
473		port@1 {
474			reg = <1>;
475			atcphy3_usb3: endpoint {
476				remote-endpoint = <&dwc3_3_ss>;
477			};
478		};
479	};
480};
481
482&atcphy2_die1 {
483	ports {
484		#address-cells = <1>;
485		#size-cells = <0>;
486
487		port@0 {
488			reg = <0>;
489			atcphy6_typec_lanes: endpoint {
490				remote-endpoint = <&typec6_connector_ss>;
491			};
492		};
493
494		port@1 {
495			reg = <1>;
496			atcphy6_usb3: endpoint {
497				remote-endpoint = <&dwc3_6_ss>;
498			};
499		};
500	};
501};
502
503&atcphy3_die1 {
504	ports {
505		#address-cells = <1>;
506		#size-cells = <0>;
507
508		port@0 {
509			reg = <0>;
510			atcphy7_typec_lanes: endpoint {
511				remote-endpoint = <&typec7_connector_ss>;
512			};
513		};
514
515		port@1 {
516			reg = <1>;
517			atcphy7_usb3: endpoint {
518				remote-endpoint = <&dwc3_7_ss>;
519			};
520		};
521	};
522};
523
524/*
525 * Delete unused PCIe nodes, the Mac Pro uses slightly different PCIe
526 * controllers with a single port connected to a PM40100 PCIe switch
527 */
528/delete-node/ &pcie0;
529/delete-node/ &pcie0_dart_0;
530/delete-node/ &pcie0_dart_1;
531/delete-node/ &pcie0_dart_2;
532/delete-node/ &pcie0_dart_3;
533
534&nco_clkref {
535	clock-frequency = <1068000000>;
536};
537
538#include "spi1-nvram.dtsi"
539