From nobody Fri Nov 29 23:44:26 2024 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (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 85F5818DF78; Sat, 14 Sep 2024 05:26:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726291602; cv=none; b=f9/FM4J06wFyTscKu33AShSuPuo7s/T36wT7Lt8+/95Fhp9Y+Dd65eKA9pcKOY+rOJcA3/CDxXbJfWT6MMkul5Kkweu1nn+Q7jpUJApPfsauHDfE9TaSIIL+WydQA0bvXtY5ZXpHWhpDnrGsGcWilDXezuUmg4Mxd5hLIC4yyR4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726291602; c=relaxed/simple; bh=J5SEPolgAawSH5c+wA7Z9Ao9L7d2oXkDAmd1T2EK/Cs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kpgcwUn8udlNIIhKSyI/7XIdNoQXUNhf9uZuTvzUksGptdwux90nX6LXI+HIleic06i1YHT8IR5R1s8drfJcucUs65UHRj/i8bVGJSZIgzqThvrKDdC46yvV00VvIKmDwv+kn4y8uZoJSN7yDyA7ntRZzGkcPiL/MtxWn1EXGOk= 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=U86bhICt; arc=none smtp.client-ip=209.85.210.177 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="U86bhICt" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-718e3c98b5aso1955234b3a.0; Fri, 13 Sep 2024 22:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726291600; x=1726896400; 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=rfUOSGh3pPERF4l//XzS1dlj9PxGJ9eyoQTy2F1aJ0g=; b=U86bhICtczX0lRXE9kb9oP9sRNDef2yZGV6xArdy08a2rD+eID8BfPBaiMT48e3iH1 09t+R1i8qQOhmBetgR1YKzgw2miBLSPnnF/xRdFbeRuQkR1i6v65r2hEimBr0g3/JTuX Xf0kHFWhsv5vwxNgL6E87Gbmlv2gVGiq8JtYvcLDz+yyoOmUcwhxkudjBvCdC/HCUhb5 tfqiMPrkFBBe31Uy6XIk6JnUxY4B82abgk6frqhVW95UNHA25mdbk6z/D9Z+ybJfaiPD MCh4qjzB09+/hUBPOigE1klagYypGatZglX67WsMKtGZTyIeUo4cXZabHwfCAemLWDoE ZoEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726291600; x=1726896400; 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=rfUOSGh3pPERF4l//XzS1dlj9PxGJ9eyoQTy2F1aJ0g=; b=ETrdLtTU4CMljoa3TzWbQfAcYN+aWK/6I3lxSKDK6G6RjxLZOCRw12fJYJinvUlPAc ruzd472kHC44TtfHJOMoNTlO9WvkzZH8Br1CHCUlhWHn0rc9ivA2UvQEwgatEo0HK4uM NqP9V+t68cu9BrQioiWz9lVcATdlhGZk0nB8FXZM7qpI3u8tS0+jgTMfOD5HGzEYXcV9 Pi/T0IGN1TwBwang5Zzd2JME54mc8E5P+An44gX7moQb/Z+j0eJaemM+g5XJM5YR8x6V 8Dg4TL/OjZ17l/C89PFRv9PRIwEZHYQ6XCTh61dF2Jj9jo5oUyT7bUDEDumYhGyNppfB Ghqg== X-Forwarded-Encrypted: i=1; AJvYcCV8bDd9GykHL1gRVRabqNt5GDnkacy/Mf+iA5o0k2cHvfFcfhV8ORcYCYgW4Umi8I9NnQnLUpwEBepjEw==@vger.kernel.org, AJvYcCViIbIo8EDir7Yr5QOB9buMzNfjiKG+KTI5JDN1pUvS7spNcEMfrVVzqfaoOghWIt2PlVkbD9O9nFM=@vger.kernel.org, AJvYcCVzxBqoHHVWCfMP4BSxnFPIzPWeHZ95/4TJhs0DBt8Of0Lb6BExND4qkaw+wvLCt2LC2KlGJoZpAKLLIos3npE=@vger.kernel.org, AJvYcCWPbfTIte26aT2b113j2Q7knTs4QHMI9fXN7hCUHM2z5qwf6tlDlf5ZagAnV+47bHDweMsZT9dmwez92qog@vger.kernel.org, AJvYcCXmwU2TX6qQ1iuEWoONSxVc/XdeMBtwUBa19Qr+bZOtK/LWc7b0d/cAQMXwbE2GgzNt1NPKQ6YGTldO@vger.kernel.org X-Gm-Message-State: AOJu0Yxs5f48lHduah9wFTA10ZKNWsKVyR3fFaICxZ7Les32VhKwv7NF G8MtstDa8JNDW9yZtrTHbCaN0F+Atg2qzloDzAzcAKna6fZ0JRN1 X-Google-Smtp-Source: AGHT+IGmcyY6AiotQBF3f9115zd9WAeL32fGNaZR6nVdcf6H/eYi4goidhnFsYMdxZhVQ9S9l0QtZw== X-Received: by 2002:a05:6a00:993:b0:714:157a:bfc7 with SMTP id d2e1a72fcca58-71926084bb4mr12739699b3a.15.1726291599783; Fri, 13 Sep 2024 22:26:39 -0700 (PDT) Received: from localhost.localdomain ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-71944b7b749sm391223b3a.113.2024.09.13.22.26.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 22:26:39 -0700 (PDT) From: Nick Chan To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "Rafael J . Wysocki" , Viresh Kumar , 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-pm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-watchdog@vger.kernel.org Cc: Nick Chan , Ivaylo Ivanov , Konrad Dybcio Subject: [PATCH v2 19/22] arm64: dts: apple: Add A10X devices Date: Sat, 14 Sep 2024 13:17:28 +0800 Message-ID: <20240914052413.68177-23-towinchenmi@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240914052413.68177-1-towinchenmi@gmail.com> References: <20240914052413.68177-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 A10X SoC and the following devices based on it: - Apple TV 4K - iPad Pro (2nd Generation) (10.5 Inch) - iPad Pro (2nd Generation) (12.9 Inch) Signed-off-by: Konrad Dybcio [Nick: SMP, m1n1 and Apple TV 4K support, uart interrupt and pinctrl fixes] Co-developed-by: Nick Chan Signed-off-by: Nick Chan --- arch/arm64/boot/dts/apple/Makefile | 5 + arch/arm64/boot/dts/apple/t8011-j105a.dts | 15 ++ arch/arm64/boot/dts/apple/t8011-j120.dts | 14 ++ arch/arm64/boot/dts/apple/t8011-j121.dts | 14 ++ arch/arm64/boot/dts/apple/t8011-j207.dts | 14 ++ arch/arm64/boot/dts/apple/t8011-j208.dts | 14 ++ arch/arm64/boot/dts/apple/t8011-pro2.dtsi | 47 ++++++ arch/arm64/boot/dts/apple/t8011.dtsi | 175 ++++++++++++++++++++++ 8 files changed, 298 insertions(+) create mode 100644 arch/arm64/boot/dts/apple/t8011-j105a.dts create mode 100644 arch/arm64/boot/dts/apple/t8011-j120.dts create mode 100644 arch/arm64/boot/dts/apple/t8011-j121.dts create mode 100644 arch/arm64/boot/dts/apple/t8011-j207.dts create mode 100644 arch/arm64/boot/dts/apple/t8011-j208.dts create mode 100644 arch/arm64/boot/dts/apple/t8011-pro2.dtsi create mode 100644 arch/arm64/boot/dts/apple/t8011.dtsi diff --git a/arch/arm64/boot/dts/apple/Makefile b/arch/arm64/boot/dts/apple= /Makefile index 4a7002e289a0..a44c14fae7bc 100644 --- a/arch/arm64/boot/dts/apple/Makefile +++ b/arch/arm64/boot/dts/apple/Makefile @@ -41,6 +41,11 @@ 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 t8011-j105a.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8011-j120.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8011-j121.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8011-j207.dtb +dtb-$(CONFIG_ARCH_APPLE) +=3D t8011-j208.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/t8011-j105a.dts b/arch/arm64/boot/dt= s/apple/t8011-j105a.dts new file mode 100644 index 000000000000..4efd02725963 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8011-j105a.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple TV 4K (1st Generation), J105a, AppleTV6,2 (A1482) + * Copyright (c) 2024, Nick Chan + */ + +/dts-v1/; + +#include "t8011.dtsi" + +/ { + compatible =3D "apple,j105a", "apple,t8011", "apple,arm-platform"; + model =3D "Apple TV 4K (1st Generation)"; + chassis-type =3D "television"; +}; diff --git a/arch/arm64/boot/dts/apple/t8011-j120.dts b/arch/arm64/boot/dts= /apple/t8011-j120.dts new file mode 100644 index 000000000000..a620d8aaf468 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8011-j120.dts @@ -0,0 +1,14 @@ +// 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 + */ + +/dts-v1/; + +#include "t8011-pro2.dtsi" + +/ { + compatible =3D "apple,j120", "apple,t8011", "apple,arm-platform"; + model =3D "Apple iPad Pro 2 (12.9-inch) (Wi-Fi)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8011-j121.dts b/arch/arm64/boot/dts= /apple/t8011-j121.dts new file mode 100644 index 000000000000..dfec25f7d54a --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8011-j121.dts @@ -0,0 +1,14 @@ +// 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 + */ + +/dts-v1/; + +#include "t8011-pro2.dtsi" + +/ { + compatible =3D "apple,j121", "apple,t8011", "apple,arm-platform"; + model =3D "Apple iPad Pro 2 (12.9-inch) (Cellular)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8011-j207.dts b/arch/arm64/boot/dts= /apple/t8011-j207.dts new file mode 100644 index 000000000000..12582bfe7532 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8011-j207.dts @@ -0,0 +1,14 @@ +// 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 + */ + +/dts-v1/; + +#include "t8011-pro2.dtsi" + +/ { + compatible =3D "apple,j207", "apple,t8011", "apple,arm-platform"; + model =3D "Apple iPad Pro 2 (10.5-inch) (Wi-Fi)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8011-j208.dts b/arch/arm64/boot/dts= /apple/t8011-j208.dts new file mode 100644 index 000000000000..c0cd18e0ab18 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8011-j208.dts @@ -0,0 +1,14 @@ +// 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 + */ + +/dts-v1/; + +#include "t8011-pro2.dtsi" + +/ { + compatible =3D "apple,j208", "apple,t8011", "apple,arm-platform"; + model =3D "Apple iPad Pro 2 (10.5-inch) (Cellular)"; +}; diff --git a/arch/arm64/boot/dts/apple/t8011-pro2.dtsi b/arch/arm64/boot/dt= s/apple/t8011-pro2.dtsi new file mode 100644 index 000000000000..9f681dd9d463 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8011-pro2.dtsi @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple iPad Pro 2 common device tree + * + * Copyright (c) 2022, Konrad Dybcio + */ + +#include "t8011.dtsi" +#include + +/ { + chassis-type =3D "tablet"; + + gpio-keys { + compatible =3D "gpio-keys"; + + button-home { + label =3D "Home Button"; + gpios =3D <&pinctrl_ap 139 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-power { + label =3D "Power Button"; + gpios =3D <&pinctrl_ap 138 GPIO_ACTIVE_LOW>; + linux,code =3D ; + wakeup-source; + }; + + button-voldown { + label =3D "Volume Down"; + gpios =3D <&pinctrl_ap 43 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + + button-volup { + label =3D "Volume Up"; + gpios =3D <&pinctrl_ap 40 GPIO_ACTIVE_LOW>; + linux,code =3D ; + }; + }; +}; + +&serial0 { + status =3D "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t8011.dtsi b/arch/arm64/boot/dts/app= le/t8011.dtsi new file mode 100644 index 000000000000..e9f7d54893fe --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8011.dtsi @@ -0,0 +1,175 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple T8011 "A10X" SoC + * + * Copyright (c) 2022, Konrad Dybcio + * Based on Asahi Linux's M1 (t8103.dtsi) and Corellium's A10 efforts. + */ + +#include +#include +#include +#include + +/ { + interrupt-parent =3D <&aic>; + #address-cells =3D <2>; + #size-cells =3D <2>; + + 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"; + }; + }; + + 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"; + }; + + cpu2: cpu@2 { + compatible =3D "apple,hurricane-zephyr"; + reg =3D <0x0 0x2>; + cpu-release-addr =3D <0 0>; /* To be filled by loader */ + enable-method =3D "spin-table"; + device_type =3D "cpu"; + }; + }; + + 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; + + /* + * The bootloader reserves a region for the (varying-address, depending + * on what FW your device runs AND model) framebuffer under this node. + */ + }; + + 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 219>; + apple,npins =3D <219>; + + 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 A10X doesn't actually have a hypervisor (EL2 is not impleme= nted). */ + interrupts =3D , + ; + }; +}; --=20 2.46.0