From nobody Thu Nov 28 02:44:43 2024 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C2C618DF79; Mon, 7 Oct 2024 07:09:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728284980; cv=none; b=SZNlRoBFOzqyvmQRoSUPNVzfTFPWhTcjjQ7BaxeJUJRUqR8j+zUGXLqJaisPlUHXbTzcbQ7KyAEKZ86dXbBGWU9Bomu+yj7jyEsrGWrEc9U9hnOH1BY6lRPq8RQrn26wz7w8/bCqRCO0h6qIXhiOnL41KzVFGViuaCWU8WYM698= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728284980; c=relaxed/simple; bh=OC2nyxMD+nTq1sFVfp1QF6WgXBr4V0N7ghNOI2XntBY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uzAdXyUbx61YO1dodfoqic4Zqd9s91mrd0fBl/nv893UGdPkSxAiGz31KutLqIO+JuiHVQTS2XO4e4K4VBAc7RsAfHRNFrVK2yUe0ksgMeFJ64q3ebX7bEt9sfyfauzCl46mw7zEsapOBveaqsJIi7ggxMsnhOZEbWE2vSm7FI4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c4ms//rn; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c4ms//rn" Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-71e05198d1dso287609b3a.1; Mon, 07 Oct 2024 00:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728284977; x=1728889777; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/Ffh/IQ5l82LoZ9Xik8p+c95hI/8/BXIHDc2Ry7LIjc=; b=c4ms//rn5o1IXCWN+vSlTRaOLXwjHPai/wdXe2kjaR/bLFlvIBIzrQdrJuT0eA3Y3R Wii8SsuryrcQ3/8Mit+0a4j+yajW7KhziYjuXctQxonRmoDXtmf0Yw4SOVmrgAkDpNRM GtWSPV7IoYg5ZTx4XSpx6TeSS+dPMhgHAIsVNEeOZOefoZp6kCmtfPcAlYz6qQJDtQUi 6ra9eNOvbSDMPOo6S/gt7nUIF32T19qWAiooqSb7LF1v4KUJFyH+vOpDf2x58Z0wsD9A 79Xy9acNChjFV294zCK2ftjd0Q7rJSP23ndGghBuaw89b0HS1kaSzpHcEw0vNZd45Ftj hXNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728284977; x=1728889777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/Ffh/IQ5l82LoZ9Xik8p+c95hI/8/BXIHDc2Ry7LIjc=; b=ZXGCftCtiNXapTTrKYRMtikOg1t0CBKxA6detowfO9bN3tVkh6DK1UYXG3dFN2OnRS H+mzvIGrNgq3c4ySg9Km/JmHJrxgPaUMalhR/vVEZZOPCsg9vmdG10pJCiJYhkMcknvQ tIGhw0Dy83nTFJ7S1aTeStpEdqXLiDc5HarSFgz4ltSaqA1NHuFKlpHmJEPohBClolDb e9bBorvMeLzODkhls2b7VPbAfXBx9GOEarYEKh2xlalZcfHAK/Oc5OrDkSBDrvMGCqwz Sd8/Rce9fXlAwutQZBTodvpyLJ2454ajRTUhkxr9+bZJmlFVB9XOuyde3B7s6iDAcu7a 1C5w== X-Forwarded-Encrypted: i=1; AJvYcCUFUaZf/Ke2HuSVvNAlJH+dDQPDFAwWJriMOzofPnYSmPjcAQTs7j/GHG2wB18cHspekecO5YzrjHfUvO01zLw=@vger.kernel.org, AJvYcCWV49B+CxdhyIvD/oK4jS0bUJSb08WbD/nR0mYS6fIsWYaY2lFKZAKAjZTceOblKs4OqBCAgY4f7YU0@vger.kernel.org, AJvYcCWhrUDFHQ33vGDdDCUmKZX2ZWgZeeLq4t0NaN4MXwgdjBv4IO9IlcT52eJIHbqjJw02hurMEQv7rsJFeyR9@vger.kernel.org, AJvYcCXIRXUuOm89GW3yXwkebr3OTsmCIumz0bDXJDBJY6n0dpYpimreCWdqowgB8B4GHh1WzKG9Ck24hK0plA==@vger.kernel.org X-Gm-Message-State: AOJu0YyyCAKMfUTgu6C8IiwkdlkWn079OVrWtpU311fdUlXtEE6C1+x1 TGsrHQqlq7Ru8k19zIvQZlKAikGb2cZZzx0NtBiAr0ltWP6ZNeRR X-Google-Smtp-Source: AGHT+IEjTFXcCbg+4zU1SDynCEDtDi7ANqiSADswIW0iaoRCl0u/rCjrekdAydWBCXeGsooGHohh/Q== X-Received: by 2002:a05:6a20:438c:b0:1d6:c990:74cc with SMTP id adf61e73a8af0-1d6dfa2441emr15716229637.1.1728284976631; Mon, 07 Oct 2024 00:09:36 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-71df0ccd1a3sm3764147b3a.66.2024.10.07.00.09.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 00:09:36 -0700 (PDT) From: Nick Chan To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Wim Van Sebroeck , Guenter Roeck , Catalin Marinas , Will Deacon , Lorenzo Pieralisi , Mark Kettenis , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-watchdog@vger.kernel.org Cc: Konrad Dybcio , Nick Chan Subject: [PATCH v6 15/20] arm64: dts: apple: Add A9 devices Date: Mon, 7 Oct 2024 15:05:40 +0800 Message-ID: <20241007070758.9961-16-towinchenmi@gmail.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241007070758.9961-1-towinchenmi@gmail.com> References: <20241007070758.9961-1-towinchenmi@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Konrad Dybcio Add DTS files for the A9 SoC and the following devices based on it: - iPhone 6s - iPhone 6s Plus - iPhone SE (2016) - iPad 5 Signed-off-by: Konrad Dybcio [Nick: SMP, m1n1 and AOP pinctrl support] Co-developed-by: Nick Chan Signed-off-by: Nick Chan --- arch/arm64/boot/dts/apple/Makefile | 10 ++ .../arm64/boot/dts/apple/s800-0-3-common.dtsi | 48 ++++++ arch/arm64/boot/dts/apple/s8000-j71s.dts | 15 ++ arch/arm64/boot/dts/apple/s8000-j72s.dts | 15 ++ arch/arm64/boot/dts/apple/s8000-n66.dts | 15 ++ arch/arm64/boot/dts/apple/s8000-n69u.dts | 15 ++ arch/arm64/boot/dts/apple/s8000-n71.dts | 15 ++ arch/arm64/boot/dts/apple/s8000.dtsi | 144 ++++++++++++++++++ arch/arm64/boot/dts/apple/s8003-j71t.dts | 15 ++ arch/arm64/boot/dts/apple/s8003-j72t.dts | 15 ++ arch/arm64/boot/dts/apple/s8003-n66m.dts | 15 ++ arch/arm64/boot/dts/apple/s8003-n69.dts | 15 ++ arch/arm64/boot/dts/apple/s8003-n71m.dts | 15 ++ arch/arm64/boot/dts/apple/s8003.dtsi | 21 +++ arch/arm64/boot/dts/apple/s800x-6s.dtsi | 49 ++++++ arch/arm64/boot/dts/apple/s800x-ipad5.dtsi | 43 ++++++ arch/arm64/boot/dts/apple/s800x-se.dtsi | 49 ++++++ 17 files changed, 514 insertions(+) create mode 100644 arch/arm64/boot/dts/apple/s800-0-3-common.dtsi create mode 100644 arch/arm64/boot/dts/apple/s8000-j71s.dts create mode 100644 arch/arm64/boot/dts/apple/s8000-j72s.dts create mode 100644 arch/arm64/boot/dts/apple/s8000-n66.dts create mode 100644 arch/arm64/boot/dts/apple/s8000-n69u.dts create mode 100644 arch/arm64/boot/dts/apple/s8000-n71.dts create mode 100644 arch/arm64/boot/dts/apple/s8000.dtsi create mode 100644 arch/arm64/boot/dts/apple/s8003-j71t.dts create mode 100644 arch/arm64/boot/dts/apple/s8003-j72t.dts create mode 100644 arch/arm64/boot/dts/apple/s8003-n66m.dts create mode 100644 arch/arm64/boot/dts/apple/s8003-n69.dts create mode 100644 arch/arm64/boot/dts/apple/s8003-n71m.dts create mode 100644 arch/arm64/boot/dts/apple/s8003.dtsi create mode 100644 arch/arm64/boot/dts/apple/s800x-6s.dtsi create mode 100644 arch/arm64/boot/dts/apple/s800x-ipad5.dtsi create mode 100644 arch/arm64/boot/dts/apple/s800x-se.dtsi diff --git a/arch/arm64/boot/dts/apple/Makefile b/arch/arm64/boot/dts/apple= /Makefile index adda522ea490..cbb7e409b7e3 100644 --- a/arch/arm64/boot/dts/apple/Makefile +++ b/arch/arm64/boot/dts/apple/Makefile @@ -18,6 +18,16 @@ dtb-$(CONFIG_ARCH_APPLE) +=3D t7000-n56.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D t7000-n61.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D t7001-j81.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D t7001-j82.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8000-j71s.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8000-j72s.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8000-n66.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8000-n69u.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8000-n71.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8003-j71t.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8003-j72t.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8003-n66m.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8003-n69.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D s8003-n71m.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D t8103-j274.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D t8103-j293.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D t8103-j313.dtb diff --git a/arch/arm64/boot/dts/apple/s800-0-3-common.dtsi b/arch/arm64/bo= ot/dts/apple/s800-0-3-common.dtsi new file mode 100644 index 000000000000..4276bd890e81 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s800-0-3-common.dtsi @@ -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 + */ + +/ { + aliases { + serial0 =3D &serial0; + }; + + chosen { + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + + stdout-path =3D "serial0"; + + framebuffer0: framebuffer@0 { + compatible =3D "apple,simple-framebuffer", "simple-framebuffer"; + reg =3D <0 0 0 0>; /* To be filled by loader */ + /* Format properties will be added by loader */ + status =3D "disabled"; + }; + }; + + memory@800000000 { + device_type =3D "memory"; + reg =3D <0x8 0 0 0>; /* To be filled by loader */ + }; + + reserved-memory { + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + + /* To be filled by loader */ + }; +}; + +&serial0 { + status =3D "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/s8000-j71s.dts b/arch/arm64/boot/dts= /apple/s8000-j71s.dts new file mode 100644 index 000000000000..b5a2dfa1121e --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8000-j71s.dts @@ -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 + */ + +/dts-v1/; + +#include "s8000.dtsi" +#include "s800x-ipad5.dtsi" + +/ { + compatible =3D "apple,j71s", "apple,s8000", "apple,arm-platform"; + model =3D "Apple iPad 5 (Wi-Fi) (Samsung)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8000-j72s.dts b/arch/arm64/boot/dts= /apple/s8000-j72s.dts new file mode 100644 index 000000000000..8f3dea5adb09 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8000-j72s.dts @@ -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 + */ + +/dts-v1/; + +#include "s8000.dtsi" +#include "s800x-ipad5.dtsi" + +/ { + compatible =3D "apple,j72s", "apple,s8000", "apple,arm-platform"; + model =3D "Apple iPad 5 (Cellular) (Samsung)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8000-n66.dts b/arch/arm64/boot/dts/= apple/s8000-n66.dts new file mode 100644 index 000000000000..30b4b6630b60 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8000-n66.dts @@ -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 + */ + +/dts-v1/; + +#include "s8000.dtsi" +#include "s800x-6s.dtsi" + +/ { + compatible =3D "apple,n66", "apple,s8000", "apple,arm-platform"; + model =3D "Apple iPhone 6s Plus (Samsung)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8000-n69u.dts b/arch/arm64/boot/dts= /apple/s8000-n69u.dts new file mode 100644 index 000000000000..e63bc2e7f7c1 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8000-n69u.dts @@ -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 + */ + +/dts-v1/; + +#include "s8000.dtsi" +#include "s800x-se.dtsi" + +/ { + compatible =3D "apple,n69u", "apple,s8000", "apple,arm-platform"; + model =3D "Apple iPhone SE (Samsung)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8000-n71.dts b/arch/arm64/boot/dts/= apple/s8000-n71.dts new file mode 100644 index 000000000000..f2964a1fc434 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8000-n71.dts @@ -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 + */ + +/dts-v1/; + +#include "s8000.dtsi" +#include "s800x-6s.dtsi" + +/ { + compatible =3D "apple,n71", "apple,s8000", "apple,arm-platform"; + model =3D "Apple iPhone 6s (Samsung)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8000.dtsi b/arch/arm64/boot/dts/app= le/s8000.dtsi new file mode 100644 index 000000000000..6e9046ea106c --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8000.dtsi @@ -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 + */ + +#include +#include +#include +#include + +/ { + interrupt-parent =3D <&aic>; + #address-cells =3D <2>; + #size-cells =3D <2>; + + clkref: clock-ref { + compatible =3D "fixed-clock"; + #clock-cells =3D <0>; + clock-frequency =3D <24000000>; + clock-output-names =3D "clkref"; + }; + + cpus { + #address-cells =3D <2>; + #size-cells =3D <0>; + + cpu0: cpu@0 { + compatible =3D "apple,twister"; + reg =3D <0x0 0x0>; + cpu-release-addr =3D <0 0>; /* To be filled in by loader */ + enable-method =3D "spin-table"; + device_type =3D "cpu"; + }; + + cpu1: cpu@1 { + compatible =3D "apple,twister"; + reg =3D <0x0 0x1>; + cpu-release-addr =3D <0 0>; /* To be filled in by loader */ + enable-method =3D "spin-table"; + device_type =3D "cpu"; + }; + }; + + soc { + compatible =3D "simple-bus"; + #address-cells =3D <2>; + #size-cells =3D <2>; + nonposted-mmio; + ranges; + + serial0: serial@20a0c0000 { + compatible =3D "apple,s5l-uart"; + reg =3D <0x2 0x0a0c0000 0x0 0x4000>; + reg-io-width =3D <4>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + /* Use the bootloader-enabled clocks for now. */ + clocks =3D <&clkref>, <&clkref>; + clock-names =3D "uart", "clk_uart_baud0"; + status =3D "disabled"; + }; + + aic: interrupt-controller@20e100000 { + compatible =3D "apple,s8000-aic", "apple,aic"; + reg =3D <0x2 0x0e100000 0x0 0x100000>; + #interrupt-cells =3D <3>; + interrupt-controller; + }; + + pinctrl_ap: pinctrl@20f100000 { + compatible =3D "apple,s8000-pinctrl", "apple,pinctrl"; + reg =3D <0x2 0x0f100000 0x0 0x100000>; + + gpio-controller; + #gpio-cells =3D <2>; + gpio-ranges =3D <&pinctrl_ap 0 0 208>; + apple,npins =3D <208>; + + interrupt-controller; + #interrupt-cells =3D <2>; + interrupt-parent =3D <&aic>; + interrupts =3D , + , + , + , + , + , + ; + }; + + pinctrl_aop: pinctrl@2100f0000 { + compatible =3D "apple,s8000-pinctrl", "apple,pinctrl"; + reg =3D <0x2 0x100f0000 0x0 0x100000>; + + gpio-controller; + #gpio-cells =3D <2>; + gpio-ranges =3D <&pinctrl_aop 0 0 42>; + apple,npins =3D <42>; + + interrupt-controller; + #interrupt-cells =3D <2>; + interrupt-parent =3D <&aic>; + interrupts =3D , + , + , + , + , + , + ; + }; + + wdt: watchdog@2102b0000 { + compatible =3D "apple,s8000-wdt", "apple,wdt"; + reg =3D <0x2 0x102b0000 0x0 0x4000>; + clocks =3D <&clkref>; + interrupt-parent =3D <&aic>; + interrupts =3D ; + }; + }; + + timer { + compatible =3D "arm,armv8-timer"; + interrupt-parent =3D <&aic>; + interrupt-names =3D "phys", "virt"; + /* Note that A9 doesn't actually have a hypervisor (EL2 is not implement= ed). */ + interrupts =3D , + ; + }; +}; + +/* + * 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. + */ diff --git a/arch/arm64/boot/dts/apple/s8003-j71t.dts b/arch/arm64/boot/dts= /apple/s8003-j71t.dts new file mode 100644 index 000000000000..0d906ae80b07 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8003-j71t.dts @@ -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 + */ + +/dts-v1/; + +#include "s8003.dtsi" +#include "s800x-ipad5.dtsi" + +/ { + compatible =3D "apple,j71t", "apple,s8003", "apple,arm-platform"; + model =3D "Apple iPad 5 (Wi-Fi) (TSMC)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8003-j72t.dts b/arch/arm64/boot/dts= /apple/s8003-j72t.dts new file mode 100644 index 000000000000..0cd7d88e9dfb --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8003-j72t.dts @@ -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 + */ + +/dts-v1/; + +#include "s8003.dtsi" +#include "s800x-ipad5.dtsi" + +/ { + compatible =3D "apple,j72t", "apple,s8003", "apple,arm-platform"; + model =3D "Apple iPad 5 (Cellular) (TSMC)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8003-n66m.dts b/arch/arm64/boot/dts= /apple/s8003-n66m.dts new file mode 100644 index 000000000000..4146cd28160d --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8003-n66m.dts @@ -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 + */ + +/dts-v1/; + +#include "s8003.dtsi" +#include "s800x-6s.dtsi" + +/ { + compatible =3D "apple,n66m", "apple,s8003", "apple,arm-platform"; + model =3D "Apple iPhone 6s Plus (TSMC)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8003-n69.dts b/arch/arm64/boot/dts/= apple/s8003-n69.dts new file mode 100644 index 000000000000..8eed879b155e --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8003-n69.dts @@ -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 + */ + +/dts-v1/; + +#include "s8003.dtsi" +#include "s800x-se.dtsi" + +/ { + compatible =3D "apple,n69", "apple,s8003", "apple,arm-platform"; + model =3D "Apple iPhone SE (TSMC)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8003-n71m.dts b/arch/arm64/boot/dts= /apple/s8003-n71m.dts new file mode 100644 index 000000000000..7ec6d2cda0bf --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8003-n71m.dts @@ -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 + */ + +/dts-v1/; + +#include "s8003.dtsi" +#include "s800x-6s.dtsi" + +/ { + compatible =3D "apple,n71m", "apple,s8003", "apple,arm-platform"; + model =3D "Apple iPhone 6s (TSMC)"; +}; diff --git a/arch/arm64/boot/dts/apple/s8003.dtsi b/arch/arm64/boot/dts/app= le/s8003.dtsi new file mode 100644 index 000000000000..7e4ad4f7e499 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s8003.dtsi @@ -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 + */ + +#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. + */ diff --git a/arch/arm64/boot/dts/apple/s800x-6s.dtsi b/arch/arm64/boot/dts/= apple/s800x-6s.dtsi new file mode 100644 index 000000000000..49b04db310c6 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s800x-6s.dtsi @@ -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 + */ + +#include "s800-0-3-common.dtsi" +#include + +/ { + chassis-type =3D "handset"; + + gpio-keys { + compatible =3D "gpio-keys"; + + button-home { + label =3D "Home Button"; + gpios =3D <&pinctrl_ap 96 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-power { + label =3D "Power Button"; + gpios =3D <&pinctrl_ap 97 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-voldown { + label =3D "Volume Down"; + gpios =3D <&pinctrl_ap 67 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + button-volup { + label =3D "Volume Up"; + gpios =3D <&pinctrl_ap 66 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + switch-mute { + label =3D "Mute Switch"; + gpios =3D <&pinctrl_ap 149 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/s800x-ipad5.dtsi b/arch/arm64/boot/d= ts/apple/s800x-ipad5.dtsi new file mode 100644 index 000000000000..32570ed3cdf0 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s800x-ipad5.dtsi @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple iPad 5 common device tree + * + * Copyright (c) 2022, Konrad Dybcio + */ + +#include "s800-0-3-common.dtsi" +#include + +/ { + chassis-type =3D "tablet"; + + gpio-keys { + compatible =3D "gpio-keys"; + + button-home { + label =3D "Home Button"; + gpios =3D <&pinctrl_ap 96 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-power { + label =3D "Power Button"; + gpios =3D <&pinctrl_ap 97 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-voldown { + label =3D "Volume Down"; + gpios =3D <&pinctrl_ap 143 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + button-volup { + label =3D "Volume Up"; + gpios =3D <&pinctrl_ap 144 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/s800x-se.dtsi b/arch/arm64/boot/dts/= apple/s800x-se.dtsi new file mode 100644 index 000000000000..a1a5690e8371 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s800x-se.dtsi @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple iPhone SE common device tree + * + * Copyright (c) 2022, Konrad Dybcio + */ + +#include "s800-0-3-common.dtsi" +#include + +/ { + chassis-type =3D "handset"; + + gpio-keys { + compatible =3D "gpio-keys"; + + button-home { + label =3D "Home Button"; + gpios =3D <&pinctrl_ap 96 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-power { + label =3D "Power Button"; + gpios =3D <&pinctrl_ap 97 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-voldown { + label =3D "Volume Down"; + gpios =3D <&pinctrl_ap 67 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + button-volup { + label =3D "Volume Up"; + gpios =3D <&pinctrl_ap 66 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + switch-mute { + label =3D "Mute Switch"; + gpios =3D <&pinctrl_ap 149 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; +}; --=20 2.46.2