From patchwork Mon Apr 30 06:27:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipun Gupta X-Patchwork-Id: 10370899 X-Patchwork-Delegate: bhelgaas@google.com 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 4B00260234 for ; Mon, 30 Apr 2018 06:30:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39350287B5 for ; Mon, 30 Apr 2018 06:30:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AF30287C8; Mon, 30 Apr 2018 06:30:03 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable 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 C01CD287B5 for ; Mon, 30 Apr 2018 06:30:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751856AbeD3G2b (ORCPT ); Mon, 30 Apr 2018 02:28:31 -0400 Received: from mail-he1eur01on0049.outbound.protection.outlook.com ([104.47.0.49]:28083 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751841AbeD3G21 (ORCPT ); Mon, 30 Apr 2018 02:28:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=d9h3X6nH80a78dCyfgRM76QM/OR4gGACQP0YP49V334=; b=rVcn/qemNzwSRAblmEUXzWsWAsA31KfAeu5i+9jV8b9JmwLdS6eTamyQymEhbHXRZVf8yiF30hCw3JBqhz4x8fmqZWab0H2qpT1WkR90hMeRCXrLVmSCDLC9C2GkiedCYeMj8eEa8O4M8UP29h6fNq2vHG47vfBxWo21SjiaUls= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; Received: from b27504-OptiPlex-790.ap.freescale.net (14.142.187.166) by AM4PR0401MB2418.eurprd04.prod.outlook.com (2603:10a6:200:51::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.715.18; Mon, 30 Apr 2018 06:28:18 +0000 From: Nipun Gupta To: robin.murphy@arm.com, will.deacon@arm.com, robh+dt@kernel.org, robh@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, gregkh@linuxfoundation.org Cc: hch@lst.de, joro@8bytes.org, m.szyprowski@samsung.com, shawnguo@kernel.org, frowand.list@gmail.com, bhelgaas@google.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, bharat.bhushan@nxp.com, stuyoder@gmail.com, laurentiu.tudor@nxp.com, leoyang.li@nxp.com, Nipun Gupta Subject: [PATCH v4 1/6] Docs: dt: add fsl-mc iommu-map device-tree binding Date: Mon, 30 Apr 2018 11:57:16 +0530 Message-Id: <1525069641-8523-2-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525069641-8523-1-git-send-email-nipun.gupta@nxp.com> References: <1524824826-29473-1-git-send-email-nipun.gupta@nxp.com> <1525069641-8523-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0006.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::16) To AM4PR0401MB2418.eurprd04.prod.outlook.com (2603:10a6:200:51::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:AM4PR0401MB2418; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2418; 3:AX3XmspH77RmosMJfbdkg1UGx6+8LYJPez62H0X/wsSx30gFd7mqJjRa9BASL7jSyRR1IxHvRaUFKVoJr6ieFjFkAZ+4OJGWkzxNwO8IqhM2Rc8F+d0zPpik072OSVVKyrTtqMcnXCOgpYFOegIru4akZxDKsV1CeK3S+NX1wEdTPeM7HeYptkgKK8wwTWr1/A70Injwvw6QMkkxky0tQ/leQihsW5DXAaXExUTuRqD3LJegoahvJnCOpvPa90H3; 25:a/cRd7J8MylNG6VxO+IQknY575kbYntaB67lQcJb/zSA2m/rrJTFE7ju9UUqIZM47+z8mtNUkqynkP22+PTKtvRXJ9MEeBWXa4ARBHaVJnYxwylD99+5aO+GD5RnCjblBheejzlDw8uegkmN5gsk0ddECyX/lvnFMt/0Ppc94WbNdGWBboSJLUtsyjRZ7ERMH5a62JFfUpv/UIZmeOry73KEaI68Y7yarEUz6Eqrgsl01TUGigmNoVeUCb2yi0uj14FNmBMgGScinU4dyZHP2qv6/NhMZls49LNu+uy1U74T3cclvu6YzfOeT/TLT/UYFkJgxiZCJ3JCUnAITJ18ig==; 31:ZfeOUuMtFW7ZmUwH3SzHkgOx5Jm0HtdgxN3RG4MypnsDtS+1MxAU77ELdOmYq74UzzgUujb2HT8vkRX6Uif6EzQQ5uGN1cDXTEO03HlEaGNAXaA8X1ONRIbpNEvDFTDDZKsCnyig0HCcVAISZXkO5bmJsf41HAKPYIWtQmbQF7Pnt2A9DOpS2o5yUmopGyzejrZrAZ2tp5aQ+JgHvmt35wYAvqfbOf2mu9+7Fmk3YVM= X-MS-TrafficTypeDiagnostic: AM4PR0401MB2418: X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2418; 20:vzmO/GISd2JZloE/9pP4/btD7YRMrL4Nkk+5FRaRkUlfGl1pvONIF1O6qXLODu1MVAhD5PoIcToFDB1q7Xx1aFvxG+Z/FPfNPj1P29h169hid1J2Qb68J5V4lVVNpoEYtj5Wf4JepXbvRq/jd2a5+XBBu/faeKilyH7axHqRcchcAD6zl/fbOXJzO6NPSjpcTGXBt+U4q4O2NM0njtZxVlCJ1coKOWCUqBpjyOAKzlkEbkd2x5KC9xj3CCAQgGA0mKKswxS4hqxs4rXy216Dxol7nfINK+b4yh2GH3+YJ2iGuFNSYjSk2QJYNVUuedaFbSDvsJLwQTeDxRiKdHUvNLoRjzzWZZ3fi39s6d95BJeYhNmWPcO4guThdn/tkS3sH9U0P7tmYI3lFixJWwRcJJ1GR6nIPdU6jbnbUcvG6tIgxiXaBT7/zg75Lb9IVcjapXCKplIHuJm/w528xRLurOXEOPp0YaFN2nczZ6GBqrx8swsIC/Ws7MjqJ8v7X4lm; 4:thtwaS8ei3+T3M0yYoMXTL07MqbGqrHHbt5Kb3mmLqrqpmFNo0h90SVFsChlQI0brcMt4P655M5uWJ4NKdefU9YCu//ntEIUx7mRqwOoLgUR7wTAs3nwbLKY1zFrzcnFFI6giIpHS8w+sZuPVLsYJIDfFwgn+34PMH9yqY+YxqyXqEJxnTizdYzN+/rQl4LcnnGYmuI7+1DNrMHbq2Ows6ut00bIHZ+TdOYsRFhsXVn/rcGvPabxY5vcNtzHlMbl4v099nwPoy6ZY7KOjMoL53tcrIpGBgb7Vn4ahEEO9kKErYZFt+c2njtB59gQiEoflJY04Wm5DDmWARuh+mPvUB4jkjRnvx7NSDHFutLyuDc= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:AM4PR0401MB2418; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0401MB2418; X-Forefront-PRVS: 0658BAF71F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(39380400002)(376002)(366004)(346002)(189003)(199004)(36756003)(7736002)(52116002)(5660300001)(105586002)(106356001)(486006)(48376002)(50466002)(316002)(2616005)(55236004)(956004)(11346002)(446003)(476003)(51416003)(16526019)(186003)(6486002)(76176011)(44832011)(47776003)(26005)(97736004)(5009440100003)(66066001)(86362001)(575784001)(68736007)(81156014)(81166006)(53936002)(16586007)(50226002)(2906002)(7416002)(25786009)(6506007)(8676002)(8936002)(478600001)(39060400002)(386003)(6116002)(6512007)(3846002)(305945005)(4326008)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR0401MB2418; H:b27504-OptiPlex-790.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM4PR0401MB2418; 23:6YZ6tjCIyS8090ZtnRd05qR17wm4MleTHF3SI/5?= =?us-ascii?Q?E98C6oaVh010qmMLmv+/wpBDwdDzDc4kWFi/VtfMzdKvmzvkcGOziuaMBwal?= =?us-ascii?Q?oHItnJycU0KeuSNj5MxSygkkHQcL+TPIBT5A9EPWWkAdx/4rCbOWPuobXNS4?= =?us-ascii?Q?QR0O/C0rFQSTasFGHFqQP6EB56Y0wAFW2DtA2mHX+U6jBQHZ6bLWWM+LfBQ8?= =?us-ascii?Q?T5B82XVaUBCKiUNQM5l4KaCDsPcSRLUy1N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8ImoNS/mDPtay4av+I39WQ0F7BIVPs+//lioZ06A9mXeYq4jaS4yGXH2D/+HA2CVQ2RB7uIzljk=; 24:w4W4Ytiw6rn8O0Io5Uk4PI34Nqqxiv8krM7QKndrvZ/gNcTzJQSolH2jTEWBiiCVSY/dAGzf9obVV2KSdKFYNWLBQMs+vnmgiaz+OyehS1Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2418; 7:vF4VEDSGrBHDfsR/aPVC5UqT18R3Nimiu70GC+fM6d6UdoKR7JHpT2UOiWzDFaMGh3Ii38EgK8i1W6afhBi2Kl7/hm/PbzDBCflmZ5e6gn7bW80Zs2ZaoMRCwBGWQpm7Y8Hsn8uQq2a736dycRUouKSK6jboyc0+vIF6JU3quVDtoQFkOCwkQAri8l+6QnRj7NrxCqkAkCmcaDNtaiHEa0D5RNRGS1CkoNxQmEX634/nMEb1oRHI7d6IQB8BnlPQ X-MS-Office365-Filtering-Correlation-Id: bbc723e0-0efb-4b49-a54b-08d5ae639299 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2018 06:28:18.5776 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bbc723e0-0efb-4b49-a54b-08d5ae639299 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0401MB2418 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The existing IOMMU bindings cannot be used to specify the relationship between fsl-mc devices and IOMMUs. This patch adds a generic binding for mapping fsl-mc devices to IOMMUs, using iommu-map property. Signed-off-by: Nipun Gupta Reviewed-by: Rob Herring --- .../devicetree/bindings/misc/fsl,qoriq-mc.txt | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt b/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt index 6611a7c..8cbed4f 100644 --- a/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt +++ b/Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt @@ -9,6 +9,25 @@ blocks that can be used to create functional hardware objects/devices such as network interfaces, crypto accelerator instances, L2 switches, etc. +For an overview of the DPAA2 architecture and fsl-mc bus see: +drivers/staging/fsl-mc/README.txt + +As described in the above overview, all DPAA2 objects in a DPRC share the +same hardware "isolation context" and a 10-bit value called an ICID +(isolation context id) is expressed by the hardware to identify +the requester. + +The generic 'iommus' property is insufficient to describe the relationship +between ICIDs and IOMMUs, so an iommu-map property is used to define +the set of possible ICIDs under a root DPRC and how they map to +an IOMMU. + +For generic IOMMU bindings, see +Documentation/devicetree/bindings/iommu/iommu.txt. + +For arm-smmu binding, see: +Documentation/devicetree/bindings/iommu/arm,smmu.txt. + Required properties: - compatible @@ -88,14 +107,34 @@ Sub-nodes: Value type: Definition: Specifies the phandle to the PHY device node associated with the this dpmac. +Optional properties: + +- iommu-map: Maps an ICID to an IOMMU and associated iommu-specifier + data. + + The property is an arbitrary number of tuples of + (icid-base,iommu,iommu-base,length). + + Any ICID i in the interval [icid-base, icid-base + length) is + associated with the listed IOMMU, with the iommu-specifier + (i - icid-base + iommu-base). Example: + smmu: iommu@5000000 { + compatible = "arm,mmu-500"; + #iommu-cells = <2>; + stream-match-mask = <0x7C00>; + ... + }; + fsl_mc: fsl-mc@80c000000 { compatible = "fsl,qoriq-mc"; reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */ <0x00000000 0x08340000 0 0x40000>; /* MC control reg */ msi-parent = <&its>; + /* define map for ICIDs 23-64 */ + iommu-map = <23 &smmu 23 41>; #address-cells = <3>; #size-cells = <1>;