Apple SoC DT updates for 6.13:

- Added base DTs for a bunch of non-Mac Apple iDevices (pre-M1)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSByI3Ki0mXziclZJcd+FPLCI8zYgUCZzINwAAKCRAd+FPLCI8z
 Yk1GAQDz+XFZssOascDr+D1+wqa5+2t1SpCRj6aTphHFZmPrEQD9GExhKvU/XjWu
 7ZGM296FgJHaJ4L1MS8v5AqHrfbHTgs=
 =RFSL
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmcz0KAACgkQYKtH/8kJ
 Uiccag//ajmGyz9hq3pog3Q0xxwuqqHplLMbSTHcIH9hAACsA/+JcGIRa+yijrLq
 AAyCgAd5MCcTwiG2W/8hOsPyJcq7ZR83SrCRXViqPpT5qnm1lUqqJtUYWvrjigYb
 l+164qUroNpY2UPa6g9r6f0QSxP/wy7WZu+eOntp2KjHoVrPXY/myh4meOg4G9JW
 Hz92R1rImmPkWC7JgRrtVHbuKz9CuPjog/7pLflrNAVsTb0Ia0tMc+n+8niQs88r
 YRNM95aDvy04dL/KFBuUx6NGg4D1GRhZJ6bTMYDyYFr+Er1v8n1mPG0NezMOmqD4
 x4zadCvr4g9lC6FzMxiVuX1nY6jNj5ifYDQvVTd8oE03dKz9OeYJCGHyFfi0xnL/
 i35zaBaCasiJhsYoiiVh5xuUUpaCTO/YWXL75THqjru/heP3639mK7IlSltYlE3N
 nWkGmofBEHCtrRO7QfUkEx3Jv3Hd/yc8UyfSycGg8C+JDP74Va8S3Bhs4iYWFkY+
 DI+ikluq+Uk5i1F0tflIObKo/kAUa2qZK6TdlEySPZp1jHTvgeW3H873llA8gCr4
 SFYb2VCLVTZxcxbtqajTMDPpdvIh1D/tcKBIrZ3Xc4XOiuNSzrKCd1M2nynR0o8v
 nOx0YS+D6h9Y+s0NnEPS4J6mfvnRPdv2l2hJ5W/mdUgaxLayUBQ=
 =RD3n
 -----END PGP SIGNATURE-----

Merge tag 'asahi-soc-dt-6.13' of https://github.com/AsahiLinux/linux into soc/dt

Apple SoC DT updates for 6.13:

- Added base DTs for a bunch of non-Mac Apple iDevices (pre-M1)

* tag 'asahi-soc-dt-6.13' of https://github.com/AsahiLinux/linux:
  arm64: Kconfig: Update help text for CONFIG_ARCH_APPLE
  arm64: dts: apple: Add A11 devices
  arm64: dts: apple: Add A10X devices
  arm64: dts: apple: Add A10 devices
  arm64: dts: apple: Add A9X devices
  arm64: dts: apple: Add A9 devices
  arm64: dts: apple: Add A8X devices
  arm64: dts: apple: Add A8 devices
  arm64: dts: apple: Add A7 devices
  dt-bindings: arm: apple: Add A11 devices
  dt-bindings: arm: apple: Add A10X devices
  dt-bindings: arm: apple: Add A10 devices
  dt-bindings: arm: apple: Add A9X devices
  dt-bindings: arm: apple: Add A9 devices
  dt-bindings: arm: apple: Add A8X devices
  dt-bindings: arm: apple: Add A8 devices
  dt-bindings: arm: apple: Add A7 devices
  dt-bindings: pinctrl: apple,pinctrl: Add A7-A11 compatibles
  dt-bindings: watchdog: apple,wdt: Add A7-A11 compatibles
  dt-bindings: arm: cpus: Add Apple A7-A11 CPU cores

Link: https://lore.kernel.org/r/a8a19596-5d46-4562-9555-3b3ae7a5a3e5@marcan.st
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2024-11-12 23:03:11 +01:00
commit 94dd51c3bc
94 changed files with 3298 additions and 4 deletions

View File

@ -12,7 +12,58 @@ maintainers:
description: |
ARM platforms using SoCs designed by Apple Inc., branded "Apple Silicon".
This currently includes devices based on the "M1" SoC:
This currently includes devices based on the "A7" SoC:
- iPhone 5s
- iPad Air (1)
- iPad mini 2
- iPad mini 3
Devices based on the "A8" SoC:
- iPhone 6
- iPhone 6 Plus
- iPad mini 4
- iPod touch 6
- Apple TV HD
Device based on the "A8X" SoC:
- iPad Air 2
Devices based on the "A9" SoC:
- iPhone 6s
- iPhone 6s Plus
- iPhone SE (2016)
- iPad 5
Devices based on the "A9X" SoC:
- iPad Pro (9.7-inch)
- iPad Pro (12.9-inch)
Devices based on the "A10" SoC:
- iPhone 7
- iPhone 7 Plus
- iPod touch 7
- iPad 6
- iPad 7
Devices based on the "A10X" SoC:
- Apple TV 4K (1st generation)
- iPad Pro (2nd Generation) (10.5 Inch)
- iPad Pro (2nd Generation) (12.9 Inch)
Devices based on the "A11" SoC:
- iPhone 8
- iPhone 8 Plus
- iPhone X
Devices based on the "M1" SoC:
- Mac mini (M1, 2020)
- MacBook Pro (13-inch, M1, 2020)
@ -65,6 +116,113 @@ properties:
const: "/"
compatible:
oneOf:
- description: Apple A7 SoC based platforms
items:
- enum:
- apple,j71 # iPad Air (Wi-Fi)
- apple,j72 # iPad Air (Cellular)
- apple,j73 # iPad Air (Cellular, China)
- apple,j85 # iPad mini 2 (Wi-Fi)
- apple,j85m # iPad mini 3 (Wi-Fi)
- apple,j86 # iPad mini 2 (Cellular)
- apple,j86m # iPad mini 3 (Cellular)
- apple,j87 # iPad mini 2 (Cellular, China)
- apple,j87m # iPad mini 3 (Cellular, China)
- apple,n51 # iPhone 5s (GSM)
- apple,n53 # iPhone 5s (LTE)
- const: apple,s5l8960x
- const: apple,arm-platform
- description: Apple A8 SoC based platforms
items:
- enum:
- apple,j42d # Apple TV HD
- apple,j96 # iPad mini 4 (Wi-Fi)
- apple,j97 # iPad mini 4 (Cellular)
- apple,n56 # iPhone 6 Plus
- apple,n61 # iPhone 6
- apple,n102 # iPod touch 6
- const: apple,t7000
- const: apple,arm-platform
- description: Apple A8X SoC based platforms
items:
- enum:
- apple,j81 # iPad Air 2 (Wi-Fi)
- apple,j82 # iPad Air 2 (Cellular)
- const: apple,t7001
- const: apple,arm-platform
- description: Apple Samsung A9 SoC based platforms
items:
- enum:
- apple,j71s # iPad 5 (Wi-Fi) (S8000)
- apple,j72s # iPad 5 (Cellular) (S8000)
- apple,n66 # iPhone 6s Plus (S8000)
- apple,n69u # iPhone SE (S8000)
- apple,n71 # iPhone 6S (S8000)
- const: apple,s8000
- const: apple,arm-platform
- description: Apple TSMC A9 SoC based platforms
items:
- enum:
- apple,j71t # iPad 5 (Wi-Fi) (S8003)
- apple,j72t # iPad 5 (Cellular) (S8003)
- apple,n66m # iPhone 6s Plus (S8003)
- apple,n69 # iPhone SE (S8003)
- apple,n71m # iPhone 6S (S8003)
- const: apple,s8003
- const: apple,arm-platform
- description: Apple A9X SoC based platforms
items:
- enum:
- apple,j127 # iPad Pro (9.7-inch) (Wi-Fi)
- apple,j128 # iPad Pro (9.7-inch) (Cellular)
- apple,j98a # iPad Pro (12.9-inch) (Wi-Fi)
- apple,j99a # iPad Pro (12.9-inch) (Cellular)
- const: apple,s8001
- const: apple,arm-platform
- description: Apple A10 SoC based platforms
items:
- enum:
- apple,d10 # iPhone 7 (Qualcomm)
- apple,d11 # iPhone 7 (Intel)
- apple,d101 # iPhone 7 Plus (Qualcomm)
- apple,d111 # iPhone 7 Plus (Intel)
- apple,j71b # iPad 6 (Wi-Fi)
- apple,j72b # iPad 6 (Cellular)
- apple,j171 # iPad 7 (Wi-Fi)
- apple,j172 # iPad 7 (Cellular)
- apple,n112 # iPod touch 7
- const: apple,t8010
- const: apple,arm-platform
- description: Apple A10X SoC based platforms
items:
- enum:
- apple,j105a # Apple TV 4K (1st Generation)
- apple,j120 # iPad Pro 2 (12.9-inch) (Wi-Fi)
- apple,j121 # iPad Pro 2 (12.9-inch) (Cellular)
- apple,j207 # iPad Pro 2 (10.5-inch) (Wi-Fi)
- apple,j208 # iPad Pro 2 (10.5-inch) (Cellular)
- const: apple,t8011
- const: apple,arm-platform
- description: Apple A11 SoC based platforms
items:
- enum:
- apple,d20 # iPhone 8 (Global)
- apple,d21 # iPhone 8 Plus (Global)
- apple,d22 # iPhone X (Global)
- apple,d201 # iPhone 8 (GSM)
- apple,d211 # iPhone 8 Plus (GSM)
- apple,d221 # iPhone X (GSM)
- const: apple,t8015
- const: apple,arm-platform
- description: Apple M1 SoC based platforms
items:
- enum:

View File

@ -87,8 +87,14 @@ properties:
enum:
- apple,avalanche
- apple,blizzard
- apple,icestorm
- apple,cyclone
- apple,firestorm
- apple,hurricane-zephyr
- apple,icestorm
- apple,mistral
- apple,monsoon
- apple,twister
- apple,typhoon
- arm,arm710t
- arm,arm720t
- arm,arm740t

View File

@ -18,6 +18,11 @@ properties:
compatible:
items:
- enum:
- apple,s5l8960x-pinctrl
- apple,t7000-pinctrl
- apple,s8000-pinctrl
- apple,t8010-pinctrl
- apple,t8015-pinctrl
- apple,t8103-pinctrl
- apple,t8112-pinctrl
- apple,t6000-pinctrl

View File

@ -16,6 +16,11 @@ properties:
compatible:
items:
- enum:
- apple,s5l8960x-wdt
- apple,t7000-wdt
- apple,s8000-wdt
- apple,t8010-wdt
- apple,t8015-wdt
- apple,t8103-wdt
- apple,t8112-wdt
- apple,t6000-wdt

View File

@ -37,8 +37,8 @@ config ARCH_APPLE
bool "Apple Silicon SoC family"
select APPLE_AIC
help
This enables support for Apple's in-house ARM SoC family, starting
with the Apple M1.
This enables support for Apple's in-house ARM SoC family, such
as the Apple M1.
menuconfig ARCH_BCM
bool "Broadcom SoC Support"

View File

@ -1,4 +1,57 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j71.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j73.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j85m.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j86m.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j87m.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-n53.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j72.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j85.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j86.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-j87.dtb
dtb-$(CONFIG_ARCH_APPLE) += s5l8960x-n51.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7000-j42d.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7000-j96.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7000-j97.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7000-n102.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7000-n56.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7000-n61.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7001-j81.dtb
dtb-$(CONFIG_ARCH_APPLE) += t7001-j82.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8000-j71s.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8000-j72s.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8000-n66.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8000-n69u.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8000-n71.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8003-j71t.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8003-j72t.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8003-n66m.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8003-n69.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8003-n71m.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8001-j127.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8001-j128.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8001-j98a.dtb
dtb-$(CONFIG_ARCH_APPLE) += s8001-j99a.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-d101.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-d10.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-d111.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-d11.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-j171.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-j172.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-j71b.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-j72b.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8010-n112.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8011-j105a.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8011-j120.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8011-j121.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8011-j207.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8011-j208.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8015-d201.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8015-d20.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8015-d211.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8015-d21.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8015-d221.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8015-d22.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8103-j274.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8103-j293.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8103-j313.dtb

View File

@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 5s common device tree
* Based on A7 (APL0698), up to 1.3GHz
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s5l8960x.dtsi"
#include "s5l8960x-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "handset";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl 5 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl 4 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl 16 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Air common device tree
* Based on A7 (APL5698), up to 1.4GHz
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s5l8960x.dtsi"
#include "s5l8960x-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl 4 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl 5 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl 110 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 5s, iPad mini 2/3, iPad Air
*
* This file contains parts common to all Apple A7 devices.
*
* target-type: J71, J72, J73, J85, J85m, J86, J86m, J87, J87m, N51, N53
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
aliases {
serial0 = &serial0;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Air (Wi-Fi), J71, iPad4,1 (A1474)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-air1.dtsi"
/ {
compatible = "apple,j71", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad Air (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Air (Cellular), J72, iPad4,2 (A1475)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-air1.dtsi"
/ {
compatible = "apple,j72", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad Air (Cellular)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Air (Cellular, China), J73, iPad4,2 (A1476)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-air1.dtsi"
/ {
compatible = "apple,j73", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad Air (Cellular, China)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 2 (Wi-Fi), J85, iPad4,4 (A1489)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-mini2.dtsi"
/ {
compatible = "apple,j85", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad mini 2 (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 3 (Wi-Fi), J85m, iPad4,7 (A1599)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-mini3.dtsi"
/ {
compatible = "apple,j85m", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad mini 3 (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 2 (Cellular), J86, iPad4,5 (A1490)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-mini2.dtsi"
/ {
compatible = "apple,j86", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad mini 2 (Cellular)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 3 (Cellular), J86m, iPad4,8 (A1600)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-mini3.dtsi"
/ {
compatible = "apple,j86m", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad mini 3 (Cellular)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 2 (Cellular, China), J87, iPad4,6 (A1491)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-mini2.dtsi"
/ {
compatible = "apple,j87", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad mini 2 (Cellular, China)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 3 (Cellular, China), J87m, iPad4,9 (A1601)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-mini3.dtsi"
/ {
compatible = "apple,j87m", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPad mini 3 (Cellular, China)";
};

View File

@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 2 common device tree
* Based on A7 (APL0698), up to 1.3GHz
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s5l8960x.dtsi"
#include "s5l8960x-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl 2 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl 5 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl 4 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl 6 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 3 common device tree
* Based on A7 (APL0698), up to 1.3GHz
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/*
* The Mini 3 seems to be only an iteration over the Mini 2 with some
* small changes, like the introduction of Touch ID, hence there is little
* to no differentiation between these 2 for now.
*/
#include "s5l8960x-mini2.dtsi"

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 5s (GSM), N51, iPhone6,1 (A1453/A1533)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-5s.dtsi"
/ {
compatible = "apple,n51", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPhone 5s (GSM)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 5s (LTE), N53, iPhone6,2 (A1457/A1518/A1528/A1530)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s5l8960x-5s.dtsi"
/ {
compatible = "apple,n53", "apple,s5l8960x", "apple,arm-platform";
model = "Apple iPhone 5s (LTE)";
};

View File

@ -0,0 +1,113 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple S5L8960X "A7" SoC
*
* Other Names: H6, "Alcatraz"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
* Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts.
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "apple,cyclone";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu1: cpu@1 {
compatible = "apple,cyclone";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@20a0a0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0a0000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 140 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
wdt: watchdog@20e027000 {
compatible = "apple,s5l8960x-wdt", "apple,wdt";
reg = <0x2 0x0e027000 0x0 0x1000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
aic: interrupt-controller@20e100000 {
compatible = "apple,s5l8960x-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl: pinctrl@20e300000 {
compatible = "apple,s5l8960x-pinctrl", "apple,pinctrl";
reg = <0x2 0x0e300000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 200>;
apple,npins = <200>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 108 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 109 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 110 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 111 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 112 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 113 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 114 IRQ_TYPE_LEVEL_HIGH>;
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A7 doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};

View File

@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6s, iPhone 6s Plus, iPad 5, iPhone SE
*
* This file contains parts common to all Apple A9 devices.
*
* target-type: J71s, J72s, N66, N69u, N71, J71t, J72t, N66m, N69, N71m
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
aliases {
serial0 = &serial0;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 5 (Wi-Fi) (Samsung), J71s, iPad6,11 (A1822)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8000.dtsi"
#include "s800x-ipad5.dtsi"
/ {
compatible = "apple,j71s", "apple,s8000", "apple,arm-platform";
model = "Apple iPad 5 (Wi-Fi) (Samsung)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 5 (Cellular) (Samsung), J72s, iPad6,12 (A1823)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8000.dtsi"
#include "s800x-ipad5.dtsi"
/ {
compatible = "apple,j72s", "apple,s8000", "apple,arm-platform";
model = "Apple iPad 5 (Cellular) (Samsung)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6s Plus (Samsung), N66, iPhone8,2 (A1634/A1687/A1690/A1699)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8000.dtsi"
#include "s800x-6s.dtsi"
/ {
compatible = "apple,n66", "apple,s8000", "apple,arm-platform";
model = "Apple iPhone 6s Plus (Samsung)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone SE (Samsung), N69u, iPhone8,4 (A1662/A1723/A1724)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8000.dtsi"
#include "s800x-se.dtsi"
/ {
compatible = "apple,n69u", "apple,s8000", "apple,arm-platform";
model = "Apple iPhone SE (Samsung)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6s (Samsung), N71, iPhone8,1 (A1633/A1688/A1691/A1700)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8000.dtsi"
#include "s800x-6s.dtsi"
/ {
compatible = "apple,n71", "apple,s8000", "apple,arm-platform";
model = "Apple iPhone 6s (Samsung)";
};

View File

@ -0,0 +1,144 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple S8000 "A9" (Samsung) SoC
*
* Other names: H8P, "Maui"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "apple,twister";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu1: cpu@1 {
compatible = "apple,twister";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 192 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
aic: interrupt-controller@20e100000 {
compatible = "apple,s8000-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl_ap: pinctrl@20f100000 {
compatible = "apple,s8000-pinctrl", "apple,pinctrl";
reg = <0x2 0x0f100000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_ap 0 0 208>;
apple,npins = <208>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
};
pinctrl_aop: pinctrl@2100f0000 {
compatible = "apple,s8000-pinctrl", "apple,pinctrl";
reg = <0x2 0x100f0000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_aop 0 0 42>;
apple,npins = <42>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 113 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 114 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 115 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 116 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 117 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 118 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 119 IRQ_TYPE_LEVEL_HIGH>;
};
wdt: watchdog@2102b0000 {
compatible = "apple,s8000-wdt", "apple,wdt";
reg = <0x2 0x102b0000 0x0 0x4000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A9 doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};
/*
* The A9 was made by two separate fabs on two different process
* nodes: Samsung made the S8000 (APL0898) on 14nm and TSMC made
* the S8003 (APL1022) on 16nm. While they are seemingly the same,
* they do have distinct part numbers and devices using them have
* distinct model names. There are currently no known differences
* between these as far as Linux is concerned, but let's keep things
* structured properly to make it easier to alter the behaviour of
* one of the chips if need be.
*/

View File

@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro (9.7-inch), iPad Pro (12.9-inch)
*
* This file contains parts common to all Apple A9X devices.
*
* target-type: J127, J128, J98a, J99a
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
aliases {
serial0 = &serial0;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro (9.7-inch) (Wi-Fi), J127, iPad6,3 (A1673)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8001-pro.dtsi"
/ {
compatible = "apple,j127", "apple,s8001", "apple,arm-platform";
model = "Apple iPad Pro (9.7-inch) (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro (9.7-inch) (Cellular), J128, iPad6,4 (A1674/A1675)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8001-pro.dtsi"
/ {
compatible = "apple,j128", "apple,s8001", "apple,arm-platform";
model = "Apple iPad Pro (9.7-inch) (Cellular)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro (12.9-inch) (Wi-Fi), J98a, iPad6,7 (A1584)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8001-pro.dtsi"
/ {
compatible = "apple,j98a", "apple,s8001", "apple,arm-platform";
model = "Apple iPad Pro (12.9-inch) (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro (12.9-inch) (Cellular), J99a, iPad6,8 (A1652)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8001-pro.dtsi"
/ {
compatible = "apple,j99a", "apple,s8001", "apple,arm-platform";
model = "Apple iPad Pro (12.9-inch) (Cellular)";
};

View File

@ -0,0 +1,44 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro (1st generation) common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s8001.dtsi"
#include "s8001-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl_ap 122 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 123 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};
};

View File

@ -0,0 +1,133 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple S8001 "A9X" SoC
*
* Other names: H8G, "Elba"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "apple,twister";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu1: cpu@1 {
compatible = "apple,twister";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 218 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
aic: interrupt-controller@20e100000 {
compatible = "apple,s8000-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl_ap: pinctrl@20f100000 {
compatible = "apple,s8000-pinctrl", "apple,pinctrl";
reg = <0x2 0x0f100000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_ap 0 0 219>;
apple,npins = <219>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
};
pinctrl_aop: pinctrl@2100f0000 {
compatible = "apple,s8000-pinctrl", "apple,pinctrl";
reg = <0x2 0x100f0000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_aop 0 0 28>;
apple,npins = <28>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 132 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 133 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 134 IRQ_TYPE_LEVEL_HIGH>;
};
wdt: watchdog@2102b0000 {
compatible = "apple,s8000-wdt", "apple,wdt";
reg = <0x2 0x102b0000 0x0 0x4000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A9X doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 5 (Wi-Fi) (TSMC), J71t, iPad6,11 (A1822)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8003.dtsi"
#include "s800x-ipad5.dtsi"
/ {
compatible = "apple,j71t", "apple,s8003", "apple,arm-platform";
model = "Apple iPad 5 (Wi-Fi) (TSMC)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 5 (Cellular) (TSMC), J72t, iPad6,12 (A1823)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8003.dtsi"
#include "s800x-ipad5.dtsi"
/ {
compatible = "apple,j72t", "apple,s8003", "apple,arm-platform";
model = "Apple iPad 5 (Cellular) (TSMC)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6s Plus (TSMC), N66m, iPhone8,2 (A1634/A1687/A1690/A1699)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8003.dtsi"
#include "s800x-6s.dtsi"
/ {
compatible = "apple,n66m", "apple,s8003", "apple,arm-platform";
model = "Apple iPhone 6s Plus (TSMC)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone SE (TSMC), N69, iPhone8,4 (A1662/A1723/A1724)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8003.dtsi"
#include "s800x-se.dtsi"
/ {
compatible = "apple,n69", "apple,s8003", "apple,arm-platform";
model = "Apple iPhone SE (TSMC)";
};

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6s (TSMC), N71m, iPhone8,1 (A1633/A1688/A1691/A1700)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "s8003.dtsi"
#include "s800x-6s.dtsi"
/ {
compatible = "apple,n71m", "apple,s8003", "apple,arm-platform";
model = "Apple iPhone 6s (TSMC)";
};

View File

@ -0,0 +1,21 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple S8003 "A9" (TSMC) SoC
*
* Other names: H8P, "Malta"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s8000.dtsi"
/*
* The A9 was made by two separate fabs on two different process
* nodes: Samsung made the S8000 (APL0898) on 14nm and TSMC made
* the S8003 (APL1022) on 16nm. While they are seemingly the same,
* they do have distinct part numbers and devices using them have
* distinct model names. There are currently no known differences
* between these as far as Linux is concerned, but let's keep things
* structured properly to make it easier to alter the behaviour of
* one of the chips if need be.
*/

View File

@ -0,0 +1,49 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6s / 6S Plus common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s800-0-3-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "handset";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl_ap 96 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 97 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 67 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 66 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl_ap 149 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 5 common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s800-0-3-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl_ap 96 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 97 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 143 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 144 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};
};

View File

@ -0,0 +1,49 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone SE common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "s800-0-3-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "handset";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl_ap 96 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 97 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 67 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 66 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl_ap 149 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,50 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6 / 6 Plus common device tree
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include <dt-bindings/input/input.h>
#include "t7000.dtsi"
#include "t7000-common.dtsi"
#include "t7000-handheld.dtsi"
/ {
chassis-type = "handset";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl 32 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl 33 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl 45 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl 46 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl 131 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,36 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple TV HD, iPhone 6, iPhone 6 Plus, iPad mini 4, iPod touch 6
*
* This file contains parts common to all Apple A8 devices.
*
* target-type: J42d, J96, J97, N56, N61, N102
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
aliases {
serial0 = &serial0;
serial6 = &serial6;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};

View File

@ -0,0 +1,27 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6, iPhone 6 Plus, iPad mini 4, iPod touch 6
*
* This file contains the parts common to handheld devices with t7000
*
* target-type: J96, J97, N56, N61, N102
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
chosen {
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,31 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple TV HD, J42d, AppleTV5,3 (A1625)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7000.dtsi"
#include "t7000-common.dtsi"
/ {
compatible = "apple,j42d", "apple,t7000", "apple,arm-platform";
model = "Apple TV HD";
chassis-type = "television";
chosen {
stdout-path = "serial6";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
};
&serial6 {
status = "okay";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 4 (Wi-Fi), J96, iPad5,1 (A1538)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7000-mini4.dtsi"
/ {
compatible = "apple,j96", "apple,t7000", "apple,arm-platform";
model = "Apple iPad mini 4 (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 4 (Cellular), J97, iPad5,2 (A1550)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7000-mini4.dtsi"
/ {
compatible = "apple,j97", "apple,t7000", "apple,arm-platform";
model = "Apple iPad mini 4 (Cellular)";
};

View File

@ -0,0 +1,51 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad mini 4 common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "t7000.dtsi"
#include "t7000-common.dtsi"
#include "t7000-handheld.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl 32 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl 33 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl 45 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl 46 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl 36 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPod touch 6, N102, iPod7,1 (A1574)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7000.dtsi"
#include "t7000-common.dtsi"
#include "t7000-handheld.dtsi"
#include <dt-bindings/input/input.h>
/ {
compatible = "apple,n102", "apple,t7000", "apple,arm-platform";
model = "Apple iPod touch 6";
chassis-type = "handset";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl 32 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl 33 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl 46 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl 45 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6 Plus, N56, iPhone7,2 (A1549/A1586/A1589)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7000-6.dtsi"
/ {
compatible = "apple,n56", "apple,t7000", "apple,arm-platform";
model = "Apple iPhone 6 Plus";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 6, N61, iPhone7,2 (A1549/A1586/A1589)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7000-6.dtsi"
/ {
compatible = "apple,n61", "apple,t7000", "apple,arm-platform";
model = "Apple iPhone 6";
};

View File

@ -0,0 +1,125 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple T7000 "A8" SoC
*
* Other names: H7P, "Fiji"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
* Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts.
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "apple,typhoon";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu1: cpu@1 {
compatible = "apple,typhoon";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 158 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
serial6: serial@20a0d8000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0d8000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 164 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
wdt: watchdog@20e027000 {
compatible = "apple,t7000-wdt", "apple,wdt";
reg = <0x2 0x0e027000 0x0 0x1000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
aic: interrupt-controller@20e100000 {
compatible = "apple,t7000-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl: pinctrl@20e300000 {
compatible = "apple,t7000-pinctrl", "apple,pinctrl";
reg = <0x2 0x0e300000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 208>;
apple,npins = <208>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 62 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 63 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 64 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 65 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 66 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 67 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 68 IRQ_TYPE_LEVEL_HIGH>;
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A8 doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};

View File

@ -0,0 +1,74 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Air 2 common device tree
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "t7001.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl 0 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl 1 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl 92 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl 93 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Air 2 (Wi-Fi), J81, iPad5,3 (A1566)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7001-air2.dtsi"
/ {
compatible = "apple,j81", "apple,t7001", "apple,arm-platform";
model = "Apple iPad Air 2 (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Air 2 (Cellular), J82, iPad5,4 (A1567)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t7001-air2.dtsi"
/ {
compatible = "apple,j82", "apple,t7001", "apple,arm-platform";
model = "Apple iPad Air 2 (Cellular)";
};

View File

@ -0,0 +1,123 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple T7001 "A8X" SoC
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
* Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts.
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
aliases {
serial0 = &serial0;
};
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "apple,typhoon";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu1: cpu@1 {
compatible = "apple,typhoon";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled in by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu2: cpu@2 {
compatible = "apple,typhoon";
reg = <0x0 0x2>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 158 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
wdt: watchdog@20e027000 {
compatible = "apple,t7000-wdt", "apple,wdt";
reg = <0x2 0x0e027000 0x0 0x1000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
aic: interrupt-controller@20e100000 {
compatible = "apple,t7000-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl: pinctrl@20e300000 {
compatible = "apple,t7000-pinctrl", "apple,pinctrl";
reg = <0x2 0x0e300000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 184>;
apple,npins = <184>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 62 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 63 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 64 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 65 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 66 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 67 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 68 IRQ_TYPE_LEVEL_HIGH>;
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A8X doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};

View File

@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 7 / 7 Plus common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "t8010.dtsi"
#include "t8010-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "handset";
gpio-keys {
compatible = "gpio-keys";
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 179 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 180 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 23 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
switch-mute {
label = "Mute Switch";
gpios = <&pinctrl_ap 86 GPIO_ACTIVE_LOW>;
linux,code = <KEY_MUTE>;
};
};
};

View File

@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
* Apple iPhone 7, iPhone 7 Plus, iPad 6, iPad 7, iPod touch 7
*
* This file contains parts common to all Apple A10 devices.
*
* target-type: D10, D11, D101, D111, J71b, J72b, J171, J172, N112
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
aliases {
serial0 = &serial0;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 7 (Qualcomm), D10, iPhone9,1 (A1660/A1778/A1779/A1780)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-7.dtsi"
/ {
compatible = "apple,d10", "apple,t8010", "apple,arm-platform";
model = "Apple iPhone 7 (Qualcomm)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 7 (Intel), D101, iPhone9,3 (A1660/A1778/A1779/A1780)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-7.dtsi"
/ {
compatible = "apple,d101", "apple,t8010", "apple,arm-platform";
model = "Apple iPhone 7 (Intel)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 7 Plus (Qualcomm), D11, iPhone9,2 (A1661/A1784/A1785/A1786)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-7.dtsi"
/ {
compatible = "apple,d11", "apple,t8010", "apple,arm-platform";
model = "Apple iPhone 7 Plus (Qualcomm)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 7 Plus (Intel), D111, iPhone9,4 (A1661/A1784/A1785/A1786)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-7.dtsi"
/ {
compatible = "apple,d111", "apple,t8010", "apple,arm-platform";
model = "Apple iPhone 7 Plus (Intel)";
};

View File

@ -0,0 +1,44 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 6 common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "t8010.dtsi"
#include "t8010-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl_ap 180 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 179 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 89 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 90 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 7 common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/*
* The iPad 7 seems to be only an iteration over the iPad 6 with some
* small changes, like the a bigger screen and 1 GiB of RAM more, hence
* there is little to no differentiation between these 2 generations for
* now.
*/
#include "t8010-ipad6.dtsi"

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 7 (Wi-Fi), J171, iPad7,11 (A2197)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-ipad7.dtsi"
/ {
compatible = "apple,j171", "apple,t8010", "apple,arm-platform";
model = "Apple iPad 7 (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 7 (Cellular), J172, iPad7,12 (A2198/A2200)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-ipad7.dtsi"
/ {
compatible = "apple,j172", "apple,t8010", "apple,arm-platform";
model = "Apple iPad 7 (Cellular)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 6 (Wi-Fi), J71b, iPad7,5 (A1893)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-ipad6.dtsi"
/ {
compatible = "apple,j71b", "apple,t8010", "apple,arm-platform";
model = "Apple iPad 6 (Wi-Fi)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad 6 (Cellular), J72b, iPad7,6 (A1954)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010-ipad6.dtsi"
/ {
compatible = "apple,j72b", "apple,t8010", "apple,arm-platform";
model = "Apple iPad 6 (Cellular)";
};

View File

@ -0,0 +1,47 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPod touch 7, N112, iPod9,1 (A2178)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8010.dtsi"
#include "t8010-common.dtsi"
#include <dt-bindings/input/input.h>
/ {
compatible = "apple,n112", "apple,t8010", "apple,arm-platform";
model = "Apple iPod touch 7";
chassis-type = "handset";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl_ap 86 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 179 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 180 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 23 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};
};

View File

@ -0,0 +1,133 @@
// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
* Apple T8010 "A10" SoC
*
* Other names: H9P, "Cayman"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu1: cpu@1 {
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 218 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
aic: interrupt-controller@20e100000 {
compatible = "apple,t8010-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl_ap: pinctrl@20f100000 {
compatible = "apple,t8010-pinctrl", "apple,pinctrl";
reg = <0x2 0x0f100000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_ap 0 0 208>;
apple,npins = <208>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
};
pinctrl_aop: pinctrl@2100f0000 {
compatible = "apple,t8010-pinctrl", "apple,pinctrl";
reg = <0x2 0x100f0000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_aop 0 0 42>;
apple,npins = <42>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 132 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 133 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 134 IRQ_TYPE_LEVEL_HIGH>;
};
wdt: watchdog@2102b0000 {
compatible = "apple,t8010-wdt", "apple,wdt";
reg = <0x2 0x102b0000 0x0 0x4000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A10 doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};

View File

@ -0,0 +1,46 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple TV 4K, Apple iPad Pro 2
*
* This file contains parts common to all Apple A10X devices.
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
aliases {
serial0 = &serial0;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple TV 4K (1st Generation), J105a, AppleTV6,2 (A1482)
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/dts-v1/;
#include "t8011.dtsi"
#include "t8011-common.dtsi"
/ {
compatible = "apple,j105a", "apple,t8011", "apple,arm-platform";
model = "Apple TV 4K (1st Generation)";
chassis-type = "television";
};

View File

@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro 2 (12.9-inch) (Wi-Fi), J120, iPad7,1 (A1670)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8011.dtsi"
#include "t8011-common.dtsi"
#include "t8011-pro2.dtsi"
/ {
compatible = "apple,j120", "apple,t8011", "apple,arm-platform";
model = "Apple iPad Pro 2 (12.9-inch) (Wi-Fi)";
};

View File

@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro 2 (12.9-inch) (Cellular), J121, iPad7,2 (A1671)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8011.dtsi"
#include "t8011-common.dtsi"
#include "t8011-pro2.dtsi"
/ {
compatible = "apple,j121", "apple,t8011", "apple,arm-platform";
model = "Apple iPad Pro 2 (12.9-inch) (Cellular)";
};

View File

@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro 2 (10.5-inch) (Wi-Fi), J207, iPad7,3 (A1701)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8011.dtsi"
#include "t8011-common.dtsi"
#include "t8011-pro2.dtsi"
/ {
compatible = "apple,j207", "apple,t8011", "apple,arm-platform";
model = "Apple iPad Pro 2 (10.5-inch) (Wi-Fi)";
};

View File

@ -0,0 +1,16 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro 2 (10.5-inch) (Cellular), J208, iPad7,4 (A1709)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8011.dtsi"
#include "t8011-common.dtsi"
#include "t8011-pro2.dtsi"
/ {
compatible = "apple,j208", "apple,t8011", "apple,arm-platform";
model = "Apple iPad Pro 2 (10.5-inch) (Cellular)";
};

View File

@ -0,0 +1,42 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPad Pro 2 common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include <dt-bindings/input/input.h>
/ {
chassis-type = "tablet";
gpio-keys {
compatible = "gpio-keys";
button-home {
label = "Home Button";
gpios = <&pinctrl_ap 139 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
wakeup-source;
};
button-power {
label = "Power Button";
gpios = <&pinctrl_ap 138 GPIO_ACTIVE_LOW>;
linux,code = <KEY_POWER>;
wakeup-source;
};
button-voldown {
label = "Volume Down";
gpios = <&pinctrl_ap 43 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
button-volup {
label = "Volume Up";
gpios = <&pinctrl_ap 40 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
};
};

View File

@ -0,0 +1,141 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple T8011 "A10X" SoC
*
* Other names: H9G, "Myst"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu1: cpu@1 {
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu2: cpu@2 {
compatible = "apple,hurricane-zephyr";
reg = <0x0 0x2>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@20a0c0000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x0a0c0000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 216 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
aic: interrupt-controller@20e100000 {
compatible = "apple,t8010-aic", "apple,aic";
reg = <0x2 0x0e100000 0x0 0x100000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl_ap: pinctrl@20f100000 {
compatible = "apple,t8010-pinctrl", "apple,pinctrl";
reg = <0x2 0x0f100000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_ap 0 0 219>;
apple,npins = <219>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 42 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 43 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 44 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 45 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 46 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 47 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 48 IRQ_TYPE_LEVEL_HIGH>;
};
pinctrl_aop: pinctrl@2100f0000 {
compatible = "apple,t8010-pinctrl", "apple,pinctrl";
reg = <0x2 0x100f0000 0x0 0x100000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_aop 0 0 42>;
apple,npins = <42>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 125 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 126 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 127 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 128 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 129 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 130 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 131 IRQ_TYPE_LEVEL_HIGH>;
};
wdt: watchdog@2102b0000 {
compatible = "apple,t8010-wdt", "apple,wdt";
reg = <0x2 0x102b0000 0x0 0x4000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 4 IRQ_TYPE_LEVEL_HIGH>;
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A10X doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};

View File

@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 8 common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "t8015.dtsi"
#include "t8015-common.dtsi"
/ {
chassis-type = "handset";
};

View File

@ -0,0 +1,9 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 8 Plus common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/* The 8 Plus has minor differences like 1 more camera, 1 GiB of RAM more and a bigger display. */
#include "t8015-8.dtsi"

View File

@ -0,0 +1,48 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 8, iPhone 8 Plus, iPhone X
*
* This file contains parts common to all Apple A11 devices.
*
* target-type: D20, D21, D22, D201, D211, D221
*
* Copyright (c) 2024, Nick Chan <towinchenmi@gmail.com>
*/
/ {
aliases {
serial0 = &serial0;
};
chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;
stdout-path = "serial0";
framebuffer0: framebuffer@0 {
compatible = "apple,simple-framebuffer", "simple-framebuffer";
reg = <0 0 0 0>; /* To be filled by loader */
/* Format properties will be added by loader */
status = "disabled";
};
};
memory@800000000 {
device_type = "memory";
reg = <0x8 0 0 0>; /* To be filled by loader */
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
/* To be filled by loader */
};
};
&serial0 {
status = "okay";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 8 (Global), D20 iPhone10,1 (A1863/A1906/A1907)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8015-8.dtsi"
/ {
compatible = "apple,d20", "apple,t8015", "apple,arm-platform";
model = "Apple iPhone 8 (Global)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 8 (GSM), D20 iPhone10,4 (A1905)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8015-8.dtsi"
/ {
compatible = "apple,d201", "apple,t8015", "apple,arm-platform";
model = "Apple iPhone 8 (GSM)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 8 Plus (Global), D21 iPhone10,2 (A1864/A1897/A1898)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8015-8plus.dtsi"
/ {
compatible = "apple,d21", "apple,t8015", "apple,arm-platform";
model = "Apple iPhone 8 Plus (Global)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone 8 Plus (GSM), D211 iPhone10,5 (A1899)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8015-8plus.dtsi"
/ {
compatible = "apple,d211", "apple,t8015", "apple,arm-platform";
model = "Apple iPhone 8 Plus (GSM)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone X (Global), D22, iPhone10,3 (A1865)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8015-x.dtsi"
/ {
compatible = "apple,d22", "apple,t8015", "apple,arm-platform";
model = "Apple iPhone X (Global)";
};

View File

@ -0,0 +1,14 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone X (GSM), D221, iPhone10,6 (A1901)
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
/dts-v1/;
#include "t8015-x.dtsi"
/ {
compatible = "apple,d221", "apple,t8015", "apple,arm-platform";
model = "Apple iPhone X (GSM)";
};

View File

@ -0,0 +1,13 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple iPhone X common device tree
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include "t8015.dtsi"
#include "t8015-common.dtsi"
/ {
chassis-type = "handset";
};

View File

@ -0,0 +1,234 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* Apple T8015 "A11" SoC
*
* Other names: H10, "Skye"
*
* Copyright (c) 2022, Konrad Dybcio <konradybcio@kernel.org>
*/
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h>
/ {
interrupt-parent = <&aic>;
#address-cells = <2>;
#size-cells = <2>;
clkref: clock-ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "clkref";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
cpu-map {
cluster0 {
core0 {
cpu = <&cpu_e0>;
};
core1 {
cpu = <&cpu_e1>;
};
core2 {
cpu = <&cpu_e2>;
};
core3 {
cpu = <&cpu_e3>;
};
};
cluster1 {
core0 {
cpu = <&cpu_p0>;
};
core1 {
cpu = <&cpu_p1>;
};
};
};
cpu_e0: cpu@0 {
compatible = "apple,mistral";
reg = <0x0 0x0>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu_e1: cpu@1 {
compatible = "apple,mistral";
reg = <0x0 0x1>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu_e2: cpu@2 {
compatible = "apple,mistral";
reg = <0x0 0x2>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu_e3: cpu@3 {
compatible = "apple,mistral";
reg = <0x0 0x3>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu_p0: cpu@10004 {
compatible = "apple,monsoon";
reg = <0x0 0x10004>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
cpu_p1: cpu@10005 {
compatible = "apple,monsoon";
reg = <0x0 0x10005>;
cpu-release-addr = <0 0>; /* To be filled by loader */
enable-method = "spin-table";
device_type = "cpu";
};
};
soc {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <2>;
nonposted-mmio;
ranges;
serial0: serial@22e600000 {
compatible = "apple,s5l-uart";
reg = <0x2 0x2e600000 0x0 0x4000>;
reg-io-width = <4>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 282 IRQ_TYPE_LEVEL_HIGH>;
/* Use the bootloader-enabled clocks for now. */
clocks = <&clkref>, <&clkref>;
clock-names = "uart", "clk_uart_baud0";
status = "disabled";
};
aic: interrupt-controller@232100000 {
compatible = "apple,t8015-aic", "apple,aic";
reg = <0x2 0x32100000 0x0 0x8000>;
#interrupt-cells = <3>;
interrupt-controller;
};
pinctrl_ap: pinctrl@233100000 {
compatible = "apple,t8015-pinctrl", "apple,pinctrl";
reg = <0x2 0x33100000 0x0 0x1000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_ap 0 0 223>;
apple,npins = <223>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 50 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 51 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 52 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 53 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 54 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 55 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 56 IRQ_TYPE_LEVEL_HIGH>;
};
pinctrl_aop: pinctrl@2340f0000 {
compatible = "apple,t8015-pinctrl", "apple,pinctrl";
reg = <0x2 0x340f0000 0x0 0x4000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_aop 0 0 49>;
apple,npins = <49>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 135 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 136 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 137 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 138 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 139 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 140 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 141 IRQ_TYPE_LEVEL_HIGH>;
};
pinctrl_nub: pinctrl@2351f0000 {
compatible = "apple,t8015-pinctrl", "apple,pinctrl";
reg = <0x2 0x351f0000 0x0 0x4000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_nub 0 0 8>;
apple,npins = <8>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 168 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 169 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 170 IRQ_TYPE_LEVEL_HIGH>;
};
wdt: watchdog@2352b0000 {
compatible = "apple,t8015-wdt", "apple,wdt";
reg = <0x2 0x352b0000 0x0 0x4000>;
clocks = <&clkref>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 172 IRQ_TYPE_LEVEL_HIGH>;
};
pinctrl_smc: pinctrl@236024000 {
compatible = "apple,t8015-pinctrl", "apple,pinctrl";
reg = <0x2 0x36024000 0x0 0x4000>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl_smc 0 0 6>;
apple,npins = <6>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 199 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 200 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 201 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 202 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 203 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 204 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 205 IRQ_TYPE_LEVEL_HIGH>;
/*
* SMC is not yet supported and accessing this pinctrl while SMC is
* suspended results in a hang.
*/
status = "disabled";
};
};
timer {
compatible = "arm,armv8-timer";
interrupt-parent = <&aic>;
interrupt-names = "phys", "virt";
/* Note that A11 doesn't actually have a hypervisor (EL2 is not implemented). */
interrupts = <AIC_FIQ AIC_TMR_GUEST_PHYS IRQ_TYPE_LEVEL_HIGH>,
<AIC_FIQ AIC_TMR_GUEST_VIRT IRQ_TYPE_LEVEL_HIGH>;
};
};