xref: /freebsd/sys/contrib/device-tree/src/arm64/apple/t8012.dtsi (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
18ccc0d23SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT
28ccc0d23SEmmanuel Vadot/*
38ccc0d23SEmmanuel Vadot * Apple T8012 "T2" SoC
48ccc0d23SEmmanuel Vadot *
58ccc0d23SEmmanuel Vadot * Other names: H9M, "Gibraltar"
68ccc0d23SEmmanuel Vadot *
78ccc0d23SEmmanuel Vadot * Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
88ccc0d23SEmmanuel Vadot */
98ccc0d23SEmmanuel Vadot
108ccc0d23SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
118ccc0d23SEmmanuel Vadot#include <dt-bindings/interrupt-controller/apple-aic.h>
128ccc0d23SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
138ccc0d23SEmmanuel Vadot#include <dt-bindings/pinctrl/apple.h>
148ccc0d23SEmmanuel Vadot
158ccc0d23SEmmanuel Vadot/ {
168ccc0d23SEmmanuel Vadot	interrupt-parent = <&aic>;
178ccc0d23SEmmanuel Vadot	#address-cells = <2>;
188ccc0d23SEmmanuel Vadot	#size-cells = <2>;
198ccc0d23SEmmanuel Vadot
208ccc0d23SEmmanuel Vadot	clkref: clock-ref {
218ccc0d23SEmmanuel Vadot		compatible = "fixed-clock";
228ccc0d23SEmmanuel Vadot		#clock-cells = <0>;
238ccc0d23SEmmanuel Vadot		clock-frequency = <24000000>;
248ccc0d23SEmmanuel Vadot		clock-output-names = "clkref";
258ccc0d23SEmmanuel Vadot	};
268ccc0d23SEmmanuel Vadot
278ccc0d23SEmmanuel Vadot	cpus {
288ccc0d23SEmmanuel Vadot		#address-cells = <2>;
298ccc0d23SEmmanuel Vadot		#size-cells = <0>;
308ccc0d23SEmmanuel Vadot
318ccc0d23SEmmanuel Vadot		cpu0: cpu@10000 {
328ccc0d23SEmmanuel Vadot			compatible = "apple,hurricane-zephyr";
338ccc0d23SEmmanuel Vadot			reg = <0x0 0x10000>;
348ccc0d23SEmmanuel Vadot			cpu-release-addr = <0 0>; /* To be filled by loader */
358ccc0d23SEmmanuel Vadot			operating-points-v2 = <&fusion_opp>;
368ccc0d23SEmmanuel Vadot			performance-domains = <&cpufreq>;
378ccc0d23SEmmanuel Vadot			enable-method = "spin-table";
388ccc0d23SEmmanuel Vadot			device_type = "cpu";
39*ae5de77eSEmmanuel Vadot			next-level-cache = <&l2_cache>;
40*ae5de77eSEmmanuel Vadot			i-cache-size = <0x10000>; /* P-core */
41*ae5de77eSEmmanuel Vadot			d-cache-size = <0x10000>; /* P-core */
428ccc0d23SEmmanuel Vadot		};
438ccc0d23SEmmanuel Vadot
448ccc0d23SEmmanuel Vadot		cpu1: cpu@10001 {
458ccc0d23SEmmanuel Vadot			compatible = "apple,hurricane-zephyr";
468ccc0d23SEmmanuel Vadot			reg = <0x0 0x10001>;
478ccc0d23SEmmanuel Vadot			cpu-release-addr = <0 0>; /* To be filled by loader */
488ccc0d23SEmmanuel Vadot			operating-points-v2 = <&fusion_opp>;
498ccc0d23SEmmanuel Vadot			performance-domains = <&cpufreq>;
508ccc0d23SEmmanuel Vadot			enable-method = "spin-table";
518ccc0d23SEmmanuel Vadot			device_type = "cpu";
52*ae5de77eSEmmanuel Vadot			next-level-cache = <&l2_cache>;
53*ae5de77eSEmmanuel Vadot			i-cache-size = <0x10000>; /* P-core */
54*ae5de77eSEmmanuel Vadot			d-cache-size = <0x10000>; /* P-core */
55*ae5de77eSEmmanuel Vadot		};
56*ae5de77eSEmmanuel Vadot
57*ae5de77eSEmmanuel Vadot		l2_cache: l2-cache {
58*ae5de77eSEmmanuel Vadot			compatible = "cache";
59*ae5de77eSEmmanuel Vadot			cache-level = <2>;
60*ae5de77eSEmmanuel Vadot			cache-unified;
61*ae5de77eSEmmanuel Vadot			cache-size = <0x300000>; /* P-cluster */
628ccc0d23SEmmanuel Vadot		};
638ccc0d23SEmmanuel Vadot	};
648ccc0d23SEmmanuel Vadot
658ccc0d23SEmmanuel Vadot	fusion_opp: opp-table {
668ccc0d23SEmmanuel Vadot		compatible = "operating-points-v2";
678ccc0d23SEmmanuel Vadot
688ccc0d23SEmmanuel Vadot		/*
698ccc0d23SEmmanuel Vadot		 * Apple Fusion Architecture: Hardware big.LITTLE switcher
708ccc0d23SEmmanuel Vadot		 * that use p-state transitions to switch between cores.
718ccc0d23SEmmanuel Vadot		 * Only one type of core can be active at a given time.
728ccc0d23SEmmanuel Vadot		 *
738ccc0d23SEmmanuel Vadot		 * The E-core frequencies are adjusted so performance scales
748ccc0d23SEmmanuel Vadot		 * linearly with reported clock speed.
758ccc0d23SEmmanuel Vadot		 */
768ccc0d23SEmmanuel Vadot
778ccc0d23SEmmanuel Vadot		opp01 {
788ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <172000000>; /* 300 MHz, E-core */
798ccc0d23SEmmanuel Vadot			opp-level = <1>;
808ccc0d23SEmmanuel Vadot			clock-latency-ns = <11000>;
818ccc0d23SEmmanuel Vadot		};
828ccc0d23SEmmanuel Vadot		opp02 {
838ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <230000000>; /* 396 MHz, E-core */
848ccc0d23SEmmanuel Vadot			opp-level = <2>;
858ccc0d23SEmmanuel Vadot			clock-latency-ns = <140000>;
868ccc0d23SEmmanuel Vadot		};
878ccc0d23SEmmanuel Vadot		opp03 {
888ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <425000000>; /* 732 MHz, E-core */
898ccc0d23SEmmanuel Vadot			opp-level = <3>;
908ccc0d23SEmmanuel Vadot			clock-latency-ns = <110000>;
918ccc0d23SEmmanuel Vadot		};
928ccc0d23SEmmanuel Vadot		opp04 {
938ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <637000000>; /* 1092 MHz, E-core */
948ccc0d23SEmmanuel Vadot			opp-level = <4>;
958ccc0d23SEmmanuel Vadot			clock-latency-ns = <130000>;
968ccc0d23SEmmanuel Vadot		};
978ccc0d23SEmmanuel Vadot		opp05 {
988ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <756000000>;
998ccc0d23SEmmanuel Vadot			opp-level = <5>;
1008ccc0d23SEmmanuel Vadot			clock-latency-ns = <130000>;
1018ccc0d23SEmmanuel Vadot		};
1028ccc0d23SEmmanuel Vadot		opp06 {
1038ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1056000000>;
1048ccc0d23SEmmanuel Vadot			opp-level = <6>;
1058ccc0d23SEmmanuel Vadot			clock-latency-ns = <130000>;
1068ccc0d23SEmmanuel Vadot		};
1078ccc0d23SEmmanuel Vadot		opp07 {
1088ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1356000000>;
1098ccc0d23SEmmanuel Vadot			opp-level = <7>;
1108ccc0d23SEmmanuel Vadot			clock-latency-ns = <130000>;
1118ccc0d23SEmmanuel Vadot		};
1128ccc0d23SEmmanuel Vadot		opp08 {
1138ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1644000000>;
1148ccc0d23SEmmanuel Vadot			opp-level = <8>;
1158ccc0d23SEmmanuel Vadot			clock-latency-ns = <135000>;
1168ccc0d23SEmmanuel Vadot		};
1178ccc0d23SEmmanuel Vadot		opp09 {
1188ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1944000000>;
1198ccc0d23SEmmanuel Vadot			opp-level = <9>;
1208ccc0d23SEmmanuel Vadot			clock-latency-ns = <140000>;
1218ccc0d23SEmmanuel Vadot		};
1228ccc0d23SEmmanuel Vadot		opp10 {
1238ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <2244000000>;
1248ccc0d23SEmmanuel Vadot			opp-level = <10>;
1258ccc0d23SEmmanuel Vadot			clock-latency-ns = <150000>;
1268ccc0d23SEmmanuel Vadot		};
1278ccc0d23SEmmanuel Vadot#if 0
1288ccc0d23SEmmanuel Vadot		/* Not available until CPU deep sleep is implemented */
1298ccc0d23SEmmanuel Vadot		opp11 {
1308ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <2340000000>;
1318ccc0d23SEmmanuel Vadot			opp-level = <11>;
1328ccc0d23SEmmanuel Vadot			clock-latency-ns = <150000>;
1338ccc0d23SEmmanuel Vadot			turbo-mode;
1348ccc0d23SEmmanuel Vadot		};
1358ccc0d23SEmmanuel Vadot#endif
1368ccc0d23SEmmanuel Vadot	};
1378ccc0d23SEmmanuel Vadot
1388ccc0d23SEmmanuel Vadot	soc {
1398ccc0d23SEmmanuel Vadot		compatible = "simple-bus";
1408ccc0d23SEmmanuel Vadot		#address-cells = <2>;
1418ccc0d23SEmmanuel Vadot		#size-cells = <2>;
1428ccc0d23SEmmanuel Vadot		nonposted-mmio;
1438ccc0d23SEmmanuel Vadot		ranges;
1448ccc0d23SEmmanuel Vadot
1458ccc0d23SEmmanuel Vadot		cpufreq: performance-controller@202f20000 {
1468ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-cluster-cpufreq", "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
1478ccc0d23SEmmanuel Vadot			reg = <0x2 0x02f20000 0 0x1000>;
1488ccc0d23SEmmanuel Vadot			#performance-domain-cells = <0>;
1498ccc0d23SEmmanuel Vadot		};
1508ccc0d23SEmmanuel Vadot
1518ccc0d23SEmmanuel Vadot		serial0: serial@20a600000 {
1528ccc0d23SEmmanuel Vadot			compatible = "apple,s5l-uart";
1538ccc0d23SEmmanuel Vadot			reg = <0x2 0x0a600000 0x0 0x4000>;
1548ccc0d23SEmmanuel Vadot			reg-io-width = <4>;
1558ccc0d23SEmmanuel Vadot			interrupt-parent = <&aic>;
1568ccc0d23SEmmanuel Vadot			interrupts = <AIC_IRQ 271 IRQ_TYPE_LEVEL_HIGH>;
1578ccc0d23SEmmanuel Vadot			/* Use the bootloader-enabled clocks for now. */
1588ccc0d23SEmmanuel Vadot			clocks = <&clkref>, <&clkref>;
1598ccc0d23SEmmanuel Vadot			clock-names = "uart", "clk_uart_baud0";
1608ccc0d23SEmmanuel Vadot			power-domains = <&ps_uart0>;
1618ccc0d23SEmmanuel Vadot			status = "disabled";
1628ccc0d23SEmmanuel Vadot		};
1638ccc0d23SEmmanuel Vadot
1648ccc0d23SEmmanuel Vadot		pmgr: power-management@20e000000 {
1658ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-pmgr", "apple,pmgr", "syscon", "simple-mfd";
1668ccc0d23SEmmanuel Vadot			#address-cells = <1>;
1678ccc0d23SEmmanuel Vadot			#size-cells = <1>;
1688ccc0d23SEmmanuel Vadot
1698ccc0d23SEmmanuel Vadot			reg = <0x2 0xe000000 0 0x8c000>;
1708ccc0d23SEmmanuel Vadot		};
1718ccc0d23SEmmanuel Vadot
1728ccc0d23SEmmanuel Vadot		aic: interrupt-controller@20e100000 {
1738ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-aic", "apple,aic";
1748ccc0d23SEmmanuel Vadot			reg = <0x2 0x0e100000 0x0 0x100000>;
1758ccc0d23SEmmanuel Vadot			#interrupt-cells = <3>;
1768ccc0d23SEmmanuel Vadot			interrupt-controller;
1778ccc0d23SEmmanuel Vadot			power-domains = <&ps_aic>;
1788ccc0d23SEmmanuel Vadot		};
1798ccc0d23SEmmanuel Vadot
1808ccc0d23SEmmanuel Vadot		pinctrl_ap: pinctrl@20f100000 {
1818ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-pinctrl", "apple,pinctrl";
1828ccc0d23SEmmanuel Vadot			reg = <0x2 0x0f100000 0x0 0x100000>;
1838ccc0d23SEmmanuel Vadot			power-domains = <&ps_gpio>;
1848ccc0d23SEmmanuel Vadot
1858ccc0d23SEmmanuel Vadot			gpio-controller;
1868ccc0d23SEmmanuel Vadot			#gpio-cells = <2>;
1878ccc0d23SEmmanuel Vadot			gpio-ranges = <&pinctrl_ap 0 0 221>;
1888ccc0d23SEmmanuel Vadot			apple,npins = <221>;
1898ccc0d23SEmmanuel Vadot
1908ccc0d23SEmmanuel Vadot			interrupt-controller;
1918ccc0d23SEmmanuel Vadot			#interrupt-cells = <2>;
1928ccc0d23SEmmanuel Vadot			interrupt-parent = <&aic>;
1938ccc0d23SEmmanuel Vadot			interrupts = <AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
1948ccc0d23SEmmanuel Vadot				     <AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
1958ccc0d23SEmmanuel Vadot				     <AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
1968ccc0d23SEmmanuel Vadot				     <AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>,
1978ccc0d23SEmmanuel Vadot				     <AIC_IRQ 49 IRQ_TYPE_LEVEL_HIGH>,
1988ccc0d23SEmmanuel Vadot				     <AIC_IRQ 50 IRQ_TYPE_LEVEL_HIGH>,
1998ccc0d23SEmmanuel Vadot				     <AIC_IRQ 51 IRQ_TYPE_LEVEL_HIGH>;
2008ccc0d23SEmmanuel Vadot		};
2018ccc0d23SEmmanuel Vadot
2028ccc0d23SEmmanuel Vadot		pinctrl_aop: pinctrl@2100f0000 {
2038ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-pinctrl", "apple,pinctrl";
2048ccc0d23SEmmanuel Vadot			reg = <0x2 0x0100f0000 0x0 0x10000>;
2058ccc0d23SEmmanuel Vadot
2068ccc0d23SEmmanuel Vadot			gpio-controller;
2078ccc0d23SEmmanuel Vadot			#gpio-cells = <2>;
2088ccc0d23SEmmanuel Vadot			gpio-ranges = <&pinctrl_aop 0 0 41>;
2098ccc0d23SEmmanuel Vadot			apple,npins = <41>;
2108ccc0d23SEmmanuel Vadot
2118ccc0d23SEmmanuel Vadot			interrupt-controller;
2128ccc0d23SEmmanuel Vadot			#interrupt-cells = <2>;
2138ccc0d23SEmmanuel Vadot			interrupt-parent = <&aic>;
2148ccc0d23SEmmanuel Vadot			interrupts = <AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>,
2158ccc0d23SEmmanuel Vadot				     <AIC_IRQ 132 IRQ_TYPE_LEVEL_HIGH>,
2168ccc0d23SEmmanuel Vadot				     <AIC_IRQ 133 IRQ_TYPE_LEVEL_HIGH>,
2178ccc0d23SEmmanuel Vadot				     <AIC_IRQ 134 IRQ_TYPE_LEVEL_HIGH>,
2188ccc0d23SEmmanuel Vadot				     <AIC_IRQ 135 IRQ_TYPE_LEVEL_HIGH>,
2198ccc0d23SEmmanuel Vadot				     <AIC_IRQ 136 IRQ_TYPE_LEVEL_HIGH>,
2208ccc0d23SEmmanuel Vadot				     <AIC_IRQ 137 IRQ_TYPE_LEVEL_HIGH>;
2218ccc0d23SEmmanuel Vadot		};
2228ccc0d23SEmmanuel Vadot
2238ccc0d23SEmmanuel Vadot		pinctrl_nub: pinctrl@2111f0000 {
2248ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-pinctrl", "apple,pinctrl";
2258ccc0d23SEmmanuel Vadot			reg = <0x2 0x111f0000 0x0 0x1000>;
2268ccc0d23SEmmanuel Vadot
2278ccc0d23SEmmanuel Vadot			gpio-controller;
2288ccc0d23SEmmanuel Vadot			#gpio-cells = <2>;
2298ccc0d23SEmmanuel Vadot			gpio-ranges = <&pinctrl_nub 0 0 19>;
2308ccc0d23SEmmanuel Vadot			apple,npins = <19>;
2318ccc0d23SEmmanuel Vadot
2328ccc0d23SEmmanuel Vadot			interrupt-controller;
2338ccc0d23SEmmanuel Vadot			#interrupt-cells = <2>;
2348ccc0d23SEmmanuel Vadot			interrupt-parent = <&aic>;
2358ccc0d23SEmmanuel Vadot			interrupts = <AIC_IRQ 164 IRQ_TYPE_LEVEL_HIGH>,
2368ccc0d23SEmmanuel Vadot				     <AIC_IRQ 165 IRQ_TYPE_LEVEL_HIGH>,
2378ccc0d23SEmmanuel Vadot				     <AIC_IRQ 166 IRQ_TYPE_LEVEL_HIGH>;
2388ccc0d23SEmmanuel Vadot		};
2398ccc0d23SEmmanuel Vadot
2408ccc0d23SEmmanuel Vadot		pmgr_mini: power-management@211200000 {
2418ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-pmgr", "apple,pmgr", "syscon", "simple-mfd";
2428ccc0d23SEmmanuel Vadot			#address-cells = <1>;
2438ccc0d23SEmmanuel Vadot			#size-cells = <1>;
2448ccc0d23SEmmanuel Vadot
2458ccc0d23SEmmanuel Vadot			reg = <0x2 0x11200000 0 0x84000>;
2468ccc0d23SEmmanuel Vadot		};
2478ccc0d23SEmmanuel Vadot
2488ccc0d23SEmmanuel Vadot		wdt: watchdog@2112b0000 {
2498ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-wdt", "apple,wdt";
2508ccc0d23SEmmanuel Vadot			reg = <0x2 0x112b0000 0x0 0x4000>;
2518ccc0d23SEmmanuel Vadot			clocks = <&clkref>;
2528ccc0d23SEmmanuel Vadot			interrupt-parent = <&aic>;
2538ccc0d23SEmmanuel Vadot			interrupts = <AIC_IRQ 168 IRQ_TYPE_LEVEL_HIGH>;
2548ccc0d23SEmmanuel Vadot		};
2558ccc0d23SEmmanuel Vadot
2568ccc0d23SEmmanuel Vadot		pinctrl_smc: pinctrl@212024000 {
2578ccc0d23SEmmanuel Vadot			compatible = "apple,t8010-pinctrl", "apple,pinctrl";
2588ccc0d23SEmmanuel Vadot			reg = <0x2 0x12024000 0x0 0x1000>;
2598ccc0d23SEmmanuel Vadot			power-domains = <&ps_smc_cpu>;
2608ccc0d23SEmmanuel Vadot
2618ccc0d23SEmmanuel Vadot			gpio-controller;
2628ccc0d23SEmmanuel Vadot			#gpio-cells = <2>;
2638ccc0d23SEmmanuel Vadot			gpio-ranges = <&pinctrl_smc 0 0 81>;
2648ccc0d23SEmmanuel Vadot			apple,npins = <81>;
2658ccc0d23SEmmanuel Vadot
2668ccc0d23SEmmanuel Vadot			interrupt-controller;
2678ccc0d23SEmmanuel Vadot			#interrupt-cells = <2>;
2688ccc0d23SEmmanuel Vadot			interrupt-parent = <&aic>;
2698ccc0d23SEmmanuel Vadot			interrupts = <AIC_IRQ 195 IRQ_TYPE_LEVEL_HIGH>,
2708ccc0d23SEmmanuel Vadot				     <AIC_IRQ 196 IRQ_TYPE_LEVEL_HIGH>,
2718ccc0d23SEmmanuel Vadot				     <AIC_IRQ 197 IRQ_TYPE_LEVEL_HIGH>,
2728ccc0d23SEmmanuel Vadot				     <AIC_IRQ 198 IRQ_TYPE_LEVEL_HIGH>,
2738ccc0d23SEmmanuel Vadot				     <AIC_IRQ 199 IRQ_TYPE_LEVEL_HIGH>,
2748ccc0d23SEmmanuel Vadot				     <AIC_IRQ 200 IRQ_TYPE_LEVEL_HIGH>,
2758ccc0d23SEmmanuel Vadot				     <AIC_IRQ 201 IRQ_TYPE_LEVEL_HIGH>;
2768ccc0d23SEmmanuel Vadot			/*
2778ccc0d23SEmmanuel Vadot			 * SMC is not yet supported and accessing this pinctrl while SMC is
2788ccc0d23SEmmanuel Vadot			 * suspended results in a hang.
2798ccc0d23SEmmanuel Vadot			 */
2808ccc0d23SEmmanuel Vadot			status = "disabled";
2818ccc0d23SEmmanuel Vadot		};
2828ccc0d23SEmmanuel Vadot	};
2838ccc0d23SEmmanuel Vadot
2848ccc0d23SEmmanuel Vadot	timer {
2858ccc0d23SEmmanuel Vadot		compatible = "arm,armv8-timer";
2868ccc0d23SEmmanuel Vadot		interrupt-parent = <&aic>;
2878ccc0d23SEmmanuel Vadot		interrupt-names = "phys", "virt";
2888ccc0d23SEmmanuel Vadot		/* Note that T2 doesn't actually have a hypervisor (EL2 is not implemented). */
2898ccc0d23SEmmanuel Vadot		interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
2908ccc0d23SEmmanuel Vadot			     <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
2918ccc0d23SEmmanuel Vadot	};
2928ccc0d23SEmmanuel Vadot};
2938ccc0d23SEmmanuel Vadot
2948ccc0d23SEmmanuel Vadot#include "t8012-pmgr.dtsi"
295