From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 2E359C433E1 for ; Sat, 18 Jul 2020 21:08:57 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 05E3822CB1 for ; Sat, 18 Jul 2020 21:08:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 05E3822CB1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C17B52034F; Sat, 18 Jul 2020 21:08:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NgJ-RsMArLiv; Sat, 18 Jul 2020 21:08:55 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 5D3DF20030; Sat, 18 Jul 2020 21:08:55 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 42D77C0865; Sat, 18 Jul 2020 21:08:55 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5AAEBC0733 for ; Sat, 18 Jul 2020 21:08:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 49BAD87F71 for ; Sat, 18 Jul 2020 21:08:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9DYSIUh1mwGW for ; Sat, 18 Jul 2020 21:08:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id E87BB87D09 for ; Sat, 18 Jul 2020 21:08:52 +0000 (UTC) X-Originating-IP: 91.175.115.186 Received: from localhost (91-175-115-186.subs.proxad.net [91.175.115.186]) (Authenticated sender: gregory.clement@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 60014240005; Sat, 18 Jul 2020 21:08:48 +0000 (UTC) From: Gregory CLEMENT To: Tomasz Nowicki , will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, robh+dt@kernel.org, hannah@marvell.com Subject: Re: [PATCH v4 4/4] arm64: dts: marvell: add SMMU support In-Reply-To: <20200715070649.18733-5-tn@semihalf.com> References: <20200715070649.18733-1-tn@semihalf.com> <20200715070649.18733-5-tn@semihalf.com> Date: Sat, 18 Jul 2020 23:08:48 +0200 Message-ID: <87k0z0350f.fsf@FE-laptop> MIME-Version: 1.0 Cc: devicetree@vger.kernel.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, nadavh@marvell.com, iommu@lists.linux-foundation.org, mw@semihalf.com, linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Tomasz Nowicki writes: > From: Marcin Wojtas > > Add IOMMU node for Marvell AP806 based SoCs together with platform > and PCI device Stream ID mapping. > > Signed-off-by: Marcin Wojtas > Signed-off-by: Tomasz Nowicki Applied on mvebu/dt64 Thanks, Gregory > --- > arch/arm64/boot/dts/marvell/armada-7040.dtsi | 28 +++++++++++++ > arch/arm64/boot/dts/marvell/armada-8040.dtsi | 40 +++++++++++++++++++ > arch/arm64/boot/dts/marvell/armada-ap80x.dtsi | 18 +++++++++ > 3 files changed, 86 insertions(+) > > diff --git a/arch/arm64/boot/dts/marvell/armada-7040.dtsi b/arch/arm64/boot/dts/marvell/armada-7040.dtsi > index 47247215770d..7a3198cd7a07 100644 > --- a/arch/arm64/boot/dts/marvell/armada-7040.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-7040.dtsi > @@ -14,3 +14,31 @@ > compatible = "marvell,armada7040", "marvell,armada-ap806-quad", > "marvell,armada-ap806"; > }; > + > +&smmu { > + status = "okay"; > +}; > + > +&cp0_pcie0 { > + iommu-map = > + <0x0 &smmu 0x480 0x20>, > + <0x100 &smmu 0x4a0 0x20>, > + <0x200 &smmu 0x4c0 0x20>; > + iommu-map-mask = <0x031f>; > +}; > + > +&cp0_sata0 { > + iommus = <&smmu 0x444>; > +}; > + > +&cp0_sdhci0 { > + iommus = <&smmu 0x445>; > +}; > + > +&cp0_usb3_0 { > + iommus = <&smmu 0x440>; > +}; > + > +&cp0_usb3_1 { > + iommus = <&smmu 0x441>; > +}; > diff --git a/arch/arm64/boot/dts/marvell/armada-8040.dtsi b/arch/arm64/boot/dts/marvell/armada-8040.dtsi > index 7699b19224c2..79e8ce59baa8 100644 > --- a/arch/arm64/boot/dts/marvell/armada-8040.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-8040.dtsi > @@ -15,6 +15,18 @@ > "marvell,armada-ap806"; > }; > > +&smmu { > + status = "okay"; > +}; > + > +&cp0_pcie0 { > + iommu-map = > + <0x0 &smmu 0x480 0x20>, > + <0x100 &smmu 0x4a0 0x20>, > + <0x200 &smmu 0x4c0 0x20>; > + iommu-map-mask = <0x031f>; > +}; > + > /* The RTC requires external oscillator. But on Aramda 80x0, the RTC clock > * in CP master is not connected (by package) to the oscillator. So > * disable it. However, the RTC clock in CP slave is connected to the > @@ -23,3 +35,31 @@ > &cp0_rtc { > status = "disabled"; > }; > + > +&cp0_sata0 { > + iommus = <&smmu 0x444>; > +}; > + > +&cp0_sdhci0 { > + iommus = <&smmu 0x445>; > +}; > + > +&cp0_usb3_0 { > + iommus = <&smmu 0x440>; > +}; > + > +&cp0_usb3_1 { > + iommus = <&smmu 0x441>; > +}; > + > +&cp1_sata0 { > + iommus = <&smmu 0x454>; > +}; > + > +&cp1_usb3_0 { > + iommus = <&smmu 0x450>; > +}; > + > +&cp1_usb3_1 { > + iommus = <&smmu 0x451>; > +}; > diff --git a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > index 7f9b9a647717..12e477f1aeb9 100644 > --- a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > @@ -56,6 +56,24 @@ > compatible = "simple-bus"; > ranges = <0x0 0x0 0xf0000000 0x1000000>; > > + smmu: iommu@5000000 { > + compatible = "marvell,ap806-smmu-500", "arm,mmu-500"; > + reg = <0x100000 0x100000>; > + dma-coherent; > + #iommu-cells = <1>; > + #global-interrupts = <1>; > + interrupts = , > + , > + , > + , > + , > + , > + , > + , > + ; > + status = "disabled"; > + }; > + > gic: interrupt-controller@210000 { > compatible = "arm,gic-400"; > #interrupt-cells = <3>; > -- > 2.17.1 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 5AB6CC433DF for ; Sat, 18 Jul 2020 21:10:24 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2467E22CB1 for ; Sat, 18 Jul 2020 21:10:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KKeKTclL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2467E22CB1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RyOXCtbFw5tVj4qxpqbgFfVY11qmKiHP/HxqkBEGjgs=; b=KKeKTclLkWVR6zyuhh3o1HBzB NanutEI9jTeBty5uIwWzXN0YIUYVTjjEJqsdoxnDsISwSR4WQuT3pUUTwbgK/XLPAY+QhNtldJNWL f/ZxWkjlaS38Wv+N3jVkQQjmvJuEUq/aG5E0wpVV2Eg60FP7QpnSCs02dD3TGgXoqQO83oW9jJV40 bPf6e58WvQsvv0Ksj1/Meo/PHE+HnJGpsApg3kCBM+6lA+UxBdD/08b5TRz+2IrSKmlphV3f+8urf qa5ETHaQIa/ALj7EwQyl3HNiDG9hMoQM4TzmB/KNXeQbPc2I3yxTvBx5CAs4ysk6dnk9Wqoj/+teh TyWK+gjhQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwu4l-0005wj-5O; Sat, 18 Jul 2020 21:08:55 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwu4i-0005vf-6c for linux-arm-kernel@lists.infradead.org; Sat, 18 Jul 2020 21:08:53 +0000 X-Originating-IP: 91.175.115.186 Received: from localhost (91-175-115-186.subs.proxad.net [91.175.115.186]) (Authenticated sender: gregory.clement@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 60014240005; Sat, 18 Jul 2020 21:08:48 +0000 (UTC) From: Gregory CLEMENT To: Tomasz Nowicki , will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, robh+dt@kernel.org, hannah@marvell.com Subject: Re: [PATCH v4 4/4] arm64: dts: marvell: add SMMU support In-Reply-To: <20200715070649.18733-5-tn@semihalf.com> References: <20200715070649.18733-1-tn@semihalf.com> <20200715070649.18733-5-tn@semihalf.com> Date: Sat, 18 Jul 2020 23:08:48 +0200 Message-ID: <87k0z0350f.fsf@FE-laptop> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_170852_484668_58079C8A X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, nadavh@marvell.com, iommu@lists.linux-foundation.org, Tomasz Nowicki , mw@semihalf.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Tomasz Nowicki writes: > From: Marcin Wojtas > > Add IOMMU node for Marvell AP806 based SoCs together with platform > and PCI device Stream ID mapping. > > Signed-off-by: Marcin Wojtas > Signed-off-by: Tomasz Nowicki Applied on mvebu/dt64 Thanks, Gregory > --- > arch/arm64/boot/dts/marvell/armada-7040.dtsi | 28 +++++++++++++ > arch/arm64/boot/dts/marvell/armada-8040.dtsi | 40 +++++++++++++++++++ > arch/arm64/boot/dts/marvell/armada-ap80x.dtsi | 18 +++++++++ > 3 files changed, 86 insertions(+) > > diff --git a/arch/arm64/boot/dts/marvell/armada-7040.dtsi b/arch/arm64/boot/dts/marvell/armada-7040.dtsi > index 47247215770d..7a3198cd7a07 100644 > --- a/arch/arm64/boot/dts/marvell/armada-7040.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-7040.dtsi > @@ -14,3 +14,31 @@ > compatible = "marvell,armada7040", "marvell,armada-ap806-quad", > "marvell,armada-ap806"; > }; > + > +&smmu { > + status = "okay"; > +}; > + > +&cp0_pcie0 { > + iommu-map = > + <0x0 &smmu 0x480 0x20>, > + <0x100 &smmu 0x4a0 0x20>, > + <0x200 &smmu 0x4c0 0x20>; > + iommu-map-mask = <0x031f>; > +}; > + > +&cp0_sata0 { > + iommus = <&smmu 0x444>; > +}; > + > +&cp0_sdhci0 { > + iommus = <&smmu 0x445>; > +}; > + > +&cp0_usb3_0 { > + iommus = <&smmu 0x440>; > +}; > + > +&cp0_usb3_1 { > + iommus = <&smmu 0x441>; > +}; > diff --git a/arch/arm64/boot/dts/marvell/armada-8040.dtsi b/arch/arm64/boot/dts/marvell/armada-8040.dtsi > index 7699b19224c2..79e8ce59baa8 100644 > --- a/arch/arm64/boot/dts/marvell/armada-8040.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-8040.dtsi > @@ -15,6 +15,18 @@ > "marvell,armada-ap806"; > }; > > +&smmu { > + status = "okay"; > +}; > + > +&cp0_pcie0 { > + iommu-map = > + <0x0 &smmu 0x480 0x20>, > + <0x100 &smmu 0x4a0 0x20>, > + <0x200 &smmu 0x4c0 0x20>; > + iommu-map-mask = <0x031f>; > +}; > + > /* The RTC requires external oscillator. But on Aramda 80x0, the RTC clock > * in CP master is not connected (by package) to the oscillator. So > * disable it. However, the RTC clock in CP slave is connected to the > @@ -23,3 +35,31 @@ > &cp0_rtc { > status = "disabled"; > }; > + > +&cp0_sata0 { > + iommus = <&smmu 0x444>; > +}; > + > +&cp0_sdhci0 { > + iommus = <&smmu 0x445>; > +}; > + > +&cp0_usb3_0 { > + iommus = <&smmu 0x440>; > +}; > + > +&cp0_usb3_1 { > + iommus = <&smmu 0x441>; > +}; > + > +&cp1_sata0 { > + iommus = <&smmu 0x454>; > +}; > + > +&cp1_usb3_0 { > + iommus = <&smmu 0x450>; > +}; > + > +&cp1_usb3_1 { > + iommus = <&smmu 0x451>; > +}; > diff --git a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > index 7f9b9a647717..12e477f1aeb9 100644 > --- a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > @@ -56,6 +56,24 @@ > compatible = "simple-bus"; > ranges = <0x0 0x0 0xf0000000 0x1000000>; > > + smmu: iommu@5000000 { > + compatible = "marvell,ap806-smmu-500", "arm,mmu-500"; > + reg = <0x100000 0x100000>; > + dma-coherent; > + #iommu-cells = <1>; > + #global-interrupts = <1>; > + interrupts = , > + , > + , > + , > + , > + , > + , > + , > + ; > + status = "disabled"; > + }; > + > gic: interrupt-controller@210000 { > compatible = "arm,gic-400"; > #interrupt-cells = <3>; > -- > 2.17.1 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 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=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 61871C433DF for ; Sat, 18 Jul 2020 21:08:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45F1C22CB1 for ; Sat, 18 Jul 2020 21:08:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726863AbgGRVIw (ORCPT ); Sat, 18 Jul 2020 17:08:52 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:48267 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726382AbgGRVIw (ORCPT ); Sat, 18 Jul 2020 17:08:52 -0400 X-Originating-IP: 91.175.115.186 Received: from localhost (91-175-115-186.subs.proxad.net [91.175.115.186]) (Authenticated sender: gregory.clement@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 60014240005; Sat, 18 Jul 2020 21:08:48 +0000 (UTC) From: Gregory CLEMENT To: Tomasz Nowicki , will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, robh+dt@kernel.org, hannah@marvell.com Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, catalin.marinas@arm.com, nadavh@marvell.com, linux-arm-kernel@lists.infradead.org, mw@semihalf.com, Tomasz Nowicki Subject: Re: [PATCH v4 4/4] arm64: dts: marvell: add SMMU support In-Reply-To: <20200715070649.18733-5-tn@semihalf.com> References: <20200715070649.18733-1-tn@semihalf.com> <20200715070649.18733-5-tn@semihalf.com> Date: Sat, 18 Jul 2020 23:08:48 +0200 Message-ID: <87k0z0350f.fsf@FE-laptop> MIME-Version: 1.0 Content-Type: text/plain Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Tomasz Nowicki writes: > From: Marcin Wojtas > > Add IOMMU node for Marvell AP806 based SoCs together with platform > and PCI device Stream ID mapping. > > Signed-off-by: Marcin Wojtas > Signed-off-by: Tomasz Nowicki Applied on mvebu/dt64 Thanks, Gregory > --- > arch/arm64/boot/dts/marvell/armada-7040.dtsi | 28 +++++++++++++ > arch/arm64/boot/dts/marvell/armada-8040.dtsi | 40 +++++++++++++++++++ > arch/arm64/boot/dts/marvell/armada-ap80x.dtsi | 18 +++++++++ > 3 files changed, 86 insertions(+) > > diff --git a/arch/arm64/boot/dts/marvell/armada-7040.dtsi b/arch/arm64/boot/dts/marvell/armada-7040.dtsi > index 47247215770d..7a3198cd7a07 100644 > --- a/arch/arm64/boot/dts/marvell/armada-7040.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-7040.dtsi > @@ -14,3 +14,31 @@ > compatible = "marvell,armada7040", "marvell,armada-ap806-quad", > "marvell,armada-ap806"; > }; > + > +&smmu { > + status = "okay"; > +}; > + > +&cp0_pcie0 { > + iommu-map = > + <0x0 &smmu 0x480 0x20>, > + <0x100 &smmu 0x4a0 0x20>, > + <0x200 &smmu 0x4c0 0x20>; > + iommu-map-mask = <0x031f>; > +}; > + > +&cp0_sata0 { > + iommus = <&smmu 0x444>; > +}; > + > +&cp0_sdhci0 { > + iommus = <&smmu 0x445>; > +}; > + > +&cp0_usb3_0 { > + iommus = <&smmu 0x440>; > +}; > + > +&cp0_usb3_1 { > + iommus = <&smmu 0x441>; > +}; > diff --git a/arch/arm64/boot/dts/marvell/armada-8040.dtsi b/arch/arm64/boot/dts/marvell/armada-8040.dtsi > index 7699b19224c2..79e8ce59baa8 100644 > --- a/arch/arm64/boot/dts/marvell/armada-8040.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-8040.dtsi > @@ -15,6 +15,18 @@ > "marvell,armada-ap806"; > }; > > +&smmu { > + status = "okay"; > +}; > + > +&cp0_pcie0 { > + iommu-map = > + <0x0 &smmu 0x480 0x20>, > + <0x100 &smmu 0x4a0 0x20>, > + <0x200 &smmu 0x4c0 0x20>; > + iommu-map-mask = <0x031f>; > +}; > + > /* The RTC requires external oscillator. But on Aramda 80x0, the RTC clock > * in CP master is not connected (by package) to the oscillator. So > * disable it. However, the RTC clock in CP slave is connected to the > @@ -23,3 +35,31 @@ > &cp0_rtc { > status = "disabled"; > }; > + > +&cp0_sata0 { > + iommus = <&smmu 0x444>; > +}; > + > +&cp0_sdhci0 { > + iommus = <&smmu 0x445>; > +}; > + > +&cp0_usb3_0 { > + iommus = <&smmu 0x440>; > +}; > + > +&cp0_usb3_1 { > + iommus = <&smmu 0x441>; > +}; > + > +&cp1_sata0 { > + iommus = <&smmu 0x454>; > +}; > + > +&cp1_usb3_0 { > + iommus = <&smmu 0x450>; > +}; > + > +&cp1_usb3_1 { > + iommus = <&smmu 0x451>; > +}; > diff --git a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > index 7f9b9a647717..12e477f1aeb9 100644 > --- a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > +++ b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi > @@ -56,6 +56,24 @@ > compatible = "simple-bus"; > ranges = <0x0 0x0 0xf0000000 0x1000000>; > > + smmu: iommu@5000000 { > + compatible = "marvell,ap806-smmu-500", "arm,mmu-500"; > + reg = <0x100000 0x100000>; > + dma-coherent; > + #iommu-cells = <1>; > + #global-interrupts = <1>; > + interrupts = , > + , > + , > + , > + , > + , > + , > + , > + ; > + status = "disabled"; > + }; > + > gic: interrupt-controller@210000 { > compatible = "arm,gic-400"; > #interrupt-cells = <3>; > -- > 2.17.1 > -- Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com