Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp902772imm; Fri, 5 Oct 2018 13:57:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV63qGObIU4jSWdR5dbt7MOGzKdtqKs68N6/SGLer66YflxzgaFLKngiqXsTbmGpva+O/QLCg X-Received: by 2002:a63:a047:: with SMTP id u7-v6mr11771321pgn.145.1538773040220; Fri, 05 Oct 2018 13:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538773040; cv=none; d=google.com; s=arc-20160816; b=I7I52IPfybuv0xjGdUrdsZ2GVlzBAK9Yxj3cc9+Lg3bYBU4eevsdoSNqj768T+b3qX GEAxcp8DEGLQXm2U12FDJFyUK5RcOcjRS9u8VAHKPVp78ENC08J4xoqoikcYlaZx2FcL 1ScfLGAHmABQkqCK9cioqio4hVSiwY5Rxn/MFmrsmL7K63CAdgguvoDuR9odTGUWivNZ 7JuHzfIHQpttOqHAHRK6sGrff4v6XEzBLXovd5qiqugv/01K+u6JPffeF4hFNDUKXQT3 flHaFOUCNzHd7xeXmrJaWStXNwZlSR4q4kfZT0EGAXDc0QYVTiFQOZoX/cMQcTXgLf9j ddew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=k/r0kdwMYas/AdBhuXbV15MWFchmUWIsimjDkTc29Tw=; b=D3wLuqP5d4Oe+/XcyRmyZPL9piFJNzFhsSGwOvD+6UUrTFvF1xT2XANgC4jRF8GSxa GCc4/HW/l+HhM0vfJUCj3EXQNYNxJE0RZpPb8aa1sNKC7RE5cKFB/Gm1lziCcnSarjn5 O/oJKByq3ZlezXBFBvtfX1X+1e7ukAdHx1KvJTaZQUN2ExBO1qqDjbjDa0KBCoPKUei4 Mg/d4VZhpxbRqh71lF1ormAF4j+6THWcUK/NkcDvx9PbnN11To4Dq+TozpiIOzjpB7vz 7KhSCebeF+8Dvgv1kU3NDWtCiIiC6HTMfwIrANpf/O7nqp6DnSHcaKIqzLjH5zBgCAue sGhw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d24-v6si10188323pgk.315.2018.10.05.13.57.04; Fri, 05 Oct 2018 13:57:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729093AbeJFDz6 (ORCPT + 99 others); Fri, 5 Oct 2018 23:55:58 -0400 Received: from mga06.intel.com ([134.134.136.31]:1454 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728139AbeJFDz4 (ORCPT ); Fri, 5 Oct 2018 23:55:56 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2018 13:55:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,346,1534834800"; d="scan'208";a="263254396" Received: from tthayer-hp-z620.an.intel.com ([10.122.105.132]) by orsmga005.jf.intel.com with ESMTP; 05 Oct 2018 13:55:28 -0700 From: thor.thayer@linux.intel.com To: dinguyen@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, will.deacon@arm.com, robin.murphy@arm.com, joro@8bytes.org, aisheng.dong@nxp.com, sboyd@kernel.org Cc: vivek.gautam@codeaurora.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, Thor Thayer Subject: [PATCHv4 1/2] arm64: dts: stratix10: Add Stratix10 SMMU support Date: Fri, 5 Oct 2018 15:56:59 -0500 Message-Id: <1538773020-27784-2-git-send-email-thor.thayer@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1538773020-27784-1-git-send-email-thor.thayer@linux.intel.com> References: <1538773020-27784-1-git-send-email-thor.thayer@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thor Thayer Add SMMU support to the Stratix10 Device Tree which includes adding the SMMU node and adding IOMMU stream ids to the SMMU peripherals. Signed-off-by: Thor Thayer --- v4 Add clock-name since clk_bulk_get() needs name for clock. v3 Remove bindings changes since not adding new structure. Remove new compatible string - use default "arm,mmu-500" v2 Add bindings changes and compatible string for SOCFPGA. --- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi index d033da401c26..f58f7601ab88 100644 --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi @@ -137,6 +137,7 @@ reset-names = "stmmaceth", "stmmaceth-ocp"; clocks = <&clkmgr STRATIX10_EMAC0_CLK>; clock-names = "stmmaceth"; + iommus = <&smmu 1>; status = "disabled"; }; @@ -150,6 +151,7 @@ reset-names = "stmmaceth", "stmmaceth-ocp"; clocks = <&clkmgr STRATIX10_EMAC1_CLK>; clock-names = "stmmaceth"; + iommus = <&smmu 2>; status = "disabled"; }; @@ -163,6 +165,7 @@ reset-names = "stmmaceth", "stmmaceth-ocp"; clocks = <&clkmgr STRATIX10_EMAC2_CLK>; clock-names = "stmmaceth"; + iommus = <&smmu 3>; status = "disabled"; }; @@ -273,6 +276,7 @@ clocks = <&clkmgr STRATIX10_L4_MP_CLK>, <&clkmgr STRATIX10_SDMMC_CLK>; clock-names = "biu", "ciu"; + iommus = <&smmu 5>; status = "disabled"; }; @@ -307,6 +311,29 @@ altr,modrst-offset = <0x20>; }; + smmu: iommu@fa000000 { + compatible = "arm,mmu-500", "arm,smmu-v2"; + reg = <0xfa000000 0x40000>; + #global-interrupts = <2>; + #iommu-cells = <1>; + clocks = <&clkmgr STRATIX10_L4_MAIN_CLK>; + clock-names = "iommu"; + interrupt-parent = <&intc>; + interrupts = <0 128 4>, /* Global Secure Fault */ + <0 129 4>, /* Global Non-secure Fault */ + /* Non-secure Context Interrupts (32) */ + <0 138 4>, <0 139 4>, <0 140 4>, <0 141 4>, + <0 142 4>, <0 143 4>, <0 144 4>, <0 145 4>, + <0 146 4>, <0 147 4>, <0 148 4>, <0 149 4>, + <0 150 4>, <0 151 4>, <0 152 4>, <0 153 4>, + <0 154 4>, <0 155 4>, <0 156 4>, <0 157 4>, + <0 158 4>, <0 159 4>, <0 160 4>, <0 161 4>, + <0 162 4>, <0 163 4>, <0 164 4>, <0 165 4>, + <0 166 4>, <0 167 4>, <0 168 4>, <0 169 4>; + stream-match-mask = <0x7ff0>; + status = "disabled"; + }; + spi0: spi@ffda4000 { compatible = "snps,dw-apb-ssi"; #address-cells = <1>; @@ -416,6 +443,7 @@ resets = <&rst USB0_RESET>, <&rst USB0_OCP_RESET>; reset-names = "dwc2", "dwc2-ecc"; clocks = <&clkmgr STRATIX10_USB_CLK>; + iommus = <&smmu 6>; status = "disabled"; }; @@ -428,6 +456,7 @@ resets = <&rst USB1_RESET>, <&rst USB1_OCP_RESET>; reset-names = "dwc2", "dwc2-ecc"; clocks = <&clkmgr STRATIX10_USB_CLK>; + iommus = <&smmu 7>; status = "disabled"; }; -- 2.7.4