From nobody Tue Nov 26 02:21:10 2024 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 40AA5155A4E; Wed, 23 Oct 2024 04:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729658772; cv=none; b=rP4r23Nr3yG++CYVR+Krntr/S+sdCdOe3agOll90Yt9YkK6bRdPkTs7EXV8v82neK6RxkHbsEke5q1WzLrQZlSqWvqYzVIIW3Wl8bITcda5dF9YOFy9nN91egqgMIlP/p2VgC9ruZbJ9oxrXr5qFLH/0qSTkWpixD63tt2l6ILk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729658772; c=relaxed/simple; bh=94jjOdtrtZImvKDIPteMs5rqwLM6WzumKrYkKINXUV0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h2uUf9gYGpWh1mn9dGYQFWz6Km63DJLMasZWtpFdF/9Kk4A2N5PlgTdsT+gnybG3E/Oyunf07tJETGYAGy785eu9SNWB419ckVavy6DkAT8pXGMKfRTmV4gZNMCJ0CyeLvnl/oi3sN1rv8HlaawFx00Nh2g2FzsHxzog4Q4eBrM= 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=Ag08rS7K; arc=none smtp.client-ip=209.85.214.175 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="Ag08rS7K" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-20cb89a4e4cso45075025ad.3; Tue, 22 Oct 2024 21:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729658769; x=1730263569; 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=uijBdBq6zNUqacP6OtbyYBaUoq7n8oBf5StN0dV2d5Q=; b=Ag08rS7KRWz71Dxd/79oxcu72TxqMETjZJvX3iOoiXYDqUYTkRwjAaj34N2rCf88aN 7pTkwRtcqx366v7Y2gu00i7pdNVubMs+lHlkAyI9UleSOohlVA+e8gdCozvNb7qZkOLd AFuopZnG1DwmCoxvK+/z5hh0I398rMYPGzhhwau/+hzAljNhY5yWCVxGzmf1t9bCVI0x WxV3TWbJR8SJHx7COV9PRn8Fn7wJf2POc96nF4n8Y+6SVzvdi3wz94/+pJnpsAfvTpfu XeMWtBPVROMYfyNSQ4n1m0D1YsRB+IEsZc7zZduxV84TTrUGI7WySAG2qSOK/y+5TLed 63AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729658769; x=1730263569; 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=uijBdBq6zNUqacP6OtbyYBaUoq7n8oBf5StN0dV2d5Q=; b=ahTS+DNm+8wJeoLe3UgJDQyepXaQhROV2TBRSTBrSpqjuAePHzBsIb2/cVu0vFncwd MRlOzAXPoV3puDTaUSSeyi3flkp8mH60/VVHPDCnJllYrpAQMBDDn0PUFWmCh8ME5Ony GfyIc/lOvYAhj9BUV1BOlFliCvdRGe7soh8itQdL4uHfq845HYuWPgnk6c5q5Mb3fySo 8RR1kQuHOpN3FqZZZ5v4ANm1CTs8Ju8xGcwawux9SGTJygvwhzLTu+VVfD/GmKnfHMDw eBWxJUhU/ToVRDC5+Ykzfiy3JusY65thweZAsJBEtggOdzWJ7cHQNUfFm9+rZZ+ItvjM Nksw== X-Forwarded-Encrypted: i=1; AJvYcCUnhW5DBxD8sgN3Z6TmebGEX4qSTCy0gL6QkvmS19bcTxOcM1Ojru4qHgVBaOxtaJa/JntSQCQ1O7VR4ked@vger.kernel.org, AJvYcCVNsVccmnhejmM+LX2oKrfA1dKIK48mMKpJZ4vT6oSDcLI4caGYJUOD0Tuo6WisgHUuH8AocHGQbyePXg==@vger.kernel.org, AJvYcCVn2wnVUQKxe5GEUOA1KBfbhEzovhgqeLQZJ2bWax34YIM1Z7AUcp2MnwCtaHk5nORXaF9GKOHAK3hF@vger.kernel.org, AJvYcCWyF2ypxRzLwJ/6hlj7NzPgBxh/S0kgs9MZv9HVpJnD1j7btrugxfjRxKcllqkQquO9FIL6i+HnKjwUxfEeWPg=@vger.kernel.org X-Gm-Message-State: AOJu0YxfZATvt28Dqv6GBTs/J0UFa1WUFq5MVIBG3YxzlcHmH+iW1qZw /R71HcEl0pfbj5rf6nrzRFrwCdTLcm++1Xetewnl0vxIA95IdhO2 X-Google-Smtp-Source: AGHT+IGbzovQGjh+okIEUuKeJiLrFqCPS8MgkLOOX7Nkj7uSPViLPLAHmCZJseRskzAMtU6IT0XyMg== X-Received: by 2002:a17:902:f94e:b0:20e:5997:c107 with SMTP id d9443c01a7336-20fa9ea0977mr14453345ad.39.1729658769392; Tue, 22 Oct 2024 21:46:09 -0700 (PDT) Received: from nick-mbp.ust.hk ([182.153.135.7]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-20e7f0de3c3sm49983125ad.207.2024.10.22.21.46.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 21:46:09 -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 RESEND 17/20] arm64: dts: apple: Add A10 devices Date: Wed, 23 Oct 2024 12:40:52 +0800 Message-ID: <20241023044423.18294-18-towinchenmi@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241023044423.18294-1-towinchenmi@gmail.com> References: <20241023044423.18294-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 A10 SoC and the following devices based on it: - iPhone 7 - iPhone 7 Plus - iPod touch 7 - iPad 6 - iPad 7 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 | 9 ++ arch/arm64/boot/dts/apple/t8010-7.dtsi | 43 +++++++ arch/arm64/boot/dts/apple/t8010-common.dtsi | 48 +++++++ arch/arm64/boot/dts/apple/t8010-d10.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-d101.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-d11.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-d111.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-ipad6.dtsi | 44 +++++++ arch/arm64/boot/dts/apple/t8010-ipad7.dtsi | 14 +++ arch/arm64/boot/dts/apple/t8010-j171.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-j172.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-j71b.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-j72b.dts | 14 +++ arch/arm64/boot/dts/apple/t8010-n112.dts | 47 +++++++ arch/arm64/boot/dts/apple/t8010.dtsi | 133 ++++++++++++++++++++ 15 files changed, 450 insertions(+) create mode 100644 arch/arm64/boot/dts/apple/t8010-7.dtsi create mode 100644 arch/arm64/boot/dts/apple/t8010-common.dtsi create mode 100644 arch/arm64/boot/dts/apple/t8010-d10.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-d101.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-d11.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-d111.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-ipad6.dtsi create mode 100644 arch/arm64/boot/dts/apple/t8010-ipad7.dtsi create mode 100644 arch/arm64/boot/dts/apple/t8010-j171.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-j172.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-j71b.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-j72b.dts create mode 100644 arch/arm64/boot/dts/apple/t8010-n112.dts create mode 100644 arch/arm64/boot/dts/apple/t8010.dtsi diff --git a/arch/arm64/boot/dts/apple/Makefile b/arch/arm64/boot/dts/apple= /Makefile index f8cd10889d9f..4a7002e289a0 100644 --- a/arch/arm64/boot/dts/apple/Makefile +++ b/arch/arm64/boot/dts/apple/Makefile @@ -32,6 +32,15 @@ dtb-$(CONFIG_ARCH_APPLE) +=3D s8001-j127.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D s8001-j128.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D s8001-j98a.dtb dtb-$(CONFIG_ARCH_APPLE) +=3D s8001-j99a.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-d101.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-d10.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-d111.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-d11.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-j171.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-j172.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-j71b.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-j72b.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8010-n112.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/t8010-7.dtsi b/arch/arm64/boot/dts/a= pple/t8010-7.dtsi new file mode 100644 index 000000000000..1332fd73f50f --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-7.dtsi @@ -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 + */ + +#include "t8010.dtsi" +#include "t8010-common.dtsi" +#include + +/ { + chassis-type =3D "handset"; + + gpio-keys { + compatible =3D "gpio-keys"; + + button-power { + label =3D "Power Button"; + gpios =3D <&pinctrl_ap 179 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-voldown { + label =3D "Volume Down"; + gpios =3D <&pinctrl_ap 180 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + button-volup { + label =3D "Volume Up"; + gpios =3D <&pinctrl_ap 23 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + switch-mute { + label =3D "Mute Switch"; + gpios =3D <&pinctrl_ap 86 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-common.dtsi b/arch/arm64/boot/= dts/apple/t8010-common.dtsi new file mode 100644 index 000000000000..6613fb57c92f --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-common.dtsi @@ -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 + */ + +/ { + 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/t8010-d10.dts b/arch/arm64/boot/dts/= apple/t8010-d10.dts new file mode 100644 index 000000000000..39cdd12db6bf --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-d10.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-7.dtsi" + +/ { + compatible =3D "apple,d10", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPhone 7 (Qualcomm)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-d101.dts b/arch/arm64/boot/dts= /apple/t8010-d101.dts new file mode 100644 index 000000000000..6a9f0856f930 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-d101.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-7.dtsi" + +/ { + compatible =3D "apple,d101", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPhone 7 (Intel)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-d11.dts b/arch/arm64/boot/dts/= apple/t8010-d11.dts new file mode 100644 index 000000000000..57e41c2cfbe2 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-d11.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-7.dtsi" + +/ { + compatible =3D "apple,d11", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPhone 7 Plus (Qualcomm)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-d111.dts b/arch/arm64/boot/dts= /apple/t8010-d111.dts new file mode 100644 index 000000000000..37e395a48c1d --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-d111.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-7.dtsi" + +/ { + compatible =3D "apple,d111", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPhone 7 Plus (Intel)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-ipad6.dtsi b/arch/arm64/boot/d= ts/apple/t8010-ipad6.dtsi new file mode 100644 index 000000000000..81696c6e302c --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-ipad6.dtsi @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple iPad 6 common device tree + * + * Copyright (c) 2022, Konrad Dybcio + */ + +#include "t8010.dtsi" +#include "t8010-common.dtsi" +#include + +/ { + chassis-type =3D "tablet"; + + gpio-keys { + compatible =3D "gpio-keys"; + + button-home { + label =3D "Home Button"; + gpios =3D <&pinctrl_ap 180 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-power { + label =3D "Power Button"; + gpios =3D <&pinctrl_ap 179 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-voldown { + label =3D "Volume Down"; + gpios =3D <&pinctrl_ap 89 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + button-volup { + label =3D "Volume Up"; + gpios =3D <&pinctrl_ap 90 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-ipad7.dtsi b/arch/arm64/boot/d= ts/apple/t8010-ipad7.dtsi new file mode 100644 index 000000000000..bd0e9c0b5696 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-ipad7.dtsi @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple iPad 7 common device tree + * + * Copyright (c) 2022, Konrad Dybcio + */ + +/* + * 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" diff --git a/arch/arm64/boot/dts/apple/t8010-j171.dts b/arch/arm64/boot/dts= /apple/t8010-j171.dts new file mode 100644 index 000000000000..6751bf3a4afd --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-j171.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-ipad7.dtsi" + +/ { + compatible =3D "apple,j171", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPad 7 (Wi-Fi)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-j172.dts b/arch/arm64/boot/dts= /apple/t8010-j172.dts new file mode 100644 index 000000000000..51aaa950acd9 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-j172.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-ipad7.dtsi" + +/ { + compatible =3D "apple,j172", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPad 7 (Cellular)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-j71b.dts b/arch/arm64/boot/dts= /apple/t8010-j71b.dts new file mode 100644 index 000000000000..534eb8413e08 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-j71b.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-ipad6.dtsi" + +/ { + compatible =3D "apple,j71b", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPad 6 (Wi-Fi)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-j72b.dts b/arch/arm64/boot/dts= /apple/t8010-j72b.dts new file mode 100644 index 000000000000..264924e41f42 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-j72b.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010-ipad6.dtsi" + +/ { + compatible =3D "apple,j72b", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPad 6 (Cellular)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8010-n112.dts b/arch/arm64/boot/dts= /apple/t8010-n112.dts new file mode 100644 index 000000000000..6e71c3cb5d92 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010-n112.dts @@ -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 + */ + +/dts-v1/; + +#include "t8010.dtsi" +#include "t8010-common.dtsi" +#include + +/ { + compatible =3D "apple,n112", "apple,t8010", "apple,arm-platform"; + model =3D "Apple iPod touch 7"; + chassis-type =3D "handset"; + + gpio-keys { + compatible =3D "gpio-keys"; + + button-home { + label =3D "Home Button"; + gpios =3D <&pinctrl_ap 86 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-power { + label =3D "Power Button"; + gpios =3D <&pinctrl_ap 179 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-voldown { + label =3D "Volume Down"; + gpios =3D <&pinctrl_ap 180 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + button-volup { + label =3D "Volume Up"; + gpios =3D <&pinctrl_ap 23 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t8010.dtsi b/arch/arm64/boot/dts/app= le/t8010.dtsi new file mode 100644 index 000000000000..e3d6a8354103 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8010.dtsi @@ -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 + */ + +#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,hurricane-zephyr"; + reg =3D <0x0 0x0>; + cpu-release-addr =3D <0 0>; /* To be filled by loader */ + enable-method =3D "spin-table"; + device_type =3D "cpu"; + }; + + cpu1: cpu@1 { + compatible =3D "apple,hurricane-zephyr"; + reg =3D <0x0 0x1>; + cpu-release-addr =3D <0 0>; /* To be filled 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,t8010-aic", "apple,aic"; + reg =3D <0x2 0x0e100000 0x0 0x100000>; + #interrupt-cells =3D <3>; + interrupt-controller; + }; + + pinctrl_ap: pinctrl@20f100000 { + compatible =3D "apple,t8010-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,t8010-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,t8010-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 A10 doesn't actually have a hypervisor (EL2 is not implemen= ted). */ + interrupts =3D , + ; + }; +}; --=20 2.47.0