Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 87AC32036FA for ; Mon, 3 Feb 2025 11:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738582818; cv=none; b=nMVGucESWfjm3oCNpEXWis53kT81ROugH1hulu7fBLcgeda8oQBIgYaNg7lMcPdhhjgmn//TZ4DRk9NIlIS6P6ifp77yb+QKXGbb8SDJAOgdbT8Eqbrex1gXKRqagku4bnIanWWpj+7uoMxqRNJV6tht3QBsS8MV7iEUn1wa7JU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738582818; c=relaxed/simple; bh=Pznr0Bts4D0FtUDtSu2Wtdp7OSNmccFCgV9QhrjQAow=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dGfBqy+8fHCsYgcQoSFHsyM5YcRJUJk9snTQcM0Rd4YXwSkfpidtmgMyrTyloG5Cu44meKHFnjGpxYVL6VRMTf+4snxAJog9PUTPedpMcG/iiLpFJmAoau9vnNsqWvCmOVopebQoLMFjIsqW+GX9GwBgzKz1EI2n1YCaNce78jI= 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=gk3N7MPX; arc=none smtp.client-ip=209.85.214.172 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="gk3N7MPX" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-21680814d42so68996845ad.2 for ; Mon, 03 Feb 2025 03:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738582815; x=1739187615; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4gduqE5+XkKRgfOuTSHYpyohOphdvP2oewiQ8WxF2r4=; b=gk3N7MPX0bmZFx1ppUOY36BbFeFBShOfxzTkuo0AKsMh1kFkklf+40la/A2XBqnu92 jmwOzt/axNeNBBHgcZoeDAVbVJcjShrZkwPYqBR4YXdw+uJpExi75BmBS2/hONgcdMV+ 7C+vw9pB5PwjkjNstlB8NXzR40xFVMan/U4LlhkMekcjB7HZhsu1kiXfKNdpyKX83rDg 0BqCwybfNCqFseokPhR32raNd7koRZx9Vf3rXqC7dC/EdxF0jg0eBAP6IDVygPF0e6+P l0oZS8aCeUIeuBKQ0VV9MKMNChY8LPv6Vj7wHRzn54XPiAEO7exv6yvTF5y+8EExX/Vg XgcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738582815; x=1739187615; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4gduqE5+XkKRgfOuTSHYpyohOphdvP2oewiQ8WxF2r4=; b=Ip07EmY+/pU41y2QvAGAnjlCKw1neBzcxgcn0ipJiGCvaHll8njrflu1FnBE6mwKTN +tzcgJmrYY3M2r4Mv0aIj6S9rknVSfS1szCt/1zncHO/xIUeDj7Oj5qJ+N1PPYvuot4g OP/FMkSJCf0s8qAlwE99wwlhK1HOkTrWfKZsTtiIShaqwydqywvtnv+bqmLUdAQFpm5m eUqW2o00rvezkT2rsCMjYGqcEBMsBB1x9RmxU2SgTvuBqRm3SkRNYm5GSaahbGfAPme4 WDhUkckKUENFqu2l9mZ3SIt7RyDyutyNCH2+E9gMN2M70QlG32KtUYXirn6Zvx6DymQe lCxw== X-Forwarded-Encrypted: i=1; AJvYcCW+aN0a1mz7Oc5SuMsbGWI9gvAjQ9q0zupqW8eMDSqrqhrKu8c7iTUikrgBR3QYozS4Bbsqcw==@lists.linux.dev X-Gm-Message-State: AOJu0YwejwE7ux8milfenqDlJsNt8sP2O1RzhT7RVP20rozwckSVFo0/ CPm3yQzSJiAgCag9zW+Mf/NUz7auDblNPPBy6SFn/KtkWG1vKg7y X-Gm-Gg: ASbGncsZ2uOdUCZ5pBoQ2RpR2czFUjmXwOTSVwwuqIcznyyTZUsNs363UVPDSXPciQA I8itbGSNWOuCuOqkHrOhDVf4jYM7bsorl6b35WPMmWup8ZENkHZXR1Beim+qEhxzZHuSGn7JxEq g5RMsPWDT2VFHiTdjDrVVhd1jriUd4LX1DSxqVkg5TySGFAENNwxMO12uYbOdajbMBxZNtDMS53 T8FNy0Pd/9el1gmbMgFJA57Pr2He9ItW7Cxtr5qEU+Bro/G5wYol2iPJ2lvoixbuNCu5s9Tslvb qs/YIPZnJhRNjz19 X-Google-Smtp-Source: AGHT+IG/voCx4BoOF7MZR1nPTGgCOf7e1n+k46BNNiWJ1p0YoUYHkwqU6ASyPIUVLd/56kA/7gIkAA== X-Received: by 2002:a05:6a20:d809:b0:1e0:df27:10b5 with SMTP id adf61e73a8af0-1ed7a6e0e6bmr38809210637.29.1738582814998; Mon, 03 Feb 2025 03:40:14 -0800 (PST) Received: from nick-mbp.. ([59.188.211.160]) by smtp.googlemail.com with ESMTPSA id 41be03b00d2f7-acec04796d6sm7721614a12.55.2025.02.03.03.40.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 03:40:14 -0800 (PST) From: Nick Chan To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski , Conor Dooley , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Nick Chan Subject: [PATCH v2 RESEND] arm64: dts: apple: Split s8000/s8003 SoC DTS files Date: Mon, 3 Feb 2025 19:38:31 +0800 Message-ID: <20250203113949.14760-1-towinchenmi@gmail.com> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Despite what the code comments said, the DTS files were not split properly. Since these two SoCs are now known to have minor differences like in latencies for cpufreq state transistions, split the DTS files now. Signed-off-by: Nick Chan --- Changes since v1: - Drop PMGR nodes file rename. This is now the first patch and other series that modifies Apple A9 DTS files now depend on this series. This avoids less than ideal situations like adding a file only for it to be renamed immediately. Link to v1: https://lore.kernel.org/asahi/20241206135051.56049-1-towinchenmi@gmail.com/T Nick Chan arch/arm64/boot/dts/apple/s800-0-3.dtsi | 140 ++++++++++++++++++++++++ arch/arm64/boot/dts/apple/s8000.dtsi | 133 +--------------------- arch/arm64/boot/dts/apple/s8003.dtsi | 10 +- 3 files changed, 146 insertions(+), 137 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/s800-0-3.dtsi diff --git a/arch/arm64/boot/dts/apple/s800-0-3.dtsi b/arch/arm64/boot/dts/apple/s800-0-3.dtsi new file mode 100644 index 000000000000..082e5b1733d0 --- /dev/null +++ b/arch/arm64/boot/dts/apple/s800-0-3.dtsi @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple S8000/S8003 "A9" SoC + * + * This file contains parts common to both variants of A9 + * + * Copyright (c) 2022, Konrad Dybcio + */ + +#include +#include +#include +#include + +/ { + 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 = ; + /* 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 = , + , + , + , + , + , + ; + }; + + 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 = , + , + , + , + , + , + ; + }; + + wdt: watchdog@2102b0000 { + compatible = "apple,s8000-wdt", "apple,wdt"; + reg = <0x2 0x102b0000 0x0 0x4000>; + clocks = <&clkref>; + interrupt-parent = <&aic>; + interrupts = ; + }; + }; + + 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 = , + ; + }; +}; + +/* + * 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. There are some minor differences + * such as timing in cpufreq state transistions. + */ diff --git a/arch/arm64/boot/dts/apple/s8000.dtsi b/arch/arm64/boot/dts/apple/s8000.dtsi index 6e9046ea106c..c7e39abda7e1 100644 --- a/arch/arm64/boot/dts/apple/s8000.dtsi +++ b/arch/arm64/boot/dts/apple/s8000.dtsi @@ -7,138 +7,11 @@ * Copyright (c) 2022, Konrad Dybcio */ -#include -#include -#include -#include - -/ { - 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 = ; - /* 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 = , - , - , - , - , - , - ; - }; - - 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 = , - , - , - , - , - , - ; - }; - - wdt: watchdog@2102b0000 { - compatible = "apple,s8000-wdt", "apple,wdt"; - reg = <0x2 0x102b0000 0x0 0x4000>; - clocks = <&clkref>; - interrupt-parent = <&aic>; - interrupts = ; - }; - }; - - 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 = , - ; - }; -}; +#include "s800-0-3.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. + * the S8003 (APL1022) on 16nm. There are some minor differences + * such as timing in cpufreq state transistions. */ diff --git a/arch/arm64/boot/dts/apple/s8003.dtsi b/arch/arm64/boot/dts/apple/s8003.dtsi index 7e4ad4f7e499..807e3452f8a7 100644 --- a/arch/arm64/boot/dts/apple/s8003.dtsi +++ b/arch/arm64/boot/dts/apple/s8003.dtsi @@ -7,15 +7,11 @@ * Copyright (c) 2022, Konrad Dybcio */ -#include "s8000.dtsi" +#include "s800-0-3.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. + * the S8003 (APL1022) on 16nm. There are some minor differences + * such as timing in cpufreq state transistions. */ base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b -- 2.48.1