xref: /freebsd/sys/contrib/device-tree/src/arm64/apple/t7001.dtsi (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
15f62a964SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT
25f62a964SEmmanuel Vadot/*
35f62a964SEmmanuel Vadot * Apple T7001 "A8X" SoC
45f62a964SEmmanuel Vadot *
55f62a964SEmmanuel Vadot * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
65f62a964SEmmanuel Vadot * Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts.
75f62a964SEmmanuel Vadot */
85f62a964SEmmanuel Vadot
95f62a964SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
105f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/apple-aic.h>
115f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
125f62a964SEmmanuel Vadot#include <dt-bindings/pinctrl/apple.h>
135f62a964SEmmanuel Vadot
145f62a964SEmmanuel Vadot/ {
155f62a964SEmmanuel Vadot	interrupt-parent = <&aic>;
165f62a964SEmmanuel Vadot	#address-cells = <2>;
175f62a964SEmmanuel Vadot	#size-cells = <2>;
185f62a964SEmmanuel Vadot
195f62a964SEmmanuel Vadot	aliases {
205f62a964SEmmanuel Vadot		serial0 = &serial0;
215f62a964SEmmanuel Vadot	};
225f62a964SEmmanuel Vadot
235f62a964SEmmanuel Vadot	clkref: clock-ref {
245f62a964SEmmanuel Vadot		compatible = "fixed-clock";
255f62a964SEmmanuel Vadot		#clock-cells = <0>;
265f62a964SEmmanuel Vadot		clock-frequency = <24000000>;
275f62a964SEmmanuel Vadot		clock-output-names = "clkref";
285f62a964SEmmanuel Vadot	};
295f62a964SEmmanuel Vadot
305f62a964SEmmanuel Vadot	cpus {
315f62a964SEmmanuel Vadot		#address-cells = <2>;
325f62a964SEmmanuel Vadot		#size-cells = <0>;
335f62a964SEmmanuel Vadot
345f62a964SEmmanuel Vadot		cpu0: cpu@0 {
355f62a964SEmmanuel Vadot			compatible = "apple,typhoon";
365f62a964SEmmanuel Vadot			reg = <0x0 0x0>;
375f62a964SEmmanuel Vadot			cpu-release-addr = <0 0>; /* To be filled in by loader */
388ccc0d23SEmmanuel Vadot			performance-domains = <&cpufreq>;
398ccc0d23SEmmanuel Vadot			operating-points-v2 = <&typhoon_opp>;
405f62a964SEmmanuel Vadot			enable-method = "spin-table";
415f62a964SEmmanuel Vadot			device_type = "cpu";
42*ae5de77eSEmmanuel Vadot			next-level-cache = <&l2_cache>;
43*ae5de77eSEmmanuel Vadot			i-cache-size = <0x10000>;
44*ae5de77eSEmmanuel Vadot			d-cache-size = <0x10000>;
455f62a964SEmmanuel Vadot		};
465f62a964SEmmanuel Vadot
475f62a964SEmmanuel Vadot		cpu1: cpu@1 {
485f62a964SEmmanuel Vadot			compatible = "apple,typhoon";
495f62a964SEmmanuel Vadot			reg = <0x0 0x1>;
505f62a964SEmmanuel Vadot			cpu-release-addr = <0 0>; /* To be filled in by loader */
518ccc0d23SEmmanuel Vadot			performance-domains = <&cpufreq>;
528ccc0d23SEmmanuel Vadot			operating-points-v2 = <&typhoon_opp>;
535f62a964SEmmanuel Vadot			enable-method = "spin-table";
545f62a964SEmmanuel Vadot			device_type = "cpu";
55*ae5de77eSEmmanuel Vadot			next-level-cache = <&l2_cache>;
56*ae5de77eSEmmanuel Vadot			i-cache-size = <0x10000>;
57*ae5de77eSEmmanuel Vadot			d-cache-size = <0x10000>;
585f62a964SEmmanuel Vadot		};
595f62a964SEmmanuel Vadot
605f62a964SEmmanuel Vadot		cpu2: cpu@2 {
615f62a964SEmmanuel Vadot			compatible = "apple,typhoon";
625f62a964SEmmanuel Vadot			reg = <0x0 0x2>;
635f62a964SEmmanuel Vadot			cpu-release-addr = <0 0>; /* To be filled by loader */
648ccc0d23SEmmanuel Vadot			performance-domains = <&cpufreq>;
658ccc0d23SEmmanuel Vadot			operating-points-v2 = <&typhoon_opp>;
665f62a964SEmmanuel Vadot			enable-method = "spin-table";
675f62a964SEmmanuel Vadot			device_type = "cpu";
68*ae5de77eSEmmanuel Vadot			next-level-cache = <&l2_cache>;
69*ae5de77eSEmmanuel Vadot			i-cache-size = <0x10000>;
70*ae5de77eSEmmanuel Vadot			d-cache-size = <0x10000>;
71*ae5de77eSEmmanuel Vadot		};
72*ae5de77eSEmmanuel Vadot
73*ae5de77eSEmmanuel Vadot		l2_cache: l2-cache {
74*ae5de77eSEmmanuel Vadot			compatible = "cache";
75*ae5de77eSEmmanuel Vadot			cache-level = <2>;
76*ae5de77eSEmmanuel Vadot			cache-unified;
77*ae5de77eSEmmanuel Vadot			cache-size = <0x200000>;
785f62a964SEmmanuel Vadot		};
795f62a964SEmmanuel Vadot	};
805f62a964SEmmanuel Vadot
818ccc0d23SEmmanuel Vadot	typhoon_opp: opp-table {
828ccc0d23SEmmanuel Vadot		compatible = "operating-points-v2";
838ccc0d23SEmmanuel Vadot
848ccc0d23SEmmanuel Vadot		opp01 {
858ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <300000000>;
868ccc0d23SEmmanuel Vadot			opp-level = <1>;
878ccc0d23SEmmanuel Vadot			clock-latency-ns = <300>;
888ccc0d23SEmmanuel Vadot		};
898ccc0d23SEmmanuel Vadot		opp02 {
908ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <396000000>;
918ccc0d23SEmmanuel Vadot			opp-level = <2>;
928ccc0d23SEmmanuel Vadot			clock-latency-ns = <49000>;
938ccc0d23SEmmanuel Vadot		};
948ccc0d23SEmmanuel Vadot		opp03 {
958ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <600000000>;
968ccc0d23SEmmanuel Vadot			opp-level = <3>;
978ccc0d23SEmmanuel Vadot			clock-latency-ns = <31000>;
988ccc0d23SEmmanuel Vadot		};
998ccc0d23SEmmanuel Vadot		opp04 {
1008ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <840000000>;
1018ccc0d23SEmmanuel Vadot			opp-level = <4>;
1028ccc0d23SEmmanuel Vadot			clock-latency-ns = <32000>;
1038ccc0d23SEmmanuel Vadot		};
1048ccc0d23SEmmanuel Vadot		opp05 {
1058ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1128000000>;
1068ccc0d23SEmmanuel Vadot			opp-level = <5>;
1078ccc0d23SEmmanuel Vadot			clock-latency-ns = <32000>;
1088ccc0d23SEmmanuel Vadot		};
1098ccc0d23SEmmanuel Vadot		opp06 {
1108ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1392000000>;
1118ccc0d23SEmmanuel Vadot			opp-level = <6>;
1128ccc0d23SEmmanuel Vadot			clock-latency-ns = <37000>;
1138ccc0d23SEmmanuel Vadot		};
1148ccc0d23SEmmanuel Vadot		opp07 {
1158ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1512000000>;
1168ccc0d23SEmmanuel Vadot			opp-level = <7>;
1178ccc0d23SEmmanuel Vadot			clock-latency-ns = <41000>;
1188ccc0d23SEmmanuel Vadot		};
1198ccc0d23SEmmanuel Vadot	};
1208ccc0d23SEmmanuel Vadot
1215f62a964SEmmanuel Vadot	soc {
1225f62a964SEmmanuel Vadot		compatible = "simple-bus";
1235f62a964SEmmanuel Vadot		#address-cells = <2>;
1245f62a964SEmmanuel Vadot		#size-cells = <2>;
1255f62a964SEmmanuel Vadot		nonposted-mmio;
1265f62a964SEmmanuel Vadot		ranges;
1275f62a964SEmmanuel Vadot
1288ccc0d23SEmmanuel Vadot		cpufreq: performance-controller@202220000 {
1298ccc0d23SEmmanuel Vadot			compatible = "apple,t7000-cluster-cpufreq", "apple,s5l8960x-cluster-cpufreq";
1308ccc0d23SEmmanuel Vadot			reg = <0x2 0x02220000 0 0x1000>;
1318ccc0d23SEmmanuel Vadot			#performance-domain-cells = <0>;
1328ccc0d23SEmmanuel Vadot		};
1338ccc0d23SEmmanuel Vadot
1345f62a964SEmmanuel Vadot		serial0: serial@20a0c0000 {
1355f62a964SEmmanuel Vadot			compatible = "apple,s5l-uart";
1365f62a964SEmmanuel Vadot			reg = <0x2 0x0a0c0000 0x0 0x4000>;
1375f62a964SEmmanuel Vadot			reg-io-width = <4>;
1385f62a964SEmmanuel Vadot			interrupt-parent = <&aic>;
1395f62a964SEmmanuel Vadot			interrupts = <AIC_IRQ 158 IRQ_TYPE_LEVEL_HIGH>;
1405f62a964SEmmanuel Vadot			/* Use the bootloader-enabled clocks for now. */
1415f62a964SEmmanuel Vadot			clocks = <&clkref>, <&clkref>;
1425f62a964SEmmanuel Vadot			clock-names = "uart", "clk_uart_baud0";
1438ccc0d23SEmmanuel Vadot			power-domains = <&ps_uart0>;
1445f62a964SEmmanuel Vadot			status = "disabled";
1455f62a964SEmmanuel Vadot		};
1465f62a964SEmmanuel Vadot
1478ccc0d23SEmmanuel Vadot		pmgr: power-management@20e000000 {
1488ccc0d23SEmmanuel Vadot			compatible = "apple,t7000-pmgr", "apple,pmgr", "syscon", "simple-mfd";
1498ccc0d23SEmmanuel Vadot			#address-cells = <1>;
1508ccc0d23SEmmanuel Vadot			#size-cells = <1>;
1518ccc0d23SEmmanuel Vadot
1528ccc0d23SEmmanuel Vadot			reg = <0x2 0xe000000 0 0x24000>;
1538ccc0d23SEmmanuel Vadot		};
1548ccc0d23SEmmanuel Vadot
1555f62a964SEmmanuel Vadot		wdt: watchdog@20e027000 {
1565f62a964SEmmanuel Vadot			compatible = "apple,t7000-wdt", "apple,wdt";
1575f62a964SEmmanuel Vadot			reg = <0x2 0x0e027000 0x0 0x1000>;
1585f62a964SEmmanuel Vadot			clocks = <&clkref>;
1595f62a964SEmmanuel Vadot			interrupt-parent = <&aic>;
1605f62a964SEmmanuel Vadot			interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
1615f62a964SEmmanuel Vadot		};
1625f62a964SEmmanuel Vadot
1635f62a964SEmmanuel Vadot		aic: interrupt-controller@20e100000 {
1645f62a964SEmmanuel Vadot			compatible = "apple,t7000-aic", "apple,aic";
1655f62a964SEmmanuel Vadot			reg = <0x2 0x0e100000 0x0 0x100000>;
1665f62a964SEmmanuel Vadot			#interrupt-cells = <3>;
1675f62a964SEmmanuel Vadot			interrupt-controller;
1688ccc0d23SEmmanuel Vadot			power-domains = <&ps_aic>;
1695f62a964SEmmanuel Vadot		};
1705f62a964SEmmanuel Vadot
1715f62a964SEmmanuel Vadot		pinctrl: pinctrl@20e300000 {
1725f62a964SEmmanuel Vadot			compatible = "apple,t7000-pinctrl", "apple,pinctrl";
1735f62a964SEmmanuel Vadot			reg = <0x2 0x0e300000 0x0 0x100000>;
1748ccc0d23SEmmanuel Vadot			power-domains = <&ps_gpio>;
1755f62a964SEmmanuel Vadot
1765f62a964SEmmanuel Vadot			gpio-controller;
1775f62a964SEmmanuel Vadot			#gpio-cells = <2>;
1785f62a964SEmmanuel Vadot			gpio-ranges = <&pinctrl 0 0 184>;
1795f62a964SEmmanuel Vadot			apple,npins = <184>;
1805f62a964SEmmanuel Vadot
1815f62a964SEmmanuel Vadot			interrupt-controller;
1825f62a964SEmmanuel Vadot			#interrupt-cells = <2>;
1835f62a964SEmmanuel Vadot			interrupt-parent = <&aic>;
1845f62a964SEmmanuel Vadot			interrupts = <AIC_IRQ 62 IRQ_TYPE_LEVEL_HIGH>,
1855f62a964SEmmanuel Vadot				     <AIC_IRQ 63 IRQ_TYPE_LEVEL_HIGH>,
1865f62a964SEmmanuel Vadot				     <AIC_IRQ 64 IRQ_TYPE_LEVEL_HIGH>,
1875f62a964SEmmanuel Vadot				     <AIC_IRQ 65 IRQ_TYPE_LEVEL_HIGH>,
1885f62a964SEmmanuel Vadot				     <AIC_IRQ 66 IRQ_TYPE_LEVEL_HIGH>,
1895f62a964SEmmanuel Vadot				     <AIC_IRQ 67 IRQ_TYPE_LEVEL_HIGH>,
1905f62a964SEmmanuel Vadot				     <AIC_IRQ 68 IRQ_TYPE_LEVEL_HIGH>;
1915f62a964SEmmanuel Vadot		};
1925f62a964SEmmanuel Vadot	};
1935f62a964SEmmanuel Vadot
1945f62a964SEmmanuel Vadot	timer {
1955f62a964SEmmanuel Vadot		compatible = "arm,armv8-timer";
1965f62a964SEmmanuel Vadot		interrupt-parent = <&aic>;
1975f62a964SEmmanuel Vadot		interrupt-names = "phys", "virt";
1985f62a964SEmmanuel Vadot		/* Note that A8X doesn't actually have a hypervisor (EL2 is not implemented). */
1995f62a964SEmmanuel Vadot		interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
2005f62a964SEmmanuel Vadot			     <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
2015f62a964SEmmanuel Vadot	};
2025f62a964SEmmanuel Vadot};
2038ccc0d23SEmmanuel Vadot
2048ccc0d23SEmmanuel Vadot#include "t7001-pmgr.dtsi"
205