All of lore.kernel.org
 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 2/9] spi: cadence_qspi: Add support for Versal NET platform
Date: Fri, 16 Sep 2022 10:53:13 +0200	[thread overview]
Message-ID: <00cfd4f55365b682440d57fcd46789b5844b8e6b.1663318393.git.michal.simek@amd.com> (raw)
In-Reply-To: <cover.1663318393.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>
---

 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-16  8:54 UTC|newest]

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

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=00cfd4f55365b682440d57fcd46789b5844b8e6b.1663318393.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.