Skip to content

Commit 1841831

Browse files
konradybciomarcan
authored andcommitted
arm64: dts: apple: Add A8 devices
Add DTS files for the A8 SoC and the following devices based on it: - iPhone 6 - iPhone 6 Plus - iPad mini 4 - iPod touch 6 - Apple TV HD The remaining HomePod is not supported as part of this patch. Signed-off-by: Konrad Dybcio <konradybcio@kernel.org> [Ivalyo: system memory bits, iPhone 6 gpio-keys, pinctrl] Co-developed-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> [Nick: SMP and m1n1 support, gpio-keys additions] 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 4b9eeff commit 1841831

12 files changed

Lines changed: 430 additions & 0 deletions

arch/arm64/boot/dts/apple/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j85.dtb
1010
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j86.dtb
1111
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j87.dtb
1212
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-n51.dtb
13+
dtb-$(CONFIG_ARCH_APPLE) += t7000-j42d.dtb
14+
dtb-$(CONFIG_ARCH_APPLE) += t7000-j96.dtb
15+
dtb-$(CONFIG_ARCH_APPLE) += t7000-j97.dtb
16+
dtb-$(CONFIG_ARCH_APPLE) += t7000-n102.dtb
17+
dtb-$(CONFIG_ARCH_APPLE) += t7000-n56.dtb
18+
dtb-$(CONFIG_ARCH_APPLE) += t7000-n61.dtb
1319
dtb-$(CONFIG_ARCH_APPLE) += t8103-j274.dtb
1420
dtb-$(CONFIG_ARCH_APPLE) += t8103-j293.dtb
1521
dtb-$(CONFIG_ARCH_APPLE) += t8103-j313.dtb
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPhone 6 / 6 Plus common device tree
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
#include <dt-bindings/input/input.h>
8+
#include "t7000.dtsi"
9+
#include "t7000-common.dtsi"
10+
#include "t7000-handheld.dtsi"
11+
12+
/ {
13+
chassis-type = "handset";
14+
15+
gpio-keys {
16+
compatible = "gpio-keys";
17+
18+
button-home {
19+
label = "Home Button";
20+
gpios = <&pinctrl 32 GPIO_ACTIVE_LOW>;
21+
linux,code = <KEY_HOMEPAGE>;
22+
wakeup-source;
23+
};
24+
25+
button-power {
26+
label = "Power Button";
27+
gpios = <&pinctrl 33 GPIO_ACTIVE_LOW>;
28+
linux,code = <KEY_POWER>;
29+
wakeup-source;
30+
};
31+
32+
button-volup {
33+
label = "Volume Up";
34+
gpios = <&pinctrl 45 GPIO_ACTIVE_LOW>;
35+
linux,code = <KEY_VOLUMEUP>;
36+
};
37+
38+
button-voldown {
39+
label = "Volume Down";
40+
gpios = <&pinctrl 46 GPIO_ACTIVE_LOW>;
41+
linux,code = <KEY_VOLUMEDOWN>;
42+
};
43+
44+
switch-mute {
45+
label = "Mute Switch";
46+
gpios = <&pinctrl 131 GPIO_ACTIVE_LOW>;
47+
linux,code = <KEY_MUTE>;
48+
};
49+
};
50+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple TV HD, iPhone 6, iPhone 6 Plus, iPad mini 4, iPod touch 6
4+
*
5+
* This file contains parts common to all Apple A8 devices.
6+
*
7+
* target-type: J42d, J96, J97, N56, N61, N102
8+
*
9+
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
10+
*/
11+
12+
/ {
13+
aliases {
14+
serial0 = &serial0;
15+
serial6 = &serial6;
16+
};
17+
18+
chosen {
19+
#address-cells = <2>;
20+
#size-cells = <2>;
21+
ranges;
22+
};
23+
24+
memory@800000000 {
25+
device_type = "memory";
26+
reg = <0x8 0 0 0>; /* To be filled by loader */
27+
};
28+
29+
reserved-memory {
30+
#address-cells = <2>;
31+
#size-cells = <2>;
32+
ranges;
33+
34+
/* To be filled by loader */
35+
};
36+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPhone 6, iPhone 6 Plus, iPad mini 4, iPod touch 6
4+
*
5+
* This file contains the parts common to handheld devices with t7000
6+
*
7+
* target-type: J96, J97, N56, N61, N102
8+
*
9+
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
10+
*/
11+
12+
/ {
13+
chosen {
14+
stdout-path = "serial0";
15+
16+
framebuffer0: framebuffer@0 {
17+
compatible = "apple,simple-framebuffer", "simple-framebuffer";
18+
reg = <0 0 0 0>; /* To be filled by loader */
19+
/* Format properties will be added by loader */
20+
status = "disabled";
21+
};
22+
};
23+
};
24+
25+
&serial0 {
26+
status = "okay";
27+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple TV HD, J42d, AppleTV5,3 (A1625)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t7000.dtsi"
10+
#include "t7000-common.dtsi"
11+
12+
/ {
13+
compatible = "apple,j42d", "apple,t7000", "apple,arm-platform";
14+
model = "Apple TV HD";
15+
chassis-type = "television";
16+
17+
chosen {
18+
stdout-path = "serial6";
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+
29+
&serial6 {
30+
status = "okay";
31+
};
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 mini 4 (Wi-Fi), J96, iPad5,1 (A1538)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t7000-mini4.dtsi"
10+
11+
/ {
12+
compatible = "apple,j96", "apple,t7000", "apple,arm-platform";
13+
model = "Apple iPad mini 4 (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 mini 4 (Cellular), J97, iPad5,2 (A1550)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t7000-mini4.dtsi"
10+
11+
/ {
12+
compatible = "apple,j97", "apple,t7000", "apple,arm-platform";
13+
model = "Apple iPad mini 4 (Cellular)";
14+
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// SPDX-License-Identifier: GPL-2.0+ OR MIT
2+
/*
3+
* Apple iPad mini 4 common device tree
4+
*
5+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
6+
*/
7+
8+
#include "t7000.dtsi"
9+
#include "t7000-common.dtsi"
10+
#include "t7000-handheld.dtsi"
11+
#include <dt-bindings/input/input.h>
12+
13+
/ {
14+
chassis-type = "tablet";
15+
16+
gpio-keys {
17+
compatible = "gpio-keys";
18+
19+
button-home {
20+
label = "Home Button";
21+
gpios = <&pinctrl 32 GPIO_ACTIVE_LOW>;
22+
linux,code = <KEY_HOMEPAGE>;
23+
wakeup-source;
24+
};
25+
26+
button-power {
27+
label = "Power Button";
28+
gpios = <&pinctrl 33 GPIO_ACTIVE_LOW>;
29+
linux,code = <KEY_POWER>;
30+
wakeup-source;
31+
};
32+
33+
button-volup {
34+
label = "Volume Up";
35+
gpios = <&pinctrl 45 GPIO_ACTIVE_LOW>;
36+
linux,code = <KEY_VOLUMEUP>;
37+
};
38+
39+
button-voldown {
40+
label = "Volume Down";
41+
gpios = <&pinctrl 46 GPIO_ACTIVE_LOW>;
42+
linux,code = <KEY_VOLUMEDOWN>;
43+
};
44+
45+
switch-mute {
46+
label = "Mute Switch";
47+
gpios = <&pinctrl 36 GPIO_ACTIVE_LOW>;
48+
linux,code = <KEY_MUTE>;
49+
};
50+
};
51+
};
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 iPod touch 6, N102, iPod7,1 (A1574)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t7000.dtsi"
10+
#include "t7000-common.dtsi"
11+
#include "t7000-handheld.dtsi"
12+
#include <dt-bindings/input/input.h>
13+
14+
/ {
15+
compatible = "apple,n102", "apple,t7000", "apple,arm-platform";
16+
model = "Apple iPod touch 6";
17+
chassis-type = "handset";
18+
19+
gpio-keys {
20+
compatible = "gpio-keys";
21+
22+
button-home {
23+
label = "Home Button";
24+
gpios = <&pinctrl 32 GPIO_ACTIVE_LOW>;
25+
linux,code = <KEY_HOMEPAGE>;
26+
wakeup-source;
27+
};
28+
29+
button-power {
30+
label = "Power Button";
31+
gpios = <&pinctrl 33 GPIO_ACTIVE_LOW>;
32+
linux,code = <KEY_POWER>;
33+
wakeup-source;
34+
};
35+
36+
button-voldown {
37+
label = "Volume Down";
38+
gpios = <&pinctrl 46 GPIO_ACTIVE_LOW>;
39+
linux,code = <KEY_VOLUMEDOWN>;
40+
};
41+
42+
button-volup {
43+
label = "Volume Up";
44+
gpios = <&pinctrl 45 GPIO_ACTIVE_LOW>;
45+
linux,code = <KEY_VOLUMEUP>;
46+
};
47+
};
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 iPhone 6 Plus, N56, iPhone7,2 (A1549/A1586/A1589)
4+
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "t7000-6.dtsi"
10+
11+
/ {
12+
compatible = "apple,n56", "apple,t7000", "apple,arm-platform";
13+
model = "Apple iPhone 6 Plus";
14+
};

0 commit comments

Comments
 (0)