Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755526AbdIHMXp (ORCPT ); Fri, 8 Sep 2017 08:23:45 -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 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; 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 Content-Type: text/plain 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: =?us-ascii?Q?1;CY1PR0201MB1930;23:1TG7VQd4PQIzONgeYWscQGwB2CZ2hqTSDfr7w6I?= =?us-ascii?Q?Uv5bf8i9SHelgom9AKLWg22L+AW2knwtTAMeuPVCFmekVC/6scS4jVLEgEXE?= =?us-ascii?Q?a/DVK7ZugU3wblU6Acxl/MQyc2RefjLCkWaXci9pNckCIWBL/ELanDHH26Nx?= =?us-ascii?Q?jGpaKu80XFKaal2jSBwXot79E6PJOh1qJMSrR6W3u2KylKszU6hrB1iiL/Vd?= =?us-ascii?Q?vT/0OLGo9Ehi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: 1;CY1PR0201MB1930;6:dzSuqJzeJGx0NjLSriCftokXMJtqFiN4FAzb26GlBzJzduGI6p1KUxUcLPPqhknMe6Wyf6lvE/OA3oCtPf9selWfGVTeATJVpAbRn6TDOk5y847ZrSe1XsR1pcoyvWYLOfugP1nSColfxvDDhLEdGixtfQcdXt/UoA8GSHUHOwq8ViEwSC2e8OGjsmRs0Zn92GdAD8N+i6KBkuZyzrwxI7qILuZ2fGCC6mtxXuocVWiSVSyYhwKR+r5jWwxXI10AffvUFlVukl5+LMYpW6NVxqDGygxwyaF5IPOTq+QuMnX/unkrvuZM02wPM/zhY4jIELujC/aYOw2xmkyyuG4fAg==;5:prAzFKG695UQQxA3cUQfJ8B2KX2W0AUO7NEOXW62uhkVYAHj6NteRuOJDrB6btu/ztA3XEiV4BKGRSBBN3i7GaUSVgrVfw/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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3923 Lines: 84 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>; + }; -- 2.7.4