From patchwork Mon Jul 22 06:25:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13738332 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 7659AC3DA59 for ; Mon, 22 Jul 2024 06:27:55 +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=cx0rTwbbvA3LJi9fxiy53iORpAvZtRm761lHb6iyjS8=; b=USqnIb9GMLgE0zG1702WYb6mm+ NiOy83wsgywjpwjS/PZqa+dWtR4Z+utYNVhYs5sdI3q8B9UYdage0kiHspTAgN2LLFxFqVFfTmQb0 DcQaYgWdj2hIMNzFVT5RFpBGsLPu8vJtQjcr4teFcmV0d2cf+HPxVSKcRGqXTx3mpsmtqRNRlqP33 MzWRf8Cq/iGpuOmmpBpcPo6Rmn+SDBpSeVOmL65NBqOM8/wiTCJFSji7dLWbbBw54/mxZBDG0rL4Z g7Arn88bMBF06dFh1RTCfmxwdKHh0lnjpQFDCAEObXLAd7tz4CM5KBtf3M+7h5K+CJiEA70BAlw2u ppMCyBeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVmWM-00000008W03-2n3t; Mon, 22 Jul 2024 06:27:42 +0000 Received: from mail-mw2nam04on20609.outbound.protection.outlook.com ([2a01:111:f403:240a::609] helo=NAM04-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVmVN-00000008Vap-2BxD for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2024 06:26:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rOsev8Qu5FxKORqITi01eJGw+pjrh1WJ/k2Dud3SpGVmV4YmpOBLNn1k9h5nGYS4NtMy1KM0jdD8xETYZw8sh8BuO0mm7eQUBqnO1RGDDI2uAsSJKB8dp1mvyefK43YElM54mrt4rQmkDMJS4HPNdbNJzmFcyDkjrUc+MjDrtcXSfrh4A8ITQQ8VlyZ7zX4nBgxl4C/bXnL9fk0o5lvPaeB2K7U0lOoUq1SQUxUeNRMiU/gliC7XjKKaoCPQv1EMLYMNls6Rij7n2T3n2HL9BYjCe6wyQPzPqxZQ2hILRPFYbT8EE40FFJUoK3YJDGYmIyRz8E3TPODZc6UIqFVKtg== 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=cx0rTwbbvA3LJi9fxiy53iORpAvZtRm761lHb6iyjS8=; b=om+r6GgvtAb3PjJjNDFd3Plh6WIXWkCKmo2xa219FU8qKyktO4qzzpVybkSE7kYmFsFrqHcPzUi5vC/eGXL7HOOQCr7rhwwTcUC27qmEqzopcoQ1r7Ff2WICn4K4ZJxI3Y34zBM2sMqgrLyiKl2xqDz5iRmf6S4CpPI/kjmBFA9gLqAyiSazAQaWj3aVjy0d66uqUI4EwjJoA1U3PyDf2ybv23EoSGIWvDux03iFoWIMg6eVV+HT+xZW9idi73npF26hS5U5BO+kdvXrHfcJKUFSCq/vNryPt/JaFLoIrZv+U90r7EuIA+UnWU+L2mrGWHVfJnXDsJbD5IsOIDlB7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org 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=cx0rTwbbvA3LJi9fxiy53iORpAvZtRm761lHb6iyjS8=; b=bvpeld+p71u3Qa/L8GJQJFg0nG61CQ6wWHX7QkNVFigx9bmqn+E+sYrX+K6WR+KDyE9Y8Q0+8LHhpxKjGV29T8kVOD31gXomr4uIcU77T37k5QWr5N+SHAjt5tLbPfd69QHctevMGuqTw89Gjd0lVLocMwXTZcbJ+/DCvUXCgtE= Received: from SN6PR04CA0089.namprd04.prod.outlook.com (2603:10b6:805:f2::30) by MN2PR12MB4405.namprd12.prod.outlook.com (2603:10b6:208:26d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.19; Mon, 22 Jul 2024 06:26:29 +0000 Received: from SN1PEPF0002636C.namprd02.prod.outlook.com (2603:10b6:805:f2:cafe::9f) by SN6PR04CA0089.outlook.office365.com (2603:10b6:805:f2::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29 via Frontend Transport; Mon, 22 Jul 2024 06:26:28 +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 SN1PEPF0002636C.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Mon, 22 Jul 2024 06:26:28 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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; Mon, 22 Jul 2024 01:26:27 -0500 Received: from xhdthippesw40.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; Mon, 22 Jul 2024 01:26:24 -0500 From: Thippeswamy Havalige To: , , , , , CC: , , , , , , "Thippeswamy Havalige" Subject: [PATCH v2 1/2] dt-bindings: PCI: xilinx-xdma: Add schemas for Xilinx QDMA PCIe Root Port Bridge Date: Mon, 22 Jul 2024 11:55:57 +0530 Message-ID: <20240722062558.1578744-2-thippesw@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722062558.1578744-1-thippesw@amd.com> References: <20240722062558.1578744-1-thippesw@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: thippesw@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636C:EE_|MN2PR12MB4405:EE_ X-MS-Office365-Filtering-Correlation-Id: 53bac269-f03e-4a0c-c8e7-08dcaa173850 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: U30evg7JN8d2lcgmnCRK43yjDQZx0fjNl1W+r9NF3+ul8lsW+vTsBTOOgW7iEggVzWexNaMNTcUwWfWoR1ERoVmwBp5zMRfq/jz/u5oZpJX4I7T6Bjo2D/TCymWSDhQVn61O7gabvgms1uyulICI2M6onPShg8zBkvX3gUvOgpRWg7DQtVskolkdWMN7yUewfxHzWtoY3h3NZX9z8Z/KgSMrKUiUwDGeh2G9CdB8Dle7tuG9LRjp9C0prtus24oGNzHfsbSYcwFQnDJrgXwL+ZaNo4Oh7laV95ds0qib8ROV43WdXi0462MqsAUryWk5vfAZwtSBt6O0t/cefsZ4wFeGAHkaScvCu5YEzD0dFeFe17m0GCoKYX301XVUUB2YuyZwlvSEVQ/1Mkyx2MLUV+pvLbC/NH1dNZC2QkdhbkoNK7jBjS++0wMhRaUusQA1rnK3cvL5cS+/ShffVsPRtWCoTble2vqkyVyMrHGtnjR6HAcSMiGpLgq3OvTZb2Xm7Cl4gpzoBmBi598bzZBOsRHzQe7F62XXAar7tWgmzt3zisbnqiwww96n36dhDJi19MzbmrqAtf+G7tRoCPC35IWwlhaqaKtFZhgpsjSB/zSiTJxWBAvh8i3M8xYXlyOaOf7CHRXuKZoPVvgdj1MZRrsg4IfqvwS4nxjCavB07FcaDP5Ye58aHlrwyQ8l0lC43gd/lm1pqnzqErPKBXk+HUkxb6Xvz9oqgf21VaTsnmQPeZlSfBfOqMnQ3HUbvoY2bh0BJEvAMndWjU1IhmO0YtKOE6gyV9SS7di0yP5JAHOeMsXsFXR2MhM7Fhqk8UpIcXDOprICLULY/1/gLLdYFBBa2yhWlHxAdodiGrWSONy+NUinegTIZ2TLhIZHct+x+K45PqrtBOX84Datdp1vzXqqeizINJtQWOXbn+OPAI3Wj/B7MCcxJvB30O7YJswG6e3W2E2ZPTAmxmhdbXb5ltNDPKLDdLxXlULf1Dn1W1R/gP9X8FiCt13Nq21nrsNTQPjZgRD1ArFxAtR4e3eKmD4ITKGI84xs2lFHqgvaVBc1Vu3m4MGqDojTxln+/l3z/fRtbhtC5b8Scf3sgbxZI9L/+BtKa/6keoeTRGyiuiG8vAbCtXj/nKfLz45C58q9LNkx2j2ga4sLvYcfMjkuT/nKbwk3w17BaLF1FDm8Di1HuLlsjrMrX9yFddQrxWcYkrqub15g9M1d6HzIRCgo6xqQHZCpQiPiWrHp9Yj1VCXM3Nj3Kg3YO5GqGb+KQzDN1I36RdKEYZkqqfwYF31j+QasRKCGqYkXAb7nyOc0Y2u6aFGwuMmegl/R87uuGoIlYf+SlcHIbnj2i6IjbeY59KUA/mOuhYy1pjQTe6ffoHIAcn99S3EYROxNVEWnAQ/MUh2lHVS5vuqF8jTjzg6j6h01jhWFeMqOib82pdodwsoMZRSpoSyqUho89oC3ApqI 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)(7416014)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 06:26:28.4774 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 53bac269-f03e-4a0c-c8e7-08dcaa173850 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: SN1PEPF0002636C.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4405 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_232641_588021_2C30B903 X-CRM114-Status: GOOD ( 11.52 ) 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. Signed-off-by: Thippeswamy Havalige --- .../bindings/pci/xlnx,xdma-host.yaml | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) --- 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..28d9350a7fb4 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 @@ -111,4 +122,30 @@ examples: interrupt-controller; }; }; + + pcie@80000000 { + compatible = "xlnx,qdma-host-3.00"; + reg = <0x0 0x80000000 0x0 0x10000000>, <0x0 0x90000000 0x0 0x10000000>; + reg-names = "cfg", "breg"; + ranges = <0x2000000 0x0 0xa8000000 0x0 0xa8000000 0x0 0x8000000>, + <0x43000000 0x4 0x80000000 0x4 0x80000000 0x0 0x40000000>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + device_type = "pci"; + interrupt-parent = <&gic>; + interrupts = , , + ; + interrupt-names = "misc", "msi0", "msi1"; + interrupt-map-mask = <0x0 0x0 0x0 0x7>; + interrupt-map = <0 0 0 1 &pcie_intc_0 0>, + <0 0 0 2 &pcie_intc_0 1>, + <0 0 0 3 &pcie_intc_0 2>, + <0 0 0 4 &pcie_intc_0 3>; + pcie_intc_1: interrupt-controller { + #address-cells = <0>; + #interrupt-cells = <1>; + interrupt-controller; + }; + }; }; From patchwork Mon Jul 22 06:25:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thippeswamy Havalige X-Patchwork-Id: 13738331 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 C1A87C3DA59 for ; Mon, 22 Jul 2024 06:27:35 +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=aPa5N7tmghtSEV/oNpdhGvF7mzdGeBTsG7Fm6bcCEvQ=; b=C/U3oX8szD/ifNZM7uvgT8SX0O T1jzB3vfJqhRM5fK/R0QjHoELwCc6ADBovgyNCA7EHn0knCNlKDQgoiyffyKUnhxrm4BQDXKOLey9 M9/Y2DcNS7FCkOVsTQ25K1C3PpxazzBDrgwWo+HshV7oynZtpP+ExR1lM/vQW5g0AgyV2763ihlG9 kz4s3DtKyWBssfvfzxOqeBwsT3Ev2Jh/jb1QfZX4c+sw2dazsKhbP+D3ixO2HwiKQFyC99LR0TsRB NACJ10FwiKhNbj+VTVvApLib9l0NfGo6tIaXXmmYerfJmGRgdTHdh0Slg9BN908ehkXIMGOqf2XDd Xi/ybCjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVmW3-00000008VuU-1NTP; Mon, 22 Jul 2024 06:27:23 +0000 Received: from mail-dm6nam04on20600.outbound.protection.outlook.com ([2a01:111:f403:2409::600] helo=NAM04-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVmVK-00000008VZY-26N2 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2024 06:26:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MANpQgS1bl+1VoK8MtR73k/kfe3dVDhfo8DLBYI+ZzrRDbMkzk+q/7fIv2+LG9JcCKj6KXFH+mO0cw6yX/+LPcRZGGkkOgSa9ckqEcdBtmA1ac3t/BjjCh2p4pP+RkHLtrTwKDXqvyjwBX1FEnU/mwIJWru+q4CxRdh+swrQuUq74mD4PSYolnzM5ZrcdLwxqvNu6xjNcK6FOH25sElzs7jvba8AeWGkLaH3S3mx+epIopN0efHwVi/KSuVyjA7c6XROITpx2xsiRweu2wR6VthfqfoR4imqBylZRxVy4gTpBBeurxSa73/bK/WAkZfnFTB++dPoCcpzlbYwe17uzw== 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=aPa5N7tmghtSEV/oNpdhGvF7mzdGeBTsG7Fm6bcCEvQ=; b=wploxtGnObTELkoJArgd3ZXNwYDXS316/dy/S3Sy10gbNOmzZz0sLGNydbXeDLbH+cdLwQWFwdDcZIXKHoIsaMg3demvd1zJPms0SuPaG8TlNMc/5wAPARGbFW4UPS7AoLtwhSMHkWKch87C+uqsWOkoDxQRG0LA68BK8+X13jGK0oGYODOoyvovlz65ZFWOYR4ebi9403mK23cvn8Bh77vJ6wkBvyNHzYfSHfyKK4hz8pwb/5n+LHn1MgycXW+XE3bSAYk9Kj83vVT7oITnRK96k8Rc1TjgpSQ9eNNjCG660maL0i4M3gmPC+3zQ5aqY9obthyTcLBGw/8xegAMaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org 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=aPa5N7tmghtSEV/oNpdhGvF7mzdGeBTsG7Fm6bcCEvQ=; b=CckNxvr8Wy7k8sKs315zAyFvl6/SAHc0VCeeTjdRfBSjBD/aGIYjVCc13b7NPTjJErl2glmgxvTUomakrEnEecCmYBrY+P7hZl3vrvBT3STPJ6LEMDPzGYvFOk7rSuKPizzVLIHmp/ST7Y9tKM2Pf4Vp0h/7arE+wHDA+flJyR4= Received: from SA1P222CA0070.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:2c1::26) by SN7PR12MB8002.namprd12.prod.outlook.com (2603:10b6:806:34b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.28; Mon, 22 Jul 2024 06:26:32 +0000 Received: from SN1PEPF00026367.namprd02.prod.outlook.com (2603:10b6:806:2c1:cafe::b) by SA1P222CA0070.outlook.office365.com (2603:10b6:806:2c1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20 via Frontend Transport; Mon, 22 Jul 2024 06:26:32 +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 SN1PEPF00026367.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7784.11 via Frontend Transport; Mon, 22 Jul 2024 06:26:32 +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; Mon, 22 Jul 2024 01:26:32 -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; Mon, 22 Jul 2024 01:26:31 -0500 Received: from xhdthippesw40.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; Mon, 22 Jul 2024 01:26:28 -0500 From: Thippeswamy Havalige To: , , , , , CC: , , , , , , "Thippeswamy Havalige" Subject: [PATCH v2 2/2] PCI: xilinx-xdma: Add Xilinx QDMA Root Port driver Date: Mon, 22 Jul 2024 11:55:58 +0530 Message-ID: <20240722062558.1578744-3-thippesw@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240722062558.1578744-1-thippesw@amd.com> References: <20240722062558.1578744-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: SN1PEPF00026367:EE_|SN7PR12MB8002:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f694b3b-32fb-42cf-546c-08dcaa173aba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|7416014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: +Ov0XAOi6PdAwqOqILvJsgRnr0H2jM6hreW6MRLNH3Dg1wTPHXzwFotaXZ+1uSDYpQFhmV/21ydPw6KxhdV0SMwC1HMd21GtZgJZMNxqxoFkgrWW20royltVWOBjS/we7WkdfiZwAcKm1clhYKaLJvRe9Nn2jdvkLYRcuw22awKnsP1moLBTnoTi9rMvWv0keg8/Rgsuw0GewUiNT6JRtPN3ln6+p0L6Bg7s/l1bHTtHr4DwRbQ2g8IEPys/czFcHgXdmzGYTQ0uLMZ8kdHE5oUyXkeWUhx7YoYXL3RZOBhBAzb8M58JlkiiAyCUn3DQx5eL5tceChg0UevRNnEBDQ12fPLcfsLvmpxOreYNt5mSRQpPPPttY/NQLf4zc7dCkSapGR08sNXaEfbIHz7jIA/ikM4ZLGWeP5FhfHrXbZA2dRKrj80jNcvdcKKcTJ+ib6C6MEwF+8KfVbPEYh7pKsDPoFGkwlEmFRpv9wtVK5fsXUJMxO2ioCeFgP2jm9ZxP/P0nYsdVOVZp2V6kwY0ZmNwD6I/AGQjsWFuH6YFadLHiSr27GtZoZXPPz7zwrBgSMood8zMrL/WLV/UDE36uSQvENkH/bfOMlGaxc0bqHi6o//Ps2DkYcosyXNsusOzd1mQ+549Auso5rkcNtEsKJBpoH8LxydBjlGaNcN+a920TVIx9TaKehgeKc9/CNse2Li3R0rk0WAD23kl1kCSKOMDbX04A1i3qxg3LMhpsfEkliGhlbvspb1k6+zM8BniqJeEH64jy4X4yXHeGilc5K0Rl0MLbw0E1aG7uU0/SQa/pt9V9lOfY/reSVg01FmJf/qlKKnpD4NAkh4hxdHujMDAxuRQWxX0mKwncs+X6axvpGozv9lSzkpL4Id2dmnEH0qA8/Rnkl+sGfnSpkWphRg5lPxugHkk0NEWELjxrdXuGVnVZzsMvM9jVvtHQqWPbzI+6KiiXD05BDqx1TXIQ+CO0hEl2LSqYDk9gjTWgSgl4d19speauUdVJFInvnHFM5MUnbghrnBSKftE33rxmIo7qAgbZFazEu7YkVcPYxvYtiFSBzjsv2rJ8AEy/Xl+3BWAgrDnmpBu+fx+zrEZbRPco82JZ3zvbLAKRCZZg6dMQbJjt76k1i1u8Q5L6jPS8FVrcrAhQu+GYK3QDRn2jty2qKTRxtcFBEXTSlvYcAtpx9SgX6BmYxDCnVPbQ15yPQFDIcd7mnqtWe4JmDX9K89T+iiwpRDDsjsC77xPDQmdzH4APohfh04WEn9IvSUAO0J5h9PrE9DOIYrHgy0TVTKT2jjoMl1ZISdMuT4aoPNnFpxO3jTfmwZXW2X3pSnXIhM+o9U5FQ4o3t1BRpppPuIFiYJKw8V/MZD1cFgGqUaFmC+MAeLmb+R6ZYDB18mO6QVVYvKASxBCEdvpxB5f0Jb7gs6u/mvhl5QbUMD0gtMabx7jvzA7P2y5/kg/+zIL 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)(82310400026)(376014)(7416014)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2024 06:26:32.5089 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f694b3b-32fb-42cf-546c-08dcaa173aba 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: SN1PEPF00026367.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8002 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_232638_567140_37678B59 X-CRM114-Status: GOOD ( 19.02 ) 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 --- drivers/pci/controller/pcie-xilinx-dma-pl.c | 58 +++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) --- 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..933be090f92d 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) { - return readl(port->reg_base + reg); + if (port->variant->version == XDMA) + return readl(port->reg_base + reg); + else + return readl(port->reg_base + reg + QDMA_BRIDGE_BASE_OFF); } static inline void pcie_write(struct pl_dma_pcie *port, u32 val, u32 reg) { - writel(val, port->reg_base + reg); + if (port->variant->version == XDMA) + writel(val, port->reg_base + reg); + else + writel(val, port->reg_base + reg + QDMA_BRIDGE_BASE_OFF); } static inline bool xilinx_pl_dma_pcie_link_up(struct pl_dma_pcie *port) @@ -173,7 +198,10 @@ static void __iomem *xilinx_pl_dma_pcie_map_bus(struct pci_bus *bus, if (!xilinx_pl_dma_pcie_valid_device(bus, devfn)) return NULL; - return port->reg_base + PCIE_ECAM_OFFSET(bus->number, devfn, where); + if (port->variant->version == XDMA) + return port->reg_base + PCIE_ECAM_OFFSET(bus->number, devfn, where); + else + return port->cfg_base + PCIE_ECAM_OFFSET(bus->number, devfn, where); } /* PCIe operations */ @@ -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, }, {} };