Skip to content

Commit c2da50c

Browse files
konradybciomarcan
authored andcommitted
arm64: dts: apple: Add A8X devices
Add DTS files for the A8X SoC and the only device based on it, the iPad Air 2. Signed-off-by: Konrad Dybcio <konradybcio@kernel.org> [Markuss: System memory bits] Co-developed-by: Markuss Broks <markuss.broks@gmail.com> Signed-off-by: Markuss Broks <markuss.broks@gmail.com> [Nick: SMP, m1n1 and gpio-keys support, 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 1841831 commit c2da50c

5 files changed

Lines changed: 227 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ dtb-$(CONFIG_ARCH_APPLE) += t7000-j97.dtb
1616
dtb-$(CONFIG_ARCH_APPLE) += t7000-n102.dtb
1717
dtb-$(CONFIG_ARCH_APPLE) += t7000-n56.dtb
1818
dtb-$(CONFIG_ARCH_APPLE) += t7000-n61.dtb
19+
dtb-$(CONFIG_ARCH_APPLE) += t7001-j81.dtb
20+
dtb-$(CONFIG_ARCH_APPLE) += t7001-j82.dtb
1921
dtb-$(CONFIG_ARCH_APPLE) += t8103-j274.dtb
2022
dtb-$(CONFIG_ARCH_APPLE) += t8103-j293.dtb
2123
dtb-$(CONFIG_ARCH_APPLE) += t8103-j313.dtb
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad Air 2 common device tree
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
#include "t7001.dtsi"
8+
#include <dt-bindings/input/input.h>
9+
10+
/ {
11+
chassis-type = "tablet";
12+
13+
chosen {
14+
#address-cells = <2>;
15+
#size-cells = <2>;
16+
ranges;
17+
18+
stdout-path = "serial0";
19+
20+
framebuffer0: framebuffer@0 {
21+
compatible = "apple,simple-framebuffer", "simple-framebuffer";
22+
reg = <0 0 0 0>; /* To be filled by loader */
23+
/* Format properties will be added by loader */
24+
status = "disabled";
25+
};
26+
};
27+
28+
gpio-keys {
29+
compatible = "gpio-keys";
30+
31+
button-home {
32+
label = "Home Button";
33+
gpios = <&pinctrl 0 GPIO_ACTIVE_LOW>;
34+
linux,code = <KEY_HOMEPAGE>;
35+
wakeup-source;
36+
};
37+
38+
button-power {
39+
label = "Power Button";
40+
gpios = <&pinctrl 1 GPIO_ACTIVE_LOW>;
41+
linux,code = <KEY_POWER>;
42+
wakeup-source;
43+
};
44+
45+
button-volup {
46+
label = "Volume Up";
47+
gpios = <&pinctrl 92 GPIO_ACTIVE_LOW>;
48+
linux,code = <KEY_VOLUMEUP>;
49+
};
50+
51+
button-voldown {
52+
label = "Volume Down";
53+
gpios = <&pinctrl 93 GPIO_ACTIVE_LOW>;
54+
linux,code = <KEY_VOLUMEDOWN>;
55+
};
56+
};
57+
58+
memory@800000000 {
59+
device_type = "memory";
60+
reg = <0x8 0 0 0>; /* To be filled by loader */
61+
};
62+
63+
reserved-memory {
64+
#address-cells = <2>;
65+
#size-cells = <2>;
66+
ranges;
67+
68+
/* To be filled by loader */
69+
};
70+
};
71+
72+
&serial0 {
73+
status = "okay";
74+
};
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 Air 2 (Wi-Fi), J81, iPad5,3 (A1566)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t7001-air2.dtsi"
10+
11+
/ {
12+
compatible = "apple,j81", "apple,t7001", "apple,arm-platform";
13+
model = "Apple iPad Air 2 (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 Air 2 (Cellular), J82, iPad5,4 (A1567)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t7001-air2.dtsi"
10+
11+
/ {
12+
compatible = "apple,j82", "apple,t7001", "apple,arm-platform";
13+
model = "Apple iPad Air 2 (Cellular)";
14+
};
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple T7001 "A8X" SoC
4+
*
5+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
6+
* Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts.
7+
*/
8+
9+
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/interrupt-controller/apple-aic.h>
11+
#include <dt-bindings/interrupt-controller/irq.h>
12+
#include <dt-bindings/pinctrl/apple.h>
13+
14+
/ {
15+
interrupt-parent = <&aic>;
16+
#address-cells = <2>;
17+
#size-cells = <2>;
18+
19+
aliases {
20+
serial0 = &serial0;
21+
};
22+
23+
clkref: clock-ref {
24+
compatible = "fixed-clock";
25+
#clock-cells = <0>;
26+
clock-frequency = <24000000>;
27+
clock-output-names = "clkref";
28+
};
29+
30+
cpus {
31+
#address-cells = <2>;
32+
#size-cells = <0>;
33+
34+
cpu0: cpu@0 {
35+
compatible = "apple,typhoon";
36+
reg = <0x0 0x0>;
37+
cpu-release-addr = <0 0>; /* To be filled in by loader */
38+
enable-method = "spin-table";
39+
device_type = "cpu";
40+
};
41+
42+
cpu1: cpu@1 {
43+
compatible = "apple,typhoon";
44+
reg = <0x0 0x1>;
45+
cpu-release-addr = <0 0>; /* To be filled in by loader */
46+
enable-method = "spin-table";
47+
device_type = "cpu";
48+
};
49+
50+
cpu2: cpu@2 {
51+
compatible = "apple,typhoon";
52+
reg = <0x0 0x2>;
53+
cpu-release-addr = <0 0>; /* To be filled by loader */
54+
enable-method = "spin-table";
55+
device_type = "cpu";
56+
};
57+
};
58+
59+
soc {
60+
compatible = "simple-bus";
61+
#address-cells = <2>;
62+
#size-cells = <2>;
63+
nonposted-mmio;
64+
ranges;
65+
66+
serial0: serial@20a0c0000 {
67+
compatible = "apple,s5l-uart";
68+
reg = <0x2 0x0a0c0000 0x0 0x4000>;
69+
reg-io-width = <4>;
70+
interrupt-parent = <&aic>;
71+
interrupts = <AIC_IRQ 158 IRQ_TYPE_LEVEL_HIGH>;
72+
/* Use the bootloader-enabled clocks for now. */
73+
clocks = <&clkref>, <&clkref>;
74+
clock-names = "uart", "clk_uart_baud0";
75+
status = "disabled";
76+
};
77+
78+
wdt: watchdog@20e027000 {
79+
compatible = "apple,t7000-wdt", "apple,wdt";
80+
reg = <0x2 0x0e027000 0x0 0x1000>;
81+
clocks = <&clkref>;
82+
interrupt-parent = <&aic>;
83+
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
84+
};
85+
86+
aic: interrupt-controller@20e100000 {
87+
compatible = "apple,t7000-aic", "apple,aic";
88+
reg = <0x2 0x0e100000 0x0 0x100000>;
89+
#interrupt-cells = <3>;
90+
interrupt-controller;
91+
};
92+
93+
pinctrl: pinctrl@20e300000 {
94+
compatible = "apple,t7000-pinctrl", "apple,pinctrl";
95+
reg = <0x2 0x0e300000 0x0 0x100000>;
96+
97+
gpio-controller;
98+
#gpio-cells = <2>;
99+
gpio-ranges = <&pinctrl 0 0 184>;
100+
apple,npins = <184>;
101+
102+
interrupt-controller;
103+
#interrupt-cells = <2>;
104+
interrupt-parent = <&aic>;
105+
interrupts = <AIC_IRQ 62 IRQ_TYPE_LEVEL_HIGH>,
106+
<AIC_IRQ 63 IRQ_TYPE_LEVEL_HIGH>,
107+
<AIC_IRQ 64 IRQ_TYPE_LEVEL_HIGH>,
108+
<AIC_IRQ 65 IRQ_TYPE_LEVEL_HIGH>,
109+
<AIC_IRQ 66 IRQ_TYPE_LEVEL_HIGH>,
110+
<AIC_IRQ 67 IRQ_TYPE_LEVEL_HIGH>,
111+
<AIC_IRQ 68 IRQ_TYPE_LEVEL_HIGH>;
112+
};
113+
};
114+
115+
timer {
116+
compatible = "arm,armv8-timer";
117+
interrupt-parent = <&aic>;
118+
interrupt-names = "phys", "virt";
119+
/* Note that A8X doesn't actually have a hypervisor (EL2 is not implemented). */
120+
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
121+
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
122+
};
123+
};

0 commit comments

Comments
 (0)