From: Marc Zyngier <maz@kernel.org>
To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Mark Kettenis <kettenis@openbsd.org>,
Sven Peter <sven@svenpeter.dev>, Hector Martin <marcan@marcan.st>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
kernel-team@android.com
Subject: [PATCH 3/5] arm64: dts: apple: t8103: Add PCIe DARTs
Date: Mon, 25 Oct 2021 22:10:16 +0100 [thread overview]
Message-ID: <20211025211018.744363-4-maz@kernel.org> (raw)
In-Reply-To: <20211025211018.744363-1-maz@kernel.org>
PCIe on the Apple M1 (aka t8103) requires the use of IOMMUs (aka
DARTs). Add the three instances that deal with the internal PCIe
ports and route each port's traffic through its DART.
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
arch/arm64/boot/dts/apple/t8103.dtsi | 30 ++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
index ed562e1103a9..ded82a734d11 100644
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
@@ -219,6 +219,30 @@ pinctrl_smc: pinctrl@23e820000 {
<AIC_IRQ 397 IRQ_TYPE_LEVEL_HIGH>;
};
+ pcie0_dart_0: dart@681008000 {
+ compatible = "apple,t8103-dart";
+ reg = <0x6 0x81008000 0x0 0x4000>;
+ #iommu-cells = <1>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 696 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pcie0_dart_1: dart@682008000 {
+ compatible = "apple,t8103-dart";
+ reg = <0x6 0x82008000 0x0 0x4000>;
+ #iommu-cells = <1>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 699 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ pcie0_dart_2: dart@683008000 {
+ compatible = "apple,t8103-dart";
+ reg = <0x6 0x83008000 0x0 0x4000>;
+ #iommu-cells = <1>;
+ interrupt-parent = <&aic>;
+ interrupts = <AIC_IRQ 702 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
pcie0: pcie@690000000 {
compatible = "apple,t8103-pcie", "apple,pcie";
device_type = "pci";
@@ -239,6 +263,12 @@ pcie0: pcie@690000000 {
msi-parent = <&pcie0>;
msi-ranges = <&aic AIC_IRQ 704 IRQ_TYPE_EDGE_RISING 32>;
+
+ iommu-map = <0x100 &pcie0_dart_0 1 1>,
+ <0x200 &pcie0_dart_1 1 1>,
+ <0x300 &pcie0_dart_2 1 1>;
+ iommu-map-mask = <0xff00>;
+
bus-range = <0 3>;
#address-cells = <3>;
#size-cells = <2>;
--
2.30.2
next prev parent reply other threads:[~2021-10-25 21:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 21:10 [PATCH 0/5] arm64: apple: DT updates for M1 PCIe support Marc Zyngier
2021-10-25 21:10 ` [PATCH 1/5] arm64: apple: Add pinctrl nodes Marc Zyngier
2021-10-25 21:10 ` [PATCH 2/5] arm64: apple: Add PCIe node Marc Zyngier
2021-10-25 21:10 ` Marc Zyngier [this message]
2021-10-25 21:10 ` [PATCH 4/5] arm64: dts: apple: t8103: Add root port interrupt routing Marc Zyngier
2021-10-25 21:10 ` [PATCH 5/5] arm64: dts: apple: j274: Expose PCI node for the Ethernet MAC address Marc Zyngier
2021-10-25 21:45 ` Alyssa Rosenzweig
2021-10-27 2:10 ` [PATCH 0/5] arm64: apple: DT updates for M1 PCIe support Hector Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211025211018.744363-4-maz@kernel.org \
--to=maz@kernel.org \
--cc=alyssa@rosenzweig.io \
--cc=devicetree@vger.kernel.org \
--cc=kernel-team@android.com \
--cc=kettenis@openbsd.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marcan@marcan.st \
--cc=sven@svenpeter.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).