From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD713C54EE9 for ; Fri, 16 Sep 2022 08:54:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3B26F84BB6; Fri, 16 Sep 2022 10:53:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="DlHyqAGK"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AA52E84BA0; Fri, 16 Sep 2022 10:53:43 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2055.outbound.protection.outlook.com [40.107.244.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7CA2284BA3 for ; Fri, 16 Sep 2022 10:53:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MYu1xik5BganwHQtSrQHGAveJy0OudmRORVTbkmIPj2rghdyAcP6Q0Kmnia8D5U4l1P9pEIGV3XuUP9iRmZqbfJmwbXWNt3XD2ljCQOOicN/xl/3f9PaNOppfy1xpHytkecC9I7Nj6Czsn2S56DRGnrPe8KyUrArQSakArLEXoMQ18TQxOwfrZ1ABiEQopjlBqqAOpUR5VbgibX5q6n4fpkc8t8Mm/x42uweBYK95r1psrUFnbOyPo1N9P1EM3wNdY+bMykQj1JGuvdfEj8VM3JLOVBoPl7XUy2Ca4abKmpmEQ4HmiTMVL0de4UP6DVbkxzafjr6IbjapW/ZO8nD9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=iXDFyZb8aVAJ2/SsfDLL2wmVYILPFD6ACn1yna7l0wo=; b=K7/ReH3FJI/kcJehr+/kB4Qk0nC6/qmHq0Dwk3qeeLUJh7n9smvkxqirxBs+8b3iROr/3YthrXBUTvVHvBDB4Rxir9vg9HjBZW/oDaAaiLrBD14BBOC2WIH1TLNQe69/7KHWOusAInxyvtc9pI8doN0PA3Q0XbLWF5jp7SReYbG7Abg7WwzjDFvA2PKwGePthUaEGJoV6u4Nf9bd6uGxZGOB9j8AsLwqoqcbWGjujEYuuqj7I7Segk8bMntQ8KEkEAxseT+adQ3pmaaBNDNTZr404N+yWwZ0PLHCAZNHkqYCeVELs4vKfuiDJzFWRARbAFcYuNd0r3o4YMu0IL3PmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de 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 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=iXDFyZb8aVAJ2/SsfDLL2wmVYILPFD6ACn1yna7l0wo=; b=DlHyqAGKFRKDieLZDuIBKVFIh34lafcC+VFtoGk6lKikiMPARqQQwE4oM+7in+I8Pce0DLHeNy2vS7+VYcD1ItuxJRXwmsz3cGPxlQ5KzzwbL4KGKAMQJQcLEPgpqLLfKtGj2ixZ5s0wY4U4BgKEze4rpiZjU5p1R78cu0QMKsY= Received: from BN8PR12CA0023.namprd12.prod.outlook.com (2603:10b6:408:60::36) by MN0PR12MB5860.namprd12.prod.outlook.com (2603:10b6:208:37b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Fri, 16 Sep 2022 08:53:33 +0000 Received: from BN8NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:408:60:cafe::90) by BN8PR12CA0023.outlook.office365.com (2603:10b6:408:60::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16 via Frontend Transport; Fri, 16 Sep 2022 08:53: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 BN8NAM11FT021.mail.protection.outlook.com (10.13.177.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5632.12 via Frontend Transport; Fri, 16 Sep 2022 08:53:32 +0000 Received: from localhost (10.180.168.240) 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.2375.28; Fri, 16 Sep 2022 03:53:31 -0500 From: Michal Simek To: , CC: Jagan Teki Subject: [PATCH 2/9] spi: cadence_qspi: Add support for Versal NET platform Date: Fri, 16 Sep 2022 10:53:13 +0200 Message-ID: <00cfd4f55365b682440d57fcd46789b5844b8e6b.1663318393.git.michal.simek@amd.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT021:EE_|MN0PR12MB5860:EE_ X-MS-Office365-Filtering-Correlation-Id: 2b4f01a7-7aba-4677-aa7e-08da97c0eee1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xP2WWBbDcQ/Yl9JFffj+rb+L9Q9u2W8kh+LHgyTozeUXZBN2kEPyqh+URfYjZzO+f3J+5gyfq6Jku2gaavwC1DQ7Io+gAwkpaFJ20PH5eTH2WVNY8KcYeDJ5hGUjJBFTMjoioHEq/OSPyng59sRWmbKiFOnORInhngr3C/wBYW4ZHhidD5yVlF+fmHcKW+EhLkkNZGZQc7i0+pltuyUrauiB9MDEGp7j/JfdypN0N/eAa2pfBQa2Z1CQDIDCrIEYmHkGbenP9ThlbRNA2XboIswSAdSPKw84XjCNgP0un9SHl97h+eWdHp+vrDhcanoRAOfMIm2f8OopfHQByulJUJiufb43deTnYLqS4MQkOENAFveFhDkhhwU1W1zM6Al4KXaqocJJFalSoKNY1ClipPEKssJBNUEMXRCAsWaXfh8C57F4yO8N335hjRHdgl2BHx8RQ5ZK71r3gO5s3W7qm+mYVme2WFgsskDWqtbEYpHQS0Fnnn8PqyZ7zAKsOcJcTPjzanWjrIZkm8nBxdM0QYDyBXOwcKVfqursPC6lQgNW4wgBm9jA4CCmwHTzYD9qagEg8PDtCXu5Ca0ZsJiGVeG2CzmDwNeahIQOvOzlm+IFwc8W2dsLDqlN3gWvCMJbse81QTplwZmJ65w0SVp62zUqSD8F2vEnrsPOkse2BtAZHpf6xEqKnX+03sQJag9DhuU8MrkXwFpRlqPqMGC4Qn0fPYyex8+z7QLPih/WdAH8/EKpiOTMI9E8rWm12Xgfh+dMHxtTGYPqlT+3Ym/pS/G599BQbI1b8jrzCVa+oyJ5zmncHhRrSxhQXscqX72y 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:(13230022)(4636009)(396003)(136003)(39860400002)(346002)(376002)(451199015)(46966006)(36840700001)(40470700004)(86362001)(40460700003)(70206006)(8676002)(41300700001)(6666004)(81166007)(47076005)(316002)(40480700001)(5660300002)(36860700001)(70586007)(110136005)(186003)(356005)(16526019)(336012)(44832011)(426003)(82310400005)(2906002)(83380400001)(8936002)(4326008)(478600001)(36756003)(2616005)(26005)(82740400003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Sep 2022 08:53:32.2378 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2b4f01a7-7aba-4677-aa7e-08da97c0eee1 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: BN8NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5860 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Trivial changes to support cadence ospi driver for Versal NET platform. Also avoid ospi flash reset for now. Signed-off-by: Michal Simek --- arch/arm/mach-versal-net/include/mach/hardware.h | 4 ++++ drivers/spi/Kconfig | 2 +- drivers/spi/cadence_ospi_versal.c | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-versal-net/include/mach/hardware.h b/arch/arm/mach-versal-net/include/mach/hardware.h index 2eb549849825..808ce48fd148 100644 --- a/arch/arm/mach-versal-net/include/mach/hardware.h +++ b/arch/arm/mach-versal-net/include/mach/hardware.h @@ -25,3 +25,7 @@ enum versal_net_platform { VERSAL_NET_EMU = 2, VERSAL_NET_QEMU = 3, }; + +#define VERSAL_SLCR_BASEADDR 0xF1060000 +#define VERSAL_AXI_MUX_SEL (VERSAL_SLCR_BASEADDR + 0x504) +#define VERSAL_OSPI_LINEAR_MODE BIT(1) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index ac91d8225821..240ff212a39f 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -148,7 +148,7 @@ config CQSPI_REF_CLK config CADENCE_OSPI_VERSAL bool "Configure Versal OSPI" - depends on ARCH_VERSAL && CADENCE_QSPI + depends on (ARCH_VERSAL || ARCH_VERSAL_NET) && CADENCE_QSPI imply DM_GPIO help This option is used to enable Versal OSPI DMA operations which diff --git a/drivers/spi/cadence_ospi_versal.c b/drivers/spi/cadence_ospi_versal.c index a25c50bc5081..a9547a820031 100644 --- a/drivers/spi/cadence_ospi_versal.c +++ b/drivers/spi/cadence_ospi_versal.c @@ -130,6 +130,7 @@ int cadence_qspi_apb_wait_for_dma_cmplt(struct cadence_spi_priv *priv) #if defined(CONFIG_DM_GPIO) int cadence_qspi_versal_flash_reset(struct udevice *dev) { +#ifndef CONFIG_ARCH_VERSAL_NET struct gpio_desc gpio; u32 reset_gpio; int ret; @@ -165,7 +166,7 @@ int cadence_qspi_versal_flash_reset(struct udevice *dev) /* Set value 1 to pin */ dm_gpio_set_value(&gpio, 1); udelay(1); - +#endif return 0; } #else -- 2.36.1