From patchwork Thu Jun 1 13:58:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 9759625 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 879E260375 for ; Thu, 1 Jun 2017 13:59:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 750E1281F9 for ; Thu, 1 Jun 2017 13:59:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69D3728459; Thu, 1 Jun 2017 13:59:01 +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 04D61281F9 for ; Thu, 1 Jun 2017 13:59:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbdFAN7A (ORCPT ); Thu, 1 Jun 2017 09:59:00 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:34030 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbdFAN67 (ORCPT ); Thu, 1 Jun 2017 09:58:59 -0400 Received: by mail-qt0-f195.google.com with SMTP id l39so5751082qtb.1; Thu, 01 Jun 2017 06:58:58 -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=80iXfB8WNVsTIcvzMg5zJt7Va76KB8rq9XzJf49ni6k=; b=MTM46So7VFTStPUNNuxUO6YevcTlaKxTPVr6Zzz4rqEjx80CjnPNuhdauCh0lyENcp i1Iq9BJRIwhCX/21sjyuchVjpQ9i8IysAlGrIlyypSyl2m+IhBCJ6EWMUt/SGJvMpafD JCYKBnzRQjMuZKk74OUzDGeBi9lOuUAqIwOHeRYZDBM7Fy/BNDJjr5Fr59q29QU6XorW C8L95AZ6gKsvswWAze+czA8RB1PTJw2W4bgFlpVlAkQj+AdGumTmgBk4hUIFRfBA+KwG f2uDP2UYI3m0Pjh50sj0EQcBzkCvBL+fepBmrNNWkwUdr2j6YQPk5yihHp4/fp5BhzFy Jbog== 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=80iXfB8WNVsTIcvzMg5zJt7Va76KB8rq9XzJf49ni6k=; b=KLLCvheXJAqPNPxIJB/0wD26HIn9Adrbv+grKm2PIXecyy91MEDMD3+NAOKtmIvcvl p5oFAy0vG8SgQkSMcWU6neGl7Aj/cX2EGoMFQcchgR6FMWmObUU5sJotm6frZGwMcsui 2OpuBMC8E0Nw+lQ1mceITfDSqYcxVARIwfxpmEAKscnq3XBtYazeL3b4yhd2yF38couM P4YAv1Jmewq6jRGln7d7ruvDiMg+XkLs6DFpDpSmTY6fAZrQRm1sghKTRzbe9cbs3BOg C1r45hxDQaKObpXPU/xLX6ZTWEekbTwEhq08yLuS68Bq1KM61nQ66+WDUgDv+CmhRvYn q4Uw== X-Gm-Message-State: AODbwcBfQaCO89YwSQsrALb9c41ZHnSrf2Jk9eXGmW90mf9JOJFGlSNY /q8Aj1x5SFpfbQ== X-Received: by 10.200.52.165 with SMTP id w34mr1935202qtb.77.1496325538298; Thu, 01 Jun 2017 06:58:58 -0700 (PDT) Received: from localhost (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id h21sm10426222qke.52.2017.06.01.06.58.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Jun 2017 06:58:57 -0700 (PDT) From: Rob Clark To: iommu@lists.linux-foundation.org Cc: linux-arm-msm@vger.kernel.org, Rob Herring , Robin Murphy , Will Deacon , Mark Rutland , Sricharan , Archit Taneja , Stanimir Varbanov , Rob Clark , devicetree@vger.kernel.org Subject: [PATCH 1/4] Docs: dt: document qcom iommu bindings Date: Thu, 1 Jun 2017 09:58:46 -0400 Message-Id: <20170601135849.14978-2-robdclark@gmail.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170601135849.14978-1-robdclark@gmail.com> References: <20170601135849.14978-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 Cc: devicetree@vger.kernel.org Signed-off-by: Rob Clark Reviewed-by: Rob Herring --- .../devicetree/bindings/iommu/qcom,iommu.txt | 121 +++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 Documentation/devicetree/bindings/iommu/qcom,iommu.txt diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.txt b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt new file mode 100644 index 0000000..b2641ce --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.txt @@ -0,0 +1,121 @@ +* QCOM IOMMU v1 Implementation + +Qualcomm "B" family devices which are not compatible with arm-smmu have +a similar looking IOMMU but without access to the global register space, +and optionally requiring additional configuration to route context irqs +to non-secure vs secure interrupt line. + +** Required properties: + +- compatible : Should be one of: + + "qcom,msm8916-iommu" + + Followed by "qcom,msm-iommu-v1". + +- clock-names : Should be a pair of "iface" (required for IOMMUs + register group access) and "bus" (required for + the IOMMUs underlying bus access). + +- clocks : Phandles for respective clocks described by + clock-names. + +- #address-cells : must be 1. + +- #size-cells : must be 1. + +- #iommu-cells : Must be 1. Index identifies the context-bank #. + +- ranges : Base address and size of the iommu context banks. + +- qcom,iommu-secure-id : secure-id. + +- List of sub-nodes, one per translation context bank. Each sub-node + has the following required properties: + + - compatible : Should be one of: + - "qcom,msm-iommu-v1-ns" : non-secure context bank + - "qcom,msm-iommu-v1-sec" : secure context bank + - reg : Base address and size of context bank within the iommu + - interrupts : The context fault irq. + +** Optional properties: + +- reg : Base address and size of the SMMU local base, should + be only specified if the iommu requires configuration + for routing of context bank irq's to secure vs non- + secure lines. (Ie. if the iommu contains secure + context banks) + + +** Examples: + + apps_iommu: iommu@1e20000 { + #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 = ; + }; + }; + + ... + + venus: video-codec@1d00000 { + ... + iommus = <&apps_iommu 5>; + }; + + mdp: mdp@1a01000 { + ... + iommus = <&apps_iommu 4>; + }; + + gpu@01c00000 { + ... + iommus = <&gpu_iommu 1>, <&gpu_iommu 2>; + };