xref: /freebsd/sys/contrib/device-tree/src/arm64/apple/t8103.dtsi (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
1// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
3 * Apple T8103 "M1" SoC
4 *
5 * Other names: H13G, "Tonga"
6 *
7 * Copyright The Asahi Linux Contributors
8 */
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/interrupt-controller/apple-aic.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13#include <dt-bindings/pinctrl/apple.h>
14#include <dt-bindings/spmi/spmi.h>
15
16/ {
17	compatible = "apple,t8103", "apple,arm-platform";
18
19	#address-cells = <2>;
20	#size-cells = <2>;
21
22	cpus {
23		#address-cells = <2>;
24		#size-cells = <0>;
25
26		cpu-map {
27			cluster0 {
28				core0 {
29					cpu = <&cpu_e0>;
30				};
31				core1 {
32					cpu = <&cpu_e1>;
33				};
34				core2 {
35					cpu = <&cpu_e2>;
36				};
37				core3 {
38					cpu = <&cpu_e3>;
39				};
40			};
41
42			cluster1 {
43				core0 {
44					cpu = <&cpu_p0>;
45				};
46				core1 {
47					cpu = <&cpu_p1>;
48				};
49				core2 {
50					cpu = <&cpu_p2>;
51				};
52				core3 {
53					cpu = <&cpu_p3>;
54				};
55			};
56		};
57
58		cpu_e0: cpu@0 {
59			compatible = "apple,icestorm";
60			device_type = "cpu";
61			reg = <0x0 0x0>;
62			enable-method = "spin-table";
63			cpu-release-addr = <0 0>; /* To be filled by loader */
64			operating-points-v2 = <&ecluster_opp>;
65			capacity-dmips-mhz = <714>;
66			performance-domains = <&cpufreq_e>;
67			next-level-cache = <&l2_cache_0>;
68			i-cache-size = <0x20000>;
69			d-cache-size = <0x10000>;
70		};
71
72		cpu_e1: cpu@1 {
73			compatible = "apple,icestorm";
74			device_type = "cpu";
75			reg = <0x0 0x1>;
76			enable-method = "spin-table";
77			cpu-release-addr = <0 0>; /* To be filled by loader */
78			operating-points-v2 = <&ecluster_opp>;
79			capacity-dmips-mhz = <714>;
80			performance-domains = <&cpufreq_e>;
81			next-level-cache = <&l2_cache_0>;
82			i-cache-size = <0x20000>;
83			d-cache-size = <0x10000>;
84		};
85
86		cpu_e2: cpu@2 {
87			compatible = "apple,icestorm";
88			device_type = "cpu";
89			reg = <0x0 0x2>;
90			enable-method = "spin-table";
91			cpu-release-addr = <0 0>; /* To be filled by loader */
92			operating-points-v2 = <&ecluster_opp>;
93			capacity-dmips-mhz = <714>;
94			performance-domains = <&cpufreq_e>;
95			next-level-cache = <&l2_cache_0>;
96			i-cache-size = <0x20000>;
97			d-cache-size = <0x10000>;
98		};
99
100		cpu_e3: cpu@3 {
101			compatible = "apple,icestorm";
102			device_type = "cpu";
103			reg = <0x0 0x3>;
104			enable-method = "spin-table";
105			cpu-release-addr = <0 0>; /* To be filled by loader */
106			operating-points-v2 = <&ecluster_opp>;
107			capacity-dmips-mhz = <714>;
108			performance-domains = <&cpufreq_e>;
109			next-level-cache = <&l2_cache_0>;
110			i-cache-size = <0x20000>;
111			d-cache-size = <0x10000>;
112		};
113
114		cpu_p0: cpu@10100 {
115			compatible = "apple,firestorm";
116			device_type = "cpu";
117			reg = <0x0 0x10100>;
118			enable-method = "spin-table";
119			cpu-release-addr = <0 0>; /* To be filled by loader */
120			operating-points-v2 = <&pcluster_opp>;
121			capacity-dmips-mhz = <1024>;
122			performance-domains = <&cpufreq_p>;
123			next-level-cache = <&l2_cache_1>;
124			i-cache-size = <0x30000>;
125			d-cache-size = <0x20000>;
126		};
127
128		cpu_p1: cpu@10101 {
129			compatible = "apple,firestorm";
130			device_type = "cpu";
131			reg = <0x0 0x10101>;
132			enable-method = "spin-table";
133			cpu-release-addr = <0 0>; /* To be filled by loader */
134			operating-points-v2 = <&pcluster_opp>;
135			capacity-dmips-mhz = <1024>;
136			performance-domains = <&cpufreq_p>;
137			next-level-cache = <&l2_cache_1>;
138			i-cache-size = <0x30000>;
139			d-cache-size = <0x20000>;
140		};
141
142		cpu_p2: cpu@10102 {
143			compatible = "apple,firestorm";
144			device_type = "cpu";
145			reg = <0x0 0x10102>;
146			enable-method = "spin-table";
147			cpu-release-addr = <0 0>; /* To be filled by loader */
148			operating-points-v2 = <&pcluster_opp>;
149			capacity-dmips-mhz = <1024>;
150			performance-domains = <&cpufreq_p>;
151			next-level-cache = <&l2_cache_1>;
152			i-cache-size = <0x30000>;
153			d-cache-size = <0x20000>;
154		};
155
156		cpu_p3: cpu@10103 {
157			compatible = "apple,firestorm";
158			device_type = "cpu";
159			reg = <0x0 0x10103>;
160			enable-method = "spin-table";
161			cpu-release-addr = <0 0>; /* To be filled by loader */
162			operating-points-v2 = <&pcluster_opp>;
163			capacity-dmips-mhz = <1024>;
164			performance-domains = <&cpufreq_p>;
165			next-level-cache = <&l2_cache_1>;
166			i-cache-size = <0x30000>;
167			d-cache-size = <0x20000>;
168		};
169
170		l2_cache_0: l2-cache-0 {
171			compatible = "cache";
172			cache-level = <2>;
173			cache-unified;
174			cache-size = <0x400000>;
175		};
176
177		l2_cache_1: l2-cache-1 {
178			compatible = "cache";
179			cache-level = <2>;
180			cache-unified;
181			cache-size = <0xc00000>;
182		};
183	};
184
185	ecluster_opp: opp-table-0 {
186		compatible = "operating-points-v2";
187
188		opp01 {
189			opp-hz = /bits/ 64 <600000000>;
190			opp-level = <1>;
191			clock-latency-ns = <7500>;
192		};
193		opp02 {
194			opp-hz = /bits/ 64 <972000000>;
195			opp-level = <2>;
196			clock-latency-ns = <22000>;
197		};
198		opp03 {
199			opp-hz = /bits/ 64 <1332000000>;
200			opp-level = <3>;
201			clock-latency-ns = <27000>;
202		};
203		opp04 {
204			opp-hz = /bits/ 64 <1704000000>;
205			opp-level = <4>;
206			clock-latency-ns = <33000>;
207		};
208		opp05 {
209			opp-hz = /bits/ 64 <2064000000>;
210			opp-level = <5>;
211			clock-latency-ns = <50000>;
212		};
213	};
214
215	pcluster_opp: opp-table-1 {
216		compatible = "operating-points-v2";
217
218		opp01 {
219			opp-hz = /bits/ 64 <600000000>;
220			opp-level = <1>;
221			clock-latency-ns = <8000>;
222		};
223		opp02 {
224			opp-hz = /bits/ 64 <828000000>;
225			opp-level = <2>;
226			clock-latency-ns = <19000>;
227		};
228		opp03 {
229			opp-hz = /bits/ 64 <1056000000>;
230			opp-level = <3>;
231			clock-latency-ns = <21000>;
232		};
233		opp04 {
234			opp-hz = /bits/ 64 <1284000000>;
235			opp-level = <4>;
236			clock-latency-ns = <23000>;
237		};
238		opp05 {
239			opp-hz = /bits/ 64 <1500000000>;
240			opp-level = <5>;
241			clock-latency-ns = <24000>;
242		};
243		opp06 {
244			opp-hz = /bits/ 64 <1728000000>;
245			opp-level = <6>;
246			clock-latency-ns = <29000>;
247		};
248		opp07 {
249			opp-hz = /bits/ 64 <1956000000>;
250			opp-level = <7>;
251			clock-latency-ns = <31000>;
252		};
253		opp08 {
254			opp-hz = /bits/ 64 <2184000000>;
255			opp-level = <8>;
256			clock-latency-ns = <34000>;
257		};
258		opp09 {
259			opp-hz = /bits/ 64 <2388000000>;
260			opp-level = <9>;
261			clock-latency-ns = <36000>;
262		};
263		opp10 {
264			opp-hz = /bits/ 64 <2592000000>;
265			opp-level = <10>;
266			clock-latency-ns = <51000>;
267		};
268		opp11 {
269			opp-hz = /bits/ 64 <2772000000>;
270			opp-level = <11>;
271			clock-latency-ns = <54000>;
272		};
273		opp12 {
274			opp-hz = /bits/ 64 <2988000000>;
275			opp-level = <12>;
276			clock-latency-ns = <55000>;
277		};
278#if 0
279		/* Not available until CPU deep sleep is implemented */
280		opp13 {
281			opp-hz = /bits/ 64 <3096000000>;
282			opp-level = <13>;
283			clock-latency-ns = <55000>;
284			turbo-mode;
285		};
286		opp14 {
287			opp-hz = /bits/ 64 <3144000000>;
288			opp-level = <14>;
289			clock-latency-ns = <56000>;
290			turbo-mode;
291		};
292		opp15 {
293			opp-hz = /bits/ 64 <3204000000>;
294			opp-level = <15>;
295			clock-latency-ns = <56000>;
296			turbo-mode;
297		};
298#endif
299	};
300
301	timer {
302		compatible = "arm,armv8-timer";
303		interrupt-parent = <&aic>;
304		interrupt-names = "phys", "virt", "hyp-phys", "hyp-virt";
305		interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
306			     <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>,
307			     <AIC_FIQ AIC_TMR_HV_PHYS IRQ_TYPE_LEVEL_HIGH>,
308			     <AIC_FIQ AIC_TMR_HV_VIRT IRQ_TYPE_LEVEL_HIGH>;
309	};
310
311	pmu-e {
312		compatible = "apple,icestorm-pmu";
313		interrupt-parent = <&aic>;
314		interrupts = <AIC_FIQ AIC_CPU_PMU_E IRQ_TYPE_LEVEL_HIGH>;
315	};
316
317	pmu-p {
318		compatible = "apple,firestorm-pmu";
319		interrupt-parent = <&aic>;
320		interrupts = <AIC_FIQ AIC_CPU_PMU_P IRQ_TYPE_LEVEL_HIGH>;
321	};
322
323	clkref: clock-ref {
324		compatible = "fixed-clock";
325		#clock-cells = <0>;
326		clock-frequency = <24000000>;
327		clock-output-names = "clkref";
328	};
329
330	clk_120m: clock-120m {
331		compatible = "fixed-clock";
332		#clock-cells = <0>;
333		clock-frequency = <120000000>;
334		clock-output-names = "clk_120m";
335	};
336
337	clk_200m: clock-200m {
338		compatible = "fixed-clock";
339		#clock-cells = <0>;
340		clock-frequency = <200000000>;
341		clock-output-names = "clk_200m";
342	};
343
344	/*
345	 * This is a fabulated representation of the input clock
346	 * to NCO since we don't know the true clock tree.
347	 */
348	nco_clkref: clock-ref-nco {
349		compatible = "fixed-clock";
350		#clock-cells = <0>;
351		clock-output-names = "nco_ref";
352	};
353
354	soc {
355		compatible = "simple-bus";
356		#address-cells = <2>;
357		#size-cells = <2>;
358
359		ranges;
360		nonposted-mmio;
361
362		cpufreq_e: performance-controller@210e20000 {
363			compatible = "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
364			reg = <0x2 0x10e20000 0 0x1000>;
365			#performance-domain-cells = <0>;
366		};
367
368		cpufreq_p: performance-controller@211e20000 {
369			compatible = "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
370			reg = <0x2 0x11e20000 0 0x1000>;
371			#performance-domain-cells = <0>;
372		};
373
374		display_dfr: display-pipe@228200000 {
375			compatible = "apple,t8103-display-pipe", "apple,h7-display-pipe";
376			reg = <0x2 0x28200000 0x0 0xc000>,
377			      <0x2 0x28400000 0x0 0x4000>;
378			reg-names = "be", "fe";
379			power-domains = <&ps_dispdfr_fe>, <&ps_dispdfr_be>;
380			interrupt-parent = <&aic>;
381			interrupts = <AIC_IRQ 502 IRQ_TYPE_LEVEL_HIGH>,
382				     <AIC_IRQ 506 IRQ_TYPE_LEVEL_HIGH>;
383			interrupt-names = "be", "fe";
384			iommus = <&displaydfr_dart 0>;
385			status = "disabled";
386
387			port {
388				dfr_adp_out_mipi: endpoint {
389					remote-endpoint = <&dfr_mipi_in_adp>;
390				};
391			};
392		};
393
394		displaydfr_dart: iommu@228304000 {
395			compatible = "apple,t8103-dart";
396			reg = <0x2 0x28304000 0x0 0x4000>;
397			interrupt-parent = <&aic>;
398			interrupts = <AIC_IRQ 504 IRQ_TYPE_LEVEL_HIGH>;
399			#iommu-cells = <1>;
400			power-domains = <&ps_dispdfr_fe>;
401			status = "disabled";
402		};
403
404		displaydfr_mipi: dsi@228600000 {
405			compatible = "apple,t8103-display-pipe-mipi", "apple,h7-display-pipe-mipi";
406			reg = <0x2 0x28600000 0x0 0x100000>;
407			power-domains = <&ps_mipi_dsi>;
408			status = "disabled";
409
410			ports {
411				#address-cells = <1>;
412				#size-cells = <0>;
413
414				dfr_mipi_in: port@0 {
415					reg = <0>;
416					#address-cells = <1>;
417					#size-cells = <0>;
418
419					dfr_mipi_in_adp: endpoint@0 {
420						reg = <0>;
421						remote-endpoint = <&dfr_adp_out_mipi>;
422					};
423				};
424
425				dfr_mipi_out: port@1 {
426					reg = <1>;
427					#address-cells = <1>;
428					#size-cells = <0>;
429				};
430			};
431		};
432
433		sio_dart: iommu@235004000 {
434			compatible = "apple,t8103-dart";
435			reg = <0x2 0x35004000 0x0 0x4000>;
436			interrupt-parent = <&aic>;
437			interrupts = <AIC_IRQ 635 IRQ_TYPE_LEVEL_HIGH>;
438			#iommu-cells = <1>;
439			power-domains = <&ps_sio_cpu>;
440		};
441
442		i2c0: i2c@235010000 {
443			compatible = "apple,t8103-i2c", "apple,i2c";
444			reg = <0x2 0x35010000 0x0 0x4000>;
445			clocks = <&clkref>;
446			interrupt-parent = <&aic>;
447			interrupts = <AIC_IRQ 627 IRQ_TYPE_LEVEL_HIGH>;
448			pinctrl-0 = <&i2c0_pins>;
449			pinctrl-names = "default";
450			#address-cells = <0x1>;
451			#size-cells = <0x0>;
452			power-domains = <&ps_i2c0>;
453		};
454
455		i2c1: i2c@235014000 {
456			compatible = "apple,t8103-i2c", "apple,i2c";
457			reg = <0x2 0x35014000 0x0 0x4000>;
458			clocks = <&clkref>;
459			interrupt-parent = <&aic>;
460			interrupts = <AIC_IRQ 628 IRQ_TYPE_LEVEL_HIGH>;
461			pinctrl-0 = <&i2c1_pins>;
462			pinctrl-names = "default";
463			#address-cells = <0x1>;
464			#size-cells = <0x0>;
465			power-domains = <&ps_i2c1>;
466		};
467
468		i2c2: i2c@235018000 {
469			compatible = "apple,t8103-i2c", "apple,i2c";
470			reg = <0x2 0x35018000 0x0 0x4000>;
471			clocks = <&clkref>;
472			interrupt-parent = <&aic>;
473			interrupts = <AIC_IRQ 629 IRQ_TYPE_LEVEL_HIGH>;
474			pinctrl-0 = <&i2c2_pins>;
475			pinctrl-names = "default";
476			#address-cells = <0x1>;
477			#size-cells = <0x0>;
478			status = "disabled"; /* not used in all devices */
479			power-domains = <&ps_i2c2>;
480		};
481
482		i2c3: i2c@23501c000 {
483			compatible = "apple,t8103-i2c", "apple,i2c";
484			reg = <0x2 0x3501c000 0x0 0x4000>;
485			clocks = <&clkref>;
486			interrupt-parent = <&aic>;
487			interrupts = <AIC_IRQ 630 IRQ_TYPE_LEVEL_HIGH>;
488			pinctrl-0 = <&i2c3_pins>;
489			pinctrl-names = "default";
490			#address-cells = <0x1>;
491			#size-cells = <0x0>;
492			power-domains = <&ps_i2c3>;
493		};
494
495		i2c4: i2c@235020000 {
496			compatible = "apple,t8103-i2c", "apple,i2c";
497			reg = <0x2 0x35020000 0x0 0x4000>;
498			clocks = <&clkref>;
499			interrupt-parent = <&aic>;
500			interrupts = <AIC_IRQ 631 IRQ_TYPE_LEVEL_HIGH>;
501			pinctrl-0 = <&i2c4_pins>;
502			pinctrl-names = "default";
503			#address-cells = <0x1>;
504			#size-cells = <0x0>;
505			power-domains = <&ps_i2c4>;
506			status = "disabled"; /* only used in J293 */
507		};
508
509		fpwm1: pwm@235044000 {
510			compatible = "apple,t8103-fpwm", "apple,s5l-fpwm";
511			reg = <0x2 0x35044000 0x0 0x4000>;
512			power-domains = <&ps_fpwm1>;
513			clocks = <&clkref>;
514			#pwm-cells = <2>;
515			status = "disabled";
516		};
517
518		spi0: spi@235100000 {
519			compatible = "apple,t8103-spi", "apple,spi";
520			reg = <0x2 0x35100000 0x0 0x4000>;
521			interrupt-parent = <&aic>;
522			interrupts = <AIC_IRQ 614 IRQ_TYPE_LEVEL_HIGH>;
523			clocks = <&clk_200m>;
524			pinctrl-0 = <&spi0_pins>;
525			pinctrl-names = "default";
526			power-domains = <&ps_spi0>;
527			#address-cells = <1>;
528			#size-cells = <0>;
529			status = "disabled";
530		};
531
532		spi1: spi@235104000 {
533			compatible = "apple,t8103-spi", "apple,spi";
534			reg = <0x2 0x35104000 0x0 0x4000>;
535			interrupt-parent = <&aic>;
536			interrupts = <AIC_IRQ 615 IRQ_TYPE_LEVEL_HIGH>;
537			clocks = <&clk_200m>;
538			pinctrl-0 = <&spi1_pins>;
539			pinctrl-names = "default";
540			power-domains = <&ps_spi1>;
541			#address-cells = <1>;
542			#size-cells = <0>;
543			status = "disabled";
544		};
545
546		spi3: spi@23510c000 {
547			compatible = "apple,t8103-spi", "apple,spi";
548			reg = <0x2 0x3510c000 0x0 0x4000>;
549			interrupt-parent = <&aic>;
550			interrupts = <AIC_IRQ 617 IRQ_TYPE_LEVEL_HIGH>;
551			clocks = <&clk_120m>;
552			pinctrl-0 = <&spi3_pins>;
553			pinctrl-names = "default";
554			power-domains = <&ps_spi3>;
555			#address-cells = <1>;
556			#size-cells = <0>;
557			status = "disabled";
558		};
559
560		serial0: serial@235200000 {
561			compatible = "apple,s5l-uart";
562			reg = <0x2 0x35200000 0x0 0x1000>;
563			reg-io-width = <4>;
564			interrupt-parent = <&aic>;
565			interrupts = <AIC_IRQ 605 IRQ_TYPE_LEVEL_HIGH>;
566			/*
567			 * TODO: figure out the clocking properly, there may
568			 * be a third selectable clock.
569			 */
570			clocks = <&clkref>, <&clkref>;
571			clock-names = "uart", "clk_uart_baud0";
572			power-domains = <&ps_uart0>;
573			status = "disabled";
574		};
575
576		serial2: serial@235208000 {
577			compatible = "apple,s5l-uart";
578			reg = <0x2 0x35208000 0x0 0x1000>;
579			reg-io-width = <4>;
580			interrupt-parent = <&aic>;
581			interrupts = <AIC_IRQ 607 IRQ_TYPE_LEVEL_HIGH>;
582			clocks = <&clkref>, <&clkref>;
583			clock-names = "uart", "clk_uart_baud0";
584			power-domains = <&ps_uart2>;
585			status = "disabled";
586		};
587
588		admac: dma-controller@238200000 {
589			compatible = "apple,t8103-admac", "apple,admac";
590			reg = <0x2 0x38200000 0x0 0x34000>;
591			dma-channels = <24>;
592			interrupts-extended = <0>,
593					      <&aic AIC_IRQ 626 IRQ_TYPE_LEVEL_HIGH>,
594					      <0>,
595					      <0>;
596			#dma-cells = <1>;
597			iommus = <&sio_dart 2>;
598			power-domains = <&ps_sio_adma>;
599			resets = <&ps_audio_p>;
600		};
601
602		mca: i2s@238400000 {
603			compatible = "apple,t8103-mca", "apple,mca";
604			reg = <0x2 0x38400000 0x0 0x18000>,
605			      <0x2 0x38300000 0x0 0x30000>;
606
607			interrupt-parent = <&aic>;
608			interrupts = <AIC_IRQ 619 IRQ_TYPE_LEVEL_HIGH>,
609				     <AIC_IRQ 620 IRQ_TYPE_LEVEL_HIGH>,
610				     <AIC_IRQ 621 IRQ_TYPE_LEVEL_HIGH>,
611				     <AIC_IRQ 622 IRQ_TYPE_LEVEL_HIGH>,
612				     <AIC_IRQ 623 IRQ_TYPE_LEVEL_HIGH>,
613				     <AIC_IRQ 624 IRQ_TYPE_LEVEL_HIGH>;
614
615			resets = <&ps_audio_p>;
616			clocks = <&nco 0>, <&nco 1>, <&nco 2>,
617				 <&nco 3>, <&nco 4>, <&nco 4>;
618			power-domains = <&ps_audio_p>, <&ps_mca0>, <&ps_mca1>,
619					<&ps_mca2>, <&ps_mca3>, <&ps_mca4>, <&ps_mca5>;
620			dmas = <&admac 0>, <&admac 1>, <&admac 2>, <&admac 3>,
621			       <&admac 4>, <&admac 5>, <&admac 6>, <&admac 7>,
622			       <&admac 8>, <&admac 9>, <&admac 10>, <&admac 11>,
623			       <&admac 12>, <&admac 13>, <&admac 14>, <&admac 15>,
624			       <&admac 16>, <&admac 17>, <&admac 18>, <&admac 19>,
625			       <&admac 20>, <&admac 21>, <&admac 22>, <&admac 23>;
626			dma-names = "tx0a", "rx0a", "tx0b", "rx0b",
627				"tx1a", "rx1a", "tx1b", "rx1b",
628				"tx2a", "rx2a", "tx2b", "rx2b",
629				"tx3a", "rx3a", "tx3b", "rx3b",
630				"tx4a", "rx4a", "tx4b", "rx4b",
631				"tx5a", "rx5a", "tx5b", "rx5b";
632
633			#sound-dai-cells = <1>;
634		};
635
636		nco: clock-controller@23b044000 {
637			compatible = "apple,t8103-nco", "apple,nco";
638			reg = <0x2 0x3b044000 0x0 0x14000>;
639			clocks = <&nco_clkref>;
640			#clock-cells = <1>;
641		};
642
643		aic: interrupt-controller@23b100000 {
644			compatible = "apple,t8103-aic", "apple,aic";
645			#interrupt-cells = <3>;
646			interrupt-controller;
647			reg = <0x2 0x3b100000 0x0 0x8000>;
648			power-domains = <&ps_aic>;
649
650			affinities {
651				e-core-pmu-affinity {
652					apple,fiq-index = <AIC_CPU_PMU_E>;
653					cpus = <&cpu_e0 &cpu_e1 &cpu_e2 &cpu_e3>;
654				};
655
656				p-core-pmu-affinity {
657					apple,fiq-index = <AIC_CPU_PMU_P>;
658					cpus = <&cpu_p0 &cpu_p1 &cpu_p2 &cpu_p3>;
659				};
660			};
661		};
662
663		pmgr: power-management@23b700000 {
664			compatible = "apple,t8103-pmgr", "apple,pmgr", "syscon", "simple-mfd";
665			#address-cells = <1>;
666			#size-cells = <1>;
667			reg = <0x2 0x3b700000 0 0x14000>;
668		};
669
670		pinctrl_ap: pinctrl@23c100000 {
671			compatible = "apple,t8103-pinctrl", "apple,pinctrl";
672			reg = <0x2 0x3c100000 0x0 0x100000>;
673			power-domains = <&ps_gpio>;
674
675			gpio-controller;
676			#gpio-cells = <2>;
677			gpio-ranges = <&pinctrl_ap 0 0 212>;
678			apple,npins = <212>;
679
680			interrupt-controller;
681			#interrupt-cells = <2>;
682			interrupt-parent = <&aic>;
683			interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>,
684				     <AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>,
685				     <AIC_IRQ 192 IRQ_TYPE_LEVEL_HIGH>,
686				     <AIC_IRQ 193 IRQ_TYPE_LEVEL_HIGH>,
687				     <AIC_IRQ 194 IRQ_TYPE_LEVEL_HIGH>,
688				     <AIC_IRQ 195 IRQ_TYPE_LEVEL_HIGH>,
689				     <AIC_IRQ 196 IRQ_TYPE_LEVEL_HIGH>;
690
691			i2c0_pins: i2c0-pins {
692				pinmux = <APPLE_PINMUX(192, 1)>,
693					 <APPLE_PINMUX(188, 1)>;
694			};
695
696			i2c1_pins: i2c1-pins {
697				pinmux = <APPLE_PINMUX(201, 1)>,
698					 <APPLE_PINMUX(199, 1)>;
699			};
700
701			i2c2_pins: i2c2-pins {
702				pinmux = <APPLE_PINMUX(163, 1)>,
703					 <APPLE_PINMUX(162, 1)>;
704			};
705
706			i2c3_pins: i2c3-pins {
707				pinmux = <APPLE_PINMUX(73, 1)>,
708					 <APPLE_PINMUX(72, 1)>;
709			};
710
711			i2c4_pins: i2c4-pins {
712				pinmux = <APPLE_PINMUX(135, 1)>,
713					 <APPLE_PINMUX(134, 1)>;
714			};
715
716			spi0_pins: spi0-pins {
717				pinmux = <APPLE_PINMUX(67, 1)>, /* CLK */
718					<APPLE_PINMUX(68, 1)>,  /* MOSI */
719					<APPLE_PINMUX(69, 1)>;  /* MISO */
720			};
721
722			spi1_pins: spi1-pins {
723				pinmux = <APPLE_PINMUX(42, 1)>,
724					<APPLE_PINMUX(43, 1)>,
725					<APPLE_PINMUX(44, 1)>,
726					<APPLE_PINMUX(45, 1)>;
727			};
728
729			spi3_pins: spi3-pins {
730				pinmux = <APPLE_PINMUX(46, 1)>,
731					<APPLE_PINMUX(47, 1)>,
732					<APPLE_PINMUX(48, 1)>,
733					<APPLE_PINMUX(49, 1)>;
734			};
735
736			pcie_pins: pcie-pins {
737				pinmux = <APPLE_PINMUX(150, 1)>,
738					 <APPLE_PINMUX(151, 1)>,
739					 <APPLE_PINMUX(32, 1)>;
740			};
741		};
742
743		nub_spmi: spmi@23d0d9300 {
744			compatible = "apple,t8103-spmi", "apple,spmi";
745			reg = <0x2 0x3d0d9300 0x0 0x100>;
746			#address-cells = <2>;
747			#size-cells = <0>;
748
749			pmic1: pmic@f {
750				compatible = "apple,sera-pmic", "apple,spmi-nvmem";
751				reg = <0xf SPMI_USID>;
752
753				nvmem-layout {
754					compatible = "fixed-layout";
755					#address-cells = <1>;
756					#size-cells = <1>;
757
758					boot_stage: boot-stage@9f01 {
759						reg = <0x9f01 0x1>;
760					};
761
762					boot_error_count: boot-error-count@9f02 {
763						reg = <0x9f02 0x1>;
764						bits = <0 4>;
765					};
766
767					panic_count: panic-count@9f02 {
768						reg = <0x9f02 0x1>;
769						bits = <4 4>;
770					};
771
772					boot_error_stage: boot-error-stage@9f03 {
773						reg = <0x9f03 0x1>;
774					};
775
776					shutdown_flag: shutdown-flag@9f0f {
777						reg = <0x9f0f 0x1>;
778						bits = <3 1>;
779					};
780
781					fault_shadow: fault-shadow@a67b {
782						reg = <0xa67b 0x10>;
783					};
784
785					socd: socd@ab00 {
786						reg = <0xab00 0x400>;
787					};
788
789					pm_setting: pm-setting@d001 {
790						reg = <0xd001 0x1>;
791					};
792
793					rtc_offset: rtc-offset@d100 {
794						reg = <0xd100 0x6>;
795					};
796				};
797			};
798		};
799
800		pinctrl_nub: pinctrl@23d1f0000 {
801			compatible = "apple,t8103-pinctrl", "apple,pinctrl";
802			reg = <0x2 0x3d1f0000 0x0 0x4000>;
803			power-domains = <&ps_nub_gpio>;
804
805			gpio-controller;
806			#gpio-cells = <2>;
807			gpio-ranges = <&pinctrl_nub 0 0 23>;
808			apple,npins = <23>;
809
810			interrupt-controller;
811			#interrupt-cells = <2>;
812			interrupt-parent = <&aic>;
813			interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>,
814				     <AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>,
815				     <AIC_IRQ 332 IRQ_TYPE_LEVEL_HIGH>,
816				     <AIC_IRQ 333 IRQ_TYPE_LEVEL_HIGH>,
817				     <AIC_IRQ 334 IRQ_TYPE_LEVEL_HIGH>,
818				     <AIC_IRQ 335 IRQ_TYPE_LEVEL_HIGH>,
819				     <AIC_IRQ 336 IRQ_TYPE_LEVEL_HIGH>;
820		};
821
822		pmgr_mini: power-management@23d280000 {
823			compatible = "apple,t8103-pmgr", "apple,pmgr", "syscon", "simple-mfd";
824			#address-cells = <1>;
825			#size-cells = <1>;
826			reg = <0x2 0x3d280000 0 0x4000>;
827		};
828
829		wdt: watchdog@23d2b0000 {
830			compatible = "apple,t8103-wdt", "apple,wdt";
831			reg = <0x2 0x3d2b0000 0x0 0x4000>;
832			clocks = <&clkref>;
833			interrupt-parent = <&aic>;
834			interrupts = <AIC_IRQ 338 IRQ_TYPE_LEVEL_HIGH>;
835		};
836
837		pinctrl_smc: pinctrl@23e820000 {
838			compatible = "apple,t8103-pinctrl", "apple,pinctrl";
839			reg = <0x2 0x3e820000 0x0 0x4000>;
840
841			gpio-controller;
842			#gpio-cells = <2>;
843			gpio-ranges = <&pinctrl_smc 0 0 16>;
844			apple,npins = <16>;
845
846			interrupt-controller;
847			#interrupt-cells = <2>;
848			interrupt-parent = <&aic>;
849			interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>,
850				     <AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>,
851				     <AIC_IRQ 393 IRQ_TYPE_LEVEL_HIGH>,
852				     <AIC_IRQ 394 IRQ_TYPE_LEVEL_HIGH>,
853				     <AIC_IRQ 395 IRQ_TYPE_LEVEL_HIGH>,
854				     <AIC_IRQ 396 IRQ_TYPE_LEVEL_HIGH>,
855				     <AIC_IRQ 397 IRQ_TYPE_LEVEL_HIGH>;
856		};
857
858		pinctrl_aop: pinctrl@24a820000 {
859			compatible = "apple,t8103-pinctrl", "apple,pinctrl";
860			reg = <0x2 0x4a820000 0x0 0x4000>;
861
862			gpio-controller;
863			#gpio-cells = <2>;
864			gpio-ranges = <&pinctrl_aop 0 0 42>;
865			apple,npins = <42>;
866
867			interrupt-controller;
868			#interrupt-cells = <2>;
869			interrupt-parent = <&aic>;
870			interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
871				     <AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
872				     <AIC_IRQ 270 IRQ_TYPE_LEVEL_HIGH>,
873				     <AIC_IRQ 271 IRQ_TYPE_LEVEL_HIGH>,
874				     <AIC_IRQ 272 IRQ_TYPE_LEVEL_HIGH>,
875				     <AIC_IRQ 273 IRQ_TYPE_LEVEL_HIGH>,
876				     <AIC_IRQ 274 IRQ_TYPE_LEVEL_HIGH>;
877		};
878
879		ans_mbox: mbox@277408000 {
880			compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";
881			reg = <0x2 0x77408000 0x0 0x4000>;
882			interrupt-parent = <&aic>;
883			interrupts = <AIC_IRQ 583 IRQ_TYPE_LEVEL_HIGH>,
884				<AIC_IRQ 584 IRQ_TYPE_LEVEL_HIGH>,
885				<AIC_IRQ 585 IRQ_TYPE_LEVEL_HIGH>,
886				<AIC_IRQ 586 IRQ_TYPE_LEVEL_HIGH>;
887			interrupt-names = "send-empty", "send-not-empty",
888				"recv-empty", "recv-not-empty";
889			#mbox-cells = <0>;
890			power-domains = <&ps_ans2>;
891		};
892
893		sart: iommu@27bc50000 {
894			compatible = "apple,t8103-sart";
895			reg = <0x2 0x7bc50000 0x0 0x10000>;
896			power-domains = <&ps_ans2>;
897		};
898
899		nvme@27bcc0000 {
900			compatible = "apple,t8103-nvme-ans2", "apple,nvme-ans2";
901			reg = <0x2 0x7bcc0000 0x0 0x40000>,
902				<0x2 0x77400000 0x0 0x4000>;
903			reg-names = "nvme", "ans";
904			interrupt-parent = <&aic>;
905			interrupts = <AIC_IRQ 590 IRQ_TYPE_LEVEL_HIGH>;
906			mboxes = <&ans_mbox>;
907			apple,sart = <&sart>;
908			power-domains = <&ps_ans2>, <&ps_apcie_st>;
909			power-domain-names = "ans", "apcie0";
910			resets = <&ps_ans2>;
911		};
912
913		pcie0_dart_0: iommu@681008000 {
914			compatible = "apple,t8103-dart";
915			reg = <0x6 0x81008000 0x0 0x4000>;
916			#iommu-cells = <1>;
917			interrupt-parent = <&aic>;
918			interrupts = <AIC_IRQ 696 IRQ_TYPE_LEVEL_HIGH>;
919			power-domains = <&ps_apcie_gp>;
920		};
921
922		pcie0_dart_1: iommu@682008000 {
923			compatible = "apple,t8103-dart";
924			reg = <0x6 0x82008000 0x0 0x4000>;
925			#iommu-cells = <1>;
926			interrupt-parent = <&aic>;
927			interrupts = <AIC_IRQ 699 IRQ_TYPE_LEVEL_HIGH>;
928			power-domains = <&ps_apcie_gp>;
929			status = "disabled";
930		};
931
932		pcie0_dart_2: iommu@683008000 {
933			compatible = "apple,t8103-dart";
934			reg = <0x6 0x83008000 0x0 0x4000>;
935			#iommu-cells = <1>;
936			interrupt-parent = <&aic>;
937			interrupts = <AIC_IRQ 702 IRQ_TYPE_LEVEL_HIGH>;
938			power-domains = <&ps_apcie_gp>;
939			status = "disabled";
940		};
941
942		pcie0: pcie@690000000 {
943			compatible = "apple,t8103-pcie", "apple,pcie";
944			device_type = "pci";
945
946			reg = <0x6 0x90000000 0x0 0x1000000>,
947			      <0x6 0x80000000 0x0 0x100000>,
948			      <0x6 0x81000000 0x0 0x4000>,
949			      <0x6 0x82000000 0x0 0x4000>,
950			      <0x6 0x83000000 0x0 0x4000>;
951			reg-names = "config", "rc", "port0", "port1", "port2";
952
953			interrupt-parent = <&aic>;
954			interrupts = <AIC_IRQ 695 IRQ_TYPE_LEVEL_HIGH>,
955				     <AIC_IRQ 698 IRQ_TYPE_LEVEL_HIGH>,
956				     <AIC_IRQ 701 IRQ_TYPE_LEVEL_HIGH>;
957
958			msi-controller;
959			msi-parent = <&pcie0>;
960			msi-ranges = <&aic AIC_IRQ 704 IRQ_TYPE_EDGE_RISING 32>;
961
962
963			iommu-map = <0x100 &pcie0_dart_0 1 1>,
964				    <0x200 &pcie0_dart_1 1 1>,
965				    <0x300 &pcie0_dart_2 1 1>;
966			iommu-map-mask = <0xff00>;
967
968			bus-range = <0 3>;
969			#address-cells = <3>;
970			#size-cells = <2>;
971			ranges = <0x43000000 0x6 0xa0000000 0x6 0xa0000000 0x0 0x20000000>,
972				 <0x02000000 0x0 0xc0000000 0x6 0xc0000000 0x0 0x40000000>;
973
974			power-domains = <&ps_apcie_gp>;
975			pinctrl-0 = <&pcie_pins>;
976			pinctrl-names = "default";
977
978			port00: pci@0,0 {
979				device_type = "pci";
980				reg = <0x0 0x0 0x0 0x0 0x0>;
981				reset-gpios = <&pinctrl_ap 152 GPIO_ACTIVE_LOW>;
982
983				#address-cells = <3>;
984				#size-cells = <2>;
985				ranges;
986
987				interrupt-controller;
988				#interrupt-cells = <1>;
989
990				interrupt-map-mask = <0 0 0 7>;
991				interrupt-map = <0 0 0 1 &port00 0 0 0 0>,
992						<0 0 0 2 &port00 0 0 0 1>,
993						<0 0 0 3 &port00 0 0 0 2>,
994						<0 0 0 4 &port00 0 0 0 3>;
995			};
996
997			port01: pci@1,0 {
998				device_type = "pci";
999				reg = <0x800 0x0 0x0 0x0 0x0>;
1000				reset-gpios = <&pinctrl_ap 153 GPIO_ACTIVE_LOW>;
1001
1002				#address-cells = <3>;
1003				#size-cells = <2>;
1004				ranges;
1005
1006				interrupt-controller;
1007				#interrupt-cells = <1>;
1008
1009				interrupt-map-mask = <0 0 0 7>;
1010				interrupt-map = <0 0 0 1 &port01 0 0 0 0>,
1011						<0 0 0 2 &port01 0 0 0 1>,
1012						<0 0 0 3 &port01 0 0 0 2>,
1013						<0 0 0 4 &port01 0 0 0 3>;
1014				status = "disabled";
1015			};
1016
1017			port02: pci@2,0 {
1018				device_type = "pci";
1019				reg = <0x1000 0x0 0x0 0x0 0x0>;
1020				reset-gpios = <&pinctrl_ap 33 GPIO_ACTIVE_LOW>;
1021
1022				#address-cells = <3>;
1023				#size-cells = <2>;
1024				ranges;
1025
1026				interrupt-controller;
1027				#interrupt-cells = <1>;
1028
1029				interrupt-map-mask = <0 0 0 7>;
1030				interrupt-map = <0 0 0 1 &port02 0 0 0 0>,
1031						<0 0 0 2 &port02 0 0 0 1>,
1032						<0 0 0 3 &port02 0 0 0 2>,
1033						<0 0 0 4 &port02 0 0 0 3>;
1034				status = "disabled";
1035			};
1036		};
1037	};
1038};
1039
1040#include "t8103-pmgr.dtsi"
1041