summaryrefslogtreecommitdiff
path: root/board/xilinx/versal-net/board.c
AgeCommit message (Collapse)Author
2025-04-16arm64: versal-net: Add PL bit stream load supportPrasad Kummari
Add support for loading the secure & non-secure pdi images and PL bitstream on the Versal NET platform. The FPGA driver is enabled to load the bitstream in PDI format on the AMD Versal NET device. PDI is the new programmable device image format for Versal NET, and the bitstream for the Versal NET platform is generated exclusively in this format. The source code for the versalnet loadpdi command and the CONFIG_CMD_VERSAL_NET configuration has been removed. It now utilizes the fpga load <dev> <address> <length> command to load secure & non-secure pdi images. Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Link: https://lore.kernel.org/r/20250327105200.1262615-2-prasad.kummari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16xilinx: versal: add firmware access to CRP Boot mode registerPrasad Kummari
Added extended support for retrieving the boot mode register via the firmware interface, which is preferred when U-Boot runs in EL2 and cannot directly access CRP registers via raw reads. Ideally, all secure registers should be accessed via xilinx_pm_request(). Introduced the secure zynqmp_pm_get_bootmode_reg() call, which uses xilinx_pm_request() to read the boot mode register. When CONFIG_ZYNQMP_FIRMWARE is enabled, the secure zynqmp_pm_get_bootmode_reg() call is used; otherwise, direct raw reads are performed in the case of mini U-Boot. Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Link: https://lore.kernel.org/r/20250219115301.3661036-1-prasad.kummari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-09-20xilinx: versal-net: fix no previous prototype for function warning.Prasad Kummari
Included the SPI header to resolve the no previous prototypes for function. Removed unused mode variable. sparse warnings warning: no previous prototype for 'spi_get_env_dev' [-Wmissing-prototypes] warning: variable 'mode' set but not used [-Wunused-but-set-variable] Signed-off-by: Prasad Kummari <prasad.kummari@amd.com> Link: https://lore.kernel.org/r/20240905115758.999936-1-prasad.kummari@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-08-05xilinx: versal-net: Handle spi seq number based on boot deviceVenkatesh Yadav Abbarapu
Versal NET boards has QSPI and OSPI and default bus set to 0 is not working when system is booting out of OSPI which is controller 1, as fixed aliases are set for all the boards i.e., QSPI to 0 and OSPI to 1. Add controller autodetection via spi_get_env_dev(). Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20240614124811.22945-3-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-05-07board: xilinx: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-02xilinx: Do not call private env_get_location() when !ENV_IS_NOWHEREMichal Simek
Private function for finding out location of environment is not working when ENV_IS_NOWHERE is disabled. The reason is that current fallback is ENVL_UNKNOWN when CONFIG_ENV_IS_NOWHERE is not enabled. The code could be updated like this - return ENVL_NOWHERE; + if (IS_ENABLED(CONFIG_ENV_IS_NOWHERE)) + return ENVL_NOWHERE; + return ENVL_UNKNOWN; But then boot is still not working because ENVL_UNKNOWN has no driver and env_init() returns -ENODEV. That's why it is better not to define board specific env_get_location() because then weak env_get_location() is used which is going over env_locations[] and returning locations which are actually enabled in u-boot instance. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/830b9c93d30688cfa8a5cbb0388e79deb7731f29.1711107795.git.michal.simek@amd.com
2024-03-22xilinx: versal-net: Add support for saving env based on bootmodeVenkatesh Yadav Abbarapu
Enable saving variables to MMC(FAT) and SPI based on primary bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE). Enable ENV_FAT_DEVICE_AND_PART="0:auto" for versal-net platform as well. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20240312113421.7394-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-10-09arm64: versal: Add SelectMAP boot mode identificationPolak, Leszek
The SelectMAP configuration interface provides an 8-bit, 16-bit or 32-bit bidirectional data bus interface to the Versal FPGA configuration logic that can be used for both configuration and readback. A connected microcontoller to the SelectMAP interface can load boot image with bitstream, TF-A (ARM Trusted Firmware) and U-Boot. This commit adds the missing identification of the SelectMAP mode. Signed-off-by: Polak, Leszek <LPolak@arri.de> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Michal Simek <michal.simek@amd.com> Cc: Stefan Roese <sr@denx.de> Link: https://lore.kernel.org/r/DU0PR07MB8419F7765892CDBCE7D559C5C8CFA@DU0PR07MB8419.eurprd07.prod.outlook.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-09-21arm64: xilinx: Guard distro boot variable generationMichal Simek
When distro boot is disabled there is no reason to generate variables for it. Also do not update boot_targets variable because it would be unused. It is useful for example when standard boot is enabled and distro boot is disabled. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/570c51435da59831ec245cddceda078afa58a550.1693913398.git.michal.simek@amd.com
2023-09-21xilinx: versal-net: Do not setup boot_targets if driver is not enabledVenkatesh Yadav Abbarapu
SOC can boot in the device which is not accessible from APU and running this is detected as error which ends up in stopping boot process. Boot mode detection and logic around is present to setup priority on boot devices that SOC boot device is likely also used for booting OS. Change logic to detect this case with showing message about it but don't fail in boot process and don't prioritize boot device in this case. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20230904032035.11926-2-venkatesh.abbarapu@amd.com
2023-07-21arm64: versal-net: spi: Update boot sequence dynamicallyAshok Reddy Soma
Currently xspi0 is used for all spi boot modes, it means it will use "sf probe 0 0 0" for all spi's irrespective of which node it is wired. Get boot sequence from dev_seq() and update boot command for xspi dynamically. As a result bootcmd for spi is updated as below when two instances of spi are present in DT node. bootcmd_xspi0=devnum_xspi=0; run xspi_boot bootcmd_xspi1=devnum_xspi=1; run xspi_boot 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...; Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Link: https://lore.kernel.org/r/20230614093058.30438-1-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-06-12arm64: versal-net: Add support for SPP production versionMichal Simek
Production version restarting platform version field from 0 that's why add new calculation to be able to use different DT for these platforms. Requested DT names for production silicons for IPP/SPP and EMU platform are versal-net-ipp-rev2.0.dts and versal-net-emu-rev2.0.dts. If platform version increase numbers revision can be even higher. As of today platform version is 2 that's why expected is rev2.2. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/691e166b3cf2643d7edf482bda5500163eecb35a.1684311689.git.michal.simek@amd.com
2023-06-12arm64: versal-net: Detect and display bootmodeAshok Reddy Soma
Read boodmode register using versal_net_get_bootmode() in board_late_init and prepare corresponding distro boot command sequence based on it. versal_net_get_bootmode() will be changed to use smc calls later, but for now directly reads the register. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Link: https://lore.kernel.org/r/20230516144753.30869-1-ashok.reddy.soma@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-02-10Correct SPL use of SYS_MEM_RSVD_FOR_MMUSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_SYS_MEM_RSVD_FOR_MMU defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-09Correct SPL uses of ENV_VARS_UBOOT_RUNTIME_CONFIGSimon Glass
This converts 4 usages of this option to the non-SPL form, since there is no SPL_ENV_VARS_UBOOT_RUNTIME_CONFIG defined in Kconfig Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16xilinx: versal-net: Add support for timer and start itAshok Reddy Soma
Add support for starting timer by setting up time stamp generator registers. This is done only for EL3 i.e. mini U-Boot case. For other cases, it will be done TF-A. Add COUNTER_FREQUENCY and IOU_SWITCH_DIVISOR0 to Kconfig so that they can be tuned as required. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/fcd8b0dc4b45a11f5e753afff42f84738ac813da.1673336645.git.michal.simek@amd.com
2022-09-26arm64: versal-net: Add support for Versal NET platformMichal Simek
Versal NET platform is based on Versal chip which is reusing a lot of IPs. For more information about new IPs please take a look at DT which describe currently supported devices. The patch is adding architecture and board support with soc detection algorithm. Generic setting should be very similar to Versal but it will likely diverge in longer run. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/320206853dc370ce290a4e7b6d0bb26b05206021.1663589964.git.michal.simek@amd.com