aboutsummaryrefslogtreecommitdiff
path: root/board/xilinx
AgeCommit message (Collapse)Author
2020-08-26CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always definedStefan Roese
Since commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") & commit 999a772d9f24 ("Kconfig: Migrate CONFIG_NR_DRAM_BANKS"), CONFIG_NR_DRAM_BANKS is always defined with a value (4 is default). It makes no sense to still carry code that is guarded with "#ifndef CONFIG_NR_DRAM_BANKS" (and similar). This patch removes all these unreferenced code paths. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-08-20xilinx: common: Change bootm_size variable settingMichal Simek
Linux kernel for arm32 requires dtb and initrd to be placed in low memory to work properly. This requirement is described in chapter 4b) and 5) in Linux documentation (Documentation/arm/booting.rst). There is an issue on arm32 with 2GB of memory that bootm_size is bigger than Linux lowmem (for example with VMSPLIT_3G). That's why limit bootm size on these systems not to be above 768MB. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: common: Check return value from variable setupMichal Simek
env_set..() can failed that's why check return status and report it back to make sure that user is aware that's something went wrong. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: common: Get rid of initrd_high variable setupMichal Simek
When bootm_low/bootm_size are setup properly there is no need to setup any initrd_high address. Location for initrd is determined through LMB. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: Change logic around zynq_board_read_rom_ethaddr()Michal Simek
There is no reason to build private function when CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET is not defined. There is already weak function which handles default case properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: Add support for ENV_VARS_UBOOT_RUNTIME_CONFIGMichal Simek
Start to use ENV_VARS_UBOOT_RUNTIME_CONFIG to enable/disable updating variables with run time information. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: zynqmp: remove chip_id functionIbai Erkiaga
Remove chip_id function and integrate the firmware call in the zynqmp_get_silicon_idcode_name function. The change avoids querying the firmware twice and makes the code bit more clear. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: zynqmp: get chip ID at EL3Ibai Erkiaga
Modify the board init function to allow getting the chip ID when U-Boot proper is executed at EL3. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: zynqmp: get chip ID using firmware driverIbai Erkiaga
Current implementation for getting chip ID uses either raw access on EL3 or a SMC call to get the silicon information. Following change simplifies the code using always the firmware driver. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: zynqmp: synchronize firmware call return payloadIbai Erkiaga
Removes duplicated definition of PAYLOAD_ARG_CNT and define it in the firmware driver. Additionally fixes payload buffer declarations without macro usage Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: versal: Use lowest memory for U-BootMichal Simek
Find and use the lowest memory for Versal to make sure that we keep u-boot as low as possible and never use memory above u-boot's maximum VA mapping. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: versal: Add new versal loadpdi commandT Karthik Reddy
Versal loadpdi command is used for loading secure & non-secure pdi images. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20arm64: zynqmp: Fix set_fdtfile() not to break u-boots DTBIgor Lantsman
Origin function was calling strsep which replaced delimiter ',' by a null byte ('\0'). Operation was done directly on FDT which ends up with the following behavior: ZynqMP> printenv fdtfile fdtfile=xilinx/zynqmp.dtb ZynqMP> fdt addr $fdtcontroladdr ZynqMP> fdt print / compatible compatible = "xlnx", "zynqmp" As is visible fdtfile was correctly composed but a null byte caused that xlnx was separated from zynqmp. This hasn't been spotted because in all Xilinx DTs there are at least 3 compatible string and only the first one was affected by this issue. But for systems which only had one compatible string "xlnx,zynqmp" it was causing an issue when U-Boot's DT was used by Linux kernel. The patch removes strsep calling and strchr is called instead which just locate the first char after deliminator ',' (variable called "name"). And using this pointer in fdtfile composing. Fixes: 91d7e0c47f51 ("arm64: zynqmp: Create fdtfile from compatible string") Reported-by: Igor Lantsman <igor.lantsman@opsys-tech.com> Signed-off-by: Igor Lantsman <igor.lantsman@opsys-tech.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-08-20xilinx: Setup bootm variablesMichal Simek
On system with PL DDR which is placed before PS DDR in DT env_get_bootm_size() and env_get_bootm_low() without specifying bootm_low and bootm_size variables are taking by default gd->bd->bi_dram[0].start and gd->bd->bi_dram[0].size. As you see 0 means bank 0 which doesn't need to be PS ddr and even can be memory above 39bit VA which is what U-Boot supports now. That's why setup bootm variables based on ram_base/ram_size setting to make sure that boot images are placed to the same location as U-Boot is placed. This location should be by default location where OS can boot from. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-06-25xilinx: zynqmp: Enable pmufw config reloadingMichal Simek
PMU FW has functionality to accept and reload configuration object at run time. The patch is adding support for doing it via u-boot prompt. For example: tftpboot 100000 pmu_obj.bin zynqmp pmufw 100000 $filesize The most of pmufw configurations don't allow config reloading. Also official Xilinx PMUFW doens't support this feature properly but the patch should open a way to call PMUFW with this request. Here is example of PMUFW config fragment which enables config reloading. /* SET CONFIG SECTION */ PM_CONFIG_SET_CONFIG_SECTION_ID, /* Section ID */ PM_CONFIG_IPI_PSU_CORTEXA53_0_MASK | PM_CONFIG_IPI_PSU_CORTEXR5_0_MASK | PM_CONFIG_IPI_PSU_CORTEXR5_1_MASK, /* Permissions to set config */ Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-06-25arm64: zynqmp: Print multiboot reg in decimalMichal Simek
It is better to print multiboot value in decimal because boot images are also composed in decimal not in hex. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-06-24topic: zynqmp: Add support for zynqmp-xilinx-xdp platformMike Looijmans
XDP - Xilinx Drone Platform is a board for drones or other UAV. Pinmux the SD card by default, and if the SD card detect line is high (inactive) then pinmux the SD1 interface to EMIO instead. SD is placed on extension card and shares connection with on board wife. That means that when SD card is present in the board wifi can't be used. There seems to be an issue with DDR access from PL at 2400MT/s, after updating the PMU and ATF firmware this is causing extremely slow DDR access. Reducing the DDR speed from 2400 to 2133 appears to solve that issue, even though the hardware has proven to be 2400 capable. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-06-24board: zynqmp: Fix for wrong AMS setting by ROMMike Looijmans
A bug in the ZynqMP bootrom sets the PS_SYSMON_ANALOG_BUS register at 0xFFA50914 to the wrong value 0x3201. This causes the AMS to exchange the PS supply voltages 0 and 1. On Xilinx boards this is not noticeable since these are tied together, it's only really noticeable if banks 500 and 501 have different supplies. Xilinx' tech support reported this undocumented register to be the cause, and this patch applies a fix for all boards by programming the correct value. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-06-24fpga: zynqpl: Add zynq aes load & loadp commandsT Karthik Reddy
Added support for zynq aes load & loadp commands. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-06-24fpga: zynqpl: Correct PL bitstream loading sequence for zynqaesSiva Durga Prasad Paladugu
Correct the PL bitstream loading sequence for zynqaes command by clearing the loaded PL bitstream before loading the new encrypted bitstream using the zynq aes command. This was done by setting the PROG_B same as in case of fpgaload commands. This patch fixes the issue of loading the encrypted PL bitstream onto the PL in which a bitstream has already been loaded successfully. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop asm/ptrace.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop log.h from common headerSimon Glass
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop init.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop part.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop net.h from common headerSimon Glass
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-27xilinx: Move bootmode detection to separate functionMichal Simek
Create special function for reading bootmode on Versal and ZynqMP. Zynq is using specific function (without mask) already. Future patches will be calling this function from different location too. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-27xilinx: Move initrd_high setup to common locationMichal Simek
Moving to common location initrd_high is also setup for Zynq which hasn't done in run time code. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-27xilinx: zynqmp: Fix MIO 18 configuration on zcu104 revCMichal Simek
Without this change QSPI is not detected on zcu104 revC. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-27xilinx: Introduce board_late_init_xilinx()Michal Simek
This function should keep common shared late configurations for Xilinx SoCs. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: xilinx: Never touch DDR if system has no DDRMichal Simek
If DDR is not mapped do not touch it. Default XILINX_OF_BOARD_DTB_ADDR is pointing to DDR. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: zynqmp: Reorder parameters for zynqmp_mmio_write()Michal Simek
Parameter order is not correct based on zynqmp_mmio_write() declaration. Fixes: be52372ff1bb ("arm64: zynqmp: Use zynqmp_mmio_read/write functions") Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: zynqmp: Move timeout for clock propagation below psu_initMichal Simek
Delay required for clock propagation is tighly coupled with initialization done in psu_init(). That's why call it also for u-boot proper with CONFIG_ZYNQMP_PSU_INIT_ENABLED enabled. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: zynqmp: Add support for debug uart also for U-Boot properMichal Simek
board_early_init_f() is the right location where debug uart can be configurated (after MIO initialization). The patch is taking this call from SPL to also make it available for U-Boot proper. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: zynqmp Add support for zcu111 revAMichal Simek
Add low level configuration for zcu111 for easier SPL run. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: zynqmp Add support for zcu102 rev1.1Michal Simek
rev1.1 has different DDR sodimm module that's why it requires different DDR configuration. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: zynqmp: Check firmware node when driver is enabledMichal Simek
ZynqMP mini configurations works without PMU firmware that's why there is no reason to enable the driver and check if it was probed properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-04-06arm64: zynqmp: Print multiboot register value in EL3Michal Simek
Multi boot register can be used for using different boot images and design better boot strategy. Let EL3 SPL or U-Boot to read it and print it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-02-28ARM: zynq: Rename defconfig to be align with ZynqMP and VersalMichal Simek
Just cosmetic change before real switch. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-02-28arm: xilinx: Fill DEVICE_TREE directly in MakefilesMichal Simek
DEVICE_TREE variable is not exported from dts/Makefile that's why it is necessary to setup directly before use. Fixes: 312f2c5b14fa ("arm: xilinx: Use device tree which can be passed on cmd line") Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-02-28arm: zynq: zybo z7: fix MIO init issueMilan Obuch
The board has two push button connected to MIO pins 50 and 51, which have a pull-down resistor and are connected to 1.8V when pressed. These two pins are wrongly initialized with internal pull-up enabled so they are reported as 1 all the time with no change when pressed. Disable the internal pull-up to fix the issue. Signed-off-by: Milan Obuch <u-boot@dino.sk> Signed-off-by: Luis Araneda <luaraneda@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-02-05dm: core: Rename ofnode_get_chosen_prop()Simon Glass
This function is actually intended to read a string rather than a property. All of its current callers use it that way. Also there is no way to return the length of the property from this function. Rename it to better indicate its purpose, using ofnode_read as the prefix since this matches most other functions. Also add some tests which are missing for these functions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17common: Move reset_cpu() to the CPU headerSimon Glass
Move this function out of common.h and into a relevant header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-14ARM: zynq: Add jtag distro boot supportT Karthik Reddy
This patch adds new jtag distro boot command to look for bootscript file in DDR and execute it first incase of jtag bootmode. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-14arm: xilinx: Use device tree which can be passed on cmd lineMichal Simek
DEVICE_TREE variable has been added by commit 6ab6b2afa091 ("dts: re-write dts/Makefile more simply with Kbuild") where DT can be specified on command line. If it is not then CONFIG_DEFAULT_DEVICE_TREE is used to ensure backward compatibility. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-14arm64: zynqmp: Fix symlinks to SC psu_init* filesMichal Simek
Names have to match device tree file names. Also add missing one. Fixes: 50d92833477e ("arm64: zynqmp: Sync names for SC with Versal") Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-14arm: zynq: Remove low level UART settingMichal Simek
There is no reason to do serial initializationin low level code. Uart driver does it already based on DT. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2020-01-14arm64: zynqmp: Remove low level UART settingMichal Simek
There is no reason to do serial initialization. Uart driver does it already based on DT. Good effect is that it is clear which interface is console. Signed-off-by: Michal Simek <michal.simek@xilinx.com>