u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: <u-boot@lists.denx.de>, <git@xilinx.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v2 2/9] spi: cadence_qspi: Add support for Versal NET platform
Date: Mon, 19 Sep 2022 14:21:03 +0200	[thread overview]
Message-ID: <0789141f432189aab69bc496fe33e0218d1d7510.1663589964.git.michal.simek@amd.com> (raw)
In-Reply-To: <cover.1663589964.git.michal.simek@amd.com>

Trivial changes to support cadence ospi driver for Versal NET platform.
Also avoid ospi flash reset for now.

Signed-off-by: Michal Simek <michal.simek@amd.com>
---

(no changes since v1)

 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


  parent reply	other threads:[~2022-09-19 12:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 12:21 [PATCH v2 0/9] xilinx: versal-net: Add support for new Versal NET SoC Michal Simek
2022-09-19 12:21 ` [PATCH v2 1/9] arm64: versal-net: Add support for Versal NET platform Michal Simek
2022-09-19 12:21 ` Michal Simek [this message]
2022-09-19 12:21 ` [PATCH v2 3/9] spi: zynqmp_gqspi: Add support for Versal NET Michal Simek
2022-09-19 12:21 ` [PATCH v2 4/9] clk: versal: Enable clock driver " Michal Simek
2022-09-19 12:21 ` [PATCH v2 5/9] firmware: zynqmp: Add Versal NET compatible string Michal Simek
2022-09-19 12:21 ` [PATCH v2 6/9] mailbox: zynqmp: Enable ipi mailbox driver for Versal NET Michal Simek
2022-09-19 12:21 ` [PATCH v2 7/9] reset: zynqmp: Enable reset " Michal Simek
2022-09-19 12:21 ` [PATCH v2 8/9] arm64: versal-net: Add defconfig " Michal Simek
2022-09-19 12:21 ` [PATCH v2 9/9] arm64: versal-net: Add support for mini configuration Michal Simek
2022-09-26 12:23 ` [PATCH v2 0/9] xilinx: versal-net: Add support for new Versal NET SoC Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0789141f432189aab69bc496fe33e0218d1d7510.1663589964.git.michal.simek@amd.com \
    --to=michal.simek@amd.com \
    --cc=git@xilinx.com \
    --cc=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).