From patchwork Sun Aug 11 02:23:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13759665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DDCEC3DA4A for ; Sun, 11 Aug 2024 02:25:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rDn4YgdMskOZ62kHhogOexozy6HtcQbqMppXEvwAX5o=; b=skRRdahNKkfu4olFY4+tFeYduh 54xDmrbGXrRLcmgIBG27QWnBpLO0Qb89LWc9n5cIuBPK9hi9c6cIhgg7am3vRxfZeVWLxatbKMG7M jy25FkfMG6xVkcA0KU53zUSQGMe9ihIEtZX78pTIn+Kfzm6YIwIJ7N64B825dmjkVnQ5ScZHAcdl2 29f0r0JUkVFTklTfzLvt5k5pXua434crfSKTaiEDaTnROcnM5kSsk2mNtmmqymRFeM7csJGgBzNBX e44sOg3CUg6J1eXpwA7sPZAE4BBeeAX/QtDYE1YPUkRK7r76dX99VCoDFWcvrho07vBPaEfVleLxk TBDzU6Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1scyGG-0000000EsZJ-0Fpz; Sun, 11 Aug 2024 02:24:48 +0000 Received: from mail-dm6nam10on20602.outbound.protection.outlook.com ([2a01:111:f400:7e88::602] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1scyFe-0000000EsR5-3OWp for linux-arm-kernel@lists.infradead.org; Sun, 11 Aug 2024 02:24:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OBTNzUHd+MCEl8jj0OFLktEgzZXTctqvt5/qZOs7f3A60hQr51ElT/ceIcrwK7odXPbFFhUkZuMLNaZFm4hxsIBrbmsQjn5h8DQcinPVxua3upqDDL0rlpSzJMp7sNcQ5CvF6824/uL4I6/f7scOgCA9IYxBZjsKXtZaJeklZoARfX03gG1EfvtkVxoytASyGi0EdeR4n6AkeZptFU9jSoRd70jJkAso22R7PcNmmye5tl0kO9xIFT20PqXY2YguI0TQLAgkvyDFAb3XO3rbEoC+wee8EBDc4Q8wnJT4511KyqbXPqouyqw8yzD/rInRBYS8vJ9zks0JUtGRYwT0nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rDn4YgdMskOZ62kHhogOexozy6HtcQbqMppXEvwAX5o=; b=r1hWbc2dmaUdVlmZ6gK01kpIgoPMVCjNqIvirRAUOdBZbxLcwfh3H4U6qdC4g4FPf96WeJuekcrTZ+/5vsOYlJxMcZv+E91R6KTtxZ5f0u0r/w1lgOsGRU3Pu/7CRDoRLnN7O2W/jXGoAWk1EsiBHk7ucYNzLyyu/tYbgz9rG9tuxde9aHQI7l2ITzCKp28kKNKNNI6A6UQNYa9kmh4jr+MwTEmvcLwJR8vLa+5YFP4mGUnZ1gaknybhChKSFiBHz/jDXHwzrZfTuVnWpf82LAEhjIFUspOno0bkDYzGrd0UqQlyjOIA7DA3Sy9lWdb2MS+2EOKXL/uLxMeo3Jm2bg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=google.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rDn4YgdMskOZ62kHhogOexozy6HtcQbqMppXEvwAX5o=; b=1TnvNGmpL2quJrAUVS4089clvptAzZJ82QiayRSjaki8WKn7oBiGBOO87Z5CJ/fCzzuS5e1uFyGe24wvBX1IJtSIq3zW23elKQ927Fz8icneDD6k74UYHteUiRoC6tfaEXbAa/eJZMO0lvV+tZ4FqST+PdkpdUH5VA4idJSOwBg= Received: from BN9PR03CA0089.namprd03.prod.outlook.com (2603:10b6:408:fc::34) by DS0PR12MB6389.namprd12.prod.outlook.com (2603:10b6:8:cf::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.17; Sun, 11 Aug 2024 02:24:03 +0000 Received: from BN2PEPF000044AC.namprd04.prod.outlook.com (2603:10b6:408:fc:cafe::c9) by BN9PR03CA0089.outlook.office365.com (2603:10b6:408:fc::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.33 via Frontend Transport; Sun, 11 Aug 2024 02:24:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BN2PEPF000044AC.mail.protection.outlook.com (10.167.243.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7849.8 via Frontend Transport; Sun, 11 Aug 2024 02:24:03 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sat, 10 Aug 2024 21:24:03 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sat, 10 Aug 2024 21:24:02 -0500 Received: from xhdbharatku40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Sat, 10 Aug 2024 21:23:59 -0500 From: Thippeswamy Havalige To: , , , , , , , , CC: , , Thippeswamy Havalige , Conor Dooley Subject: [PATCH v4 1/2] dt-bindings: PCI: xilinx-xdma: Add schemas for Xilinx QDMA PCIe Root Port Bridge Date: Sun, 11 Aug 2024 07:53:44 +0530 Message-ID: <20240811022345.1178203-2-thippesw@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240811022345.1178203-1-thippesw@amd.com> References: <20240811022345.1178203-1-thippesw@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: thippesw@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN2PEPF000044AC:EE_|DS0PR12MB6389:EE_ X-MS-Office365-Filtering-Correlation-Id: 3eec6e90-c03b-4f67-538c-08dcb9acaaf8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|7416014|376014; X-Microsoft-Antispam-Message-Info: 5Sjr9ImFpCwroRjD6U4PSWOoAv3YKu73okZ7+fbHqdUQPuRCs9eRluBeBM++o6Oj57ky4VPC7tZoe2hMZzlKQXZB8Y8RbXqBXIw+uA1Y84+cWSB/F7HoitEkg/8/j7WPI4FfhwJT94pk/ImMrzx3L7PNzizwi8aPuNF0iih62xw23+qsXsbOx6hPARF1vmQLLj81IygBGq1kiDIrD7DK76S39shC+RbQhU9pmc3DslSynBzXXJUuTIpTU1v3DvaI8G5WAM1ft47oIwle2j+LdaUHx90tK2HXN1TCI0ZbKJMM++9OLDgIefudCMwvX20qi/To+oz/iZM0lGilj/bXtsWVNOnWoLM/70M6m4AC2fWOBtPbXzsv2O0v1SxJbhFOU+vG+Rc74+AEoFMmBm+Dawillp6ElcHDjMk4eAOx7/kcWVN2xInry73jHJxQk7KNZX2RpqGbs3ai76yN96KmtKPLTVx7MI4E0GpGqyztnSHExLwdc0onkX2vamG/DQE8fjoRSzsYavsu7NEY/2zdZjUEOy+bh+hkOUEUG7F3+fhNJTO47ZI4c2lI+I5GsZ/Mtiy84RMC7tTcvuwQqlf9R3Mfc8zjFEwbLKMKuzhvl87lm9ravbvr+Zl96sZjzVYCDs9kMEJ3YeVo39wH2J05N3PEe4hXxBP4FsP1l/8A8PCBgaaDMnvyEBs1xGekf75ZotHkwlB/5+7kg7WoK7Gc8eBTojGc8TtN3XRDJLSMO2esXL/skQkez3bgfHA3+M4+ayo7otFCI7LoYeK/e6g2kOh8sYW7q1y5IKMMr1zXoySekrLIpJogsMJmZv9jHsZf570hK8DMysDev2QnLY5EXw8DYzHSG1HXQxipCw5AqU3lKhGlHsUx9Vs5frmlm2pzny9X17sQB3bek1dLELV6Jmm3snLLY4Jqj7KjW8RN9M7ObrDu6YiDgptvyUiBB+83ZIJ904sikJyNOJmBqOTX+cgUiTK+JQWqb1LqOlJhQwoKONVytnpTwtVgANMO7xzWilX2RcjVqpPEeoXFM78h/BBEknrILsyVeXTvaieqdB5kIR3a20DkGa8iZIAQj3jZZNk/Z/sXfEx4qn7XqUeF3XqRHghugUmKSOI3uLHT4achbEN//EEwvtz4ThSZUnnK7qjwOMaDv0+Eq4fp46y6+B2TJrONQcyWFrkTkYcJP/Z1+lqoi2bLl+9O3+KywtHQl/5hKC8NiPmCKMDeVClLUjFcMwmn5qtV2dQinz9hT/TjYE1I079j+4DtAr0CF5bGUuO5IrOpvY257dW42tAtTFdDbSPbQy5cpVlchykVMHWQokuDNRkgtjdVjO1rvuk5VfTjCFnoUA4WjcOdoF6lIJ7yiIG0vfz5e1WrSSNv0en2NtTZj1RBRjxf3NYAhHMhPPG1RiprEZOc3Bi7Mlp57vcAN2zDgAklekZicIY6jU3cSDfe5midKB2Q5rkSjP8o X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2024 02:24:03.2901 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3eec6e90-c03b-4f67-538c-08dcb9acaaf8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000044AC.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6389 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240810_192410_876647_63D3C4E8 X-CRM114-Status: GOOD ( 10.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add YAML devicetree schemas for Xilinx QDMA Soft IP PCIe Root Port Bridge version 3.0. Signed-off-by: Thippeswamy Havalige Acked-by: Conor Dooley --- .../bindings/pci/xlnx,xdma-host.yaml | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) --- changes in v4 - update IP version changes in v3 - constrain the new entry to only the new compatible. - Remove example. changes in v2 - update dt node label with pcie. --- diff --git a/Documentation/devicetree/bindings/pci/xlnx,xdma-host.yaml b/Documentation/devicetree/bindings/pci/xlnx,xdma-host.yaml index 2f59b3a73dd2..f1efd919c351 100644 --- a/Documentation/devicetree/bindings/pci/xlnx,xdma-host.yaml +++ b/Documentation/devicetree/bindings/pci/xlnx,xdma-host.yaml @@ -14,10 +14,21 @@ allOf: properties: compatible: - const: xlnx,xdma-host-3.00 + enum: + - xlnx,xdma-host-3.00 + - xlnx,qdma-host-3.00 reg: - maxItems: 1 + items: + - description: configuration region and XDMA bridge register. + - description: QDMA bridge register. + minItems: 1 + + reg-names: + items: + - const: cfg + - const: breg + minItems: 1 ranges: maxItems: 2 @@ -76,6 +87,27 @@ required: - "#interrupt-cells" - interrupt-controller +if: + properties: + compatible: + contains: + enum: + - xlnx,qdma-host-3.00 +then: + properties: + reg: + minItems: 2 + reg-names: + minItems: 2 + required: + - reg-names +else: + properties: + reg: + maxItems: 1 + reg-names: + maxItems: 1 + unevaluatedProperties: false examples: From patchwork Sun Aug 11 02:23:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13759667 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AA96C3DA7F for ; Sun, 11 Aug 2024 02:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=e2rc8i2Mj2nzPHOkyHFlQiZPHFWOIXenaKXby9DdNoQ=; b=RCvBRSZR2Vh5+nGsDD7+mWFxdJ /GHb79umr7/Hi/nRZzYmCaue4ddNCMdw9aHnPG3GLVmOELsn+oFa/f+G3KXEJv5UUzEI40cZIbHPA TMcs8Zphj/0jWVVP1j03+zSV6lg9nZvAooGknv+cY4zm59KFKWLnOPYcDwS9VkrwJt2EnxP0YTXXW 7LF3ZQC2g985g0yD/Ch3ixwIWRx8AyLL3k0WxBXVXi1kpSZ8SUk9AkpEOl0H9K24h0NWXssow77WZ SoEtIJox6XYMat1vyvCZz9bn1litC42DyXw8Csxhl/Zujkn6UoP38H/RwzO3HWaY8b6vB2Xmjf1UH heRXE+XA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1scyHL-0000000Esqo-2XLE; Sun, 11 Aug 2024 02:25:55 +0000 Received: from mail-dm6nam10on2060b.outbound.protection.outlook.com ([2a01:111:f400:7e88::60b] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1scyFl-0000000EsSC-42Hk for linux-arm-kernel@lists.infradead.org; Sun, 11 Aug 2024 02:24:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mWoe+nDjDv//1uyIPnKzEDG6O5830elLCwgZasLNlBZpi7JmTOxaQfimBAHKT2gwlQWmKEL5CmQCWNfwvdUWCV56aL1VA/U5HeGrQF/79gPQn/05si/Ttx3x4J6/QBrQ4gPQ+8QKsXlYCbkrcUILfGGVdfNe+vjRCLCnEAWhaFeJ957oYtPgCKm34djVOtAL5V4ApLL/jwZLzbGbe3VBB14LZtSyq9YW28iHJhizb6oVptXdg9t85cCFAOEQs2jRwstZNa+Md8VAzD7FZOcK+/OlbVDnxF8ft7ODElJViXzdf8fjyPAMovTC+enxbpp+D3IryMEaLr/sSHij/T8cSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=e2rc8i2Mj2nzPHOkyHFlQiZPHFWOIXenaKXby9DdNoQ=; b=kEEs05TCZQHwGn5wAyb3kMcf2WgMgrkAl/QKet+GvUk+nM8qZU+gshKPeBO3gF7E5WTQs2WIO1NemMn+gX2KjWCtX3iwrEBCaBSvSFmGVVuB/F/mGNKWdDo7JYS6EwheFj1qm/G13Z4/G2Lphy0KTpSYHR4FKNndlqgP4Dtv7FJBJR2/MoS4OpsOFRtoYdUTumEKXKRVhblTQZ7ro3KnfYK4I9g1XYgjAhTVWM8i8BV2CEwb9mZPjcBx9cdeR5jft4JoxllRdt0HdMXvbUr92g+DeM7xx2RB62w1BSji5h7to0cOTRcTX9VzChOot5Kiub9ObuU7QuCYucbPRdIW+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=google.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=e2rc8i2Mj2nzPHOkyHFlQiZPHFWOIXenaKXby9DdNoQ=; b=Z+bub5rzmklwYV6BHYft+0jezFEzaPryL6C/q3gQQUyWADDqeyKfFgU8hd1EXZGphglggcPTzuVSTksbuXgrKU7wpm0U3g4UmjgO2OnPRV8XGM2zP7kFDyDn4TT58Rj6/y1YIlysUpuVbUfohlzzwRz/ptJrDVq6ZCXIRIQyC2g= Received: from BN9PR03CA0410.namprd03.prod.outlook.com (2603:10b6:408:111::25) by DM6PR12MB4218.namprd12.prod.outlook.com (2603:10b6:5:21b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.19; Sun, 11 Aug 2024 02:24:07 +0000 Received: from BL6PEPF00020E66.namprd04.prod.outlook.com (2603:10b6:408:111:cafe::ef) by BN9PR03CA0410.outlook.office365.com (2603:10b6:408:111::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.33 via Frontend Transport; Sun, 11 Aug 2024 02:24:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF00020E66.mail.protection.outlook.com (10.167.249.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7849.8 via Frontend Transport; Sun, 11 Aug 2024 02:24:07 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sat, 10 Aug 2024 21:24:06 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Sat, 10 Aug 2024 21:24:06 -0500 Received: from xhdbharatku40.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Sat, 10 Aug 2024 21:24:03 -0500 From: Thippeswamy Havalige To: , , , , , , , , CC: , , Thippeswamy Havalige Subject: [PATCH v4 2/2] PCI: xilinx-xdma: Add Xilinx QDMA Root Port driver Date: Sun, 11 Aug 2024 07:53:45 +0530 Message-ID: <20240811022345.1178203-3-thippesw@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240811022345.1178203-1-thippesw@amd.com> References: <20240811022345.1178203-1-thippesw@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: thippesw@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E66:EE_|DM6PR12MB4218:EE_ X-MS-Office365-Filtering-Correlation-Id: a6ad6829-c137-427d-03a5-08dcb9acad42 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: YTZrOodY04CF9R/b2STY8GsUf+oFpMH5rkMyd59wq2gA7trv0dGLEr5nVO4I2LnNhes5vU+AMer18a1QWi9FL/TxtSEPp/KrSBgWWDsg0VAuCBExg5nAVmji0A/wUS6Hc44hFheZ8nmW4hX2G0xJKzcFdy32mUSJSHD5RIJnj2qaT5ZOxrJ/Lp721zDG2MAjNZe3Jw0EgGoxHuhT6GhMk9DgHpeZj744ahPUOe7N6+qQ0FGmOc1iwvyTgY0F6RkI701e8T0sax0fR6RHm4JmIrcu/LhsYyrVFMt32oMTGZBkoD/mPRBR9sBxR1H49EgNEr9XDUymrvGAXSvMF5Q2andL9qjiib7rNuCXZW0BkuqDKhmW7UyxCGir90kWhk7EaW7nN1L8DiNipN9EfkEM20H7sYbuAOeLrfdsBhSfUIgtKWqYfeYe5P0aO1p0wNnK+a6PViGwFogmpFHkug0G/ttnDroVeVvIAksLoFbCr2jTKnJlwlblUJ4+2ZVM/abLHCJFwZh8EprsHWJtf/mLshqWhhhYXjW16QR72qpK536BOtYPmk/DNk4hcw6+It1ZkR6FjqchehycuCzPtRr22kQkGKylrT0FGF1v1srh+oRpsCLhw1ZBeKSw0rMWtgIYYwsXhgG43aw+CaMEdQ+uZJNXUos1Rp5ALY478YfHu9ApJijKlv5fi3lLSlL/rMEJ6ZEgwi3u6H81NlnCKHHYI2bt4hm18LaZt3kPWURybGpFY1HQ7qhETEnL/QY9ODZXqui1olCXuHsZsFeZ7NkmaSEWbqKCiwxjvIOi456YKWlQAWaPe+yQ5CsTNCCPRPjVV5wjeiZCHJbiDrkfH6ly00fqqMsW55CT2h4mF+b4GkH1ul7Pqo6/PprFWFJjCjTgf8BvVBHoH0oiwhxhPDzqwXAhxtE/eHU4etffMtYnLztaKLRjjLpbceNHUtL1ZQF9qaww/RybTYIOKwJJK0VqgpR5be4A3ANVl7Ev75XqkvAwAmHRXN5UTS27EOPHZJPB6YItcQx0CLssCcKZO0cBbf6JyAiV+PIVfOxE4hcEjR+kGPMThFa/rHW8nJH07wrA6ViTtx3v84KsD3CDfLwe4kJAmMGoly2tuRWkXHuA0ioK1OfiVgNp1i35GLIn9BJirBvXlAbQR28+iVRCguGtYQk8/lnp2iWhu38DaKeuahhtC/eUFWrCeSBu2kb+F1FxiWq+U2bomrZUCueDySI1EI3WUhaU7e8Ydv7QpL9Xlgm8IiF+NU/bM4UBs5TswZxqTh6sdwZn0OFV46opcLXxbVKzrav4GvkReWLU0wmQYqsVLxRjgrCinMPzrVpsmJclrUKI2QCLTo8ZKRo/mL0S9hgkqpQu4BBkuaB/aDw6674JsmFeTkO9KtYpbCxSlbF5MMXNb7rLNJ+YPyN+QUsKng== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(7416014)(82310400026)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Aug 2024 02:24:07.1440 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a6ad6829-c137-427d-03a5-08dcb9acad42 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E66.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4218 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240810_192418_028450_119A8A9A X-CRM114-Status: GOOD ( 19.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support for Xilinx QDMA Soft IP core as Root Port. The Versal Prime devices support QDMA soft IP module in programmable logic. The integrated QDMA Soft IP block has integrated bridge function that can act as PCIe Root Port. Signed-off-by: Thippeswamy Havalige Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/pcie-xilinx-dma-pl.c | 54 ++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) --- changes in v4: - none changes in v3: - Modify macro value to lower case. - Change return type based QDMA compatible. changes in v2: - Add description for struct pl_dma_pcie --- diff --git a/drivers/pci/controller/pcie-xilinx-dma-pl.c b/drivers/pci/controller/pcie-xilinx-dma-pl.c index 5be5dfd8398f..1ea6a1d265bb 100644 --- a/drivers/pci/controller/pcie-xilinx-dma-pl.c +++ b/drivers/pci/controller/pcie-xilinx-dma-pl.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "../pci.h" #include "pcie-xilinx-common.h" @@ -71,10 +72,24 @@ /* Phy Status/Control Register definitions */ #define XILINX_PCIE_DMA_REG_PSCR_LNKUP BIT(11) +#define QDMA_BRIDGE_BASE_OFF 0xcd8 /* Number of MSI IRQs */ #define XILINX_NUM_MSI_IRQS 64 +enum xilinx_pl_dma_version { + XDMA, + QDMA, +}; + +/** + * struct xilinx_pl_dma_variant - PL DMA PCIe variant information + * @version: DMA version + */ +struct xilinx_pl_dma_variant { + enum xilinx_pl_dma_version version; +}; + struct xilinx_msi { struct irq_domain *msi_domain; unsigned long *bitmap; @@ -88,6 +103,7 @@ struct xilinx_msi { * struct pl_dma_pcie - PCIe port information * @dev: Device pointer * @reg_base: IO Mapped Register Base + * @cfg_base: IO Mapped Configuration Base * @irq: Interrupt number * @cfg: Holds mappings of config space window * @phys_reg_base: Physical address of reg base @@ -97,10 +113,12 @@ struct xilinx_msi { * @msi: MSI information * @intx_irq: INTx error interrupt number * @lock: Lock protecting shared register access + * @variant: PL DMA PCIe version check pointer */ struct pl_dma_pcie { struct device *dev; void __iomem *reg_base; + void __iomem *cfg_base; int irq; struct pci_config_window *cfg; phys_addr_t phys_reg_base; @@ -110,16 +128,23 @@ struct pl_dma_pcie { struct xilinx_msi msi; int intx_irq; raw_spinlock_t lock; + const struct xilinx_pl_dma_variant *variant; }; static inline u32 pcie_read(struct pl_dma_pcie *port, u32 reg) { + if (port->variant->version == QDMA) + return readl(port->reg_base + reg + QDMA_BRIDGE_BASE_OFF); + return readl(port->reg_base + reg); } static inline void pcie_write(struct pl_dma_pcie *port, u32 val, u32 reg) { - writel(val, port->reg_base + reg); + if (port->variant->version == QDMA) + writel(val, port->reg_base + reg + QDMA_BRIDGE_BASE_OFF); + else + writel(val, port->reg_base + reg); } static inline bool xilinx_pl_dma_pcie_link_up(struct pl_dma_pcie *port) @@ -173,6 +198,9 @@ static void __iomem *xilinx_pl_dma_pcie_map_bus(struct pci_bus *bus, if (!xilinx_pl_dma_pcie_valid_device(bus, devfn)) return NULL; + if (port->variant->version == QDMA) + return port->cfg_base + PCIE_ECAM_OFFSET(bus->number, devfn, where); + return port->reg_base + PCIE_ECAM_OFFSET(bus->number, devfn, where); } @@ -731,6 +759,15 @@ static int xilinx_pl_dma_pcie_parse_dt(struct pl_dma_pcie *port, port->reg_base = port->cfg->win; + if (port->variant->version == QDMA) { + port->cfg_base = port->cfg->win; + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "breg"); + port->reg_base = devm_ioremap_resource(dev, res); + if (IS_ERR(port->reg_base)) + return PTR_ERR(port->reg_base); + port->phys_reg_base = res->start; + } + err = xilinx_request_msi_irq(port); if (err) { pci_ecam_free(port->cfg); @@ -760,6 +797,8 @@ static int xilinx_pl_dma_pcie_probe(struct platform_device *pdev) if (!bus) return -ENODEV; + port->variant = of_device_get_match_data(dev); + err = xilinx_pl_dma_pcie_parse_dt(port, bus->res); if (err) { dev_err(dev, "Parsing DT failed\n"); @@ -791,9 +830,22 @@ static int xilinx_pl_dma_pcie_probe(struct platform_device *pdev) return err; } +static const struct xilinx_pl_dma_variant xdma_host = { + .version = XDMA, +}; + +static const struct xilinx_pl_dma_variant qdma_host = { + .version = QDMA, +}; + static const struct of_device_id xilinx_pl_dma_pcie_of_match[] = { { .compatible = "xlnx,xdma-host-3.00", + .data = &xdma_host, + }, + { + .compatible = "xlnx,qdma-host-3.00", + .data = &qdma_host, }, {} };