From patchwork Wed Nov 20 12:09:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Boyapally X-Patchwork-Id: 13881108 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2078.outbound.protection.outlook.com [40.107.95.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 385D817BB2E; Wed, 20 Nov 2024 12:10:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732104643; cv=fail; b=duHEcxMBAf0FLsswrFrtwddS1OYb5j5k4lg8c9jdiR0qGfWDXGUMD0zfIQ8Vnxrk0UDZ5n4NhifqZs+ciO9ptiIOaE6b5mYpeUSh10jxK1tY2gqCmqEWvEHjI8j9l7Idpwg4IwitvW24hWMRE5SLJB866lnkeKNm2V32BHK9EBk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732104643; c=relaxed/simple; bh=kz4LpAdIHzHrHJLRrroeAZCFBYjDOuApB3+nd0wxL/c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kkn5Wm57UTogTkl0GsSVKk/NU+evtoDMghnDNRCpS5OrBo2/UNwArYVnVCOcB9HHC+5YZfZQaTSb678fC4cjmjGr1kuL4bboAcZUvb/Ues767NKbUdKuIhPD/DWclk4v2Q5N9JBP96N1+AVqc3n37TXFpf+k5OnpZhOK2l8iE3E= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=x6oCozJ6; arc=fail smtp.client-ip=40.107.95.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="x6oCozJ6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YJma7aJgKRNB8WAS0nWGe1DlApi2Q2fk7eyapSKY+zwRhmFTSVKlvKCRSKHF/25LN+x9z7K+rXVwIYNDcwQ7BOTebPQwKiOxjf0zhH8Rt7Dfc89aGF4/ytjXimaTsWupaMj5ZoD0X1j+ux2b2k11krlFHvdTj0e02oJufNgv+T43YH8dPvTbUy7U2DNnkHsSH3Qmb1LMACndWv7QVIBQ+bb1OoLxjzzlcGHZc6pW14BJtb53jPEEBi8nCI3b3AhANzMMEsH0uFvtg/aYRlymELaRSKaiIyUYG+0YsL+5QDEtGaIaZ9R+lB8chzPD00ZYoNXrJ5NHDf6Uhcmj/RBXRg== 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=M7a3BOVsA88RAp/JxUY76MXBgT+Y7tVYqwDendDBeHM=; b=SYM511PHp1K0zhOmKSXtLVtvCJkYtpOaPL8dDCg7nZpvUBN0zJURbRByFxPHcG7xvZe4MB4gl1lsFdMIjlkPr9VNdHUcOIomO7W37sLE1i18CL7cnhaL64qh14Un8Rg3fdx+lw1fii9vxsW8Znk1CDobhCI1Lso7B/IArabrLsGXRCR5gMPJOWPurtuOXGAh2mK3sPKpNZ1D080Iw3Iu2bnnPW5VY8LDYJ91Y2OnibVlntBF7LWvF6x0vXw/q/uvhecLidrzIAbfiHG+vFSvrz5ZkTxxqyGiRKPX+0jFhfNNrOttPrR0xVxH16/KWL70mIPBpnjNeCBu5MoHJriZuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.12) 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=M7a3BOVsA88RAp/JxUY76MXBgT+Y7tVYqwDendDBeHM=; b=x6oCozJ62rkHoXJm9QZxBbimVwZUxrA2fHu7/cXBVFcdIN4C+p6v3pdEx7fLWMQLq+4xqOhA+0ZMivlkSf1Zd4o8Z2kpaXitIhPoN49ECN++bpsLhAMH+454yPvo10WAkqX28PXH6tx/IfObjXA/ZPfgTEiCrbsUdCSGP8NVhLE= Received: from SN7PR18CA0024.namprd18.prod.outlook.com (2603:10b6:806:f3::33) by CH3PR12MB9313.namprd12.prod.outlook.com (2603:10b6:610:1ca::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.20; Wed, 20 Nov 2024 12:10:35 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:f3:cafe::44) by SN7PR18CA0024.outlook.office365.com (2603:10b6:806:f3::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23 via Frontend Transport; Wed, 20 Nov 2024 12:10:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.12) 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.12 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.12; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.12) by SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8182.16 via Frontend Transport; Wed, 20 Nov 2024 12:10:35 +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; Wed, 20 Nov 2024 06:10:29 -0600 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; Wed, 20 Nov 2024 06:10:28 -0600 Received: from xhdakumarma40u.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; Wed, 20 Nov 2024 06:10:24 -0600 From: Srikanth Boyapally To: , , , , CC: , , , , , , , , Subject: [PATCH 1/3] dt-bindings: qspi: cdns,qspi-nor: Add compatible string to support OSPI controller on Versal Gen2 platform Date: Wed, 20 Nov 2024 17:39:49 +0530 Message-ID: <20241120120951.56327-2-srikanth.boyapally@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241120120951.56327-1-srikanth.boyapally@amd.com> References: <20241120120951.56327-1-srikanth.boyapally@amd.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: srikanth.boyapally@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636A:EE_|CH3PR12MB9313:EE_ X-MS-Office365-Filtering-Correlation-Id: 27b81cc3-f5b1-42c9-d6d2-08dd095c56ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: njrjWYxofAn6eekdOadHU621IjsB+BZ8IYha5mCwCH75VNLzsK9CeXaWPPyJQcmSrTjSNESobtiqftDlq0abD0316LtoAnC7dQX5f3ciOa7maemuBpA5d01ifZt5u1hD+EAfEvLpcIxMtfdkNcqFiAiJXnUolf9suEIQHvd/G/pY/18Njq3gbkh2jxcaQEl9M9qyb4rRMKU8SZIDnmMLkmaIyrGWA3t6M10C+sqkyeKQat1RSmP6KiyWlfCM8rdJjTglecLfXCrwHmUPYdJvWguILv4QPQauXSYSeRX5j50I9jfsL84W0Egqkqw/WS7WGsu9KXm8BYdUSs1mLkYek5yjW6G4M0okf9tvi+K5bXrKCd5cW0T+sf1/1BhCJYnNwbYlfcG4WFZh2wXIimXbX4eEk77DruPYqOTsRyrCnPhSPg9YCIGsnLNAGC1IjF0d7P3fUdEdCivq/kVz8bBrUJfcrGnPE9z3/f4G0ek5pjOAsDtBr/uRgMB/CefO/Xo5YeQMZL8S7/GmjvVKRgFs26GbIxygORuKc4LgKIFwiEKOS3/H3ZbsADl37w2aXGQDAkfOdoi/ZvFXXFikh08/pWSFuGcb51hvwDvQPwoLSj65vcufvMb+wlKK04JYZSpRThnHnTwerDBrzROLY6tK6R2YgpZREnhdQptpd2IMYSIUjLfkIZT5sjElaC78i61kxevSpauLNjaBuXTyPnobGi9jQwJVjT6k/uWCeS6uLqAnhpU+1PVuEwcAFv0Xgn1xQkYhcChTgsNZqGxuozmtVT4OjI7arIp6r8tmdXxk1RqYpqW3aQz/auBWHXaw4oNrd+WRZjNuQfZzfNYN0++8/4SFmeoZtmOmnjsrkRKRBl1oUW3rA2NaLGYR5O+7XszJqU/v27qrSuWrxSZkGTlCZ8x6Gxrk4RktsZGVM9cCzUXuLbYG+RldOPqFm581CSSLKwnRpJql3+2VRep7UlMc8r/Y8TZwhsLCL6mFVuWfLEIW+FHWT4U2N/1D5icgmgYZCvCVWm82+5tBLhsPbnJPq0kNi7AG3mWpkxko3qyUfDlTWZp4fi0YpPww8M3bEVO7H/0wzpQKzzQIEgTT6+pcRnZAzAlxOlJXXqU3oR6dAWQSyoJFfAaAJ+wWhAU5a9UIlBUCNgbuLCbOh+EXgeFdpNfQ01sN4HC0j9M4DdI7OC5iZ2gpHEzKgyL6Favn0zQS+L62wCselI1FOoex+oK/e4aMXxBoBFnb7yWUnxW2had60lEAHHO8g/ucrP8OtaNoXMAtoKeqHqGTxv6Lb+7PDl3p2Zix+GpSdroNgA6uFizF7LkQxyC8IExZDNULQBFhM+l/PMJykFjKWiEzJv+qhDaqafPNuvGExgN6U32KR/WPLAJusrbWdiBle4QrgZaCQWLZ7ZwzY4EdydCHtpQUWA== X-Forefront-Antispam-Report: CIP:165.204.84.12;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:atlvpn-bp.amd.com;CAT:NONE;SFS:(13230040)(376014)(82310400026)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2024 12:10:35.3578 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 27b81cc3-f5b1-42c9-d6d2-08dd095c56ce 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.12];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9313 Add compatible string to support OSPI controller device reset IP feature on Versal Gen2 platform. Signed-off-by: Srikanth Boyapally Acked-by: Conor Dooley --- Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml index d48ecd6cd5ad..b6bc71d19286 100644 --- a/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml +++ b/Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml @@ -68,6 +68,7 @@ properties: - items: - enum: - amd,pensando-elba-qspi + - amd,versal2-ospi - intel,lgm-qspi - intel,socfpga-qspi - mobileye,eyeq5-ospi From patchwork Wed Nov 20 12:09:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Boyapally X-Patchwork-Id: 13881109 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2043.outbound.protection.outlook.com [40.107.243.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ACC919F43A; Wed, 20 Nov 2024 12:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732104645; cv=fail; b=LRvbgPespTc/cQj7lS5h4W5UGOfhuKdekMlT93YDX7JTGwFFGf/Fkihgxivqvbv4UMbqaMM7EaCpM+f7FJaei8d1PpGC4Poyf5Bllk9+GOyCzobbqHJ66APqp3bPqwxpqsLSRXnR0gtotERUkO6XHml685wuiRbOcFgWXjm+XKo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732104645; c=relaxed/simple; bh=/MIMeOpuTXvUmYbn1EGDUDuHs2M16kZFqCDoI/dudZw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Zqgp4AeXqRxP+HZ/bqmHE34rGgBtOvEYGXXEFD91KNqQl0xjFLA652fssg/mHk12Wmj2vww7EZCd1pa0iVEzUgLuZYUOVskdrctWvY8FulGdtFmsrSlAY8HhIqM6QXTCpy2v65GNnrb8KaU79AttLWLmspJAMYnOTMqphV13tiI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=DOQt7Bm4; arc=fail smtp.client-ip=40.107.243.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="DOQt7Bm4" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jBslHTf1AW/mctYwTr0P29Fo2sKcjXl9yPX9//lVa5ROkMhQVatEN90EWDmfXu5GP8YdtGVOMnjTiDffQGyppnHbL3rjgMy0UrfM4P1NKlptEDnRGDPxElowdbDdX4LqoZK8+9cnPMIyrh8kCzieekq1K80qqeLxWlhNTbbK9D8Ax3gfGj7LfiJBmZwFj4IdP72X73iD8q0QB+2cZGY2r5+SQaJej9m3QspmYvVzpEZiH/2lS3xfoPBjI+24N3VyBCt0kZt7BuYnXT3uaW1e6GFp+HGbvbveOaJGLh7vcNq5dTw77mv786dET6lYyYxmto5zwoohWJoYafzxa8SgMw== 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=m7VgfESRWb4sp96rlGBbkrY5aqY6rkYqzWmGYpBEwuw=; b=npZGR0R6hEqvwwBRtpuHJJliXLNHROC9Ns8CTBNcrw92O2VEVInRIBCgfWzAhO4QFYsFpJjal6JVa2jG5QVxnigUjEWZMRyNYQ9/EHZJpttSa9vt1vA3RexF9eOiRFPKHr6SFGojf6miR3nxAHlthrxh6e/6CHkQ6SC6XS2r9ehis00gFjKvf/I00nfyDIGiLQrvgDICeTd5sALQVNaCEGh0yQ5FFyELSJbgLWP9R0ZBuQ/C2ut3oCATlD5Ho3UeXRJtisHDbuJCHvSKjGTskHDEcUKG8Rkxwx+KPbbnpn9pFQEnx0S9qk7R7I5z4WAkHb/nd/HswwoMAUXFiOBBrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.12) 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=m7VgfESRWb4sp96rlGBbkrY5aqY6rkYqzWmGYpBEwuw=; b=DOQt7Bm4tIwOG9U0iWu3K/Py4ZQdQTmaNP06i/r1PwBvXlHMAKnLb5sMa6D+oifMOAZEKFR7JbX8djlkq/S/5JArafU5FT1OtK1EvSNzDc9K67G84Rvmwb3gSouWt4elkwJJvR2eidMpn89qeoe+Q5jv4UkAlEQL8/x5A2WSMSg= Received: from SN7PR04CA0110.namprd04.prod.outlook.com (2603:10b6:806:122::25) by CYYPR12MB8892.namprd12.prod.outlook.com (2603:10b6:930:be::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Wed, 20 Nov 2024 12:10:40 +0000 Received: from SN1PEPF0002636D.namprd02.prod.outlook.com (2603:10b6:806:122:cafe::70) by SN7PR04CA0110.outlook.office365.com (2603:10b6:806:122::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.15 via Frontend Transport; Wed, 20 Nov 2024 12:10:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.12) 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.12 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.12; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.12) by SN1PEPF0002636D.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8182.16 via Frontend Transport; Wed, 20 Nov 2024 12:10:39 +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; Wed, 20 Nov 2024 06:10:32 -0600 Received: from xhdakumarma40u.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; Wed, 20 Nov 2024 06:10:28 -0600 From: Srikanth Boyapally To: , , , , CC: , , , , , , , , Subject: [PATCH 2/3] spi: cadence-quadspi: Use quirks to set dma_set_mask instead of compatible string for 64-bit DMA support Date: Wed, 20 Nov 2024 17:39:50 +0530 Message-ID: <20241120120951.56327-3-srikanth.boyapally@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241120120951.56327-1-srikanth.boyapally@amd.com> References: <20241120120951.56327-1-srikanth.boyapally@amd.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: srikanth.boyapally@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636D:EE_|CYYPR12MB8892:EE_ X-MS-Office365-Filtering-Correlation-Id: 5bbc9806-1dfd-47a8-5d85-08dd095c5976 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: uFfUmMm/XS0yk7kk74Wg+QGTrE/INg4xUDJgl+si69VmjzCbGDzpyBpIvl4lIxMtMf8Aq/swBejELMbcvk98nE/5vaBt0vY0SDcYb8b1k9bfBFfk2GJNdjzwL0Rf/Bycn+6m5dGfwUAZCdfaZhEwwCt4wT5QoG+ycYpbtA7BUrnwuMixBfMUh7K9f0MUnC/abz16c/ZaHNpZEcng6/sOTawpaghoI6FIFCet9c2SqhhNtxO29wTh+AcNv2W2E1anh1shHkOTY4qP1DQ4CA+NMluAFWgMe64ZQfofx1UgrKVPaYAKfDZm8svduOQEei2ESfvdvoEWlyCbKweUvQYCvXxoeoGriCmr472ug6I2mAvjOvJh+bbJhJxUshGIJQrvLadaIM/HAr8FlshmovIZ3Znv7E9htjEWGGYv+MJddkoMfq1vnyZRR2SaIZ7QLbvLJn7u48vepLqu4X73S3OF5W1dCZtC7AND8gmUKYkckghqYmpK03DSJYvhI1NgtohGCrArvhQhs/Dzjupqv9eje/Owsqf0hReztxJgzDJd/MRklnf32RhW1Er4Or8aZvqSBsrrwhblrCYTVAJp3KmM4LikUhTahk2JVUutln+OMshwfNn8Tta8jfT6+hEW7BwEt8ny11kz0rIbf+QxQN/QZ5j0EgUJpXT79lp+Uzb15OCOnItv/9eJQ3/GAh0jrVY17OC5iyJg9atQnVez3Wx4niti7prVfwkIvK4YS6p+llUvbTLg1w+sYmuucveri/xtA8jqEYZo4te84//a316fMdVIM8kwpCF/Z/bINK4cBK7YypNFprmZ/a7DrGolE02MjpEZVd80GmzCZxqnziUkT6Dk7RkR701Zyvi5UxS5VhSE/KG+ptPMi6bbJ0NBPUpFmri7HcX0xpz+Jqton/83AQG4Ir51uLxf/5Ctj5aJHcCQ7EjPiOk+HwT7FRqKUZfauNoWav5vRMTe7K/NwFkUCK1pRPu6waxTdZ/lDEH6Rw7tTt96n0bIjctc20bOA8XU6Op/gQDptfaNLAgvMR0dQEkGiQmwt3a8hi20yXvW1Ik5vKHIVJg5IDswIM2LQuuijngHRvRGHU/LOYZ+MAWgwga4C3POeHeR040WTZ60z+baEyLn0l92De0qCNYqK4CLHuTFXj2gQeNBepX7lJZo53jtkM4Tw/rqNGK4l9uq36eFgiUrFRrUg2qfryk6Ap19dvVftgSEAFmKYZ4udT4hxcqkZn9ij2ne3XnoaWmfEbOAKNH5pxVIxUCZsnqVpDLXAx6BxFVKdBpAXxvS3FwQ3N54fif5RP17vucigWE6G+YlAO589jHh3+wsYCvF38E2mAp0KcC4nuWlc3395dznOCEL5bUx5sDVUGHm4o1g/S5JkaXisEbs6YgkDE+3WXIgSlniDTzfQzTxhkx7ATac/g== X-Forefront-Antispam-Report: CIP:165.204.84.12;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:atlvpn-bp.amd.com;CAT:NONE;SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2024 12:10:39.7799 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5bbc9806-1dfd-47a8-5d85-08dd095c5976 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.12];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8892 Remove device compatible property check and instead use quirks to program DMA addressing. Signed-off-by: Srikanth Boyapally --- drivers/spi/spi-cadence-quadspi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 1755ca026f08..fb75400518e0 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -43,6 +43,7 @@ static_assert(CQSPI_MAX_CHIPSELECT <= SPI_CS_CNT_MAX); #define CQSPI_SLOW_SRAM BIT(4) #define CQSPI_NEEDS_APB_AHB_HAZARD_WAR BIT(5) #define CQSPI_RD_NO_IRQ BIT(6) +#define CQSPI_DMA_SET_MASK BIT(7) /* Capabilities */ #define CQSPI_SUPPORTS_OCTAL BIT(0) @@ -1881,8 +1882,7 @@ static int cqspi_probe(struct platform_device *pdev) goto probe_reset_failed; } - if (of_device_is_compatible(pdev->dev.of_node, - "xlnx,versal-ospi-1.0")) { + if (ddata->quirks & CQSPI_DMA_SET_MASK) { ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); if (ret) goto probe_reset_failed; @@ -2048,7 +2048,8 @@ static const struct cqspi_driver_platdata socfpga_qspi = { static const struct cqspi_driver_platdata versal_ospi = { .hwcaps_mask = CQSPI_SUPPORTS_OCTAL, - .quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA, + .quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA + | CQSPI_DMA_SET_MASK, .indirect_read_dma = cqspi_versal_indirect_read_dma, .get_dma_status = cqspi_get_versal_dma_status, }; From patchwork Wed Nov 20 12:09:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srikanth Boyapally X-Patchwork-Id: 13881110 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2041.outbound.protection.outlook.com [40.107.94.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7A581AA1DE; Wed, 20 Nov 2024 12:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732104648; cv=fail; b=ZaRZbGAddmiyDTgtCakTb0XMm7TRJInxwfM93bCBsLpS5lN64YAE5Y7Cph6R66U82DM1B9cJK+02gqM7FUJfZMP9T0qSrWYGcrhlEGhH3Kj2mN0ftoNAAbV8JTxdtgvFT221WJaMYzBoqZug7pUpXG+OIHCU4j/2qEEAadPWqzM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732104648; c=relaxed/simple; bh=9U2Vkj1GpajCtUz+Si0+mXuF7R7Kz6H4SIsgYagXV/I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OcFGdLXJMqhhlzgiuxD7wgXFndKDBdMFuD7oktQJE2J6hwbVKvdumVx6f4Py9NBH2ZPSi1WKu1jrDDDroPzAHK3oLjVrfAWhFZ2PYsw+3DjOLC1iOi12eqyyqNu/RhSZOc3I/0ogod5+pKRfrEqZ3wu9JmcFpl03xvEdk/DbobQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=xRKi7l5C; arc=fail smtp.client-ip=40.107.94.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="xRKi7l5C" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=H5bSjncpCaQdihcyytQUFrWblyqH+P/m4IQ1egHzmrDy5nlbf4cMC+Cjn3qvPaoWUX571Ovco3tyktxuv2Mp5yFmd8r1bE0FxTfmgs99ozAnRNjXLAY+x20pzV/HKzeiQT3OPi90RVCZBNFipxfytUCTDUMCBI7cbo01AJ/mVZTkDmvDr6MIs63Jf7iV8vtmiz+48XewFN7a+tMD5xUgyQ7S05txCD3mbTqEuN9HNeedRnmg55QnGTfVjJbIAQzCRSpSIihBG/rSzr37h+CRUZad0mEGvmfa92dPRQSLpeKFRj+g4T2pK+Xnz9y7pzUhdPa95GUjt39x+Zvsn7WaHA== 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=NqgKUJVuo769CX/pxCJfVX59x8jYHinECEaEyoW5Eko=; b=qjqWMYEUWHJDSo65WZUWhmmX0PANL94DcR+UlzZMUTruQkCIPpz2sk+vbe0U0L7e7EQ85lz1+tUro22z3FYF6FXNhTUxmvWUER1abla96MLes1xqCVkMMBaIsPpGsHzS5NxwnJNZUEVCK8v7AQoe7+K4MVJi+pScWQtquAA8v+jqsXEQA1zZxL6gE87Pd1Wp601BL7quSAsXC86rJ/IpkXLy3O2W2zV0KiDj2PHjNWY/a+st0axqjG0sJD7v9T8k3Kqhq/tJoh7vSFIrJeqDfxWu2vICrJZ9p+jJMIYBp63ibyzt0M+80DJYGs8uGGhrA+0TnH4XVxu8AwAV2kDGYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.12) 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=NqgKUJVuo769CX/pxCJfVX59x8jYHinECEaEyoW5Eko=; b=xRKi7l5CPpO4oy4VdVpn/0IzzwoukmuqAXWfylc9Yv1TFoYhzlalaN+GV6cEAv+hpTFAxycdqSq9H3g6wcsZDfb7vaIRnP9sIAdv1MZMxc9Gv+gEWVYc2EkJuLpbl8Ets897QYJHpgOLHHCLZSr06v47CYziyflFzlFsE3+cgDk= Received: from SN7PR04CA0104.namprd04.prod.outlook.com (2603:10b6:806:122::19) by MW6PR12MB8705.namprd12.prod.outlook.com (2603:10b6:303:24c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Wed, 20 Nov 2024 12:10:43 +0000 Received: from SN1PEPF0002636D.namprd02.prod.outlook.com (2603:10b6:806:122:cafe::41) by SN7PR04CA0104.outlook.office365.com (2603:10b6:806:122::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.24 via Frontend Transport; Wed, 20 Nov 2024 12:10:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.12) 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.12 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.12; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.12) by SN1PEPF0002636D.mail.protection.outlook.com (10.167.241.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8182.16 via Frontend Transport; Wed, 20 Nov 2024 12:10:42 +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; Wed, 20 Nov 2024 06:10:35 -0600 Received: from xhdakumarma40u.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; Wed, 20 Nov 2024 06:10:32 -0600 From: Srikanth Boyapally To: , , , , CC: , , , , , , , , Subject: [PATCH 3/3] spi: cadence-quadspi: Support for device reset via OSPI controller Date: Wed, 20 Nov 2024 17:39:51 +0530 Message-ID: <20241120120951.56327-4-srikanth.boyapally@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20241120120951.56327-1-srikanth.boyapally@amd.com> References: <20241120120951.56327-1-srikanth.boyapally@amd.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: srikanth.boyapally@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636D:EE_|MW6PR12MB8705:EE_ X-MS-Office365-Filtering-Correlation-Id: 83dd6e20-fa53-4c06-0d3e-08dd095c5b4c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: U72UXeN8zF6k4E0MW4GV1KjHZtU+9T4196AYV4JG7MT0dAo7Asplu51t5UNIdVN9+KAKbqsLt9KZZbkK9511RgUOhHYt0AWaciX5qlSBdXxSCsdbVo9tZi/9oi4ftPYoqf2nxjUqn9Gm6w/b0MHsRoXQoQZYuDsgsiaT5qrZ5v3ALhcKBI/jb7axSisVKVvMJfAoB6WHTi1U1xtHopn3WYgxENWd+wR2csR5H4uXYx7GyuJ4Jp0l56TSDEqbNaIlGIVmb/SpXJXPZHus1XE1JAzP1uOcMboX1yusozHRomBAOSPNRZodLtxKd8ucqEKYwqIB/GyzjwMcOb5qQkThXNakPZABrEUoTYLY84N/s4AR38zynt+0Lh7qjcoqV8Ct5TgvrHf0ecp8tY+MASIgyhcDmMLAUlUEtLqRgvoxk5bIB1ZQSXAvUFRUfY6yS2wdSIsYm0OXRC/ognr5jR+u7CQISesguSUXqT5crahFvnYp8qMcZbt0xCJ+D0AMld3iKPsNhEUFDMKG46YclC0kL8tfgG/8f4IR4p5R8OZGl1u1CUD6hEPyQ3UTtvcTzhA6MpJpYe9+gftJmKurSfO1WIhqy3qznP4Q8YlG9ROGF8YQ+RxVU41cZlmv+/9XIXEy2YWfc1SEGEn2A16x5y1mS9vgWgvUJP+nZHJgsPXLs2/Ew8qzLcagOhMJlIe637US/mE9pxotbMnAqlgqDVGE3CSytzB5u8MRD/i5XHWxcbzu2SZzMOyJiKPwLL/kxWthaWy7Uz9e02Cy+xqmOoKfPjvl6r5CWLM4idfT1juEG/g2l5QVBK1gYBTYPo3xD0sJ4UXi/lev/+Bgj1VyYLuHC+tXfGugoXAXxHfoID0mR+Kpyk3KqAT1Ym+f+ZkW2HcjKofcv88ZWjR4jSz2rITcUAt0pB2UhmFXBcgiW5tr3ukilYRGA+toFoTAyV880W5XxQmeQ6gRk4ljS+MBCNrhvsJYSpWuG+ti1bTrvB1k9H5jQHlZXAb3/fsekuDgZY/RicyhuvhW+2l+VLoV4ccFcOZnBonU+F2vKkSEajKj3YdN1ZAIptu19y6iB50R8AUpQNTf3+m9ZnKpGRWJrwIoMlwpa1N1kmgahyQK1J2cTsMCcpi0TrGOI0Q7LiEruUylxLptajAwLOvn5w/pztqQkpTL+271xBhPahQoK7OEt5MYvZJSsknQSm8DebI2Hyf4Fxy5NSiB5fgrtaN2bA4yqNy7T0BcJ+Iu7HJl9JSBICrG7G+NyBenpKgRmuTVHz4vsGkn/vHWiD3yFDwdc4xNEQhwDV6J3i+JJt2f56+Mf6VVHw62u8HXuaqSNRoTrUJfkGcb7P8M1NOOI+xTva4lsDzfQI2ieRdE/QtmDMJyyJ7kxjaoeykD2Yd5ilZbc60T5G/j/8Mn4ssZWnD7Oo+1zA== X-Forefront-Antispam-Report: CIP:165.204.84.12;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:atlvpn-bp.amd.com;CAT:NONE;SFS:(13230040)(82310400026)(376014)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2024 12:10:42.8892 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83dd6e20-fa53-4c06-0d3e-08dd095c5b4c 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.12];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8705 Add support for flash device reset via ospi controller, instead of using GPIO, as ospi IP has device reset feature on Versal Gen2 platform. Signed-off-by: Srikanth Boyapally --- drivers/spi/spi-cadence-quadspi.c | 40 ++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index fb75400518e0..82df3d0683d6 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -44,6 +44,7 @@ static_assert(CQSPI_MAX_CHIPSELECT <= SPI_CS_CNT_MAX); #define CQSPI_NEEDS_APB_AHB_HAZARD_WAR BIT(5) #define CQSPI_RD_NO_IRQ BIT(6) #define CQSPI_DMA_SET_MASK BIT(7) +#define CQSPI_SUPPORT_DEVICE_RESET BIT(8) /* Capabilities */ #define CQSPI_SUPPORTS_OCTAL BIT(0) @@ -110,7 +111,7 @@ struct cqspi_st { struct cqspi_driver_platdata { u32 hwcaps_mask; - u8 quirks; + u16 quirks; int (*indirect_read_dma)(struct cqspi_flash_pdata *f_pdata, u_char *rxbuf, loff_t from_addr, size_t n_rx); u32 (*get_dma_status)(struct cqspi_st *cqspi); @@ -145,6 +146,8 @@ struct cqspi_driver_platdata { #define CQSPI_REG_CONFIG_IDLE_LSB 31 #define CQSPI_REG_CONFIG_CHIPSELECT_MASK 0xF #define CQSPI_REG_CONFIG_BAUD_MASK 0xF +#define CQSPI_REG_CONFIG_RESET_PIN_FLD_MASK BIT(5) +#define CQSPI_REG_CONFIG_RESET_CFG_FLD_MASK BIT(6) #define CQSPI_REG_RD_INSTR 0x04 #define CQSPI_REG_RD_INSTR_OPCODE_LSB 0 @@ -831,6 +834,25 @@ static int cqspi_indirect_read_execute(struct cqspi_flash_pdata *f_pdata, return ret; } +static void cqspi_device_reset(struct cqspi_st *cqspi) +{ + u32 reg; + + reg = readl(cqspi->iobase + CQSPI_REG_CONFIG); + reg |= CQSPI_REG_CONFIG_RESET_CFG_FLD_MASK; + writel(reg, cqspi->iobase + CQSPI_REG_CONFIG); + /* + * NOTE: Delay timing implementation is derived from + * spi_nor_hw_reset() + */ + writel(reg & ~CQSPI_REG_CONFIG_RESET_PIN_FLD_MASK, cqspi->iobase + CQSPI_REG_CONFIG); + usleep_range(1, 5); + writel(reg | CQSPI_REG_CONFIG_RESET_PIN_FLD_MASK, cqspi->iobase + CQSPI_REG_CONFIG); + usleep_range(100, 150); + writel(reg & ~CQSPI_REG_CONFIG_RESET_PIN_FLD_MASK, cqspi->iobase + CQSPI_REG_CONFIG); + usleep_range(1000, 1200); +} + static void cqspi_controller_enable(struct cqspi_st *cqspi, bool enable) { void __iomem *reg_base = cqspi->iobase; @@ -1912,6 +1934,9 @@ static int cqspi_probe(struct platform_device *pdev) host->num_chipselect = cqspi->num_chipselect; + if (ddata->quirks & CQSPI_SUPPORT_DEVICE_RESET) + cqspi_device_reset(cqspi); + if (cqspi->use_direct_mode) { ret = cqspi_request_mmap_dma(cqspi); if (ret == -EPROBE_DEFER) @@ -2054,6 +2079,15 @@ static const struct cqspi_driver_platdata versal_ospi = { .get_dma_status = cqspi_get_versal_dma_status, }; +static const struct cqspi_driver_platdata versal2_ospi = { + .hwcaps_mask = CQSPI_SUPPORTS_OCTAL, + .quirks = CQSPI_DISABLE_DAC_MODE | CQSPI_SUPPORT_EXTERNAL_DMA + | CQSPI_DMA_SET_MASK + | CQSPI_SUPPORT_DEVICE_RESET, + .indirect_read_dma = cqspi_versal_indirect_read_dma, + .get_dma_status = cqspi_get_versal_dma_status, +}; + static const struct cqspi_driver_platdata jh7110_qspi = { .quirks = CQSPI_DISABLE_DAC_MODE, .jh7110_clk_init = cqspi_jh7110_clk_init, @@ -2106,6 +2140,10 @@ static const struct of_device_id cqspi_dt_ids[] = { .compatible = "mobileye,eyeq5-ospi", .data = &mobileye_eyeq5_ospi, }, + { + .compatible = "amd,versal2-ospi", + .data = &versal2_ospi, + }, { /* end of table */ } };