From: Venkatesh Yadav Abbarapu Date: Tue, 25 Feb 2025 03:28:06 +0000 (-1200) Subject: amd: versal2: Add the UFS boot mode support X-Git-Tag: v2025.07-rc1~52^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=253da1f0a2821bf741c8dc24ed2e568b7013f6e0;p=pandora-u-boot.git amd: versal2: Add the UFS boot mode support Add the UFS boot mode support and update the boot_targets with ufs mode. If the UFS device is not accessible from APU and running this is detected as a warning, as the device is not accessible. Signed-off-by: Venkatesh Yadav Abbarapu Link: https://lore.kernel.org/r/20250225032806.1842581-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek --- diff --git a/arch/arm/mach-versal2/include/mach/hardware.h b/arch/arm/mach-versal2/include/mach/hardware.h index 15085f941e0..a961032b4d5 100644 --- a/arch/arm/mach-versal2/include/mach/hardware.h +++ b/arch/arm/mach-versal2/include/mach/hardware.h @@ -68,6 +68,7 @@ struct crp_regs { #define USB_MODE 0x00000007 #define OSPI_MODE 0x00000008 #define SELECTMAP_MODE 0x0000000A +#define UFS_MODE 0x0000000B #define SD1_LSHFT_MODE 0x0000000E /* SD1 Level shifter */ #define JTAG_MODE 0x00000000 #define BOOT_MODE_USE_ALT 0x100 diff --git a/board/amd/versal2/board.c b/board/amd/versal2/board.c index d3e6547eada..c99620d03ef 100644 --- a/board/amd/versal2/board.c +++ b/board/amd/versal2/board.c @@ -252,6 +252,16 @@ static int boot_targets_setup(void) mode = "mmc"; bootseq = dev_seq(dev); break; + case UFS_MODE: + puts("UFS_MODE\n"); + if (uclass_get_device(UCLASS_UFS, 0, &dev)) { + debug("UFS driver for UFS device is not present\n"); + break; + } + debug("ufs device found at %p\n", dev); + + mode = "ufs"; + break; default: printf("Invalid Boot Mode:0x%x\n", bootmode); break;