From patchwork Fri Sep 8 12:23:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Shankar Jonnalagadda X-Patchwork-Id: 811554 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="KlEse9S5"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xpc1m4JGFz9tXx for ; Fri, 8 Sep 2017 22:23:56 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755208AbdIHMXm (ORCPT ); Fri, 8 Sep 2017 08:23:42 -0400 Received: from mail-dm3nam03on0071.outbound.protection.outlook.com ([104.47.41.71]:25184 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754946AbdIHMXb (ORCPT ); Fri, 8 Sep 2017 08:23:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=b361jLTHqwbooNuBnqSK1cGhqAu7ekDYepirkFTJ/9Q=; b=KlEse9S53l0eT3Ak2KlsuVx1XTaimoLEpFUGXd6mlRRBGoYeOldXXSYM/htCGsrtEeIOd4eI3esvd6bFBecxD/r3V43WiY76Y2S5elE38mWLarY57v6eTf13UTfETae0wClSIHVWLWKvpCi9qc2xDPPDYRJGw0PhBwfqL6A0Oh0= Received: from BN6PR02CA0040.namprd02.prod.outlook.com (10.173.146.154) by CY1PR0201MB1930.namprd02.prod.outlook.com (10.163.56.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Fri, 8 Sep 2017 12:23:28 +0000 Received: from SN1NAM02FT022.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::204) by BN6PR02CA0040.outlook.office365.com (2603:10b6:404:5f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12 via Frontend Transport; Fri, 8 Sep 2017 12:23:27 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT022.mail.protection.outlook.com (10.152.72.148) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.13.11 via Frontend Transport; Fri, 8 Sep 2017 12:23:23 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1dqIJe-00027B-I6; Fri, 08 Sep 2017 05:23:22 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1dqIJe-0004Nc-Eb; Fri, 08 Sep 2017 05:23:22 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id v88CNGW4013167; Fri, 8 Sep 2017 05:23:17 -0700 Received: from [172.23.37.80] (helo=xhd-paegbuild40.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1dqIJY-0004Me-HY; Fri, 08 Sep 2017 05:23:16 -0700 Received: by xhd-paegbuild40.xilinx.com (Postfix, from userid 12633) id 25D72B2085B; Fri, 8 Sep 2017 17:53:16 +0530 (IST) From: Ravi Shankar Jonnalagadda To: , , , , , , , , , , , , , , , Subject: [PATCH v2 5/5] devicetree: zynqmp_ps_pcie: Devicetree binding for Root DMA Date: Fri, 8 Sep 2017 17:53:08 +0530 Message-ID: <1504873388-29195-7-git-send-email-vjonnal@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1504873388-29195-1-git-send-email-vjonnal@xilinx.com> References: <1504873388-29195-1-git-send-email-vjonnal@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.1.0.1062-23314.003 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(81156014)(8936002)(81166006)(50226002)(478600001)(90966002)(8676002)(52956003)(36386004)(76176999)(189998001)(50986999)(2201001)(5003940100001)(575784001)(103686004)(50466002)(106466001)(46386002)(356003)(305945005)(33646002)(5660300001)(2906002)(6636002)(48376002)(6266002)(63266004)(36756003)(47776003)(42186005)(7416002)(6666003)(2950100002)(45336002)(107986001)(921003)(1121003)(2101003)(83996005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB1930; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; PTR:unknown-60-83.xilinx.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT022; 1:r4szq9MORzlz3608FDsv0+ExUHFTNIzaTUph2JlE/+h9hvAp3S9k9IQH3ErtSM/rnYFDAUEwAYW7z3SipE0ngcjv+OuRRwJ+PEKJoxWr00JHi1GAxe8x+6uBvI732zR+ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d74bd6ae-86c5-4916-0b5a-08d4f6b4688a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(8251501002)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR0201MB1930; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1930; 3:e16a2dilAbwu6XyDblm1v7Wy8I4JaxP4MBMaHnvio2F5QGZL9wvgD4+B/TZEmMchG42Cc/CdVXOfd07rkFL0+/OvGCtZeIP+u4W8YoarWHTwycEz04LvTuGhbvZXeD4D5n8e+YWx6QxrhqD2tOb9FsEiGZu2f3SeDnMa2PqkHs8wr8Ay4rt4rzMIS09wSBR/wrGg9Hk8oe4Gs+4v4+JUbOvIOlZoezY27vC1DuN37Ik5570gZREqiMHeyh27xbac4nYL/6mrK2ofvxrli77tbBFc0GTt65hovv/2Lukb9IpMNsvv1wTbibbQao2xFRtkIeGUfVKPOciZiDa8WnLXv6MVly7HDPSQIJE5W1TZ7V8=; 25:qM3hRAsPD5wTRw01SEulKX217t1tN0ICuVrzo+KBtDMn3OXU/JhPXolklqwY8DHru47/f5S2FDE0OcIvZGIpn5aqS/KuV9wk+d8S03GdxUaa0IaYUaAXKasrSi9XHvY9Kenw4ULzCv2pQ4WfhwB8aWKlu4KUzwF5A2/uXALFZxJh9ERwKsmo3nVhta3UuSHEF4mjnBgOyeUTGnbdlW09/oma8AqaYtOxqAVlq+H52w8oZoLLX9o6eb8IuGVu3dEUs9tfNQGohcTNf7YSa2WBUFVup/ooTf6iDGiTm9D2jSRpLXB1hcZ8rdkAY8M7/UXxUUtT5rhxG8TJwoPGLhNxNw== X-MS-TrafficTypeDiagnostic: CY1PR0201MB1930: X-LD-Processed: 657af505-d5df-48d0-8300-c31994686c5c,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1930; 31:LVMZj2PO6/KBy+5gGmq7d2iCK2EvLLuxH8tK/0cQz6zQ4pKSRf34LMGtkO6rklOpHxuVlv0NWfIvxLOrhlR6Iecii4RsVmbkHq712igfe1Lb+lDSAO0+0BxBqS2ug0BQlrvEWfat6wZ7RgijvLWj5P1f1OdFdASqEVqmi1S3xveuSTLuq8T/Sd+qJ+hZQI+bv3bt21NuneMx106t140hiwkKlH0z4X2s2tUI4soP0/A=; 20:2ybrjV5oxYIuyfryDDy7rYx/BDifotqcaPiwfIQTayMigQ89wIU7d8m97hD2zRohYnh65V5PqJ9pvMxBI7+p386xPicgflY2OpEo4zXc22lcL70IfnZzHD4uEAddPC856287nRZmE5h9XgW3xZo9Vj9qVlOKA6nPEpeXpuSh/OHMQ60qS2asF5yCeT8B5LuhRKSVc5HYbgujqUXXI+KgpQp92rhDCJkw22cYmxEqusPVeZQkKWGlsNrFpvBj0Q6JuoBszX+DjV/QDPvuGBGMwyO551cI/UXmk5eZd2FQ8DOvbXSsGgTcIt5cgf4EwLT+DcpJmP8tuEw2mCk5TQj29+Ed1AdmDjDcGs+bEiRfHvesTxmYQRFCUULgSlBl0nYFV6y7A9e0UUhmahEYqaR5I11k39646dmXroF2erhwMI5aE3anPPaaCTvAxH7IORqVPp28oooX1eqqTkvJgCMbQC046xfWlK88+O/hH6f/onU0HV1cCEttTMYublEYkryU X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0201MB1930; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0201MB1930; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1930; 4:ChuVyPV+p3TldUw6zwEc6o5A/azGXDYSwKRWCrPLWtkkWs34YAve+tLmqIXyIqexwhxTaVLRACKxsKPZ/m4ma5wtbWx9PSug0UPC7UO+SCvlY15XLshFPWBMthZ5nP5vddy+4tRmmtEJRP5qY54l4lhbOSnt6F4vJ7xjzIYVTRQu/bIBkLu1aa0xCLqCFAVFB3TlYBMdmglvV17HCF+SH3GWo3ca9eB6rSK/67yEzOSM7SOG8i7ayEstWg+UVODmAPpDgCVH930OFH9vsibiWoXEwzudsIOmSTHjg2NNRxs= X-Forefront-PRVS: 04244E0DC5 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1930; 23:1TG7VQd4PQIzONgeYWscQGwB2CZ2hqTSDfr7w6IUv5bf8i9SHelgom9AKLWg22L+AW2knwtTAMeuPVCFmekVC/6scS4jVLEgEXEa/DVK7ZugU3wblU6Acxl/MQyc2RefjLCkWaXci9pNckCIWBL/ELanDHH26NxjGpaKu80XFKaal2jSBwXot79E6PJOh1qJMSrR6W3u2KylKszU6hrB1iiL/VdvT/0OLGo9EhiGnR5OBpOd4xMuGGGS5cyJOuqwsVa1hLKWROgKBrlV1sO7JsFx5k7c+YrAFZIlrP9mkslWn9yTZ6/6wPGylG5abNTS9FGe9+bx018hzgbnIzkhnH+qPL4lydPAJCTtzpDtDk5B8AIKySAVGM+nDOur5D0O7l4qcMg1irMCi27nOteUtWM7qfmdP/Qi+qvMfCjjuokHV3Gc3ejPGCCVBO/zxSona+gKAo+sHcV3UqdNv2PU8SCLgy3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BN3i7GaUSVgrVfw/Iv8rJscr1Oe2oJkL5hfLESOwbxaVcA0x97XRHPmWHg22v2R9eFLDsgA==; 24:cbRDyeI1ukkHjPUn8X6PkGuAonUCwGwf7zp6b27l3nYUNQnlVkVpbgnA114WpyWk4JN81V+g+ZtWEl30w/9cK9hw1Ccj76Sy0HcioIt7gw4=; 7:e1Ccr8rXgTU6FD/cmaxule2nj+wrneS/Zsfp2Ws0BjS4ZGCxNjUAzWoeYaISlGmt3V8f/cyv8qR/k4Xd8gWIJUBzIrSDzzvhrI9GhpcSv0kPtNHOrt7UNiUOlzEBk9wQ/aJommCwmzn+8bH/rVWiLoOIJ5s5vpS7NHf7vCF/AxW72T6pF5bdw+y3HJ6SIdI01W0nQiW4QtMg1ylDfjJ1Ry5guoRbHmDF6VxURFr9F34= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2017 12:23:23.3567 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0201MB1930 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Binding explaining devicetree usage for enabling Root DMA capability Signed-off-by: Ravi Shankar Jonnalagadda Signed-off-by: RaviKiran Gummaluri --- .../devicetree/bindings/dma/xilinx/ps-pcie-dma.txt | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/xilinx/ps-pcie-dma.txt diff --git a/Documentation/devicetree/bindings/dma/xilinx/ps-pcie-dma.txt b/Documentation/devicetree/bindings/dma/xilinx/ps-pcie-dma.txt new file mode 100644 index 0000000..1522a49 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/xilinx/ps-pcie-dma.txt @@ -0,0 +1,67 @@ +* Xilinx PS PCIe Root DMA + +Required properties: +- compatible: Should be "xlnx,ps_pcie_dma-1.00.a" +- reg: Register offset for Root DMA channels +- reg-names: Name for the register. Should be "xlnx,ps_pcie_regbase" +- interrupts: Interrupt pin for Root DMA +- interrupt-names: Name for the interrupt. Should be "xlnx,ps_pcie_rootdma_intr" +- interrupt-parent: Should be gic in case of zynqmp +- xlnx,rootdma: Indicates this platform device is root dma. + This is required as the same platform driver will be invoked by pcie end points too +- xlnx,dma_vendorid: 16 bit PCIe device vendor id. + This can be later used by dma client for matching while using dma_request_channel +- xlnx,dma_deviceid: 16 bit PCIe device id + This can be later used by dma client for matching while using dma_request_channel +- xlnx,numchannels: Indicates number of channels to be enabled for the device. + Valid values are from 1 to 4 for zynqmp +- xlnx,ps_pcie_channel : One for each channel to be enabled. + This array contains channel specific properties. + Index 0: Direction of channel + Direction of channel can be either PCIe Memory to AXI memory i.e., Host to Card or + AXI Memory to PCIe memory i.e., Card to Host + PCIe to AXI Channel Direction is represented as 0x1 + AXI to PCIe Channel Direction is represented as 0x0 + Index 1: Number of Buffer Descriptors + This number describes number of buffer descriptors to be allocated for a channel + Index 2: Number of Queues + Each Channel has four DMA Buffer Descriptor Queues. + By default All four Queues will be managed by Root DMA driver. + User may choose to have only two queues either Source and it's Status Queue or + Destination and it's Status Queue to be handled by Driver. + The other two queues need to be handled by user logic which will not be part of this driver. + All Queues on Host is represented by 0x4 + Two Queues on Host is represented by 0x2 + Index 3: Coaelse Count + This number indicates the number of transfers after which interrupt needs to + be raised for the particular channel. The allowed range is from 0 to 255 + Index 4: Coaelse Count Timer frequency + This property is used to control the frequency of poll timer. Poll timer is + created for a channel whenever coalesce count value (>= 1) is programmed for the particular + channel. This timer is helpful in draining out completed transactions even though interrupt is + not generated. + +Client Usage: + DMA clients can request for these channels using dma_request_channel API + + +Xilinx PS PCIe Root DMA node Example +++++++++++++++++++++++++++++++++++++ + + pci_rootdma: rootdma@fd0f0000 { + compatible = "xlnx,ps_pcie_dma-1.00.a"; + reg = <0x0 0xfd0f0000 0x0 0x1000>; + reg-names = "xlnx,ps_pcie_regbase"; + interrupts = <0 117 4>; + interrupt-names = "xlnx,ps_pcie_rootdma_intr"; + interrupt-parent = <&gic>; + xlnx,rootdma; + xlnx,dma_vendorid = /bits/ 16 <0x10EE>; + xlnx,dma_deviceid = /bits/ 16 <0xD021>; + xlnx,numchannels = <0x4>; + #size-cells = <0x5>; + xlnx,ps_pcie_channel0 = <0x1 0x7CF 0x4 0x0 0x3E8>; + xlnx,ps_pcie_channel1 = <0x0 0x7CF 0x4 0x0 0x3E8>; + xlnx,ps_pcie_channel2 = <0x1 0x7CF 0x4 0x0 0x3E8>; + xlnx,ps_pcie_channel3 = <0x0 0x7CF 0x4 0x0 0x3E8>; + };