arm64: versal: Add Xilinx Versal Virtual QEMU board
authorMichal Simek <michal.simek@xilinx.com>
Tue, 18 Sep 2018 12:58:16 +0000 (14:58 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 16 Oct 2018 14:53:24 +0000 (16:53 +0200)
Virtual QEMU board is generating DTB self and putting it to
VERSAL_QEMU_DTB_ADDR address.
Board is using CONFIG_OF_BOARD which ensures that u-boot is aligned with
board created by QEMU.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-versal/Kconfig
arch/arm/mach-versal/cpu.c
configs/xilinx_versal_virt_defconfig [new file with mode: 0644]

index 04dbaea09c90df42a4add6648433a8f37cdec4e9..9cee97b7482507498f10273fbdcad56a33a25837 100644 (file)
@@ -36,4 +36,9 @@ config COUNTER_FREQUENCY
 config ZYNQ_SDHCI_MAX_FREQ
        default 200000000
 
+config VERSAL_OF_BOARD_DTB_ADDR
+       hex
+       default 0x1000
+       depends on OF_BOARD
+
 endif
index 959570eef6edae4bbe0fdd14a313c13bfc24fe57..1fd3c246c1296bff1198997e61b058d10f5eedd0 100644 (file)
@@ -67,3 +67,17 @@ u64 get_page_table_size(void)
 {
        return 0x14000;
 }
+
+#if defined(CONFIG_OF_BOARD)
+void *board_fdt_blob_setup(void)
+{
+       static void *fw_dtb = (void *)CONFIG_VERSAL_OF_BOARD_DTB_ADDR;
+
+       if (fdt_magic(fw_dtb) != FDT_MAGIC) {
+               printf("DTB is not passed via %llx\n", (u64)fw_dtb);
+               return NULL;
+       }
+
+       return fw_dtb;
+}
+#endif
diff --git a/configs/xilinx_versal_virt_defconfig b/configs/xilinx_versal_virt_defconfig
new file mode 100644 (file)
index 0000000..668c313
--- /dev/null
@@ -0,0 +1,68 @@
+CONFIG_ARM=y
+CONFIG_ARCH_VERSAL=y
+CONFIG_SYS_TEXT_BASE=0x8000000
+CONFIG_SYS_MALLOC_F_LEN=0x8000
+CONFIG_DEBUG_UART_BASE=0xff000000
+CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_COUNTER_FREQUENCY=62500000
+CONFIG_DEBUG_UART=y
+CONFIG_ENV_VARS_UBOOT_CONFIG=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set
+CONFIG_BOOTDELAY=-1
+CONFIG_SUPPORT_RAW_INITRD=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_BOARD_EARLY_INIT_R=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="Versal> "
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_SYS_ALT_MEMTEST=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_TFTPPUT=y
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
+CONFIG_CMD_TIMER=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_EXT4_WRITE=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_ISO_PARTITION=y
+CONFIG_EFI_PARTITION=y
+# CONFIG_PARTITION_UUIDS is not set
+CONFIG_OF_BOARD=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ZYNQ=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=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_PHY_FIXED=y
+CONFIG_DM_ETH=y
+CONFIG_PHY_GIGE=y
+CONFIG_MII=y
+CONFIG_ZYNQ_GEM=y
+CONFIG_DEBUG_UART_PL011=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
+CONFIG_PL01X_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_FAT_WRITE=y
+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y