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.

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

Changes in v2:
- Remove CONFIG_SYS_CBSIZE, CONFIG_BOOTP_BOOTFILESIZE,
  CONFIG_BOOTP_MAY_FAIL from .h file
- Setup HAS_CUSTOM_SYS_INIT_SP_ADDR

 arch/arm/dts/Makefile                    |  1 +
 arch/arm/dts/versal-net-mini.dts         | 67 ++++++++++++++++++++++
 configs/xilinx_versal_net_mini_defconfig | 72 ++++++++++++++++++++++++
 include/configs/xilinx_versal_net_mini.h | 21 +++++++
 4 files changed, 161 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

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index a141d0de0c20..4ad526d565c9 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -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
diff --git a/arch/arm/dts/versal-net-mini.dts b/arch/arm/dts/versal-net-mini.dts
new file mode 100644
index 000000000000..8c29a6ed6bfe
--- /dev/null
+++ b/arch/arm/dts/versal-net-mini.dts
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * dts file for Xilinx Versal NET
+ *
+ * Copyright (C) 2021 - 2022, Xilinx, Inc.
+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
+ *
+ * Michal Simek <michal.si...@amd.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+       compatible = "xlnx,versal-net-mini";
+       model = "Xilinx Versal NET MINI";
+       #address-cells = <2>;
+       #size-cells = <2>;
+
+       memory: memory@0 {
+               reg = <0 0xBBF00000 0 0x100000>, <0 0 0 0x80000000>;
+               device_type = "memory";
+       };
+
+       aliases {
+               /* serial0 = &serial0; */
+               serial0 = &dcc;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200";
+       };
+
+       clk1: clk1 {
+               u-boot,dm-pre-reloc;
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <1000000>;
+       };
+
+       dcc: dcc {
+               compatible = "arm,dcc";
+               status = "okay";
+               u-boot,dm-pre-reloc;
+       };
+
+       amba: axi {
+               compatible = "simple-bus";
+               u-boot,dm-pre-reloc;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               serial0: serial@f1920000 {
+                       u-boot,dm-pre-reloc;
+                       compatible = "arm,pl011", "arm,primecell";
+                       reg = <0 0xf1920000 0 0x1000>;
+                       reg-io-width = <4>;
+                       clock-names = "uartclk", "apb_pclk";
+                       clocks = <&clk1>, <&clk1>;
+                       clock = <1000000>;
+                       current-speed = <115200>;
+                       skip-init;
+               };
+       };
+};
diff --git a/configs/xilinx_versal_net_mini_defconfig 
b/configs/xilinx_versal_net_mini_defconfig
new file mode 100644
index 000000000000..e8fa08e3ef0d
--- /dev/null
+++ b/configs/xilinx_versal_net_mini_defconfig
@@ -0,0 +1,72 @@
+CONFIG_ARM=y
+CONFIG_SYS_CONFIG_NAME="xilinx_versal_net_mini"
+CONFIG_SYS_ICACHE_OFF=y
+# CONFIG_ARM64_CRC32 is not set
+# CONFIG_ARM64_SUPPORT_AARCH32 is not set
+CONFIG_ARCH_VERSAL_NET=y
+CONFIG_SYS_TEXT_BASE=0xBBF10000
+CONFIG_SYS_MALLOC_LEN=0x20000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=3
+CONFIG_ENV_SIZE=0x80
+CONFIG_DEFAULT_DEVICE_TREE="versal-net-mini"
+CONFIG_SYS_PROMPT="Versal NET> "
+CONFIG_SYS_MEM_RSVD_FOR_MMU=y
+# CONFIG_PSCI_RESET is not set
+CONFIG_SYS_LOAD_ADDR=0x8000000
+CONFIG_SYS_MEMTEST_START=0x00000000
+CONFIG_SYS_MEMTEST_END=0x00001000
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xBBF10000
+# CONFIG_EXPERT is not set
+# CONFIG_LEGACY_IMAGE_FORMAT is not set
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
+# CONFIG_AUTOBOOT is not set
+CONFIG_SYS_CONSOLE_INFO_QUIET=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_BOARD_EARLY_INIT_R=y
+# CONFIG_BOARD_LATE_INIT is not set
+# CONFIG_CMDLINE_EDITING is not set
+# CONFIG_AUTO_COMPLETE is not set
+# CONFIG_SYS_LONGHELP is not set
+# CONFIG_CMD_CONSOLE is not set
+# CONFIG_CMD_BOOTD is not set
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_BOOTI is not set
+# CONFIG_CMD_ELF is not set
+# CONFIG_CMD_FDT is not set
+# CONFIG_CMD_GO is not set
+# CONFIG_CMD_RUN is not set
+# CONFIG_CMD_IMI is not set
+# CONFIG_CMD_XIMG is not set
+# CONFIG_CMD_EXPORTENV is not set
+# CONFIG_CMD_IMPORTENV is not set
+# CONFIG_CMD_EDITENV is not set
+# CONFIG_CMD_SAVEENV is not set
+# CONFIG_CMD_ENV_EXISTS is not set
+# CONFIG_CMD_CRC32 is not set
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_MX_CYCLIC=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_SYS_ALT_MEMTEST=y
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+# CONFIG_CMD_ECHO is not set
+# CONFIG_CMD_ITEST is not set
+# CONFIG_CMD_SOURCE is not set
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_CACHE=y
+# CONFIG_CMD_SLEEP is not set
+CONFIG_OF_EMBED=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+# CONFIG_NET is not set
+# CONFIG_DM_WARN is not set
+# CONFIG_DM_DEVICE_REMOVE is not set
+# CONFIG_GPIO is not set
+# CONFIG_I2C is not set
+# CONFIG_INPUT is not set
+# CONFIG_MMC is not set
+# CONFIG_POWER is not set
+CONFIG_ARM_DCC=y
+CONFIG_PL01X_SERIAL=y
+# CONFIG_GZIP is not set
diff --git a/include/configs/xilinx_versal_net_mini.h 
b/include/configs/xilinx_versal_net_mini.h
new file mode 100644
index 000000000000..1939832a848e
--- /dev/null
+++ b/include/configs/xilinx_versal_net_mini.h
@@ -0,0 +1,21 @@
+/* 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 <michal.si...@amd.com>
+ */
+
+#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
+
+#endif /* __CONFIG_VERSAL_NET_MINI_H */
-- 
2.36.1

Reply via email to