From patchwork Thu May 25 17:48:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 9748861 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CB0C3601E9 for ; Thu, 25 May 2017 17:48:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC7A728047 for ; Thu, 25 May 2017 17:48:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B168D2808F; Thu, 25 May 2017 17:48:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4ED4128047 for ; Thu, 25 May 2017 17:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970110AbdEYRsn (ORCPT ); Thu, 25 May 2017 13:48:43 -0400 Received: from mail-qt0-f194.google.com ([209.85.216.194]:34861 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763211AbdEYRsj (ORCPT ); Thu, 25 May 2017 13:48:39 -0400 Received: by mail-qt0-f194.google.com with SMTP id r58so31062723qtb.2 for ; Thu, 25 May 2017 10:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MuUznZNcjkIvHU2dxBxkKUJNyv5Nm0tQAXTSTqHuGx4=; b=IKyv50V9ZtW1GNtDxvw6Ms8WnYfRxAUhWAKp+i67RLTsgVTKS2t6H2rXp9ARHml9VO ootOdMBxg/qui80d+1CNgMrvozSG8DFSj7604CHCRQvUFL9xGxcY0TU3j0bYiOtW9F4d L2fRiRq+8bzscpAfGDojeN1s6y7MPoJvHPyFejvPFhiloCdgJ3CH1fFqJ6A0A3pkrK70 91NGh+Yv1tfXtW3xlrZnkAY9fyGQ3WlGgIkJ/LXf6csTY5+ce5BUp4mo1AAIadlupdeY rPFssIzbipacBlf3qaInjcskSG3cPEeC65OHgSP+NyNwtC3rFPHszxoeRE67nqXtQTTP sNkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MuUznZNcjkIvHU2dxBxkKUJNyv5Nm0tQAXTSTqHuGx4=; b=tH5BFy089XRi3sNR+8H/k4u1b0zsta0RMvHvgDr2yJrnkFb6O2wqsh/7tgMnGVG6s7 q/GrMHRvqRyDA1/AVtbymiyoP1mg8ElKNNeUUbfad+39nbssBzfyLp+EaEhlfAl2wV77 PKbm87amT8Y9ILEhrdIUsq6+7cAQOUoIgJOUuCpdhT/oir83CMbL1fkhyC+2ISHwPSPt 2sgSuzDlhk+Wt7dPQ5uLCMWqdLY1MHTEl9fjalboDv2heZTnRRouJPctVb/9t+u12nzz HUE8r+acX9//XUM7pMnvQa72t8HAXIJVdP1jOepaKrhD1z3JbLHHxyrCWAdn73zOXg+W ZYSA== X-Gm-Message-State: AODbwcDU/khbljuJfG6aeQaQhebAAnn+P6mZ+9i2xePVrVmU5YRLCHp8 ueqCDqkNlbMATg== X-Received: by 10.237.61.35 with SMTP id g32mr45456002qtf.60.1495734518742; Thu, 25 May 2017 10:48:38 -0700 (PDT) Received: from localhost (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id b23sm5357664qkb.31.2017.05.25.10.48.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 May 2017 10:48:37 -0700 (PDT) From: Rob Clark To: linux-arm-msm@vger.kernel.org, Andy Gross Cc: Stanimir Varbanov , Rob Clark Subject: [PATCH 3/3] ARM64: DT: add iommu for msm8916 Date: Thu, 25 May 2017 13:48:22 -0400 Message-Id: <20170525174822.27996-4-robdclark@gmail.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170525174822.27996-1-robdclark@gmail.com> References: <20170525174822.27996-1-robdclark@gmail.com> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Rob Clark --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 2ef8f53..13bb079 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -705,6 +705,59 @@ #thermal-sensor-cells = <1>; }; + apps_iommu: iommu@1ef0000 { + #address-cells = <1>; + #size-cells = <1>; + #iommu-cells = <1>; + compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1"; + ranges = <0 0x1e20000 0x40000>; + reg = <0x1ef0000 0x3000>; + clocks = <&gcc GCC_SMMU_CFG_CLK>, + <&gcc GCC_APSS_TCU_CLK>; + clock-names = "iface", "bus"; + qcom,iommu-secure-id = <17>; + + // mdp_0: + iommu-ctx@4000 { + compatible = "qcom,msm-iommu-v1-ns"; + reg = <0x4000 0x1000>; + interrupts = ; + }; + + // venus_ns: + iommu-ctx@5000 { + compatible = "qcom,msm-iommu-v1-sec"; + reg = <0x5000 0x1000>; + interrupts = ; + }; + }; + + gpu_iommu: iommu@1f08000 { + #address-cells = <1>; + #size-cells = <1>; + #iommu-cells = <1>; + compatible = "qcom,msm8916-iommu", "qcom,msm-iommu-v1"; + ranges = <0 0x1f08000 0x10000>; + clocks = <&gcc GCC_SMMU_CFG_CLK>, + <&gcc GCC_GFX_TCU_CLK>; + clock-names = "iface", "bus"; + qcom,iommu-secure-id = <18>; + + // gfx3d_user: + iommu-ctx@1000 { + compatible = "qcom,msm-iommu-v1-ns"; + reg = <0x1000 0x1000>; + interrupts = ; + }; + + // gfx3d_priv: + iommu-ctx@2000 { + compatible = "qcom,msm-iommu-v1-ns"; + reg = <0x2000 0x1000>; + interrupts = ; + }; + }; + gpu_opp_table: opp_table { compatible = "operating-points-v2"; @@ -738,6 +791,7 @@ <&gcc GFX3D_CLK_SRC>; power-domains = <&gcc OXILI_GDSC>; operating-points-v2 = <&gpu_opp_table>; + iommus = <&gpu_iommu 1>, <&gpu_iommu 2>; }; mdss: mdss@1a00000 { @@ -781,6 +835,8 @@ "core_clk", "vsync_clk"; + iommus = <&apps_iommu 4>; + ports { #address-cells = <1>; #size-cells = <0>; @@ -1231,6 +1287,7 @@ <&gcc GCC_VENUS0_AHB_CLK>, <&gcc GCC_VENUS0_AXI_CLK>; clock-names = "core", "iface", "bus"; + iommus = <&apps_iommu 5>; memory-region = <&venus_mem>; status = "okay";