From 93d98383382d4911241b8e8f947f08f6fdd8b569 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 15 Apr 2024 09:55:33 +0200 Subject: xilinx: zynqmp: Clean up xilinx_zynqmp.h Options are moving to Kconfig by running sed and comments are staying in that's why do clean up and remove useless comments. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/fa117ac482591d3d5957af54fe99e6acc89972e3.1713167731.git.michal.simek@amd.com --- include/configs/xilinx_zynqmp.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index f76b3c6b163..de0db7bb63f 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -42,8 +42,6 @@ # define PARTS_DEFAULT #endif -/* Console I/O Buffer Size */ - /* Ethernet driver */ #define ENV_MEM_LAYOUT_SETTINGS \ @@ -201,10 +199,6 @@ # define CFG_SYS_SPI_ARGS_SIZE 0xa0000 #endif -/* u-boot is like dtb */ - -/* ATF is my kernel image */ - #ifdef CONFIG_SPL_SYS_MALLOC_SIMPLE # error "Disable CONFIG_SPL_SYS_MALLOC_SIMPLE. Full malloc needs to be used" #endif -- cgit v1.2.3 From 52ef6a9cb88f3202871d14e68980ad102d9dc492 Mon Sep 17 00:00:00 2001 From: Lukas Funke Date: Wed, 27 Mar 2024 13:11:52 +0100 Subject: spl: Introduce SoC specific init function Some architectures use spl_board_init() in their SoC specific implementation. Board developers should be able to add board specific implementation via spl_board_init(). Hence, introduce a spl_soc_init() method which is called right before spl_board_init() for SoC specific implementation. Signed-off-by: Lukas Funke Reviewed-by: Devarsh Thakkar Link: https://lore.kernel.org/r/20240327121153.2455126-2-lukas.funke-oss@weidmueller.com Signed-off-by: Michal Simek --- include/spl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/spl.h b/include/spl.h index 043875f10f4..5dfdf778d2d 100644 --- a/include/spl.h +++ b/include/spl.h @@ -816,6 +816,14 @@ int spl_early_init(void); */ int spl_init(void); +/* + * spl_soc_init() - Do architecture-specific init in SPL + * + * If SPL_SOC_INIT is enabled, this is called from board_init_r() before + * jumping to the next phase. + */ +void spl_soc_init(void); + /* * spl_board_init() - Do board-specific init in SPL * -- cgit v1.2.3 From efff3976e3a68c922bb7f7730e2c15ead442e60d Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Thu, 30 May 2024 12:39:23 +0200 Subject: arm64: zynqmp: Update rproc node remoteproc node should be updated to be aligned with the latest dt-schema. Reviewed-by: Tanmay Shah Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/d8247a46f486a612f85767de9b832ad33fa980fe.1717065556.git.michal.simek@amd.com --- include/dt-bindings/power/xlnx-zynqmp-power.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/dt-bindings/power/xlnx-zynqmp-power.h b/include/dt-bindings/power/xlnx-zynqmp-power.h index e7eb0960480..618024cbb20 100644 --- a/include/dt-bindings/power/xlnx-zynqmp-power.h +++ b/include/dt-bindings/power/xlnx-zynqmp-power.h @@ -6,16 +6,12 @@ #ifndef _DT_BINDINGS_ZYNQMP_POWER_H #define _DT_BINDINGS_ZYNQMP_POWER_H -#define PD_RPU_0 6 -#define PD_RPU_1 7 -#define PD_OCM_BANK_0 11 -#define PD_OCM_BANK_1 12 -#define PD_OCM_BANK_2 13 -#define PD_OCM_BANK_3 14 -#define PD_TCM_BANK_0 15 -#define PD_TCM_BANK_1 16 -#define PD_TCM_BANK_2 17 -#define PD_TCM_BANK_3 18 +#define PD_RPU_0 7 +#define PD_RPU_1 8 +#define PD_R5_0_ATCM 15 +#define PD_R5_0_BTCM 16 +#define PD_R5_1_ATCM 17 +#define PD_R5_1_BTCM 18 #define PD_USB_0 22 #define PD_USB_1 23 #define PD_TTC_0 24 @@ -45,6 +41,5 @@ #define PD_CAN_1 48 #define PD_GPU 58 #define PD_PCIE 59 -#define PD_PL 69 #endif -- cgit v1.2.3 From 40f5046c221a7b2719c49b51acefe12914b213e5 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 29 May 2024 16:47:58 +0200 Subject: arm64: versal2: Add support for AMD Versal Gen 2 Add support for AMD Versal Gen 2. SoC is based on Cortex-a78ae 4 cluster/2 cpu core each. A lot of IPs are shared with previous families. There are couple of new IP blocks where the most interesting from user point of view is UFS. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/bc2b70831ce1031bd0fac32357bff84936e1310f.1716994063.git.michal.simek@amd.com --- include/configs/amd_versal2.h | 143 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 include/configs/amd_versal2.h (limited to 'include') diff --git a/include/configs/amd_versal2.h b/include/configs/amd_versal2.h new file mode 100644 index 00000000000..6a40bbdf3a7 --- /dev/null +++ b/include/configs/amd_versal2.h @@ -0,0 +1,143 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Configuration for AMD Versal Gen 2 + * Copyright (C) 2016 - 2022, Xilinx, Inc. + * Copyright (C) 2022 - 2024, Advanced Micro Devices, Inc. + * + * Michal Simek + * + * Based on Configuration for Xilinx ZynqMP + */ + +#ifndef __AMD_VERSAL2_H +#define __AMD_VERSAL2_H + +/* FIXME this is causing issue at least on IPP */ +/* #define CONFIG_ARMV8_SWITCH_TO_EL1 */ + +/* Generic Interrupt Controller Definitions */ +#define GICD_BASE 0xF9000000 +#define GICR_BASE 0xF9060000 + +/* Serial setup */ +#define CFG_SYS_BAUDRATE_TABLE \ + { 4800, 9600, 19200, 38400, 57600, 115200 } + +#if defined(CONFIG_CMD_DFU) +#define DFU_DEFAULT_POLL_TIMEOUT 300 +#define DFU_ALT_INFO_RAM \ + "dfu_ram_info=" \ + "setenv dfu_alt_info " \ + "Image ram 80000 $kernel_size_r\\\\;" \ + "system.dtb ram $fdt_addr_r $fdt_size_r\0" \ + "dfu_ram=run dfu_ram_info && dfu 0 ram 0\0" \ + "thor_ram=run dfu_ram_info && thordown 0 ram 0\0" + +#define DFU_ALT_INFO \ + DFU_ALT_INFO_RAM +#endif + +#if !defined(DFU_ALT_INFO) +# define DFU_ALT_INFO +#endif + +/* Ethernet driver */ +#if defined(CONFIG_ZYNQ_GEM) +# define PHY_ANEG_TIMEOUT 20000 +#endif + +#define ENV_MEM_LAYOUT_SETTINGS \ + "fdt_addr_r=0x40000000\0" \ + "fdt_size_r=0x400000\0" \ + "pxefile_addr_r=0x10000000\0" \ + "kernel_addr_r=0x18000000\0" \ + "kernel_size_r=0x10000000\0" \ + "kernel_comp_addr_r=0x30000000\0" \ + "kernel_comp_size=0x3C00000\0" \ + "ramdisk_addr_r=0x02100000\0" \ + "script_size_f=0x80000\0" + +#if defined(CONFIG_DISTRO_DEFAULTS) + +#if defined(CONFIG_MMC_SDHCI_ZYNQ) +# define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) +#else +# define BOOT_TARGET_DEVICES_MMC(func) +#endif + +#if defined(CONFIG_CMD_PXE) && defined(CONFIG_CMD_DHCP) +# define BOOT_TARGET_DEVICES_PXE(func) func(PXE, pxe, na) +#else +# define BOOT_TARGET_DEVICES_PXE(func) +#endif + +#if defined(CONFIG_CMD_DHCP) +# define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) +#else +# define BOOT_TARGET_DEVICES_DHCP(func) +#endif + +#if defined(CONFIG_ZYNQMP_GQSPI) || defined(CONFIG_CADENCE_OSPI_VERSAL) +# define BOOT_TARGET_DEVICES_XSPI(func) func(XSPI, xspi, 0) func(XSPI, xspi, 1) +# define BOOTENV_DEV_SHARED_XSPI \ + "xspi_boot=sf probe $devnum_xspi:0 0 0 && " \ + "sf read $scriptaddr $script_offset_f $script_size_f && " \ + "echo XSPI: Trying to boot script at ${scriptaddr} && " \ + "source ${scriptaddr}; echo XSPI: SCRIPT FAILED: continuing...;\0" +#else +# define BOOT_TARGET_DEVICES_XSPI(func) +# define BOOTENV_DEV_SHARED_XSPI +#endif + +#define BOOTENV_DEV_XSPI(devtypeu, devtypel, instance) \ + "bootcmd_" #devtypel #instance "=" \ + "devnum_xspi=" #instance "; run " #devtypel "_boot\0" \ + +#define BOOTENV_DEV_NAME_XSPI(devtypeu, devtypel, instance) \ + "" + +#define BOOT_TARGET_DEVICES_JTAG(func) func(JTAG, jtag, na) + +#define BOOTENV_DEV_JTAG(devtypeu, devtypel, instance) \ + "bootcmd_jtag=echo JTAG: Trying to boot script at ${scriptaddr} && " \ + "source ${scriptaddr}; echo JTAG: SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_JTAG(devtypeu, devtypel, instance) \ + "jtag " + +#define BOOT_TARGET_DEVICES_DFU_USB(func) func(DFU_USB, dfu_usb, 0) + +#define BOOTENV_DEV_DFU_USB(devtypeu, devtypel, instance) \ + "bootcmd_dfu_usb=setenv dfu_alt_info boot.scr ram $scriptaddr " \ + "$script_size_f; dfu 0 ram 0 && " \ + "echo DFU: Trying to boot script at ${scriptaddr} && " \ + "source ${scriptaddr}; " \ + "echo DFU: SCRIPT FAILED: continuing...;\0" + +#define BOOTENV_DEV_NAME_DFU_USB(devtypeu, devtypel, instance) \ + "" + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_DEVICES_JTAG(func) \ + BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_XSPI(func) \ + BOOT_TARGET_DEVICES_DFU_USB(func) \ + BOOT_TARGET_DEVICES_PXE(func) \ + BOOT_TARGET_DEVICES_DHCP(func) + +#include + +#else /* CONFIG_DISTRO_DEFAULTS */ +# define BOOTENV +#endif /* CONFIG_DISTRO_DEFAULTS */ + +/* Initial environment variables */ +#ifndef CFG_EXTRA_ENV_SETTINGS +#define CFG_EXTRA_ENV_SETTINGS \ + ENV_MEM_LAYOUT_SETTINGS \ + BOOTENV \ + BOOTENV_DEV_SHARED_XSPI \ + DFU_ALT_INFO +#endif + +#endif /* __AMD_VERSAL2_H */ -- cgit v1.2.3