From patchwork Fri Aug 27 17:15:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Kettenis X-Patchwork-Id: 12462465 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CE28C432BE for ; Fri, 27 Aug 2021 17:18:19 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E3C1C60F6C for ; Fri, 27 Aug 2021 17:18:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E3C1C60F6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=xs4all.nl Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=u6aBRgnSm4DEuLbigoBnXcOLoQkqib43y02D2pP/KTQ=; b=zY3WzLnOyT7Cg3 LunS37Kcb17Ld0AF7xmJ9EMSnvCjF71TdJiW2CR24kVezSJvL+UqtmddD2NJ9+Hx0zPM10BvDRFjB DYpTja2kTDrUKrNSW7IrT9Hb1EHsq5Nn6pCVBOLvTfHG3yHeV//WdPUmfnC7VF3F5yJE7B96EShMr mSMPwBsZ163w/pdTOQLsFN97Oe4vy4fIhVKIan+0vHBwlwMaVEeAES5h0NB9pmRg4XokK12mE074G bSdr9PYHHcjIfK8bL6OEr0wEfMgdBfz+oagO//X78e04DoNLFV0HX/H2vPJ6Pf0p+JTOOGUxjcHbB RoTg6rvOs5YCElY68/IQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJfSK-00CptP-6G; Fri, 27 Aug 2021 17:15:52 +0000 Received: from lb2-smtp-cloud8.xs4all.net ([2001:888:0:108::2b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJfSC-00Cprx-Rw; Fri, 27 Aug 2021 17:15:49 +0000 Received: from cust-df1d398c ([IPv6:fc0c:c1f5:9ac0:c45f:1583:5c5b:91fa:2436]) by smtp-cloud8.xs4all.net with ESMTPA id JfS3mDfw9JWNeJfS5m6c2g; Fri, 27 Aug 2021 19:15:40 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s2; t=1630084540; bh=nXlaS3prSiZVMJryT3t3etHYnAzjqVUbsiRTUUbYIeI=; h=From:To:Subject:Date:Message-Id:MIME-Version:From:Subject; b=O5mvUkZqEL/Ad+wlV/1oQLIZve/W6esfQZnoDY1y8Bc5jdtEqj5ZDHG4JnqmakBek LKm7xGDfBYtHJGS4VgNXlawwuL/oj+5kGREWjNOzkQNej/SZSD0f0OORkVxe/L0A6F W2cnzPP0nWQIh0DmRQ6h1DpXeIzqgw3ZB1G5k4msnDzpJqFvrq2JMoXddGngzkwmHb jBcoAhC9Ie7OJ5lyWHRwQkTHrt906AorhfSjeMPz80FiD0IgxT6uPeq65ji9nNiump ACRZ4nZaCUMzmgjpF9KkjXk0DESAvClRiXs+08roByBw1u3yzU1B4+0KzYVyX57rUq U1u9Wl+PhQ6yg== From: Mark Kettenis To: devicetree@vger.kernel.org Cc: alyssa@rosenzweig.io, Mark Kettenis , Thomas Gleixner , Marc Zyngier , Rob Herring , Hector Martin , Bjorn Helgaas , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Jim Quinlan , Daire McNamara , Saenz Julienne , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Subject: [PATCH v4 0/4] Apple M1 PCIe DT bindings Date: Fri, 27 Aug 2021 19:15:25 +0200 Message-Id: <20210827171534.62380-1-mark.kettenis@xs4all.nl> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CMAE-Envelope: MS4xfF4P4Lg/TKSMGvTdS4QEd3FclE9oV5E+06cdwacwqiwVewVsnRfmDHmsDipn9GOTFOJXXXyD2knsMLStF3P6V8Ul/a21HndwGlfyD7KdAEUp9Wpr4J71 iocDEPasSk9Pi1ggyGTSsmNmCygt3cPp5sBhgekIvTrWRgH5AQUz1/GYLz1GtfkS85DywbBoU/hD1sQwf3cV4g0fKFfVjetMsJeH8EebN5nbaAc8D842iO4p XL6Mgorwis/xz1jXNcpdmfQ3eP5y0MzDakhoUY6FG/zy9ECXqJZRmCenH4VFxVo09sEGDwxhR5j3zq0DA0iVBOxqolG8nYyg1yDI2H34B93dhUcYQ/TNtH73 z46PG/hfiiIdNNXd/THBPscyjeT/KA+jKg8SYzPxsgzO6qBIjy33tafGfYq/6bDDU4MYaAXs2tawq47h8M8QoBtkV0L4bVhRQK+PAweEXdEb5Mttn5gLYuMW fHUA4ea9OeDZo1RRJ+vobULpm/eQnUOGomfik8n0YJFCF6oW9HdxXo4oGyogm54K8H8ojH88FgVQyTQYL7St1uwo32mE9zzPK1uFBKoSAyodVdbPbcKcbOzB Ynh2Su6qtcaDBjsSBe0V8KWPNkWm9em9UpPGwoT4dSctdCL0deWuKGGjmV8AEhTosHHbjmCExPtaa6on5kTyS+hiCEw05kgfL7GHX0iXqL/oAryh1/pZ62zo tX9C3AtV+e5N+XNEU0aLV/i3J3gQdL67C6/GGe6/EYm7JkZ3zJZgfRMSW4o844A21qA4h6we4rRmiIuTyyX2hvU8NxSowbRe2C3KhNlxli5/J68A103Rt2m0 t8mQ0aVfZZ28vAbJF1Y= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210827_101545_377791_6C86856A X-CRM114-Status: GOOD ( 14.98 ) 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 From: Mark Kettenis This small series adds bindings for the PCIe controller found on the Apple M1 SoC. At this point, the primary consumer for these bindings is U-Boot. With these bindings U-Boot can bring up the links for the root ports of the PCIe root complex. A simple OS driver can then provide standard ECAM access and manage MSI interrupts to provide access to the built-in Ethernet and XHCI controllers of the Mac mini. The Apple controller incorporates Synopsys Designware PCIe logic to implement its root port. But unlike other hardware currently supported by U-Boot and the Linux kernel the Apple hardware integrates multiple root ports. As such the existing bindings for the DWC PCIe interface can't be used. There is a single ECAM space for all root space, but separate GPIOs to take the PCI devices on those ports out of reset. Therefore the standard "reset-gpio" and "max-link-speed" properties appear on the child nodes representing the PCI devices that correspond to the individual root ports. MSIs are handled by the PCIe controller and translated into "regular interrupts". A range of 32 MSIs is provided. These 32 MSIs can be distributed over the root ports as the OS sees fit by programming the PCIe controller port registers. This now adds an MSI controller binding schema and uses the generic msi-ranges property to specify how the MSIs are mapped to interrupts on the AIC. I copied some of the description text in the MSI controller binding schema from msi.txt but it may need some further tweaks to make sense. Patch 2/2 of this series depends on the pinctrl series I sent earlier and will probably go through Hector Martin's Apple M1 SoC tree. Changelog: v4: - Convert MSI controller binding to YAML - Add generic msi-ranges property to MSI controller binding - Fix typos/formatting in apple,pcie binding - Use generic MSI controller binding in apple,pcie v3: - Remove unneeded include in example v2: - Adjust name for ECAM in "reg-names" - Drop "phy" registers - Expand description - Add description for "interrupts" - Fix incorrect minItems for "interrupts" - Fix incorrect MaxItems for "reg-names" - Document the use of "msi-controller", "msi-parent", "iommu-map" and "iommu-map-mask" - Fix "bus-range" and "iommu-map" properties in the example Mark Kettenis (4): dt-bindings: interrupt-controller: Convert MSI controller to json-schema dt-bindings: interrupt-controller: msi: Add msi-ranges property dt-bindings: pci: Add DT bindings for apple,pcie arm64: apple: Add PCIe node .../interrupt-controller/msi-controller.yaml | 42 +++++ .../devicetree/bindings/pci/apple,pcie.yaml | 165 ++++++++++++++++++ .../bindings/pci/brcm,stb-pcie.yaml | 1 + .../bindings/pci/microchip,pcie-host.yaml | 1 + MAINTAINERS | 1 + arch/arm64/boot/dts/apple/t8103.dtsi | 63 +++++++ 6 files changed, 273 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml create mode 100644 Documentation/devicetree/bindings/pci/apple,pcie.yaml Acked-by: Marc Zyngier