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/interrupt-controller/apple-aic.h>
11#include <dt-bindings/interrupt-controller/irq.h>
12
13/ {
14	compatible = "apple,t8103", "apple,arm-platform";
15
16	#address-cells = <2>;
17	#size-cells = <2>;
18
19	cpus {
20		#address-cells = <2>;
21		#size-cells = <0>;
22
23		cpu0: cpu@0 {
24			compatible = "apple,icestorm";
25			device_type = "cpu";
26			reg = <0x0 0x0>;
27			enable-method = "spin-table";
28			cpu-release-addr = <0 0>; /* To be filled by loader */
29		};
30
31		cpu1: cpu@1 {
32			compatible = "apple,icestorm";
33			device_type = "cpu";
34			reg = <0x0 0x1>;
35			enable-method = "spin-table";
36			cpu-release-addr = <0 0>; /* To be filled by loader */
37		};
38
39		cpu2: cpu@2 {
40			compatible = "apple,icestorm";
41			device_type = "cpu";
42			reg = <0x0 0x2>;
43			enable-method = "spin-table";
44			cpu-release-addr = <0 0>; /* To be filled by loader */
45		};
46
47		cpu3: cpu@3 {
48			compatible = "apple,icestorm";
49			device_type = "cpu";
50			reg = <0x0 0x3>;
51			enable-method = "spin-table";
52			cpu-release-addr = <0 0>; /* To be filled by loader */
53		};
54
55		cpu4: cpu@10100 {
56			compatible = "apple,firestorm";
57			device_type = "cpu";
58			reg = <0x0 0x10100>;
59			enable-method = "spin-table";
60			cpu-release-addr = <0 0>; /* To be filled by loader */
61		};
62
63		cpu5: cpu@10101 {
64			compatible = "apple,firestorm";
65			device_type = "cpu";
66			reg = <0x0 0x10101>;
67			enable-method = "spin-table";
68			cpu-release-addr = <0 0>; /* To be filled by loader */
69		};
70
71		cpu6: cpu@10102 {
72			compatible = "apple,firestorm";
73			device_type = "cpu";
74			reg = <0x0 0x10102>;
75			enable-method = "spin-table";
76			cpu-release-addr = <0 0>; /* To be filled by loader */
77		};
78
79		cpu7: cpu@10103 {
80			compatible = "apple,firestorm";
81			device_type = "cpu";
82			reg = <0x0 0x10103>;
83			enable-method = "spin-table";
84			cpu-release-addr = <0 0>; /* To be filled by loader */
85		};
86	};
87
88	timer {
89		compatible = "arm,armv8-timer";
90		interrupt-parent = <&aic>;
91		interrupt-names = "phys", "virt", "hyp-phys", "hyp-virt";
92		interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
93			     <AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>,
94			     <AIC_FIQ AIC_TMR_HV_PHYS IRQ_TYPE_LEVEL_HIGH>,
95			     <AIC_FIQ AIC_TMR_HV_VIRT IRQ_TYPE_LEVEL_HIGH>;
96	};
97
98	clk24: clock-24m {
99		compatible = "fixed-clock";
100		#clock-cells = <0>;
101		clock-frequency = <24000000>;
102		clock-output-names = "clk24";
103	};
104
105	soc {
106		compatible = "simple-bus";
107		#address-cells = <2>;
108		#size-cells = <2>;
109
110		ranges;
111		nonposted-mmio;
112
113		serial0: serial@235200000 {
114			compatible = "apple,s5l-uart";
115			reg = <0x2 0x35200000 0x0 0x1000>;
116			reg-io-width = <4>;
117			interrupt-parent = <&aic>;
118			interrupts = <AIC_IRQ 605 IRQ_TYPE_LEVEL_HIGH>;
119			/*
120			 * TODO: figure out the clocking properly, there may
121			 * be a third selectable clock.
122			 */
123			clocks = <&clk24>, <&clk24>;
124			clock-names = "uart", "clk_uart_baud0";
125			status = "disabled";
126		};
127
128		aic: interrupt-controller@23b100000 {
129			compatible = "apple,t8103-aic", "apple,aic";
130			#interrupt-cells = <3>;
131			interrupt-controller;
132			reg = <0x2 0x3b100000 0x0 0x8000>;
133		};
134	};
135};
136