From patchwork Wed Oct 23 04:40:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Chan X-Patchwork-Id: 838061 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.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 62338154457; Wed, 23 Oct 2024 04:45:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729658757; cv=none; b=BS0HoHs3MCg/cumskKoLKs+Y14kVX16QubhPv+zXh2skIEKbKVK20dGVYB7t0JvkH9dObB9YmHdwk+BjL8+CPKERjwe3IHL5JMLLIJvS6g66r1tbixhS4YaO7VpYjcq35w2mhZqf4o93nMknkDNWi1+8l5qQIfH8JWA+4XCIPqE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729658757; c=relaxed/simple; bh=SiMVBX7W7hhoJAL/qCc3A3gub3f9fWHwN4g5NCcNwHg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p7z2Ygj33W1OAM2KfPkaU+1mk9l+xk5/E4Tnp65i+od3+f7rz08eaNZtsD0GtzOT/MIU8OCg3ueWgCAuR4eDboXNrvQEAcZTt/9Kje/qRGqrb4yMu+9hZEt1DcVghSuukQrJ05Dkl2YIzOm4VxL0jxYb/saBx54m4l8m7ZUnhCA= 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=OWrb0zHc; arc=none smtp.client-ip=209.85.214.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="OWrb0zHc" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-20cceb8d8b4so3339245ad.1; Tue, 22 Oct 2024 21:45:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729658755; x=1730263555; 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=xse42JPMlb18tBEtSRtGxVxHCq0YAkMVANvrwDCLO5g=; b=OWrb0zHcd72xVHKmzNF8EAjCtZAWoiMj3N/wlu7YdmSy3ntJerUpM+b4ZBXEK5jNrH PUKHyOUWG/l4cpOdu37dBQEapDu2HLluYOYEHFdOZqOfNt5CRC9TNQ6uyMfxW/jxrd9E ylXCDvDZ5YtRSDwnhfIH5kw0IU8h6XO+7bn8mvx9WgaiWCPickwoxYI8U6T0bY/47crw 1fAe0BnycLGwY0FC2jHUWPNq6tV92jdwkv6Nj/p3gGnXYTpzxD3yW0Fj3b0+g1LPsAKI ec3LcDNk2qXaQCt6upV0Ym2Pw6/4luz3oVCs01cH/AZ90d7h5s0pHktRQHQCQMAUzG/2 wVbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729658755; x=1730263555; 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=xse42JPMlb18tBEtSRtGxVxHCq0YAkMVANvrwDCLO5g=; b=csKW/VDVvJ+7zFD7Wj2DXmuYo2G6Kjok6wEJacv2+wZ6rYIOlpGjXWKBE2qN6oXYFL GUGAsrU257k6A/G1d2ph9GLfemMYL1AMHA7NSMai179z/O3tFEXwH9dfOUtN3UOjis4Z 4yLkvRwIYjdbnriw3WDWoT0oqXvzj5MmV4vajKNjo/35YOzNJhjqmjkykZGUKwHyZ1cb ru5eAvN87CNot0KRDdwfA4QwUEWLtAk79OiJwjmXbAVtcmRWpD8/Ks6pHjQm8zRoAONz WcVDtWsUUEVxGN5oPv85Pv3Bvvzlons+BQMSmhqZTZAxpr301juQSeMH+p420ASYXnZu CHgA== X-Forwarded-Encrypted: i=1; AJvYcCUTLwTw9DZ4Yi77rPPN9vC2mLTQ7pvFd8VqWy0d8qsNEpzU6fqtBxCc0SrbP0fbkNS+QGYQf59cU1ggiKv/@vger.kernel.org, AJvYcCWEyGJSIpak0ZWIFkZKgGwo3yDMtTQzJ1UGJM+KjeLkJ+obblZOcxIrcq4JgPmkY9n3NX3PranVrN1niEx8Q2U=@vger.kernel.org, AJvYcCWuxyy6wCbNvYA0LZm4mC+2kDkm+l1h6ELZKEmyS+zSc/8kK8PiehHyIlGrQ+ANWudyqoL4Egad+xOnsQ==@vger.kernel.org, AJvYcCXeu1gJtRD0OUTDtdeF0hdb3JYJ+Rh0qPvbQAmI7EVk9wiTOVB/1HkfSo5aH7mqI2mcWWsvwoeZOM7K@vger.kernel.org X-Gm-Message-State: AOJu0YyTbFoDuXDVnpunzcpxYe//yVPzz5UoqXPP3h/1DKQHXd47x0so EtppDkBnZ6G0lX3BEEmvv5Zguq+B+JURQ2zzOx+UyQPy+j7XNNUB X-Google-Smtp-Source: AGHT+IFrW760imja2ufBc09zoWb6edLpgsry9SDkkTqlmYzglUTtXXBRp6nj6R5lNsnbXpIftk/Mhg== X-Received: by 2002:a17:902:f686:b0:20c:d71d:69c5 with SMTP id d9443c01a7336-20fa9e96600mr20023365ad.4.1729658754667; Tue, 22 Oct 2024 21:45:54 -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.45.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2024 21:45:54 -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 , Markuss Broks , Nick Chan Subject: [PATCH v6 RESEND 14/20] arm64: dts: apple: Add A8X devices Date: Wed, 23 Oct 2024 12:40:49 +0800 Message-ID: <20241023044423.18294-15-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-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Konrad Dybcio Add DTS files for the A8X SoC and the only device based on it, the iPad Air 2. Signed-off-by: Konrad Dybcio [Markuss: System memory bits] Co-developed-by: Markuss Broks Signed-off-by: Markuss Broks [Nick: SMP, m1n1 and gpio-keys support, pinctrl fixes] Co-developed-by: Nick Chan Signed-off-by: Nick Chan --- arch/arm64/boot/dts/apple/Makefile | 2 + arch/arm64/boot/dts/apple/t7001-air2.dtsi | 74 +++++++++++++ arch/arm64/boot/dts/apple/t7001-j81.dts | 14 +++ arch/arm64/boot/dts/apple/t7001-j82.dts | 14 +++ arch/arm64/boot/dts/apple/t7001.dtsi | 123 ++++++++++++++++++++++ 5 files changed, 227 insertions(+) create mode 100644 arch/arm64/boot/dts/apple/t7001-air2.dtsi create mode 100644 arch/arm64/boot/dts/apple/t7001-j81.dts create mode 100644 arch/arm64/boot/dts/apple/t7001-j82.dts create mode 100644 arch/arm64/boot/dts/apple/t7001.dtsi diff --git a/arch/arm64/boot/dts/apple/Makefile b/arch/arm64/boot/dts/apple/Makefile index d5dd1e2e4f4c..adda522ea490 100644 --- a/arch/arm64/boot/dts/apple/Makefile +++ b/arch/arm64/boot/dts/apple/Makefile @@ -16,6 +16,8 @@ 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) += t8103-j274.dtb dtb-$(CONFIG_ARCH_APPLE) += t8103-j293.dtb dtb-$(CONFIG_ARCH_APPLE) += t8103-j313.dtb diff --git a/arch/arm64/boot/dts/apple/t7001-air2.dtsi b/arch/arm64/boot/dts/apple/t7001-air2.dtsi new file mode 100644 index 000000000000..19fabd425c52 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t7001-air2.dtsi @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple iPad Air 2 common device tree + * Copyright (c) 2022, Konrad Dybcio + */ + +#include "t7001.dtsi" +#include + +/ { + 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 = ; + wakeup-source; + }; + + button-power { + label = "Power Button"; + gpios = <&pinctrl 1 GPIO_ACTIVE_LOW>; + linux,code = ; + wakeup-source; + }; + + button-volup { + label = "Volume Up"; + gpios = <&pinctrl 92 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + button-voldown { + label = "Volume Down"; + gpios = <&pinctrl 93 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + 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"; +}; diff --git a/arch/arm64/boot/dts/apple/t7001-j81.dts b/arch/arm64/boot/dts/apple/t7001-j81.dts new file mode 100644 index 000000000000..ca90dc0c872c --- /dev/null +++ b/arch/arm64/boot/dts/apple/t7001-j81.dts @@ -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 + */ + +/dts-v1/; + +#include "t7001-air2.dtsi" + +/ { + compatible = "apple,j81", "apple,t7001", "apple,arm-platform"; + model = "Apple iPad Air 2 (Wi-Fi)"; +}; diff --git a/arch/arm64/boot/dts/apple/t7001-j82.dts b/arch/arm64/boot/dts/apple/t7001-j82.dts new file mode 100644 index 000000000000..d9fd16f48db7 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t7001-j82.dts @@ -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 + */ + +/dts-v1/; + +#include "t7001-air2.dtsi" + +/ { + compatible = "apple,j82", "apple,t7001", "apple,arm-platform"; + model = "Apple iPad Air 2 (Cellular)"; +}; diff --git a/arch/arm64/boot/dts/apple/t7001.dtsi b/arch/arm64/boot/dts/apple/t7001.dtsi new file mode 100644 index 000000000000..a76e034c85e3 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t7001.dtsi @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple T7001 "A8X" 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 = <&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 = ; + /* 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: 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 = , + , + , + , + , + , + ; + }; + }; + + 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 = , + ; + }; +};