Skip to contentSkip to conversation

xilinx: versal-net: Add support for new Versal NET SoC

PATCH Superseded Michal Simek 2 participants 11 messages Sep 16, 2022

Subsystems (7)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

cover xilinx: versal-net: Add support for new Versal NET SoC

Hi,

I am sending support for new Xilinx/AMD SoC called Versal NET. Versal NET is very similar to origin Versal SOC. There is different register layout, some IPs have been upgraded like i3c and some other changes in different location.

Thanks,
Michal

Jay Buddhabhatti (4):
clk: versal: Enable clock driver for Versal NET
firmware: zynqmp: Add Versal NET compatible string
mailbox: zynqmp: Enable ipi mailbox driver for Versal NET
reset: zynqmp: Enable reset driver for Versal NET

Michal Simek (5):
arm64: versal-net: Add support for Versal NET platform
spi: cadence_qspi: Add support for Versal NET platform
spi: zynqmp_gqspi: Add support for Versal NET
arm64: versal-net: Add defconfig for Versal NET
arm64: versal-net: Add support for mini configuration

 Kconfig                                       |   2 +-
 MAINTAINERS                                   |   7 +
 arch/arm/Kconfig                              |  14 ++
 arch/arm/Makefile                             |   1 +
 arch/arm/dts/Makefile                         |   3 +
 arch/arm/dts/versal-net-mini.dts              |  67 +++++++
 arch/arm/dts/xilinx-versal-net-virt.dts       |  11 ++
 arch/arm/mach-versal-net/Kconfig              |  43 +++++
 arch/arm/mach-versal-net/Makefile             |  10 ++
 arch/arm/mach-versal-net/clk.c                |  35 ++++
 arch/arm/mach-versal-net/cpu.c                |  89 +++++++++
 .../mach-versal-net/include/mach/hardware.h   |  31 ++++
 .../mach-versal-net/include/mach/sys_proto.h  |  16 ++
 board/xilinx/Kconfig                          |   6 +-
 board/xilinx/versal-net/Kconfig               |   9 +
 board/xilinx/versal-net/MAINTAINERS           |   8 +
 board/xilinx/versal-net/Makefile              |   9 +
 board/xilinx/versal-net/board.c               | 170 ++++++++++++++++++
 configs/xilinx_versal_net_mini_defconfig      |  70 ++++++++
 configs/xilinx_versal_net_virt_defconfig      | 118 ++++++++++++
 drivers/clk/Kconfig                           |   2 +-
 drivers/clk/clk_versal.c                      |   1 +
 drivers/firmware/firmware-zynqmp.c            |   1 +
 drivers/mailbox/Kconfig                       |   2 +-
 drivers/reset/reset-zynqmp.c                  |   1 +
 drivers/spi/Kconfig                           |   2 +-
 drivers/spi/cadence_ospi_versal.c             |   3 +-
 drivers/spi/zynqmp_gqspi.c                    |   3 +-
 env/Kconfig                                   |   6 +-
 include/configs/xilinx_versal_net.h           | 156 ++++++++++++++++
 include/configs/xilinx_versal_net_mini.h      |  28 +++
 31 files changed, 912 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/dts/versal-net-mini.dts
 create mode 100644 arch/arm/dts/xilinx-versal-net-virt.dts
 create mode 100644 arch/arm/mach-versal-net/Kconfig
 create mode 100644 arch/arm/mach-versal-net/Makefile
 create mode 100644 arch/arm/mach-versal-net/clk.c
 create mode 100644 arch/arm/mach-versal-net/cpu.c
 create mode 100644 arch/arm/mach-versal-net/include/mach/hardware.h
 create mode 100644 arch/arm/mach-versal-net/include/mach/sys_proto.h
 create mode 100644 board/xilinx/versal-net/Kconfig
 create mode 100644 board/xilinx/versal-net/MAINTAINERS
 create mode 100644 board/xilinx/versal-net/Makefile
 create mode 100644 board/xilinx/versal-net/board.c
 create mode 100644 configs/xilinx_versal_net_mini_defconfig
 create mode 100644 configs/xilinx_versal_net_virt_defconfig
 create mode 100644 include/configs/xilinx_versal_net.h
 create mode 100644 include/configs/xilinx_versal_net_mini.h
Signature · 1 line
2.36.1
author maintainer
#1 lore raw

PATCH 1/9 arm64: versal-net: Add support for Versal NET platform

Versal NET platform is based on Versal chip which is reusing a lot of IPs. For more information about new IPs please take a look at DT which describe currently supported devices.
The patch is adding architecture and board support with soc detection algorithm. Generic setting should be very similar to Versal but it will likely diverge in longer run.

---

 Kconfig                                       |   2 +-
 MAINTAINERS                                   |   7 +
 arch/arm/Kconfig                              |  14 ++
 arch/arm/Makefile                             |   1 +
 arch/arm/dts/Makefile                         |   2 +
 arch/arm/dts/xilinx-versal-net-virt.dts       |  11 ++
 arch/arm/mach-versal-net/Kconfig              |  43 +++++
 arch/arm/mach-versal-net/Makefile             |  10 ++
 arch/arm/mach-versal-net/clk.c                |  35 ++++
 arch/arm/mach-versal-net/cpu.c                |  89 +++++++++
 .../mach-versal-net/include/mach/hardware.h   |  27 +++
 .../mach-versal-net/include/mach/sys_proto.h  |  16 ++
 board/xilinx/Kconfig                          |   6 +-
 board/xilinx/versal-net/Kconfig               |   9 +
 board/xilinx/versal-net/MAINTAINERS           |   8 +
 board/xilinx/versal-net/Makefile              |   9 +
 board/xilinx/versal-net/board.c               | 170 ++++++++++++++++++
 env/Kconfig                                   |   6 +-
 include/configs/xilinx_versal_net.h           | 156 ++++++++++++++++
 19 files changed, 614 insertions(+), 7 deletions(-)
 create mode 100644 arch/arm/dts/xilinx-versal-net-virt.dts
 create mode 100644 arch/arm/mach-versal-net/Kconfig
 create mode 100644 arch/arm/mach-versal-net/Makefile
 create mode 100644 arch/arm/mach-versal-net/clk.c
 create mode 100644 arch/arm/mach-versal-net/cpu.c
 create mode 100644 arch/arm/mach-versal-net/include/mach/hardware.h
 create mode 100644 arch/arm/mach-versal-net/include/mach/sys_proto.h
 create mode 100644 board/xilinx/versal-net/Kconfig
 create mode 100644 board/xilinx/versal-net/MAINTAINERS
 create mode 100644 board/xilinx/versal-net/Makefile
 create mode 100644 board/xilinx/versal-net/board.c
 create mode 100644 include/configs/xilinx_versal_net.h
Kconfig +1 -1
index 991b260182e8..4542ed7333d1 100644
@@ -539,7 +539,7 @@ config PLATFORM_ELFENTRY
 
 config STACK_SIZE
 	hex "Define max stack size that can be used by U-Boot"
-	default 0x4000000 if ARCH_VERSAL || ARCH_ZYNQMP
+	default 0x4000000 if ARCH_VERSAL_NET || ARCH_VERSAL || ARCH_ZYNQMP
 	default 0x200000 if MICROBLAZE
 	default 0x1000000
 	help
MAINTAINERS +7 -0
index 1a7a56335f6f..82b5e9edc29c 100644
@@ -628,6 +628,13 @@ F:	arch/arm/mach-uniphier/
 F:	configs/uniphier_*_defconfig
 N:	uniphier
 
+ARM VERSAL NET
+M:	Michal Simek <[email protected]>
+S:	Maintained
+T:	git https://source.denx.de/u-boot/custodians/u-boot-microblaze.git
+F:	arch/arm/mach-versal-net/
+N:	(?<!uni)versal-net
+
 ARM VERSAL
 M:	Michal Simek <[email protected]>
 S:	Maintained
arch/arm/Kconfig +14 -0
index 3649222470ea..cf2ccb4a7306 100644
@@ -1248,6 +1248,18 @@ config ARCH_VERSAL
 	imply BOARD_LATE_INIT
 	imply ENV_VARS_UBOOT_RUNTIME_CONFIG
 
+config ARCH_VERSAL_NET
+	bool "Support Xilinx Keystone Platform"
+	select ARM64
+	select CLK
+	select DM
+	select DM_ETH if NET
+	select DM_MMC if MMC
+	select DM_SERIAL
+	select OF_CONTROL
+	imply BOARD_LATE_INIT
+	imply ENV_VARS_UBOOT_RUNTIME_CONFIG
+
 config ARCH_VF610
 	bool "Freescale Vybrid"
 	select CPU_V7A
@@ -2297,6 +2309,8 @@ source "arch/arm/mach-zynqmp/Kconfig"
 
 source "arch/arm/mach-versal/Kconfig"
 
+source "arch/arm/mach-versal-net/Kconfig"
+
 source "arch/arm/mach-zynqmp-r5/Kconfig"
 
 source "arch/arm/cpu/armv7/Kconfig"
arch/arm/Makefile +1 -0
index 1f4a1d57883b..ac602aed9c9a 100644
@@ -88,6 +88,7 @@ machine-$(CONFIG_ARCH_OCTEONTX)		+= octeontx
 machine-$(CONFIG_ARCH_OCTEONTX2)	+= octeontx2
 machine-$(CONFIG_ARCH_UNIPHIER)		+= uniphier
 machine-$(CONFIG_ARCH_VERSAL)		+= versal
+machine-$(CONFIG_ARCH_VERSAL_NET)	+= versal-net
 machine-$(CONFIG_ARCH_ZYNQ)		+= zynq
 machine-$(CONFIG_ARCH_ZYNQMP)		+= zynqmp
 machine-$(CONFIG_ARCH_ZYNQMP_R5)	+= zynqmp-r5
arch/arm/dts/Makefile +2 -0
index 5bff2e65b76f..a141d0de0c20 100644
@@ -379,6 +379,8 @@ dtb-$(CONFIG_ARCH_VERSAL) += \
 	versal-mini-emmc0.dtb \
 	versal-mini-emmc1.dtb \
 	xilinx-versal-virt.dtb
+dtb-$(CONFIG_ARCH_VERSAL_NET) += \
+	xilinx-versal-net-virt.dtb
 dtb-$(CONFIG_ARCH_ZYNQMP_R5) += \
 	zynqmp-r5.dtb
 dtb-$(CONFIG_AM33XX) += \
arch/arm/dts/xilinx-versal-net-virt.dts new file +11 -0
new file mode 100644
index 000000000000..c99257cb0834
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Empty device tree for versal-net-virt board
+ *
+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
+ */
+
+/dts-v1/;
+
+/ {
+};
arch/arm/mach-versal-net/Kconfig new file +43 -0

43 lines not on this page · raw message

arch/arm/mach-versal-net/Makefile new file +10 -0
new file mode 100644
index 000000000000..e12c4c0e6739
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (C) 2021 - 2022, Xilinx, Inc.
+# Copyright (C) 2022, Advanced Micro Devices, Inc.
+#
+# Michal Simek <[email protected]>
+#
+
+obj-y	+= clk.o
+obj-y	+= cpu.o
arch/arm/mach-versal-net/clk.c new file +35 -0
new file mode 100644
index 000000000000..d097de7afa63
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2016 - 2022,  Xilinx, Inc.
+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <[email protected]>
+ */
+
+#include <common.h>
+#include <init.h>
+#include <time.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_CLOCKS
+/**
+ * set_cpu_clk_info - Initialize clock framework
+ *
+ * Return: 0 always.
+ *
+ * This function is called from common code after relocation and sets up the
+ * clock framework. The framework must not be used before this function had been
+ * called.
+ */
+int set_cpu_clk_info(void)
+{
+	gd->cpu_clk = get_tbclk();
+
+	gd->bd->bi_arm_freq = gd->cpu_clk / 1000000;
+	gd->bd->bi_dsp_freq = 0;
+
+	return 0;
+}
+#endif
arch/arm/mach-versal-net/cpu.c new file +89 -0

89 lines not on this page · raw message

arch/arm/mach-versal-net/include/mach/hardware.h new file +27 -0
new file mode 100644
index 000000000000..2eb549849825
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2016 - 2022, Xilinx, Inc.
+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
+ */
+
+#ifndef __ASSEMBLY__
+#include <linux/bitops.h>
+#endif
+
+#define PMC_TAP	0xF11A0000
+
+#define PMC_TAP_IDCODE		(PMC_TAP + 0)
+#define PMC_TAP_VERSION		(PMC_TAP + 0x4)
+# define PMC_VERSION_MASK	GENMASK(7, 0)
+# define PS_VERSION_MASK	GENMASK(15, 8)
+# define RTL_VERSION_MASK	GENMASK(23, 16)
+# define PLATFORM_MASK		GENMASK(27, 24)
+# define PLATFORM_VERSION_MASK	GENMASK(31, 28)
+#define PMC_TAP_USERCODE	(PMC_TAP + 0x8)
+
+enum versal_net_platform {
+	VERSAL_NET_SILICON = 0,
+	VERSAL_NET_SPP = 1,
+	VERSAL_NET_EMU = 2,
+	VERSAL_NET_QEMU = 3,
+};
arch/arm/mach-versal-net/include/mach/sys_proto.h new file +16 -0
new file mode 100644
index 000000000000..5bba9030f2dd
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2021 - 2022, Xilinx, Inc.
+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
+ */
+
+#include <linux/build_bug.h>
+
+void mem_map_fill(void);
+
+static inline int zynqmp_mmio_write(const u32 address, const u32 mask,
+				    const u32 value)
+{
+	BUILD_BUG();
+	return -EINVAL;
+}
board/xilinx/Kconfig +3 -3
index 17880661736d..746a2332ad5f 100644
@@ -42,7 +42,7 @@ endif
 
 config XILINX_OF_BOARD_DTB_ADDR
 	hex "Default DTB pickup address"
-	default 0x1000 if ARCH_VERSAL
+	default 0x1000 if ARCH_VERSAL || ARCH_VERSAL_NET
 	default 0x8000 if MICROBLAZE
 	default 0x100000 if ARCH_ZYNQ || ARCH_ZYNQMP
 	depends on OF_BOARD || OF_SEPARATE
@@ -51,10 +51,10 @@ config XILINX_OF_BOARD_DTB_ADDR
 
 config BOOT_SCRIPT_OFFSET
 	hex "Boot script offset"
-	depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || MICROBLAZE
+	depends on ARCH_ZYNQ || ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET || MICROBLAZE
 	default 0xFC0000 if ARCH_ZYNQ || MICROBLAZE
 	default 0x3E80000 if ARCH_ZYNQMP
-	default 0x7F80000 if ARCH_VERSAL
+	default 0x7F80000 if ARCH_VERSAL || ARCH_VERSAL_NET
 	help
 	   Specifies distro boot script offset in NAND/QSPI/NOR flash.
 
board/xilinx/versal-net/Kconfig new file +9 -0
new file mode 100644
index 000000000000..8f94d2bb399a
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (C) 2020 - 2022, Xilinx, Inc.
+# Copyright (C) 2022, Advanced Micro Devices, Inc.
+#
+
+if ARCH_VERSAL_NET
+
+endif
board/xilinx/versal-net/MAINTAINERS new file +8 -0
new file mode 100644
index 000000000000..50120a88d6e7
@@ -0,0 +1,8 @@
+XILINX_VERSAL_NET BOARDS
+M:	Michal Simek <[email protected]>
+S:	Maintained
+T:	git https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze.git
+F:	arch/arm/dts/versal-net*
+F:	board/xilinx/versal-net/
+F:	include/configs/xilinx_versal_net*
+F:	configs/xilinx_versal_net*
board/xilinx/versal-net/Makefile new file +9 -0
new file mode 100644
index 000000000000..2008d4e231c6
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (C) 2021 - 2022, Xilinx, Inc.
+# Copyright (C) 2022, Advanced Micro Devices, Inc.
+#
+# Michal Simek <[email protected]>
+#
+
+obj-y	:= board.o
board/xilinx/versal-net/board.c new file +170 -0

170 lines not on this page · raw message

env/Kconfig +3 -3
index 5329f7585be5..24111dfaf47b 100644
@@ -558,7 +558,7 @@ config ENV_OFFSET
 	default 0xF0000 if ARCH_SUNXI
 	default 0xE0000 if ARCH_ZYNQ
 	default 0x1E00000 if ARCH_ZYNQMP
-	default 0x7F40000 if ARCH_VERSAL
+	default 0x7F40000 if ARCH_VERSAL || ARCH_VERSAL_NET
 	default 0 if ARC
 	default 0x140000 if ARCH_AT91
 	default 0x260000 if ARCH_OMAP2PLUS
@@ -583,7 +583,7 @@ config ENV_SIZE
 	default 0x10000 if ARCH_SUNXI
 	default 0x8000 if ARCH_ROCKCHIP && ENV_IS_IN_MMC
 	default 0x2000 if ARCH_ROCKCHIP && ENV_IS_IN_SPI_FLASH
-	default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL
+	default 0x8000 if ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET
 	default 0x4000 if ARC
 	default 0x1f000
 	help
@@ -593,7 +593,7 @@ config ENV_SECT_SIZE
 	hex "Environment Sector-Size"
 	depends on ENV_IS_IN_FLASH || ENV_IS_IN_SPI_FLASH
 	default 0x2000 if ARCH_ROCKCHIP
-	default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL
+	default 0x40000 if ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET
 	default 0x20000 if ARCH_ZYNQ || ARCH_OMAP2PLUS || ARCH_AT91
 	default 0x20000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
 	default 0x10000 if ARCH_SUNXI && ENV_IS_IN_SPI_FLASH
include/configs/xilinx_versal_net.h new file +156 -0

156 lines not on this page · raw message

Signature · 1 line
2.36.1
author maintainer
#2 lore raw

PATCH 2/9 spi: cadence_qspi: Add support for Versal NET platform

In reply to Michal Simek

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

---

 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(-)
arch/arm/mach-versal-net/include/mach/hardware.h +4 -0
index 2eb549849825..808ce48fd148 100644
@@ -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)
drivers/spi/Kconfig +1 -1
index ac91d8225821..240ff212a39f 100644
@@ -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
drivers/spi/cadence_ospi_versal.c +2 -1
index a25c50bc5081..a9547a820031 100644
@@ -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
Signature · 1 line
2.36.1
author maintainer
#3 lore raw

PATCH 3/9 spi: zynqmp_gqspi: Add support for Versal NET

In reply to Michal Simek

Add support for Versal NET platform.

---

 drivers/spi/zynqmp_gqspi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/zynqmp_gqspi.c +2 -1
index 4e718c545c64..d3cc8554b8fb 100644
@@ -308,7 +308,8 @@ void zynqmp_qspi_set_tapdelay(struct udevice *bus, u32 baudrateval)
 	debug("%s, req_hz:%d, clk_rate:%d, baudrateval:%d\n",
 	      __func__, reqhz, clk_rate, baudrateval);
 
-	if (!IS_ENABLED(CONFIG_ARCH_VERSAL)) {
+	if (!(IS_ENABLED(CONFIG_ARCH_VERSAL) ||
+	      IS_ENABLED(CONFIG_ARCH_VERSAL_NET))) {
 		if (reqhz <= GQSPI_FREQ_40MHZ) {
 			tapdlybypass = TAP_DLY_BYPASS_LQSPI_RX_VALUE <<
 					TAP_DLY_BYPASS_LQSPI_RX_SHIFT;
Signature · 1 line
2.36.1
author maintainer
#4 lore raw

PATCH 4/9 clk: versal: Enable clock driver for Versal NET

In reply to Michal Simek

From: Jay Buddhabhatti <[email protected]>

Add support for Versal NET compatible string in clock driver.

---

 drivers/clk/Kconfig      | 2 +-
 drivers/clk/clk_versal.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/clk/Kconfig +1 -1
index fd9e1a80c6aa..09aa97ee8c0e 100644
@@ -184,7 +184,7 @@ config CLK_VERSACLOCK
 
 config CLK_VERSAL
 	bool "Enable clock driver support for Versal"
-	depends on ARCH_VERSAL
+	depends on (ARCH_VERSAL || ARCH_VERSAL_NET)
 	select ZYNQMP_FIRMWARE
 	help
 	  This clock driver adds support for clock realted settings for
drivers/clk/clk_versal.c +1 -0
index a9dd57b098fe..b2f62061cea2 100644
@@ -739,6 +739,7 @@ static struct clk_ops versal_clk_ops = {
 
 static const struct udevice_id versal_clk_ids[] = {
 	{ .compatible = "xlnx,versal-clk" },
+	{ .compatible = "xlnx,versal-net-clk" },
 	{ }
 };
 
Signature · 1 line
2.36.1
author maintainer
#5 lore raw

PATCH 5/9 firmware: zynqmp: Add Versal NET compatible string

In reply to Michal Simek

From: Jay Buddhabhatti <[email protected]>

Add compatible string for Versal NET.

---

 drivers/firmware/firmware-zynqmp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/firmware/firmware-zynqmp.c +1 -0
index 76ddc6b4f404..d8e0d79c5744 100644
@@ -370,6 +370,7 @@ int __maybe_unused xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2,
 static const struct udevice_id zynqmp_firmware_ids[] = {
 	{ .compatible = "xlnx,zynqmp-firmware" },
 	{ .compatible = "xlnx,versal-firmware"},
+	{ .compatible = "xlnx,versal-net-firmware"},
 	{ }
 };
 
Signature · 1 line
2.36.1
author maintainer
#6 lore raw

PATCH 6/9 mailbox: zynqmp: Enable ipi mailbox driver for Versal NET

In reply to Michal Simek

From: Jay Buddhabhatti <[email protected]>

Enable mailbox configs for Versal NET.

---

 drivers/mailbox/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mailbox/Kconfig +1 -1
index acbdce11b7c7..47f24e0a02e0 100644
@@ -54,7 +54,7 @@ config K3_SEC_PROXY
 
 config ZYNQMP_IPI
 	bool "Xilinx ZynqMP IPI controller support"
-	depends on DM_MAILBOX && (ARCH_ZYNQMP || ARCH_VERSAL)
+	depends on DM_MAILBOX && (ARCH_ZYNQMP || ARCH_VERSAL || ARCH_VERSAL_NET)
 	help
 	  This enables support for the Xilinx ZynqMP Inter Processor Interrupt
 	  communication controller.
Signature · 1 line
2.36.1
author maintainer
#7 lore raw

PATCH 7/9 reset: zynqmp: Enable reset driver for Versal NET

In reply to Michal Simek

From: Jay Buddhabhatti <[email protected]>

Enable zynqmp reset driver for Versal NET.

---

 drivers/reset/reset-zynqmp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/reset/reset-zynqmp.c +1 -0
index 52c08c4722da..87b4df5bf81a 100644
@@ -80,6 +80,7 @@ const struct reset_ops zynqmp_reset_ops = {
 static const struct udevice_id zynqmp_reset_ids[] = {
 	{ .compatible = "xlnx,zynqmp-reset" },
 	{ .compatible = "xlnx,versal-reset" },
+	{ .compatible = "xlnx,versal-net-reset" },
 	{ }
 };
 
Signature · 1 line
2.36.1
author maintainer
#8 lore raw

PATCH 8/9 arm64: versal-net: Add defconfig for Versal NET

In reply to Michal Simek

Use one defconfig for supporting multiple different platforms. DTB reselection is enabled to choose DT based on SOC detection.

---

 configs/xilinx_versal_net_virt_defconfig | 118 +++++++++++++++++++++++
 1 file changed, 118 insertions(+)
 create mode 100644 configs/xilinx_versal_net_virt_defconfig
configs/xilinx_versal_net_virt_defconfig new file +118 -0
new file mode 100644
index 000000000000..b918b2f128b0
@@ -0,0 +1,118 @@
+CONFIG_ARM=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_SYS_INIT_SP_BSS_OFFSET=1572864
+CONFIG_ARCH_VERSAL_NET=y
+CONFIG_SYS_TEXT_BASE=0x8000000
+CONFIG_SYS_MALLOC_F_LEN=0x100000
+CONFIG_DEFAULT_DEVICE_TREE="xilinx-versal-net-virt"
+CONFIG_SYS_PROMPT="Versal NET> "
+CONFIG_CMD_FRU=y
+CONFIG_SYS_LOAD_ADDR=0x8000000
+CONFIG_SYS_MEMTEST_START=0x00000000
+CONFIG_SYS_MEMTEST_END=0x00001000
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
+CONFIG_BOOTDELAY=5
+CONFIG_USE_PREBOOT=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_BOARD_EARLY_INIT_F=y
+CONFIG_BOARD_EARLY_INIT_R=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_NVEDIT_EFI=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_SYS_ALT_MEMTEST=y
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DFU=y
+CONFIG_CMD_DM=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_EFIDEBUG=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_TIMER=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_CMD_UBI=y
+CONFIG_PARTITION_TYPE_GUID=y
+CONFIG_OF_BOARD=y
+CONFIG_DTB_RESELECT=y
+CONFIG_MULTI_DTB_FIT=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
+CONFIG_IP_DEFRAG=y
+CONFIG_TFTP_BLOCKSIZE=4096
+CONFIG_CLK_VERSAL=y
+CONFIG_DFU_RAM=y
+CONFIG_ZYNQ_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_CADENCE=y
+CONFIG_DM_MAILBOX=y
+CONFIG_ZYNQMP_IPI=y
+CONFIG_MISC=y
+CONFIG_I2C_EEPROM=y
+CONFIG_SYS_I2C_EEPROM_ADDR=0x0
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_MMC_IO_VOLTAGE=y
+CONFIG_MMC_UHS_SUPPORT=y
+CONFIG_MMC_HS400_SUPPORT=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_ZYNQ_SDHCI_MIN_FREQ=100000
+CONFIG_MTD=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_ISSI=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_SST=y
+CONFIG_SPI_FLASH_WINBOND=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_PHY_MARVELL=y
+CONFIG_PHY_NATSEMI=y
+CONFIG_PHY_REALTEK=y
+CONFIG_PHY_TI_DP83867=y
+CONFIG_PHY_VITESSE=y
+CONFIG_PHY_FIXED=y
+CONFIG_PHY_GIGE=y
+CONFIG_XILINX_AXIEMAC=y
+CONFIG_ZYNQ_GEM=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_ZYNQMP_POWER_DOMAIN=y
+CONFIG_DM_RESET=y
+CONFIG_RESET_ZYNQMP=y
+CONFIG_ARM_DCC=y
+CONFIG_PL01X_SERIAL=y
+CONFIG_XILINX_UARTLITE=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_CADENCE_QSPI=y
+CONFIG_CADENCE_OSPI_VERSAL=y
+CONFIG_ZYNQ_SPI=y
+CONFIG_ZYNQMP_GQSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB_GADGET=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_GENERIC=y
+CONFIG_USB_ULPI_VIEWPORT=y
+CONFIG_USB_ULPI=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Xilinx"
+CONFIG_USB_GADGET_VENDOR_NUM=0x03FD
+CONFIG_USB_GADGET_PRODUCT_NUM=0x0300
+CONFIG_USB_GADGET_DOWNLOAD=y
+CONFIG_USB_FUNCTION_THOR=y
+CONFIG_OF_LIBFDT_OVERLAY=y
Signature · 1 line
2.36.1
author maintainer
#9 lore raw

PATCH 9/9 arm64: versal-net: Add support for mini configuration

In reply to Michal Simek

Versal NET mini configuration is designed for running memory test. Current output is on DCC but changing serial0 alias to pl011 will move console to serial port.

---

 arch/arm/dts/Makefile                    |  1 +
 arch/arm/dts/versal-net-mini.dts         | 67 +++++++++++++++++++++++
 configs/xilinx_versal_net_mini_defconfig | 70 ++++++++++++++++++++++++
 include/configs/xilinx_versal_net_mini.h | 28 ++++++++++
 4 files changed, 166 insertions(+)
 create mode 100644 arch/arm/dts/versal-net-mini.dts
 create mode 100644 configs/xilinx_versal_net_mini_defconfig
 create mode 100644 include/configs/xilinx_versal_net_mini.h
arch/arm/dts/Makefile +1 -0
index a141d0de0c20..4ad526d565c9 100644
@@ -380,6 +380,7 @@ dtb-$(CONFIG_ARCH_VERSAL) += \
 	versal-mini-emmc1.dtb \
 	xilinx-versal-virt.dtb
 dtb-$(CONFIG_ARCH_VERSAL_NET) += \
+	versal-net-mini.dtb \
 	xilinx-versal-net-virt.dtb
 dtb-$(CONFIG_ARCH_ZYNQMP_R5) += \
 	zynqmp-r5.dtb
arch/arm/dts/versal-net-mini.dts new file +67 -0

67 lines not on this page · raw message

configs/xilinx_versal_net_mini_defconfig new file +70 -0

70 lines not on this page · raw message

include/configs/xilinx_versal_net_mini.h new file +28 -0
new file mode 100644
index 000000000000..aff906316b2d
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Configuration for Xilinx Versal NET MINI configuration
+ *
+ * Copyright (C) 2018 - 2022, Xilinx, Inc.
+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <[email protected]>
+ */
+
+#ifndef __CONFIG_VERSAL_NET_MINI_H
+#define __CONFIG_VERSAL_NET_MINI_H
+
+#define CONFIG_EXTRA_ENV_SETTINGS
+
+#include <configs/xilinx_versal_net.h>
+
+/* Undef unneeded configs */
+#undef CONFIG_EXTRA_ENV_SETTINGS
+
+/* BOOTP options */
+#undef CONFIG_BOOTP_BOOTFILESIZE
+#undef CONFIG_BOOTP_MAY_FAIL
+
+#undef CONFIG_SYS_CBSIZE
+#define CONFIG_SYS_CBSIZE		1024
+
+#endif /* __CONFIG_VERSAL_NET_MINI_H */
Signature · 1 line
2.36.1
#10 lore raw
In reply to Michal Simek

Hello! I'm not maintainer of xilinx and I'm getting tons of emails. So please do not send and spam me with unrelated emails/patches as I would not have time to process those emails/patches which are important and which I should review. Thanks.

Quoted 76 lines · On Friday 16 September 2022 10:53:11 Michal Simek wrote:

Hi,

I am sending support for new Xilinx/AMD SoC called Versal NET. Versal NET is very similar to origin Versal SOC. There is different register layout, some IPs have been upgraded like i3c and some other changes in different location.

Thanks,
Michal

Jay Buddhabhatti (4):
clk: versal: Enable clock driver for Versal NET
firmware: zynqmp: Add Versal NET compatible string
mailbox: zynqmp: Enable ipi mailbox driver for Versal NET
reset: zynqmp: Enable reset driver for Versal NET

Michal Simek (5):
arm64: versal-net: Add support for Versal NET platform
spi: cadence_qspi: Add support for Versal NET platform
spi: zynqmp_gqspi: Add support for Versal NET
arm64: versal-net: Add defconfig for Versal NET
arm64: versal-net: Add support for mini configuration

 Kconfig                                       |   2 +-
 MAINTAINERS                                   |   7 +
 arch/arm/Kconfig                              |  14 ++
 arch/arm/Makefile                             |   1 +
 arch/arm/dts/Makefile                         |   3 +
 arch/arm/dts/versal-net-mini.dts              |  67 +++++++
 arch/arm/dts/xilinx-versal-net-virt.dts       |  11 ++
 arch/arm/mach-versal-net/Kconfig              |  43 +++++
 arch/arm/mach-versal-net/Makefile             |  10 ++
 arch/arm/mach-versal-net/clk.c                |  35 ++++
 arch/arm/mach-versal-net/cpu.c                |  89 +++++++++
 .../mach-versal-net/include/mach/hardware.h   |  31 ++++
 .../mach-versal-net/include/mach/sys_proto.h  |  16 ++
 board/xilinx/Kconfig                          |   6 +-
 board/xilinx/versal-net/Kconfig               |   9 +
 board/xilinx/versal-net/MAINTAINERS           |   8 +
 board/xilinx/versal-net/Makefile              |   9 +
 board/xilinx/versal-net/board.c               | 170 ++++++++++++++++++
 configs/xilinx_versal_net_mini_defconfig      |  70 ++++++++
 configs/xilinx_versal_net_virt_defconfig      | 118 ++++++++++++
 drivers/clk/Kconfig                           |   2 +-
 drivers/clk/clk_versal.c                      |   1 +
 drivers/firmware/firmware-zynqmp.c            |   1 +
 drivers/mailbox/Kconfig                       |   2 +-
 drivers/reset/reset-zynqmp.c                  |   1 +
 drivers/spi/Kconfig                           |   2 +-
 drivers/spi/cadence_ospi_versal.c             |   3 +-
 drivers/spi/zynqmp_gqspi.c                    |   3 +-
 env/Kconfig                                   |   6 +-
 include/configs/xilinx_versal_net.h           | 156 ++++++++++++++++
 include/configs/xilinx_versal_net_mini.h      |  28 +++
 31 files changed, 912 insertions(+), 12 deletions(-)
 create mode 100644 arch/arm/dts/versal-net-mini.dts
 create mode 100644 arch/arm/dts/xilinx-versal-net-virt.dts
 create mode 100644 arch/arm/mach-versal-net/Kconfig
 create mode 100644 arch/arm/mach-versal-net/Makefile
 create mode 100644 arch/arm/mach-versal-net/clk.c
 create mode 100644 arch/arm/mach-versal-net/cpu.c
 create mode 100644 arch/arm/mach-versal-net/include/mach/hardware.h
 create mode 100644 arch/arm/mach-versal-net/include/mach/sys_proto.h
 create mode 100644 board/xilinx/versal-net/Kconfig
 create mode 100644 board/xilinx/versal-net/MAINTAINERS
 create mode 100644 board/xilinx/versal-net/Makefile
 create mode 100644 board/xilinx/versal-net/board.c
 create mode 100644 configs/xilinx_versal_net_mini_defconfig
 create mode 100644 configs/xilinx_versal_net_virt_defconfig
 create mode 100644 include/configs/xilinx_versal_net.h
 create mode 100644 include/configs/xilinx_versal_net_mini.h
Signature · 1 line
2.36.1