diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/versal-net/board.c | 45 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 13 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp_kria.env | 9 |
3 files changed, 51 insertions, 16 deletions
diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c index 88e10fa7a7..1d67e3f318 100644 --- a/board/xilinx/versal-net/board.c +++ b/board/xilinx/versal-net/board.c @@ -193,6 +193,51 @@ static u8 versal_net_get_bootmode(void) return bootmode; } +int spi_get_env_dev(void) +{ + struct udevice *dev; + const char *mode = NULL; + int bootseq = -1; + + switch (versal_net_get_bootmode()) { + case QSPI_MODE_24BIT: + puts("QSPI_MODE_24\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1030000", &dev)) { + debug("QSPI driver for QSPI device is not present\n"); + break; + } + mode = "xspi"; + bootseq = dev_seq(dev); + break; + case QSPI_MODE_32BIT: + puts("QSPI_MODE_32\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1030000", &dev)) { + debug("QSPI driver for QSPI device is not present\n"); + break; + } + mode = "xspi"; + bootseq = dev_seq(dev); + break; + case OSPI_MODE: + puts("OSPI_MODE\n"); + if (uclass_get_device_by_name(UCLASS_SPI, + "spi@f1010000", &dev)) { + debug("OSPI driver for OSPI device is not present\n"); + break; + } + mode = "xspi"; + bootseq = dev_seq(dev); + break; + default: + break; + } + + debug("bootseq %d\n", bootseq); + return bootseq; +} + static int boot_targets_setup(void) { u8 bootmode; diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index b4c15b041c..e6331c0e4d 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -152,20 +152,7 @@ int board_init(void) if (sizeof(CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE) > 1) zynqmp_pmufw_load_config_object(zynqmp_pm_cfg_obj, zynqmp_pm_cfg_obj_size); -#endif - -#if defined(CONFIG_ZYNQMP_FIRMWARE) - struct udevice *dev; - uclass_get_device_by_name(UCLASS_FIRMWARE, "power-management", &dev); - if (!dev) { - uclass_get_device_by_name(UCLASS_FIRMWARE, "zynqmp-power", &dev); - if (!dev) - panic("PMU Firmware device not found - Enable it"); - } -#endif - -#if defined(CONFIG_SPL_BUILD) printf("Silicon version:\t%d\n", zynqmp_get_silicon_version()); /* the CSU disables the JTAG interface when secure boot is enabled */ diff --git a/board/xilinx/zynqmp/zynqmp_kria.env b/board/xilinx/zynqmp/zynqmp_kria.env index 69e333c538..49ef3e7d75 100644 --- a/board/xilinx/zynqmp/zynqmp_kria.env +++ b/board/xilinx/zynqmp/zynqmp_kria.env @@ -63,10 +63,13 @@ kr260_setup=i2c dev 1 && run usb_hub_init; i2c dev 2 && run usb_hub_init; kd240_setup=i2c dev 1 && run usb_hub_init;zynqmp pmufw node 33; zynqmp pmufw node 47 tpm_setup=tpm autostart; +tpm_reset=echo "!!! For TPM reset a full power cycle or pressing the POR_B button is required !!!"; +tpm_kv260=if test ${card1_rev} = A -o ${card1_rev} = B -o ${card1_rev} = Y -o ${card1_rev} = Z -o ${card1_rev} = 1; then run tpm_reset; fi +tpm_kd240=if test ${card1_rev} = A; then run tpm_reset; fi board_setup=\ zynqmp mmio_write 0xFFCA0010 0xfff 0; \ -if test ${card1_name} = SCK-KV-G; then run kv260_setup; fi;\ -if test ${card1_name} = SCK-KR-G; then run kr260_setup; fi;\ -if test ${card1_name} = SCK-KD-G; then run kd240_setup; fi;\ +if test ${card1_name} = SCK-KV-G; then run kv260_setup; run tpm_kv260; fi;\ +if test ${card1_name} = SCK-KR-G; then run kr260_setup; run tpm_reset; fi;\ +if test ${card1_name} = SCK-KD-G; then run kd240_setup; run tpm_kd240; fi;\ run tpm_setup |