From patchwork Fri Sep 9 13:50:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janne Grunau X-Patchwork-Id: 12971839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DBD52ECAAA1 for ; Fri, 9 Sep 2022 13:52:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=nHrZGl5PsFisuqwl75+eSOoiRufKYVmroHxbAdWoom4=; b=Q5GZuWaZpDTS01 j5wT22hKYpAoG69dPwQ7bYaWR7h9q1ByBjzyAf/s9/MqAYGd7TD+PGI5qxTeEId+7an75UVppYh4A cJR0lfVpAKoURtdhM3/sYBUI/fY6I88pXvgGOR6qzk9wdM5ogJYQ6PW4QL2HnGHttcF3IcgS2e1L7 CXOnkMzDkqDYfxBTfjH3gwteBuzLX5v1YZt5euRJfB9oZ9P1XJwSSwzEIRugiQGH0/Cv0Yskjhj4x Yj5Z3dp/qudU4n5KExE8HH5/ZCx+niHccETUhJtzj9d0tuk6YcQlp4VDIcGYTSDLh7uUp5J2MqQGm SCbekZhQkhYbOpPKEECA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWePj-00GSIO-Lo; Fri, 09 Sep 2022 13:51:23 +0000 Received: from soltyk.jannau.net ([144.76.91.90]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWePV-00GS9Z-8p for linux-arm-kernel@lists.infradead.org; Fri, 09 Sep 2022 13:51:11 +0000 Received: from robin.home.jannau.net (p54acc2ba.dip0.t-ipconnect.de [84.172.194.186]) by soltyk.jannau.net (Postfix) with ESMTPSA id 8E74A26EFE9; Fri, 9 Sep 2022 15:51:03 +0200 (CEST) From: Janne Grunau To: asahi@lists.linux.dev Cc: Mark Kettenis , Alyssa Rosenzweig , Hector Martin , Krzysztof Kozlowski , Marc Zyngier , Rob Herring , Sven Peter , Thomas Gleixner , Vinod Koul , devicetree@vger.kernel.org, dmaengine@vger.kernel.org, er , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 00/10] Apple M1 Pro/Max/Ultra device trees Date: Fri, 9 Sep 2022 15:50:53 +0200 Message-Id: <20220909135103.98179-1-j@jannau.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220909_065109_533300_D66B99B9 X-CRM114-Status: GOOD ( 17.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hej, this series contains device trees for Apple's M1 Pro, Max and Ultra SoCs and devices based on these SoCs. Quoting from the main commit: These SoCs are found in Apple devices with M1 Pro (t6000), M1 Max (t6001) and M1 Ultra (t6002). t6000 is a cut-down version of t6001, so the former just includes the latter and disables the missing bits (This is currently just one PMGR node and all of its domains. t6002 is two connected t6001 dies. The implementation seems to use t6001 with blocks disabled (mostly on the second die). MMIO addresses on the second die have a constant offset. The interrupt controller is multi-die aware. This setup can be represented in the device tree with two top level "soc" nodes. The MMIO offset is applied via "ranges" and devices are included with preproceesor macros to make the node labels unique and to specify the die number for the interrupt definition. Device nodes are distributed over dtsi files based on whether they are present on both dies or just on the first die. The only execption is the NVMe controller which resides on the second die. Its nodes are in a separate file. I'm open for ideas how to improve the preprocessor handling but I'm convinced that it should be avoided to duplicate the device nodes manually. For dts verification this series depends on t6000-dart support (https://lore.kernel.org/linux-iommu/20220901012519.7167-1-j@jannau.net/T/#t) expected to be queued for v6.1. Even with the t6000-dart support t600x devices are not terribly useful in upstream. There is no input device support. The laptop's keyboard and touchpad are missing SPI and HID over SPI drivers. The dwc3 USB-C ports are not yet added since they require special handling after disconnect. The PCIe based USB xhci controller in the Mac Studio requires firmware downloaded in a similar way as USB_XHCI_PCI_RENESAS. For dependency handling this series contains a fix for the aic dt-bindings and carries mostly identical device tree additions for M1 and M1 Pro/Max/Ultra as part of audio support. The series passes dtbs_check with 2 additional bindings already submitted elsewhere: - "ASoC: Add Apple MCA I2S transceiver bindings" (6ed462d1c11675) in sound/for-next - "dt-bindings: iommu: dart: add t6000 compatible" https://lore.kernel.org/linux-iommu/20220901012519.7167-2-j@jannau.net/ New bindings passes dt_binding_check Hector Martin (3): arm64: dts: apple: Fix j45x model years arm64: dts: apple: Add initial t6000/t6001/t6002 DTs arm64: dts: apple: Add J314 and J316 devicetrees Janne Grunau (6): dt-bindings: apple,aic: Fix required item "apple,fiq-index" in affinity description dt-bindings: dma: apple,admac: Add iommus and power-domains properties dt-bindings: apple,aic2: Add CPU PMU per-cpu pseudo-interrupts dt-bindings: arm: apple: Add t6001/t6002 Mac Studio compatibles arm64: dts: apple: Add J375 devicetrees arm64: dts: apple: t600x: Add MCA and its support Martin PoviĊĦer (1): arm64: dts: apple: t8103: Add MCA and its support .../devicetree/bindings/arm/apple.yaml | 11 +- .../devicetree/bindings/dma/apple,admac.yaml | 7 + .../interrupt-controller/apple,aic.yaml | 2 +- .../interrupt-controller/apple,aic2.yaml | 29 + arch/arm64/boot/dts/apple/Makefile | 6 + arch/arm64/boot/dts/apple/multi-die-cpp.h | 23 + arch/arm64/boot/dts/apple/t6000-j314s.dts | 18 + arch/arm64/boot/dts/apple/t6000-j316s.dts | 18 + arch/arm64/boot/dts/apple/t6000.dtsi | 18 + arch/arm64/boot/dts/apple/t6001-j314c.dts | 18 + arch/arm64/boot/dts/apple/t6001-j316c.dts | 18 + arch/arm64/boot/dts/apple/t6001-j375c.dts | 18 + arch/arm64/boot/dts/apple/t6001.dtsi | 63 + arch/arm64/boot/dts/apple/t6002-j375d.dts | 50 + arch/arm64/boot/dts/apple/t6002.dtsi | 173 ++ arch/arm64/boot/dts/apple/t600x-common.dtsi | 137 ++ arch/arm64/boot/dts/apple/t600x-die0.dtsi | 360 +++ arch/arm64/boot/dts/apple/t600x-dieX.dtsi | 103 + .../arm64/boot/dts/apple/t600x-gpio-pins.dtsi | 45 + .../arm64/boot/dts/apple/t600x-j314-j316.dtsi | 114 + arch/arm64/boot/dts/apple/t600x-j375.dtsi | 119 + arch/arm64/boot/dts/apple/t600x-nvme.dtsi | 42 + arch/arm64/boot/dts/apple/t600x-pmgr.dtsi | 2012 +++++++++++++++++ arch/arm64/boot/dts/apple/t8103-j456.dts | 2 +- arch/arm64/boot/dts/apple/t8103-j457.dts | 2 +- arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 4 + arch/arm64/boot/dts/apple/t8103.dtsi | 73 + 27 files changed, 3481 insertions(+), 4 deletions(-) create mode 100644 arch/arm64/boot/dts/apple/multi-die-cpp.h create mode 100644 arch/arm64/boot/dts/apple/t6000-j314s.dts create mode 100644 arch/arm64/boot/dts/apple/t6000-j316s.dts create mode 100644 arch/arm64/boot/dts/apple/t6000.dtsi create mode 100644 arch/arm64/boot/dts/apple/t6001-j314c.dts create mode 100644 arch/arm64/boot/dts/apple/t6001-j316c.dts create mode 100644 arch/arm64/boot/dts/apple/t6001-j375c.dts create mode 100644 arch/arm64/boot/dts/apple/t6001.dtsi create mode 100644 arch/arm64/boot/dts/apple/t6002-j375d.dts create mode 100644 arch/arm64/boot/dts/apple/t6002.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-common.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-die0.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-dieX.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-gpio-pins.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-j375.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-nvme.dtsi create mode 100644 arch/arm64/boot/dts/apple/t600x-pmgr.dtsi