Skip to content

Commit 1100a11

Browse files
konradybciomarcan
authored andcommitted
arm64: dts: apple: Add A9X devices
Add the device tree for the A9X SoC and the devices based on it: - iPad Pro (9.7 Inch) - iPad Pro (12.9 Inch) (1st generation) Signed-off-by: Konrad Dybcio <konradybcio@kernel.org> [Nick: SMP and m1n1 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 0806906 commit 1100a11

8 files changed

Lines changed: 285 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ dtb-$(CONFIG_ARCH_APPLE) += s8003-j72t.dtb
2828
dtb-$(CONFIG_ARCH_APPLE) += s8003-n66m.dtb
2929
dtb-$(CONFIG_ARCH_APPLE) += s8003-n69.dtb
3030
dtb-$(CONFIG_ARCH_APPLE) += s8003-n71m.dtb
31+
dtb-$(CONFIG_ARCH_APPLE) += s8001-j127.dtb
32+
dtb-$(CONFIG_ARCH_APPLE) += s8001-j128.dtb
33+
dtb-$(CONFIG_ARCH_APPLE) += s8001-j98a.dtb
34+
dtb-$(CONFIG_ARCH_APPLE) += s8001-j99a.dtb
3135
dtb-$(CONFIG_ARCH_APPLE) += t8103-j274.dtb
3236
dtb-$(CONFIG_ARCH_APPLE) += t8103-j293.dtb
3337
dtb-$(CONFIG_ARCH_APPLE) += t8103-j313.dtb
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro (9.7-inch), iPad Pro (12.9-inch)
4+
*
5+
* This file contains parts common to all Apple A9X devices.
6+
*
7+
* target-type: J127, J128, J98a, J99a
8+
*
9+
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
10+
*/
11+
12+
/ {
13+
aliases {
14+
serial0 = &serial0;
15+
};
16+
17+
chosen {
18+
#address-cells = <2>;
19+
#size-cells = <2>;
20+
ranges;
21+
22+
stdout-path = "serial0";
23+
24+
framebuffer0: framebuffer@0 {
25+
compatible = "apple,simple-framebuffer", "simple-framebuffer";
26+
reg = <0 0 0 0>; /* To be filled by loader */
27+
/* Format properties will be added by loader */
28+
status = "disabled";
29+
};
30+
};
31+
32+
memory@800000000 {
33+
device_type = "memory";
34+
reg = <0x8 0 0 0>; /* To be filled by loader */
35+
};
36+
37+
reserved-memory {
38+
#address-cells = <2>;
39+
#size-cells = <2>;
40+
ranges;
41+
42+
/* To be filled by loader */
43+
};
44+
};
45+
46+
&serial0 {
47+
status = "okay";
48+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro (9.7-inch) (Wi-Fi), J127, iPad6,3 (A1673)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "s8001-pro.dtsi"
10+
11+
/ {
12+
compatible = "apple,j127", "apple,s8001", "apple,arm-platform";
13+
model = "Apple iPad Pro (9.7-inch) (Wi-Fi)";
14+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro (9.7-inch) (Cellular), J128, iPad6,4 (A1674/A1675)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "s8001-pro.dtsi"
10+
11+
/ {
12+
compatible = "apple,j128", "apple,s8001", "apple,arm-platform";
13+
model = "Apple iPad Pro (9.7-inch) (Cellular)";
14+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro (12.9-inch) (Wi-Fi), J98a, iPad6,7 (A1584)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "s8001-pro.dtsi"
10+
11+
/ {
12+
compatible = "apple,j98a", "apple,s8001", "apple,arm-platform";
13+
model = "Apple iPad Pro (12.9-inch) (Wi-Fi)";
14+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro (12.9-inch) (Cellular), J99a, iPad6,8 (A1652)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "s8001-pro.dtsi"
10+
11+
/ {
12+
compatible = "apple,j99a", "apple,s8001", "apple,arm-platform";
13+
model = "Apple iPad Pro (12.9-inch) (Cellular)";
14+
};
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Pro (1st generation) common device tree
4+
*
5+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
6+
*/
7+
8+
#include "s8001.dtsi"
9+
#include "s8001-common.dtsi"
10+
#include <dt-bindings/input/input.h>
11+
12+
/ {
13+
chassis-type = "tablet";
14+
15+
gpio-keys {
16+
compatible = "gpio-keys";
17+
18+
button-home {
19+
label = "Home Button";
20+
gpios = <&pinctrl_ap 122 GPIO_ACTIVE_LOW>;
21+
linux,code = <KEY_HOMEPAGE>;
22+
wakeup-source;
23+
};
24+
25+
button-power {
26+
label = "Power Button";
27+
gpios = <&pinctrl_ap 123 GPIO_ACTIVE_LOW>;
28+
linux,code = <KEY_POWER>;
29+
wakeup-source;
30+
};
31+
32+
button-voldown {
33+
label = "Volume Down";
34+
gpios = <&pinctrl_ap 15 GPIO_ACTIVE_LOW>;
35+
linux,code = <KEY_VOLUMEDOWN>;
36+
};
37+
38+
button-volup {
39+
label = "Volume Up";
40+
gpios = <&pinctrl_ap 12 GPIO_ACTIVE_LOW>;
41+
linux,code = <KEY_VOLUMEUP>;
42+
};
43+
};
44+
};
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple S8001 "A9X" SoC
4+
*
5+
* Other names: H8G, "Elba"
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,twister";
33+
reg = <0x0 0x0>;
34+
cpu-release-addr = <0 0>; /* To be filled in by loader */
35+
enable-method = "spin-table";
36+
device_type = "cpu";
37+
};
38+
39+
cpu1: cpu@1 {
40+
compatible = "apple,twister";
41+
reg = <0x0 0x1>;
42+
cpu-release-addr = <0 0>; /* To be filled in by loader */
43+
enable-method = "spin-table";
44+
device_type = "cpu";
45+
};
46+
};
47+
48+
soc {
49+
compatible = "simple-bus";
50+
#address-cells = <2>;
51+
#size-cells = <2>;
52+
nonposted-mmio;
53+
ranges;
54+
55+
serial0: serial@20a0c0000 {
56+
compatible = "apple,s5l-uart";
57+
reg = <0x2 0x0a0c0000 0x0 0x4000>;
58+
reg-io-width = <4>;
59+
interrupt-parent = <&aic>;
60+
interrupts = <AIC_IRQ 218 IRQ_TYPE_LEVEL_HIGH>;
61+
/* Use the bootloader-enabled clocks for now. */
62+
clocks = <&clkref>, <&clkref>;
63+
clock-names = "uart", "clk_uart_baud0";
64+
status = "disabled";
65+
};
66+
67+
aic: interrupt-controller@20e100000 {
68+
compatible = "apple,s8000-aic", "apple,aic";
69+
reg = <0x2 0x0e100000 0x0 0x100000>;
70+
#interrupt-cells = <3>;
71+
interrupt-controller;
72+
};
73+
74+
pinctrl_ap: pinctrl@20f100000 {
75+
compatible = "apple,s8000-pinctrl", "apple,pinctrl";
76+
reg = <0x2 0x0f100000 0x0 0x100000>;
77+
78+
gpio-controller;
79+
#gpio-cells = <2>;
80+
gpio-ranges = <&pinctrl_ap 0 0 219>;
81+
apple,npins = <219>;
82+
83+
interrupt-controller;
84+
#interrupt-cells = <2>;
85+
interrupt-parent = <&aic>;
86+
interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
87+
<AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
88+
<AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
89+
<AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
90+
<AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
91+
<AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
92+
<AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
93+
};
94+
95+
pinctrl_aop: pinctrl@2100f0000 {
96+
compatible = "apple,s8000-pinctrl", "apple,pinctrl";
97+
reg = <0x2 0x100f0000 0x0 0x100000>;
98+
99+
gpio-controller;
100+
#gpio-cells = <2>;
101+
gpio-ranges = <&pinctrl_aop 0 0 28>;
102+
apple,npins = <28>;
103+
104+
interrupt-controller;
105+
#interrupt-cells = <2>;
106+
interrupt-parent = <&aic>;
107+
interrupts = <AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>,
108+
<AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>,
109+
<AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>,
110+
<AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>,
111+
<AIC_IRQ 132 IRQ_TYPE_LEVEL_HIGH>,
112+
<AIC_IRQ 133 IRQ_TYPE_LEVEL_HIGH>,
113+
<AIC_IRQ 134 IRQ_TYPE_LEVEL_HIGH>;
114+
};
115+
116+
wdt: watchdog@2102b0000 {
117+
compatible = "apple,s8000-wdt", "apple,wdt";
118+
reg = <0x2 0x102b0000 0x0 0x4000>;
119+
clocks = <&clkref>;
120+
interrupt-parent = <&aic>;
121+
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
122+
};
123+
};
124+
125+
timer {
126+
compatible = "arm,armv8-timer";
127+
interrupt-parent = <&aic>;
128+
interrupt-names = "phys", "virt";
129+
/* Note that A9X doesn't actually have a hypervisor (EL2 is not implemented). */
130+
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
131+
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
132+
};
133+
};

0 commit comments

Comments
 (0)