summaryrefslogtreecommitdiff
path: root/board/xilinx/common
Commit message (Collapse)AuthorAgeFilesLines
* xilinx: Consolidate board_fit_config_name_match() for Xilinx platformsMichal Simek2020-10-291-0/+11
| | | | | | | | | Move board_fit_config_name_match() from Zynq/ZynqMP to common location. This change will open a way to use it also by Microblaze and Versal. Through this function there is a way to handle images with multiple DTBs. For now match it with DEVICE_TREE as is done for Zynq. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Wire generic xilinx board_late_init_xilinx()Michal Simek2020-10-271-2/+2
| | | | | | | | | Call generic board_late_init_xilinx() to be aligned with the rest of xilinx platforms. Also getting rid of initrd_high/fdt_high and use bootm_low/boot_size instead. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: Add DDR base address to bootscript addressT Karthik Reddy2020-10-271-0/+9
| | | | | | | | | | | | | | | | | Add ram base address to scriptaddr env variable to make boot script address to be a valid address when ddr base address changes. This works properly if the first memory region is the region where uboot runs. Also the solution was taken in respect of a lot of jtag script putting u-boot script to certain address. For standard cases bd->bi_dram[0].start is 0 all the time. Only for systems with DDR placed out of this location it does calculation. This is not the best solution and should be done differently in future but enough for now till we don't have full solution ready yet. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: board: Add FRU decoder supportMichal Simek2020-10-271-1/+82
| | | | | | | FMC cards are using FRU format for card identification. That's why add support for this format. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: cmd: Add basic fru format generatorMichal Simek2020-10-273-2/+136
| | | | | | | | | | | | | | | | | Idea is to have something what can be used for board bringup from generic board perspective. There is a violation compare to spec that FRU ID is ASCII8 instead of binary format but this is really for having something to pass boot and boot to OS which has better generating options. Also time should be filled properly. For example: fru board_gen 1000 XILINX versal-x-prc-01-revA serialX partX There is also support for revision field which is Xilinx specific field. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: cmd: Add support for FRU commandsSiva Durga Prasad Paladugu2020-10-274-0/+405
| | | | | | | | | | | | | | | | | This patch adds support for fru commands "fru capture" and "fru display". The fru capture parses the FRU table present at an address and stores in a structure for later use. The fru display prints the content of captured structured in a readable format. As of now, it supports only common header and board area of FRU. Also, it supports only English language code and ASCII8/BINARY formats. fru_data variable is placed to data section because fru parser can be called very early before bss is initialized. And also information needs to be shared that's why it is exported via header. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: common: Add Makefile to common folderMichal Simek2020-10-271-0/+7
| | | | | | | | There is no need to reference files in common folder back. Simply adding Makefile to this folder does the job because this "common" location is already wired in main Makefile. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: common: Protect board_late_init_xilinx()Michal Simek2020-10-271-0/+2
| | | | | | Do not call board_late_init_xilinx() when BOARD_LATE_INIT is not enabled. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: board: Add support for additional card detectionMichal Simek2020-10-271-24/+61
| | | | | | | | | The most of Xilinx evaluation boards have FMC connectors which contain small eeprom for card identification. That's why read content of eeprom and record it. Also generate cardX_ variables for easier script handling. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: board: Read the whole eeprom not just offsetMichal Simek2020-10-272-1/+206
| | | | | | | | | | | | Starts to use new way how eeproms should be referenced. Reference is done via nvmem alias nodes. When this new way is specified code itself read the eeprom and decode xilinx legacy format and fill struct xilinx_board_description. Then based on information present there board_* variables are setup. If variables are saved and content can't be changed information is just shown on console. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: common: Do not save fdt_blob to bss sectionMichal Simek2020-09-231-1/+1
| | | | | | | | | | | | | For SPL flow without specifying address for DT loading DTB is automatically appended behind U-Boot code. Specifically _end symbol is used. Just behind it there is place for bss section. It means if early code is using static variable and there is a write to this variable DTB file is corrupted if variable is located between DTB start and end. In this particular case offset of this variable from bss section start is very small (0x40) that's why DT is currupted which breaks this boot flow. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: common: Change bootm_size variable settingMichal Simek2020-08-201-1/+5
| | | | | | | | | | | | 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>
* xilinx: common: Check return value from variable setupMichal Simek2020-08-201-3/+8
| | | | | | | 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>
* xilinx: common: Get rid of initrd_high variable setupMichal Simek2020-08-201-6/+0
| | | | | | | 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>
* xilinx: Change logic around zynq_board_read_rom_ethaddr()Michal Simek2020-08-201-3/+2
| | | | | | | | 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>
* xilinx: Setup bootm variablesMichal Simek2020-08-201-0/+3
| | | | | | | | | | | | | | 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>
* common: Drop log.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* command: Remove the cmd_tbl_t typedefSimon Glass2020-05-181-0/+1
| | | | | | | | | | | | | 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>
* xilinx: Move initrd_high setup to common locationMichal Simek2020-04-271-0/+7
| | | | | | | 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>
* xilinx: Introduce board_late_init_xilinx()Michal Simek2020-04-272-0/+20
| | | | | | | This function should keep common shared late configurations for Xilinx SoCs. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* arm64: xilinx: Never touch DDR if system has no DDRMichal Simek2020-04-061-1/+5
| | | | | | | 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>
* dm: core: Rename ofnode_get_chosen_prop()Simon Glass2020-02-051-1/+1
| | | | | | | | | | | | | 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>
* arm64: zynqmp: Add support for OF_SEPARATE with board DTBMichal Simek2020-01-141-6/+23
| | | | | | | | | | | | | OF_BOARD and OF_SEPARATE can use board specific board_fdt_blob_setup(). OF_BOARD option is mostly used for picking up DTB from certain location. OF_SEPARATE option is used when DTB is appended after u-boot binary. This board specific function is aligned with current version in lib/fdtdec.c with checking CONFIG_XILINX_OF_BOARD_DTB_ADDR address first. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* arm64: zynqmp: Rename fw_dtb variable to fdt_blobMichal Simek2020-01-141-4/+4
| | | | | | | The reason for this change is just get in sync with board_fdt_blob_setup() available at lib/fdtdec.c. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* arm64: xilinx: Enable generic of_board_dtbIbai Erkiaga2019-10-081-1/+1
| | | | | | | | | Modify the configuration naming to be generic to xilinx rather than specific to Versal. The offset value is different for Zynq and ZynqMP to avoid overlapping with FSBL. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* arm64: versal: Move common board dtb searchIbai Erkiaga2019-10-081-0/+14
| | | | | | | | Move the exisiting function of getting board dtb from versal to a common Xilinx folder. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: common: Remove !DM_i2C code for reading mac from eepromMichal Simek2019-02-141-19/+0
| | | | | | | | All platforms are converted to DM_I2C that's why there is no reason to keep this code here. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* xilinx: common: Add support for DM_I2C zynq_board_read_rom_ethaddr()Michal Simek2019-02-141-0/+32
| | | | | | | | | | | | | | | It is much easier to point to eeprom which stores information like MAC address directly via DT. eeprom which contains this information is pointed by /chosen/xlnx,eeprom parameter. For example: chosen { bootargs = "earlycon"; stdout-path = "serial0:115200n8"; + xlnx,eeprom = &eeprom; }; Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* xilinx: Move zynq_board_read_rom_ethaddr to shared locationMichal Simek2019-02-141-0/+25
| | | | | | | | | | Zynq and ZynqMP are sharing similar code and there is no reason to do code duplication. Move zynq_board_read_rom_ethaddr() to common file for easier conversion to DM. Use ZynqMP version that's why also add CONFIG_ZYNQ_EEPROM_BUS to Syzygy which is only one Zynq board which is using this feature. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* board: xilinx: Remove common folderMichal Simek2013-02-0415-5862/+0
| | | | | | | | All these files was used for ancient xilinx drivers which are finally gone. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Rommel Custodio <sessyargc@gmail.com>
* Big white-space cleanup.Wolfgang Denk2008-05-212-7/+7
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Cleanup for GCC-4.xWolfgang Denk2005-10-131-1/+1
|
* * Patch by Sean Chang, 9 Aug 2004:wdenk2004-09-292-35/+349
| | | | | | | | | | | | | | | | | | - Added I2C support for ML300. - Added support for ML300 to read out its environment information stored on the EEPROM. - Added support to use board specific parameters as part of U-Boot's environment information. - Updated MLD files to support configuration for new features above. * Patches by Travis Sawyer, 5 Aug 2004: - Remove incorrect bridge settings for eth group 6 - Add call to setup bridge in ppc_440x_eth_initialize - Fix ppc_440x_eth_init to reset the phy only if its the first time through, otherwise, just check the phy for the autonegotiated speed/duplex. This allows the use of netconsole - only print the speed/duplex the first time the phy is reset.
* * Patch by Peter Ryser, 20 Feb 2004:wdenk2004-02-2314-0/+5548
Add support for the Xilinx ML300 platform * Patch by Stephan Linz, 17 Feb 2004: Fix watchdog support for NIOS * Patch by Josh Fryman, 16 Feb 2004: Fix byte-swapping for cfi_flash.c for different bus widths * Patch by Jon Diekema, 14 Jeb 2004: Remove duplicate "FPGA Support" notes from the README file