From patchwork Tue Apr 17 10:21:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nipun Gupta X-Patchwork-Id: 10344715 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 69AE060216 for ; Tue, 17 Apr 2018 10:28:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 647AA286A9 for ; Tue, 17 Apr 2018 10:28:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 591FF28A48; Tue, 17 Apr 2018 10:28:15 +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 E5575286A9 for ; Tue, 17 Apr 2018 10:28:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752568AbeDQK0q (ORCPT ); Tue, 17 Apr 2018 06:26:46 -0400 Received: from mail-eopbgr50065.outbound.protection.outlook.com ([40.107.5.65]:49344 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751211AbeDQK0m (ORCPT ); Tue, 17 Apr 2018 06:26:42 -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=u/WFSTb/EACS4rWR0ioTSm2SudUBMIHYgcb6KTmkIRM=; b=rlu8BhW2FriTAEOxYDB1VXJQBz2JqAv6l/w8vdQnjlRzd1oktESnU0DrgtBH+PNKTxHYlbJRNBafx6vkBsVn71MbeVmkKrV40gFUsIndU3OucBJzGyR2b7GZ/RW7IWZDBxYsGy6nFL0TauzsQdhvqQbeeTvELw5KOwjq83SKFhI= 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.696.12; Tue, 17 Apr 2018 10:26:34 +0000 From: Nipun Gupta To: robin.murphy@arm.com, will.deacon@arm.com, mark.rutland@arm.com, catalin.marinas@arm.com Cc: hch@lst.de, gregkh@linuxfoundation.org, joro@8bytes.org, robh+dt@kernel.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 1/6 v2] Docs: dt: add fsl-mc iommu-map device-tree binding Date: Tue, 17 Apr 2018 15:51:49 +0530 Message-Id: <1523960514-25457-2-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1523960514-25457-1-git-send-email-nipun.gupta@nxp.com> References: <1520260166-29387-1-git-send-email-nipun.gupta@nxp.com> <1523960514-25457-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MAXPR0101CA0011.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:c::21) 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)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM4PR0401MB2418; X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2418; 3:ggfega3+TqFnbZMwGJqlq2cN1yS8yKhojEpk23SVM/Y3OKcMhspwFCNg8GldUF6TuJ9Bpn8rPL3rvsh/CyijNqcfdguORCcUODPaC030yisko4ERsyiSUZr0Aq5369ATn1owJiNfmPrEiStYH9I/sHYqVM7cJiswYWuDJ/dirEeLhyXIDnXrXhfBDiBK+8+ppDSwVPp42alID9Uf3us37OBNOi6QPX52Ajx3MlJVoYVdGZKYxxXYeeCbTplvT9HY; 25:V9+cqjn/+DsD7gyb9ECORn+X9t/GHtQ/SKFlwyCD3cY3QcgbGUY9fCa9U+NrQWzQLVeWq9+vhrOHkAvzRNQ1n4L1lo2gyCxBP30qS9nsoXqRLtkSeB2Ukp3bUQMMOXI1brK6kLFb/L5Ige15Kp/Cp4MPXhTUDYNlNWTzugWNTjOhBLPLC3I4byBM2HIHpRuM8bEbEsY3YgpFOvJYLvSLDI97oSsXI77mwN/kqpATRegG+CXao4a/5PghyuyMSSWDNr64sX7W96uVrdaRg69gwmSkWACx87y9GlSIZ0kbP6oQZWNf4kypl71iRhcsn9yqHvhi1bXBU8/FAwDEIiQmCA==; 31:6swpAnRuihJtRd7jJiJY16k0QzesqyyFtz3FqxVzKWIPvzEPsem3y+mXoatQXvlfmx5rPXVCdkClc3hIUv3kF/msryi5BDtYluzJFT/qrVrtK76gQ9kXqPpP1REl1KkS6lp37fY3w2RL1DOiYYiVL6MpZODfH/RraGhSgAuxVMANA5B/nNz/hEmwH7yH29ZA55dy7w+5dphm1p3VeI86n9eAk7tQ42kVLp3OkZC1lkI= X-MS-TrafficTypeDiagnostic: AM4PR0401MB2418: X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2418; 20:5dyapgW0XkKSxdgOLWPFP5NdaozA3jDCWxMft1vSNXXOAZ+HtNuovr35dCo36QxxcLYFzAFkOkT03yYWoLnyF7+nRTa5wWQRvUzhV2B5lm7p3+BVSqmSMdYXTMkT0gv4yOtgUqgzVfN+L7wXKSXNn85IW44zU7nuyy896P+fcMWG7qlwqVes0yl3PX938cnGTCb7VC+9P+zzjLvmcBh4myIU0HLes/ZZcoKMgu9WzWScIG1BocDBUXbVhrZviCBNPEcg8Jylm6wwZozxKkOHA0hlv21NhC+ekGqCbv1y6XzuRElBIARmGpLQ+vE4T8kASpyaD8Lpaw3vAgrMXtilo+S1rwuPiiBlhp/NUokwQI1WBqONCzeG78jC8iteFnjRbIHbAsjgYtmP9icI4JwnAwGrXJpWDCwVvT83d7kmq1lBIDB/ycRxK2fF4/V5u30TYoH9YGVZaouvcvW5UpEaLwkiuAJPzGSCnrBDQG66tLwmK+nqDtvQPG+5eYOOrC8Y; 4:OLBaqanT5MdAK7DnprBHPgWDXjhje6KYL86mJcUZqpPZUQA7N9rSyWdAnnZ8HdteyJt2aT1i8gdzgZuoJ83jZJglaH3VTPYCQyFPAgdP2KU6Af1AL6GtX6dx62x76Hr7uQlPxGBqsuTYNspDGDBUADZhSyA3kyJ4MBqdqbn/iORDK8hoTKvlX2sRcrEaCNKSWxADkyNJP5gaixyOm+01kJ9G3LmYarbg6PFnfLlQ25+P86HvdxAe4fbUfh0LL9VXiD/7Dll+bEr1egF6IBfSFolHCq97DgzXikg5P9l8Tw6gwiRlOuoMjAbaz1+Vqs/57jpDnjkbGjBZQDoysKU7iFlpnBhAnHwMb0PZIDxbzNk= 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)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231232)(944501359)(52105095)(6055026)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:AM4PR0401MB2418; BCL:0; PCL:0; RULEID:; SRVR:AM4PR0401MB2418; X-Forefront-PRVS: 0645BEB7AA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(396003)(376002)(39380400002)(346002)(189003)(199004)(6506007)(386003)(2616005)(446003)(11346002)(316002)(486006)(97736004)(956004)(16586007)(76176011)(55236004)(6512007)(186003)(16526019)(44832011)(48376002)(476003)(86362001)(575784001)(8936002)(7736002)(8676002)(81156014)(81166006)(6116002)(3846002)(2906002)(53936002)(50226002)(66066001)(68736007)(5660300001)(478600001)(25786009)(39060400002)(5009440100003)(4326008)(47776003)(36756003)(106356001)(305945005)(105586002)(51416003)(52116002)(26005)(6486002)(7416002)(6666003)(50466002)(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:BziF/vjNnMzM/WYM5jbUn5YwFmanXQwhf/vA4cl?= =?us-ascii?Q?reqlPvWI51Pp8ot3nx8kFP5cKfGoxizx/4oUR4tregneI7zDkj/4TfIpyFz+?= =?us-ascii?Q?Bs6UmEL6WtQVB70vAkJEW/dOAHLoqM9cf4z7+as5NEXs7jI+fxAZdcDU3CGn?= =?us-ascii?Q?6g4JHtJ9WoXwvg1oAPOQRBsFml/b1KmNxLiqJhgBOad6fRPXAdCHXirFvptU?= =?us-ascii?Q?WgWft9VqfifMLohKDkZ6qiy0HgvHUdZ9ChK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yHvAw1Fm+DbLEayMAsPMZLbPhfMpVEs0VJDvzEDCn7luqng?= =?us-ascii?Q?qjYX/K01xobnwckoM5piGvBjnWzKEV9kg6cYu8j9jI6XaIVn7lz7mGhG19cg?= =?us-ascii?Q?IfBmOxn7TQ3syy6Y5E/yIwKMBc0x5ubRyiapa9D+t5sM7MK5WF0mgBMDABH/?= =?us-ascii?Q?WgD5UUhQvG/BdH2Es8VtP5a8ZLxhg7goM35EDlbUSR50g?= X-Microsoft-Antispam-Message-Info: xiMxYzFdVo6TlT+TLr8HtIobG+8CiHlyGbdas+TPmZtoDXIsSgdwBaY8FBz6MTuUiL5WDsXWGLyEZDXbmoR/mD426UE8KckDxxFxISYtJMe/+6aSTPjn9vtUDBgKjppY2YsB9rvdiA3vCR4SRe+2Oma94xnHOiNxGgUSTImg8t7ypC2ETOr6CaLizah0CDIu X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2418; 6:Xs0tBzbvPgaj21zoN2Jc/xdqzVKlvnL0TuoYN8CPcawiUGk1b+b82baONVrdGIE68SrdVh0iFbvHe4VatxVmgambSl1c64qO7A/SkONpBpnxdUopY3nmVeIzY1cCEhWCe87iwYzNxXNCw3yTR+rH8crBgrBn0jVHuT8y/LAHgpq+1+rUgYvyizs091JAsEc4fX2VjYUlzBTitOvmCfXYdQCjQJocRh9z6VTaX+WeEikQMgsRVJUv9t5h/YnBnBNM47TF+oxdX7QDBWFbApO6WOVar5ZUwbstC/bEh76BH9TNBQEB1+i52WwAmCYSHtIBkSies7OeDvAlZth806nZE542qw6vlI48kTh/61VQx6aCDQYCq7fEBTwBb8QWBSMd5hWBV5ZiNnr3GnOD96jkOXXJt/2DynBnqltzESrpkcD/MmVfZyANpAkOvRr75LAfKnrsVZgKMVcFqEuhI0ioVQ==; 5:WTTnMOYVTlVIF9kaR8V6tUfGbUoaqazxVr3FSw/wBYfLHvjBV+gLsIMC1B1GKMmXTfhqbxVwfEXecRsk9ryBJEavUVn7pMf5j26AgV2Ke6beK14HsH9DzED56S9zXB+IgsL8gvu2gdGZoX9ShtRIe1DS/pOyDnfbG44GGiZNqkQ=; 24:w+eAFZpt4XcvfmwgFQXDppuVKd9ExoDT/3g81yv/JslFkc+mtBQyh3tEyvZ0GgGRABifCRkPbUyGte0LJN1k1J0iNzA5LNv1b8/IH6Gwiww= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM4PR0401MB2418; 7:eSRIq0vbAyhPfatv07KsACjZ6km/StGlqKem8T0Aiau6GuLWOTnFmT/+XJnQueeRlkOMriEBbZXY7Ue3KnDxDT/uqPcGx56i9w1X6WjD4bFfGf23tkS2PIB8soGcdcutWKxO+wxjgcfJduF0nlU+baZ7A5etWMkLhA1kn7pviWcyeZnmbhHEefRMATeYTRZ4y19K1yqCCRzLKg89qqKVEeX7Xj9cGCJRAUByiE3BvgQRB9U10Q+thyYzZWFOtlLU X-MS-Office365-Filtering-Correlation-Id: 0d2f300a-d716-4557-56f9-08d5a44db4d4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2018 10:26:34.9175 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0d2f300a-d716-4557-56f9-08d5a44db4d4 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 --- .../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>;