xref: /freebsd/sys/contrib/device-tree/src/arm64/apple/s8001.dtsi (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
15f62a964SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ OR MIT
25f62a964SEmmanuel Vadot/*
35f62a964SEmmanuel Vadot * Apple S8001 "A9X" SoC
45f62a964SEmmanuel Vadot *
55f62a964SEmmanuel Vadot * Other names: H8G, "Elba"
65f62a964SEmmanuel Vadot *
75f62a964SEmmanuel Vadot * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
85f62a964SEmmanuel Vadot */
95f62a964SEmmanuel Vadot
105f62a964SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
115f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/apple-aic.h>
125f62a964SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
135f62a964SEmmanuel Vadot#include <dt-bindings/pinctrl/apple.h>
145f62a964SEmmanuel Vadot
155f62a964SEmmanuel Vadot/ {
165f62a964SEmmanuel Vadot	interrupt-parent = <&aic>;
175f62a964SEmmanuel Vadot	#address-cells = <2>;
185f62a964SEmmanuel Vadot	#size-cells = <2>;
195f62a964SEmmanuel Vadot
205f62a964SEmmanuel Vadot	clkref: clock-ref {
215f62a964SEmmanuel Vadot		compatible = "fixed-clock";
225f62a964SEmmanuel Vadot		#clock-cells = <0>;
235f62a964SEmmanuel Vadot		clock-frequency = <24000000>;
245f62a964SEmmanuel Vadot		clock-output-names = "clkref";
255f62a964SEmmanuel Vadot	};
265f62a964SEmmanuel Vadot
275f62a964SEmmanuel Vadot	cpus {
285f62a964SEmmanuel Vadot		#address-cells = <2>;
295f62a964SEmmanuel Vadot		#size-cells = <0>;
305f62a964SEmmanuel Vadot
315f62a964SEmmanuel Vadot		cpu0: cpu@0 {
325f62a964SEmmanuel Vadot			compatible = "apple,twister";
335f62a964SEmmanuel Vadot			reg = <0x0 0x0>;
345f62a964SEmmanuel Vadot			cpu-release-addr = <0 0>; /* To be filled in by loader */
358ccc0d23SEmmanuel Vadot			operating-points-v2 = <&twister_opp>;
368ccc0d23SEmmanuel Vadot			performance-domains = <&cpufreq>;
375f62a964SEmmanuel Vadot			enable-method = "spin-table";
385f62a964SEmmanuel Vadot			device_type = "cpu";
39*ae5de77eSEmmanuel Vadot			next-level-cache = <&l2_cache>;
40*ae5de77eSEmmanuel Vadot			i-cache-size = <0x10000>;
41*ae5de77eSEmmanuel Vadot			d-cache-size = <0x10000>;
425f62a964SEmmanuel Vadot		};
435f62a964SEmmanuel Vadot
445f62a964SEmmanuel Vadot		cpu1: cpu@1 {
455f62a964SEmmanuel Vadot			compatible = "apple,twister";
465f62a964SEmmanuel Vadot			reg = <0x0 0x1>;
475f62a964SEmmanuel Vadot			cpu-release-addr = <0 0>; /* To be filled in by loader */
488ccc0d23SEmmanuel Vadot			operating-points-v2 = <&twister_opp>;
498ccc0d23SEmmanuel Vadot			performance-domains = <&cpufreq>;
505f62a964SEmmanuel Vadot			enable-method = "spin-table";
515f62a964SEmmanuel Vadot			device_type = "cpu";
52*ae5de77eSEmmanuel Vadot			next-level-cache = <&l2_cache>;
53*ae5de77eSEmmanuel Vadot			i-cache-size = <0x10000>;
54*ae5de77eSEmmanuel Vadot			d-cache-size = <0x10000>;
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>;
625f62a964SEmmanuel Vadot		};
635f62a964SEmmanuel Vadot	};
645f62a964SEmmanuel Vadot
658ccc0d23SEmmanuel Vadot	twister_opp: opp-table {
668ccc0d23SEmmanuel Vadot		compatible = "operating-points-v2";
678ccc0d23SEmmanuel Vadot
688ccc0d23SEmmanuel Vadot		opp01 {
698ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <300000000>;
708ccc0d23SEmmanuel Vadot			opp-level = <1>;
718ccc0d23SEmmanuel Vadot			clock-latency-ns = <800>;
728ccc0d23SEmmanuel Vadot		};
738ccc0d23SEmmanuel Vadot		opp02 {
748ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <396000000>;
758ccc0d23SEmmanuel Vadot			opp-level = <2>;
768ccc0d23SEmmanuel Vadot			clock-latency-ns = <53000>;
778ccc0d23SEmmanuel Vadot		};
788ccc0d23SEmmanuel Vadot		opp03 {
798ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <792000000>;
808ccc0d23SEmmanuel Vadot			opp-level = <3>;
818ccc0d23SEmmanuel Vadot			clock-latency-ns = <18000>;
828ccc0d23SEmmanuel Vadot		};
838ccc0d23SEmmanuel Vadot		opp04 {
848ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1080000000>;
858ccc0d23SEmmanuel Vadot			opp-level = <4>;
868ccc0d23SEmmanuel Vadot			clock-latency-ns = <21000>;
878ccc0d23SEmmanuel Vadot		};
888ccc0d23SEmmanuel Vadot		opp05 {
898ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1440000000>;
908ccc0d23SEmmanuel Vadot			opp-level = <5>;
918ccc0d23SEmmanuel Vadot			clock-latency-ns = <25000>;
928ccc0d23SEmmanuel Vadot		};
938ccc0d23SEmmanuel Vadot		opp06 {
948ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <1800000000>;
958ccc0d23SEmmanuel Vadot			opp-level = <6>;
968ccc0d23SEmmanuel Vadot			clock-latency-ns = <33000>;
978ccc0d23SEmmanuel Vadot		};
988ccc0d23SEmmanuel Vadot		opp07 {
998ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <2160000000>;
1008ccc0d23SEmmanuel Vadot			opp-level = <7>;
1018ccc0d23SEmmanuel Vadot			clock-latency-ns = <45000>;
1028ccc0d23SEmmanuel Vadot		};
1038ccc0d23SEmmanuel Vadot#if 0
1048ccc0d23SEmmanuel Vadot		/* Not available until CPU deep sleep is implemented */
1058ccc0d23SEmmanuel Vadot		opp08 {
1068ccc0d23SEmmanuel Vadot			opp-hz = /bits/ 64 <2160000000>;
1078ccc0d23SEmmanuel Vadot			opp-level = <8>;
1088ccc0d23SEmmanuel Vadot			clock-latency-ns = <45000>;
1098ccc0d23SEmmanuel Vadot			turbo-mode;
1108ccc0d23SEmmanuel Vadot		};
1118ccc0d23SEmmanuel Vadot#endif
1128ccc0d23SEmmanuel Vadot	};
1138ccc0d23SEmmanuel Vadot
1145f62a964SEmmanuel Vadot	soc {
1155f62a964SEmmanuel Vadot		compatible = "simple-bus";
1165f62a964SEmmanuel Vadot		#address-cells = <2>;
1175f62a964SEmmanuel Vadot		#size-cells = <2>;
1185f62a964SEmmanuel Vadot		nonposted-mmio;
1195f62a964SEmmanuel Vadot		ranges;
1205f62a964SEmmanuel Vadot
1218ccc0d23SEmmanuel Vadot		cpufreq: performance-controller@202220000 {
1228ccc0d23SEmmanuel Vadot			compatible = "apple,s8000-cluster-cpufreq", "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
1238ccc0d23SEmmanuel Vadot			reg = <0x2 0x02220000 0 0x1000>;
1248ccc0d23SEmmanuel Vadot			#performance-domain-cells = <0>;
1258ccc0d23SEmmanuel Vadot		};
1268ccc0d23SEmmanuel Vadot
1275f62a964SEmmanuel Vadot		serial0: serial@20a0c0000 {
1285f62a964SEmmanuel Vadot			compatible = "apple,s5l-uart";
1295f62a964SEmmanuel Vadot			reg = <0x2 0x0a0c0000 0x0 0x4000>;
1305f62a964SEmmanuel Vadot			reg-io-width = <4>;
1315f62a964SEmmanuel Vadot			interrupt-parent = <&aic>;
1325f62a964SEmmanuel Vadot			interrupts = <AIC_IRQ 218 IRQ_TYPE_LEVEL_HIGH>;
1335f62a964SEmmanuel Vadot			/* Use the bootloader-enabled clocks for now. */
1345f62a964SEmmanuel Vadot			clocks = <&clkref>, <&clkref>;
1355f62a964SEmmanuel Vadot			clock-names = "uart", "clk_uart_baud0";
1368ccc0d23SEmmanuel Vadot			power-domains = <&ps_uart0>;
1375f62a964SEmmanuel Vadot			status = "disabled";
1385f62a964SEmmanuel Vadot		};
1395f62a964SEmmanuel Vadot
1408ccc0d23SEmmanuel Vadot		pmgr: power-management@20e000000 {
1418ccc0d23SEmmanuel Vadot			compatible = "apple,s8000-pmgr", "apple,pmgr", "syscon", "simple-mfd";
1428ccc0d23SEmmanuel Vadot			#address-cells = <1>;
1438ccc0d23SEmmanuel Vadot			#size-cells = <1>;
1448ccc0d23SEmmanuel Vadot
1458ccc0d23SEmmanuel Vadot			reg = <0x2 0xe000000 0 0x8c000>;
1468ccc0d23SEmmanuel Vadot		};
1478ccc0d23SEmmanuel Vadot
1485f62a964SEmmanuel Vadot		aic: interrupt-controller@20e100000 {
1495f62a964SEmmanuel Vadot			compatible = "apple,s8000-aic", "apple,aic";
1505f62a964SEmmanuel Vadot			reg = <0x2 0x0e100000 0x0 0x100000>;
1515f62a964SEmmanuel Vadot			#interrupt-cells = <3>;
1525f62a964SEmmanuel Vadot			interrupt-controller;
1538ccc0d23SEmmanuel Vadot			power-domains = <&ps_aic>;
1545f62a964SEmmanuel Vadot		};
1555f62a964SEmmanuel Vadot
1565f62a964SEmmanuel Vadot		pinctrl_ap: pinctrl@20f100000 {
1575f62a964SEmmanuel Vadot			compatible = "apple,s8000-pinctrl", "apple,pinctrl";
1585f62a964SEmmanuel Vadot			reg = <0x2 0x0f100000 0x0 0x100000>;
1598ccc0d23SEmmanuel Vadot			power-domains = <&ps_gpio>;
1605f62a964SEmmanuel Vadot
1615f62a964SEmmanuel Vadot			gpio-controller;
1625f62a964SEmmanuel Vadot			#gpio-cells = <2>;
1635f62a964SEmmanuel Vadot			gpio-ranges = <&pinctrl_ap 0 0 219>;
1645f62a964SEmmanuel Vadot			apple,npins = <219>;
1655f62a964SEmmanuel Vadot
1665f62a964SEmmanuel Vadot			interrupt-controller;
1675f62a964SEmmanuel Vadot			#interrupt-cells = <2>;
1685f62a964SEmmanuel Vadot			interrupt-parent = <&aic>;
1695f62a964SEmmanuel Vadot			interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
1705f62a964SEmmanuel Vadot				     <AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
1715f62a964SEmmanuel Vadot				     <AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
1725f62a964SEmmanuel Vadot				     <AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
1735f62a964SEmmanuel Vadot				     <AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
1745f62a964SEmmanuel Vadot				     <AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
1755f62a964SEmmanuel Vadot				     <AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
1765f62a964SEmmanuel Vadot		};
1775f62a964SEmmanuel Vadot
1785f62a964SEmmanuel Vadot		pinctrl_aop: pinctrl@2100f0000 {
1795f62a964SEmmanuel Vadot			compatible = "apple,s8000-pinctrl", "apple,pinctrl";
1805f62a964SEmmanuel Vadot			reg = <0x2 0x100f0000 0x0 0x100000>;
1818ccc0d23SEmmanuel Vadot			power-domains = <&ps_aop_gpio>;
1825f62a964SEmmanuel Vadot
1835f62a964SEmmanuel Vadot			gpio-controller;
1845f62a964SEmmanuel Vadot			#gpio-cells = <2>;
1855f62a964SEmmanuel Vadot			gpio-ranges = <&pinctrl_aop 0 0 28>;
1865f62a964SEmmanuel Vadot			apple,npins = <28>;
1875f62a964SEmmanuel Vadot
1885f62a964SEmmanuel Vadot			interrupt-controller;
1895f62a964SEmmanuel Vadot			#interrupt-cells = <2>;
1905f62a964SEmmanuel Vadot			interrupt-parent = <&aic>;
1915f62a964SEmmanuel Vadot			interrupts = <AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>,
1925f62a964SEmmanuel Vadot				     <AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>,
1935f62a964SEmmanuel Vadot				     <AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>,
1945f62a964SEmmanuel Vadot				     <AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>,
1955f62a964SEmmanuel Vadot				     <AIC_IRQ 132 IRQ_TYPE_LEVEL_HIGH>,
1965f62a964SEmmanuel Vadot				     <AIC_IRQ 133 IRQ_TYPE_LEVEL_HIGH>,
1975f62a964SEmmanuel Vadot				     <AIC_IRQ 134 IRQ_TYPE_LEVEL_HIGH>;
1985f62a964SEmmanuel Vadot		};
1995f62a964SEmmanuel Vadot
2008ccc0d23SEmmanuel Vadot		pmgr_mini: power-management@210200000 {
2018ccc0d23SEmmanuel Vadot			compatible = "apple,s8000-pmgr", "apple,pmgr", "syscon", "simple-mfd";
2028ccc0d23SEmmanuel Vadot			#address-cells = <1>;
2038ccc0d23SEmmanuel Vadot			#size-cells = <1>;
2048ccc0d23SEmmanuel Vadot
2058ccc0d23SEmmanuel Vadot			reg = <0x2 0x10200000 0 0x84000>;
2068ccc0d23SEmmanuel Vadot		};
2078ccc0d23SEmmanuel Vadot
2085f62a964SEmmanuel Vadot		wdt: watchdog@2102b0000 {
2095f62a964SEmmanuel Vadot			compatible = "apple,s8000-wdt", "apple,wdt";
2105f62a964SEmmanuel Vadot			reg = <0x2 0x102b0000 0x0 0x4000>;
2115f62a964SEmmanuel Vadot			clocks = <&clkref>;
2125f62a964SEmmanuel Vadot			interrupt-parent = <&aic>;
2135f62a964SEmmanuel Vadot			interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
2145f62a964SEmmanuel Vadot		};
2155f62a964SEmmanuel Vadot	};
2165f62a964SEmmanuel Vadot
2175f62a964SEmmanuel Vadot	timer {
2185f62a964SEmmanuel Vadot		compatible = "arm,armv8-timer";
2195f62a964SEmmanuel Vadot		interrupt-parent = <&aic>;
2205f62a964SEmmanuel Vadot		interrupt-names = "phys", "virt";
2215f62a964SEmmanuel Vadot		/* Note that A9X doesn't actually have a hypervisor (EL2 is not implemented). */
2225f62a964SEmmanuel Vadot		interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
2235f62a964SEmmanuel Vadot			     <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
2245f62a964SEmmanuel Vadot	};
2255f62a964SEmmanuel Vadot};
2268ccc0d23SEmmanuel Vadot
2278ccc0d23SEmmanuel Vadot#include "s8001-pmgr.dtsi"
228