From patchwork Mon Jun 12 12:43:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 9781061 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 8FCE760352 for ; Mon, 12 Jun 2017 12:43:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95E832846C for ; Mon, 12 Jun 2017 12:43:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AD972849E; Mon, 12 Jun 2017 12:43:33 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 3742B2846C for ; Mon, 12 Jun 2017 12:43:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751995AbdFLMnc (ORCPT ); Mon, 12 Jun 2017 08:43:32 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35252 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751944AbdFLMnb (ORCPT ); Mon, 12 Jun 2017 08:43:31 -0400 Received: by mail-qt0-f195.google.com with SMTP id x58so26082707qtc.2 for ; Mon, 12 Jun 2017 05:43:31 -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=G1YTgXDb1R4hU/X2FaQfj7RrVjK+EhT13VfaubhAB4U=; b=efS8fueGMYsaoW1ZexZVVOXUzlXXHhyPEdww6dGusTa92H+96uj+LGaVLhnhF3RDF7 NRXN76htaI0s1M5RRAotHBEHO1q1ba5rvK+O8fmTesy1K8jEDxuVvNcJOV+2X6x/MywP XdApU89VbS17pVQysG5aw+LeiYsyx4Y22qrUS88+cwhMo75rVivgx8kCsBHM7pUl3y3E wJfEEd2vqcKFw+7CA61Ds9RuLUot9BDYCu9ABGCJCSxKTw7Z5NEDLzZqnZclxd5smlv3 R4DeYpOwvqO12HlaFfzD9GpVuBq6d+SFHJYGGfw08hUYPlPc64oMhQ0exS3GiEJl6GFo WTxQ== 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=G1YTgXDb1R4hU/X2FaQfj7RrVjK+EhT13VfaubhAB4U=; b=bXjyOj/Zo+3df+jvti9KJ7VhCQhNqbbqIOJbFiQ335VfHYqBm9J7B/KOfItmMtUzw9 JW9CfzdxIxifFqQTPL4d6CH15ooaPKdQ5YhJVGG57bN3oday1dglnMP4zCL7lqXW8/f7 mxvsLg5m+aORmo+jCb0tyGqEHVm0Kn69NG7Rlw/tXXgwGAnc3nBqKWY6E8tlO0fZOQeH rDiTpZ4/n89olt1AZ4vahQ6Fw0rVngsbi2f+xRGxlpIDDtWfh/woIbhSQqVxQog8yuYY vK1IsNS3cYCF6naMwyo8VAF0BQoGi4BoqEX4JQCjAXsxJeOH5fulX0XoLftfRBtOBIlX tL+Q== X-Gm-Message-State: AKS2vOw0Gi7NP+WoElymhqIDwWbe7YUPrSqJpBBhI1u0vFEvY5cyXGTp zTLLpo8KySzgnvVeXmU= X-Received: by 10.200.46.99 with SMTP id s32mr56776206qta.48.1497271410614; Mon, 12 Jun 2017 05:43:30 -0700 (PDT) Received: from localhost ([144.121.20.162]) by smtp.gmail.com with ESMTPSA id b52sm6583525qtc.35.2017.06.12.05.43.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Jun 2017 05:43:29 -0700 (PDT) From: Rob Clark To: linux-arm-msm@vger.kernel.org Cc: Stephen Boyd , Andy Gross , Stanimir Varbanov , Rob Clark Subject: [PATCH 3/3] ARM64: DT: add iommu for msm8916 Date: Mon, 12 Jun 2017 08:43:17 -0400 Message-Id: <20170612124317.29313-3-robdclark@gmail.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170612124317.29313-1-robdclark@gmail.com> References: <20170612124317.29313-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 Reviewed-by: Stephen Boyd --- 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 1dcd632..9a1d7ef 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -716,6 +716,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@1c00000 { compatible = "qcom,adreno-306.0", "qcom,adreno"; reg = <0x01c00000 0x20000>; @@ -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";