Skip to content

Commit a9a28af

Browse files
konradybciomarcan
authored andcommitted
arm64: dts: apple: Add A10X devices
Add DTS files for the A10X SoC and the following devices based on it: - Apple TV 4K - iPad Pro (2nd Generation) (10.5 Inch) - iPad Pro (2nd Generation) (12.9 Inch) Signed-off-by: Konrad Dybcio <konradybcio@kernel.org> [Nick: SMP, m1n1 and Apple TV 4K support, uart interrupt and pinctrl fixes] Co-developed-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Nick Chan <towinchenmi@gmail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Neal Gompa <neal@gompa.dev> Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 33ee92b commit a9a28af

9 files changed

Lines changed: 314 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ dtb-$(CONFIG_ARCH_APPLE) += t8010-j172.dtb
4141
dtb-$(CONFIG_ARCH_APPLE) += t8010-j71b.dtb
4242
dtb-$(CONFIG_ARCH_APPLE) += t8010-j72b.dtb
4343
dtb-$(CONFIG_ARCH_APPLE) += t8010-n112.dtb
44+
dtb-$(CONFIG_ARCH_APPLE) += t8011-j105a.dtb
45+
dtb-$(CONFIG_ARCH_APPLE) += t8011-j120.dtb
46+
dtb-$(CONFIG_ARCH_APPLE) += t8011-j121.dtb
47+
dtb-$(CONFIG_ARCH_APPLE) += t8011-j207.dtb
48+
dtb-$(CONFIG_ARCH_APPLE) += t8011-j208.dtb
4449
dtb-$(CONFIG_ARCH_APPLE) += t8103-j274.dtb
4550
dtb-$(CONFIG_ARCH_APPLE) += t8103-j293.dtb
4651
dtb-$(CONFIG_ARCH_APPLE) += t8103-j313.dtb
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple TV 4K, Apple iPad Pro 2
4+
*
5+
* This file contains parts common to all Apple A10X devices.
6+
*
7+
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
8+
*/
9+
10+
/ {
11+
aliases {
12+
serial0 = &serial0;
13+
};
14+
15+
chosen {
16+
#address-cells = <2>;
17+
#size-cells = <2>;
18+
ranges;
19+
20+
stdout-path = "serial0";
21+
22+
framebuffer0: framebuffer@0 {
23+
compatible = "apple,simple-framebuffer", "simple-framebuffer";
24+
reg = <0 0 0 0>; /* To be filled by loader */
25+
/* Format properties will be added by loader */
26+
status = "disabled";
27+
};
28+
};
29+
30+
memory@800000000 {
31+
device_type = "memory";
32+
reg = <0x8 0 0 0>; /* To be filled by loader */
33+
};
34+
35+
reserved-memory {
36+
#address-cells = <2>;
37+
#size-cells = <2>;
38+
ranges;
39+
40+
/* To be filled by loader */
41+
};
42+
};
43+
44+
&serial0 {
45+
status = "okay";
46+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple TV 4K (1st Generation), J105a, AppleTV6,2 (A1482)
4+
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t8011.dtsi"
10+
#include "t8011-common.dtsi"
11+
12+
/ {
13+
compatible = "apple,j105a", "apple,t8011", "apple,arm-platform";
14+
model = "Apple TV 4K (1st Generation)";
15+
chassis-type = "television";
16+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro 2 (12.9-inch) (Wi-Fi), J120, iPad7,1 (A1670)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t8011.dtsi"
10+
#include "t8011-common.dtsi"
11+
#include "t8011-pro2.dtsi"
12+
13+
/ {
14+
compatible = "apple,j120", "apple,t8011", "apple,arm-platform";
15+
model = "Apple iPad Pro 2 (12.9-inch) (Wi-Fi)";
16+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro 2 (12.9-inch) (Cellular), J121, iPad7,2 (A1671)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t8011.dtsi"
10+
#include "t8011-common.dtsi"
11+
#include "t8011-pro2.dtsi"
12+
13+
/ {
14+
compatible = "apple,j121", "apple,t8011", "apple,arm-platform";
15+
model = "Apple iPad Pro 2 (12.9-inch) (Cellular)";
16+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro 2 (10.5-inch) (Wi-Fi), J207, iPad7,3 (A1701)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t8011.dtsi"
10+
#include "t8011-common.dtsi"
11+
#include "t8011-pro2.dtsi"
12+
13+
/ {
14+
compatible = "apple,j207", "apple,t8011", "apple,arm-platform";
15+
model = "Apple iPad Pro 2 (10.5-inch) (Wi-Fi)";
16+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro 2 (10.5-inch) (Cellular), J208, iPad7,4 (A1709)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t8011.dtsi"
10+
#include "t8011-common.dtsi"
11+
#include "t8011-pro2.dtsi"
12+
13+
/ {
14+
compatible = "apple,j208", "apple,t8011", "apple,arm-platform";
15+
model = "Apple iPad Pro 2 (10.5-inch) (Cellular)";
16+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro 2 common device tree
4+
*
5+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
6+
*/
7+
8+
#include <dt-bindings/input/input.h>
9+
10+
/ {
11+
chassis-type = "tablet";
12+
13+
gpio-keys {
14+
compatible = "gpio-keys";
15+
16+
button-home {
17+
label = "Home Button";
18+
gpios = <&pinctrl_ap 139 GPIO_ACTIVE_LOW>;
19+
linux,code = <KEY_HOMEPAGE>;
20+
wakeup-source;
21+
};
22+
23+
button-power {
24+
label = "Power Button";
25+
gpios = <&pinctrl_ap 138 GPIO_ACTIVE_LOW>;
26+
linux,code = <KEY_POWER>;
27+
wakeup-source;
28+
};
29+
30+
button-voldown {
31+
label = "Volume Down";
32+
gpios = <&pinctrl_ap 43 GPIO_ACTIVE_LOW>;
33+
linux,code = <KEY_VOLUMEDOWN>;
34+
};
35+
36+
button-volup {
37+
label = "Volume Up";
38+
gpios = <&pinctrl_ap 40 GPIO_ACTIVE_LOW>;
39+
linux,code = <KEY_VOLUMEUP>;
40+
};
41+
};
42+
};
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple T8011 "A10X" SoC
4+
*
5+
* Other names: H9G, "Myst"
6+
*
7+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
8+
*/
9+
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include <dt-bindings/interrupt-controller/apple-aic.h>
12+
#include <dt-bindings/interrupt-controller/irq.h>
13+
#include <dt-bindings/pinctrl/apple.h>
14+
15+
/ {
16+
interrupt-parent = <&aic>;
17+
#address-cells = <2>;
18+
#size-cells = <2>;
19+
20+
clkref: clock-ref {
21+
compatible = "fixed-clock";
22+
#clock-cells = <0>;
23+
clock-frequency = <24000000>;
24+
clock-output-names = "clkref";
25+
};
26+
27+
cpus {
28+
#address-cells = <2>;
29+
#size-cells = <0>;
30+
31+
cpu0: cpu@0 {
32+
compatible = "apple,hurricane-zephyr";
33+
reg = <0x0 0x0>;
34+
cpu-release-addr = <0 0>; /* To be filled by loader */
35+
enable-method = "spin-table";
36+
device_type = "cpu";
37+
};
38+
39+
cpu1: cpu@1 {
40+
compatible = "apple,hurricane-zephyr";
41+
reg = <0x0 0x1>;
42+
cpu-release-addr = <0 0>; /* To be filled by loader */
43+
enable-method = "spin-table";
44+
device_type = "cpu";
45+
};
46+
47+
cpu2: cpu@2 {
48+
compatible = "apple,hurricane-zephyr";
49+
reg = <0x0 0x2>;
50+
cpu-release-addr = <0 0>; /* To be filled by loader */
51+
enable-method = "spin-table";
52+
device_type = "cpu";
53+
};
54+
};
55+
56+
soc {
57+
compatible = "simple-bus";
58+
#address-cells = <2>;
59+
#size-cells = <2>;
60+
nonposted-mmio;
61+
ranges;
62+
63+
serial0: serial@20a0c0000 {
64+
compatible = "apple,s5l-uart";
65+
reg = <0x2 0x0a0c0000 0x0 0x4000>;
66+
reg-io-width = <4>;
67+
interrupt-parent = <&aic>;
68+
interrupts = <AIC_IRQ 216 IRQ_TYPE_LEVEL_HIGH>;
69+
/* Use the bootloader-enabled clocks for now. */
70+
clocks = <&clkref>, <&clkref>;
71+
clock-names = "uart", "clk_uart_baud0";
72+
status = "disabled";
73+
};
74+
75+
aic: interrupt-controller@20e100000 {
76+
compatible = "apple,t8010-aic", "apple,aic";
77+
reg = <0x2 0x0e100000 0x0 0x100000>;
78+
#interrupt-cells = <3>;
79+
interrupt-controller;
80+
};
81+
82+
pinctrl_ap: pinctrl@20f100000 {
83+
compatible = "apple,t8010-pinctrl", "apple,pinctrl";
84+
reg = <0x2 0x0f100000 0x0 0x100000>;
85+
86+
gpio-controller;
87+
#gpio-cells = <2>;
88+
gpio-ranges = <&pinctrl_ap 0 0 219>;
89+
apple,npins = <219>;
90+
91+
interrupt-controller;
92+
#interrupt-cells = <2>;
93+
interrupt-parent = <&aic>;
94+
interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
95+
<AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
96+
<AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
97+
<AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
98+
<AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
99+
<AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
100+
<AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
101+
};
102+
103+
pinctrl_aop: pinctrl@2100f0000 {
104+
compatible = "apple,t8010-pinctrl", "apple,pinctrl";
105+
reg = <0x2 0x100f0000 0x0 0x100000>;
106+
107+
gpio-controller;
108+
#gpio-cells = <2>;
109+
gpio-ranges = <&pinctrl_aop 0 0 42>;
110+
apple,npins = <42>;
111+
112+
interrupt-controller;
113+
#interrupt-cells = <2>;
114+
interrupt-parent = <&aic>;
115+
interrupts = <AIC_IRQ 125 IRQ_TYPE_LEVEL_HIGH>,
116+
<AIC_IRQ 126 IRQ_TYPE_LEVEL_HIGH>,
117+
<AIC_IRQ 127 IRQ_TYPE_LEVEL_HIGH>,
118+
<AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>,
119+
<AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>,
120+
<AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>,
121+
<AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>;
122+
};
123+
124+
wdt: watchdog@2102b0000 {
125+
compatible = "apple,t8010-wdt", "apple,wdt";
126+
reg = <0x2 0x102b0000 0x0 0x4000>;
127+
clocks = <&clkref>;
128+
interrupt-parent = <&aic>;
129+
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
130+
};
131+
};
132+
133+
timer {
134+
compatible = "arm,armv8-timer";
135+
interrupt-parent = <&aic>;
136+
interrupt-names = "phys", "virt";
137+
/* Note that A10X doesn't actually have a hypervisor (EL2 is not implemented). */
138+
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
139+
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
140+
};
141+
};

0 commit comments

Comments
 (0)