xref: /linux/arch/arm64/boot/dts/apple/s800-0-3.dtsi (revision ec71f661a572a770d7c861cd52a50cbbb0e1a8d1)
1ef7980d4SNick Chan// SPDX-License-Identifier: GPL-2.0+ OR MIT
2ef7980d4SNick Chan/*
3ef7980d4SNick Chan * Apple S8000/S8003 "A9" SoC
4ef7980d4SNick Chan *
5ef7980d4SNick Chan * This file contains parts common to both variants of A9
6ef7980d4SNick Chan *
7ef7980d4SNick Chan * Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
8ef7980d4SNick Chan */
9ef7980d4SNick Chan
10ef7980d4SNick Chan#include <dt-bindings/gpio/gpio.h>
11ef7980d4SNick Chan#include <dt-bindings/interrupt-controller/apple-aic.h>
12ef7980d4SNick Chan#include <dt-bindings/interrupt-controller/irq.h>
13ef7980d4SNick Chan#include <dt-bindings/pinctrl/apple.h>
14ef7980d4SNick Chan
15ef7980d4SNick Chan/ {
16ef7980d4SNick Chan	interrupt-parent = <&aic>;
17ef7980d4SNick Chan	#address-cells = <2>;
18ef7980d4SNick Chan	#size-cells = <2>;
19ef7980d4SNick Chan
20ef7980d4SNick Chan	clkref: clock-ref {
21ef7980d4SNick Chan		compatible = "fixed-clock";
22ef7980d4SNick Chan		#clock-cells = <0>;
23ef7980d4SNick Chan		clock-frequency = <24000000>;
24ef7980d4SNick Chan		clock-output-names = "clkref";
25ef7980d4SNick Chan	};
26ef7980d4SNick Chan
27ef7980d4SNick Chan	cpus {
28ef7980d4SNick Chan		#address-cells = <2>;
29ef7980d4SNick Chan		#size-cells = <0>;
30ef7980d4SNick Chan
31ef7980d4SNick Chan		cpu0: cpu@0 {
32ef7980d4SNick Chan			compatible = "apple,twister";
33ef7980d4SNick Chan			reg = <0x0 0x0>;
34ef7980d4SNick Chan			cpu-release-addr = <0 0>; /* To be filled in by loader */
351fd51c73SNick Chan			operating-points-v2 = <&twister_opp>;
361fd51c73SNick Chan			performance-domains = <&cpufreq>;
37ef7980d4SNick Chan			enable-method = "spin-table";
38ef7980d4SNick Chan			device_type = "cpu";
39*a7a38536SNick Chan			next-level-cache = <&l2_cache>;
40*a7a38536SNick Chan			i-cache-size = <0x10000>;
41*a7a38536SNick Chan			d-cache-size = <0x10000>;
42ef7980d4SNick Chan		};
43ef7980d4SNick Chan
44ef7980d4SNick Chan		cpu1: cpu@1 {
45ef7980d4SNick Chan			compatible = "apple,twister";
46ef7980d4SNick Chan			reg = <0x0 0x1>;
47ef7980d4SNick Chan			cpu-release-addr = <0 0>; /* To be filled in by loader */
481fd51c73SNick Chan			operating-points-v2 = <&twister_opp>;
491fd51c73SNick Chan			performance-domains = <&cpufreq>;
50ef7980d4SNick Chan			enable-method = "spin-table";
51ef7980d4SNick Chan			device_type = "cpu";
52*a7a38536SNick Chan			next-level-cache = <&l2_cache>;
53*a7a38536SNick Chan			i-cache-size = <0x10000>;
54*a7a38536SNick Chan			d-cache-size = <0x10000>;
55*a7a38536SNick Chan		};
56*a7a38536SNick Chan
57*a7a38536SNick Chan		l2_cache: l2-cache {
58*a7a38536SNick Chan			compatible = "cache";
59*a7a38536SNick Chan			cache-level = <2>;
60*a7a38536SNick Chan			cache-unified;
61*a7a38536SNick Chan			cache-size = <0x300000>;
62ef7980d4SNick Chan		};
63ef7980d4SNick Chan	};
64ef7980d4SNick Chan
65ef7980d4SNick Chan	soc {
66ef7980d4SNick Chan		compatible = "simple-bus";
67ef7980d4SNick Chan		#address-cells = <2>;
68ef7980d4SNick Chan		#size-cells = <2>;
69ef7980d4SNick Chan		nonposted-mmio;
70ef7980d4SNick Chan		ranges;
71ef7980d4SNick Chan
721fd51c73SNick Chan		cpufreq: performance-controller@202220000 {
731fd51c73SNick Chan			compatible = "apple,s8000-cluster-cpufreq", "apple,t8103-cluster-cpufreq", "apple,cluster-cpufreq";
741fd51c73SNick Chan			reg = <0x2 0x02220000 0 0x1000>;
751fd51c73SNick Chan			#performance-domain-cells = <0>;
761fd51c73SNick Chan		};
771fd51c73SNick Chan
78ef7980d4SNick Chan		serial0: serial@20a0c0000 {
79ef7980d4SNick Chan			compatible = "apple,s5l-uart";
80ef7980d4SNick Chan			reg = <0x2 0x0a0c0000 0x0 0x4000>;
81ef7980d4SNick Chan			reg-io-width = <4>;
82ef7980d4SNick Chan			interrupt-parent = <&aic>;
83ef7980d4SNick Chan			interrupts = <AIC_IRQ 192 IRQ_TYPE_LEVEL_HIGH>;
84ef7980d4SNick Chan			/* Use the bootloader-enabled clocks for now. */
85ef7980d4SNick Chan			clocks = <&clkref>, <&clkref>;
86ef7980d4SNick Chan			clock-names = "uart", "clk_uart_baud0";
87bd89a1baSNick Chan			power-domains = <&ps_uart0>;
88ef7980d4SNick Chan			status = "disabled";
89ef7980d4SNick Chan		};
90ef7980d4SNick Chan
91bd89a1baSNick Chan		pmgr: power-management@20e000000 {
92bd89a1baSNick Chan			compatible = "apple,s8000-pmgr", "apple,pmgr", "syscon", "simple-mfd";
93bd89a1baSNick Chan			#address-cells = <1>;
94bd89a1baSNick Chan			#size-cells = <1>;
95bd89a1baSNick Chan
96bd89a1baSNick Chan			reg = <0x2 0xe000000 0 0x8c000>;
97bd89a1baSNick Chan		};
98bd89a1baSNick Chan
99ef7980d4SNick Chan		aic: interrupt-controller@20e100000 {
100ef7980d4SNick Chan			compatible = "apple,s8000-aic", "apple,aic";
101ef7980d4SNick Chan			reg = <0x2 0x0e100000 0x0 0x100000>;
102ef7980d4SNick Chan			#interrupt-cells = <3>;
103ef7980d4SNick Chan			interrupt-controller;
104bd89a1baSNick Chan			power-domains = <&ps_aic>;
105ef7980d4SNick Chan		};
106ef7980d4SNick Chan
1074384b6c7SNick Chan		dwi_bl: backlight@20e200080 {
1084384b6c7SNick Chan			compatible = "apple,s8000-dwi-bl", "apple,dwi-bl";
1094384b6c7SNick Chan			reg = <0x2 0x0e200080 0x0 0x8>;
1104384b6c7SNick Chan			power-domains = <&ps_dwi>;
1114384b6c7SNick Chan			status = "disabled";
1124384b6c7SNick Chan		};
1134384b6c7SNick Chan
114ef7980d4SNick Chan		pinctrl_ap: pinctrl@20f100000 {
115ef7980d4SNick Chan			compatible = "apple,s8000-pinctrl", "apple,pinctrl";
116ef7980d4SNick Chan			reg = <0x2 0x0f100000 0x0 0x100000>;
117bd89a1baSNick Chan			power-domains = <&ps_gpio>;
118ef7980d4SNick Chan
119ef7980d4SNick Chan			gpio-controller;
120ef7980d4SNick Chan			#gpio-cells = <2>;
121ef7980d4SNick Chan			gpio-ranges = <&pinctrl_ap 0 0 208>;
122ef7980d4SNick Chan			apple,npins = <208>;
123ef7980d4SNick Chan
124ef7980d4SNick Chan			interrupt-controller;
125ef7980d4SNick Chan			#interrupt-cells = <2>;
126ef7980d4SNick Chan			interrupt-parent = <&aic>;
127ef7980d4SNick Chan			interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
128ef7980d4SNick Chan				     <AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
129ef7980d4SNick Chan				     <AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
130ef7980d4SNick Chan				     <AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
131ef7980d4SNick Chan				     <AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
132ef7980d4SNick Chan				     <AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
133ef7980d4SNick Chan				     <AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
134ef7980d4SNick Chan		};
135ef7980d4SNick Chan
136ef7980d4SNick Chan		pinctrl_aop: pinctrl@2100f0000 {
137ef7980d4SNick Chan			compatible = "apple,s8000-pinctrl", "apple,pinctrl";
138ef7980d4SNick Chan			reg = <0x2 0x100f0000 0x0 0x100000>;
139bd89a1baSNick Chan			power-domains = <&ps_aop_gpio>;
140ef7980d4SNick Chan
141ef7980d4SNick Chan			gpio-controller;
142ef7980d4SNick Chan			#gpio-cells = <2>;
143ef7980d4SNick Chan			gpio-ranges = <&pinctrl_aop 0 0 42>;
144ef7980d4SNick Chan			apple,npins = <42>;
145ef7980d4SNick Chan
146ef7980d4SNick Chan			interrupt-controller;
147ef7980d4SNick Chan			#interrupt-cells = <2>;
148ef7980d4SNick Chan			interrupt-parent = <&aic>;
149ef7980d4SNick Chan			interrupts = <AIC_IRQ 113 IRQ_TYPE_LEVEL_HIGH>,
150ef7980d4SNick Chan				     <AIC_IRQ 114 IRQ_TYPE_LEVEL_HIGH>,
151ef7980d4SNick Chan				     <AIC_IRQ 115 IRQ_TYPE_LEVEL_HIGH>,
152ef7980d4SNick Chan				     <AIC_IRQ 116 IRQ_TYPE_LEVEL_HIGH>,
153ef7980d4SNick Chan				     <AIC_IRQ 117 IRQ_TYPE_LEVEL_HIGH>,
154ef7980d4SNick Chan				     <AIC_IRQ 118 IRQ_TYPE_LEVEL_HIGH>,
155ef7980d4SNick Chan				     <AIC_IRQ 119 IRQ_TYPE_LEVEL_HIGH>;
156ef7980d4SNick Chan		};
157ef7980d4SNick Chan
158bd89a1baSNick Chan		pmgr_mini: power-management@210200000 {
159bd89a1baSNick Chan			compatible = "apple,s8000-pmgr", "apple,pmgr", "syscon", "simple-mfd";
160bd89a1baSNick Chan			#address-cells = <1>;
161bd89a1baSNick Chan			#size-cells = <1>;
162bd89a1baSNick Chan
163bd89a1baSNick Chan			reg = <0x2 0x10200000 0 0x84000>;
164bd89a1baSNick Chan		};
165bd89a1baSNick Chan
166ef7980d4SNick Chan		wdt: watchdog@2102b0000 {
167ef7980d4SNick Chan			compatible = "apple,s8000-wdt", "apple,wdt";
168ef7980d4SNick Chan			reg = <0x2 0x102b0000 0x0 0x4000>;
169ef7980d4SNick Chan			clocks = <&clkref>;
170ef7980d4SNick Chan			interrupt-parent = <&aic>;
171ef7980d4SNick Chan			interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
172ef7980d4SNick Chan		};
173ef7980d4SNick Chan	};
174ef7980d4SNick Chan
175ef7980d4SNick Chan	timer {
176ef7980d4SNick Chan		compatible = "arm,armv8-timer";
177ef7980d4SNick Chan		interrupt-parent = <&aic>;
178ef7980d4SNick Chan		interrupt-names = "phys", "virt";
179ef7980d4SNick Chan		/* Note that A9 doesn't actually have a hypervisor (EL2 is not implemented). */
180ef7980d4SNick Chan		interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
181ef7980d4SNick Chan			     <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
182ef7980d4SNick Chan	};
183ef7980d4SNick Chan};
184ef7980d4SNick Chan
185bd89a1baSNick Chan#include "s800-0-3-pmgr.dtsi"
186bd89a1baSNick Chan
187ef7980d4SNick Chan/*
188ef7980d4SNick Chan * The A9 was made by two separate fabs on two different process
189ef7980d4SNick Chan * nodes: Samsung made the S8000 (APL0898) on 14nm and TSMC made
190ef7980d4SNick Chan * the S8003 (APL1022) on 16nm. There are some minor differences
191ef7980d4SNick Chan * such as timing in cpufreq state transistions.
192ef7980d4SNick Chan */
193