summaryrefslogtreecommitdiff
path: root/board/xilinx
Commit message (Collapse)AuthorAgeLines
* ARM: zynq: Setup modeboot variable based on boot modeMichal Simek2017-01-10-0/+6
| | | | | | | modeboot variable is used for saving inforation which bootmode is used. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Make the board configuration name user definableSai Pavan Boddu2017-01-10-0/+5
| | | | | | | Add a prompt for editing in menuconfig Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Replace board specific with generic memory bank decodingNathan Rossi2016-12-20-109/+3
| | | | | | | | | | | | | | | | The dram_init and dram_init_banksize functions were using a board specific implementation for decoding the memory banks from the fdt. This board specific implementation uses a static variable 'tmp' which makes these functions unsafe for execution from within the board_init_f context. This change makes the dram_init* functions use a generic implementation of decoding and populating memory bank and size data. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Fixes: 8d59d7f63b ("ARM64: zynqmp: Read RAM information from DT") Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM: zynq: Replace board specific with generic memory bank decodingNathan Rossi2016-12-20-109/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dram_init and dram_init_banksize functions were using a board specific implementation for decoding the memory banks from the fdt. This board specific implementation uses a static variable 'tmp' which makes these functions unsafe for execution from within the board_init_f context. This unsafe use of a static variable was causing a specific bug when using the zynq_zybo configuration, U-Boot would generate the following error during image load. This was caused due to dram_init overwriting the relocations for the 'image' variable within the do_bootm function. Out of coincidence the un-initialized memory has a compression type which is the same as the value for the relocation type R_ARM_RELATIVE. Uncompressing Invalid Image ... Unimplemented compression type 23 It should be noted that this is just one way the issue could surface, other cases my not be observed in normal boot flow. Depending on the size of various sections, and location of relocations within __rel_dyn and the compiler/linker the outcome of this bug can differ greatly. This change makes the dram_init* functions use a generic implementation of decoding and populating memory bank and size data. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Fixes: 758f29d0f8 ("ARM: zynq: Support systems with more memory banks") Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* block: Move ceva driver to DMMichal Simek2016-12-20-11/+0
| | | | | | | | | This patch also includes ARM64 zynqmp changes: - Remove platform non DM initialization - Remove hardcoded sata base address Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Revert "Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze"Tom Rini2016-12-09-54066/+216
| | | | | This reverts commit 3edc0c252257e4afed163a3a74aba24a5509b198, reversing changes made to bb135a0180c31fbd7456021fb9700b49bba7f533.
* ARM64: zynqmp: Add updated psu_init_gpl* filesMichal Simek2016-12-08-0/+53957
| | | | | | With origin files there was an issue with serdes setting for SCSI. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* zynqmp worksMichal Simek2016-12-08-130/+82
|
* ARM: zynq: Replace dram_init* functions with board_init_f safe onesNathan Rossi2016-12-08-98/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dram_init* functions for the zynq board are not safe for use from the board_init_f stage due to its use of the 'tmp' static variable. This incorrect use of a static variable was causing rare issues where the dram_init function would overwrite some parts the __rel_dyn section which caused obscure failures. Using the zynq_zybo configuration, U-Boot would generate the following error during image load. This was caused due to dram_init overwriting the relocations for the "image" variable within the do_bootm function. Out of coincidence the un-initialized memory has a compression type which is the same as the value for the relocation type R_ARM_RELATIVE. Uncompressing Invalid Image ... Unimplemented compression type 23 It should be noted that this is just one way the issue could surface, other cases my not be observed in normal boot flow. This change removes the existing code and copies the implementation of the dram_init and dram_init_banksize from the arch/arm/mach-uniphier/dram_init.c source. This version of these functions does not use static variables and behaves the same (reading banks from fdt, and using the first bank as the ram_size). Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Fixes: 758f29d0f8 ("ARM: zynq: Support systems with more memory banks") Cc: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* block: Move ceva driver to DMMichal Simek2016-12-08-11/+0
| | | | | | | | | | | | | | | | | | | | | | This patch also includes ARM64 zynqmp changes: - Remove platform non DM initialization - Remove hardcoded sata base address Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Series-to: sjg, agraf@suse.de Series-cc: uboot Series-version: 4 Series-changes: 2 - make ceva_init_sata static - Move SATA_CEVA to defconfig - Initalized max_lun and max_id platdata Series-changes: 3 - Extend Kconfig help description - sort dm.h - Remove SPL undefinition from board file - Fix Kconfig dependecies
* ARM64: zynqmp: Use DTS name for different psu_init_gpl* files in SPLMichal Simek2016-12-02-1/+1
| | | | | | | | | | | | | | | CONFIG_SYS_CONFIG_NAME is not proper config option for different low level init files because different board revisions requires different psu_init_gpl* files. Also at the end of moving drivers to DM all board specific configuration files should be removed. The same changes was done for Zynq. "ARM: zynq: Simplify zynq configuration" (sha1: ad5b5801264e573bfbf17a20b04c546985c5bfc1) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Ignore warnings from autogenerated filesMichal Simek2016-11-15-0/+12
| | | | | | | | Autogenerated files contain casting issues and missing function declaration and even usleep implementation. Suppress them for now till these files are fixed. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Fix secondary bootmode enablingMichal Simek2016-11-15-0/+3
| | | | | | | | | | | | | Do not setup use_alt bit which copy alternative boot mode to boot mode. The reason is that this bit is cleared after POR but not after any software reset which will cause that after SW reset bootrom will look for different boot image. This patch setups alternative boot mode selection (purely SW handling) and extends code to read this alternative boot mode first and use it if it is setup. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Add support for SD1 with level shifters bootmodeSiva Durga Prasad Paladugu2016-11-15-0/+3
| | | | | | | Add support for SD1 with level shifters bootmode. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Record board name as serial number for DFU/FASTBOOTMichal Simek2016-11-15-0/+4
| | | | Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Adjust to new SMC interface to get silicon versionSoren Brinkmann2016-11-15-0/+11
| | | | | | | | | | The new FW interface returns the IDCODE and version register, leaving extracting bitfields to the caller. Cc: Michal Simek <michal.simek@xilinx.com> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM: zynq: Add support for Zynq 7000S 7007s/7012s/7014s devicesMichal Simek2016-11-15-0/+12
| | | | | | | Zynq 7000S (Single A9 core) devices is using different ID code. This patch adds this new codes and assign them. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* arm: Provide common PSCI based reset handlerAlexander Graf2016-10-19-5/+0
| | | | | | | | | | | | | | | | Most armv8 systems have PSCI support enabled in EL3, either through ARM Trusted Firmware or other firmware. On these systems, we do not need to implement system reset manually, but can instead rely on higher level firmware to deal with it. The exclude list seems excessive right now, but NXP is working on providing an in-tree PSCI implementation, so that all NXP systems can eventually use PSCI as well. Signed-off-by: Alexander Graf <agraf@suse.de> [agraf: fix meson] Reviewed-by: Simon Glass <sjg@chromium.org>
* arm: Disable HVC PSCI calls by defaultAlexander Graf2016-10-18-1/+1
| | | | | | | | | | | | | All systems that are running on armv8 are running bare metal with firmware that implements PSCI running in EL3. That means we don't really need to expose the hypercall variants of them. This patch leaves the code in, but makes the code explicit enough to have the compiler optimize it out. With this we don't need to worry about hvc vs smc calling convention when calling psci helper functions. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* ARM64: zynqmp: Add support for chip ID detectionMichal Simek2016-09-22-0/+99
| | | | | | | | | | | Chip ID needs to be known for loading bitstream because U-Boot checks ID from bitstream header in BIT format. BIN format is completely unchecked. The chipid is get from ATF via SMC. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Add support for DFU from SPLMichal Simek2016-09-22-0/+4
| | | | | | | | | | | | | | | | | | | | SPL needs to have bigger stack size because of USB. Simple malloc needs to be disabled because dfu code requires different allocation functions. There is no space in OCM that's why random place in DDR is used. BOOTD must be disabled because it is causing compilation error. All variables are disabled and used only variables valid for DFU because they are simple huge. Including automatic variables added by CONFIG_ENV_VARS_UBOOT_CONFIG. Hardcode addresses for u-boot, atf, kernel and dtb just for SPL DFU code. Enable SPL DFU for zcu100. Create new usb_dfu_spl variable just to run Linux kernel loaded in SPL. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Fix usb_gadget_handle_interrupt routineMichal Simek2016-09-22-2/+3
| | | | | | | Function is defined in g_dnl.h and have different parameter then it is used. This patch fixes it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Wire up both USBs available on ZynqMPMichal Simek2016-09-22-2/+18
| | | | | | The second USB wasn't enabled. This patch fixes it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Wire up PSCI resetMichal Simek2016-08-02-0/+5
| | | | | | Using PSCI to reset the system. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Add support for standard distro boot commandsMichal Simek2016-06-06-7/+27
| | | | | | | | | | | | | Nand and QSPI are not defined now but this will be extended. Based on selected bootmode boot_targets are rewritten. Patch also contains detection if variables are saved. If yes don't rewrite boot_targets variable. Also move variable setup to the end of file because SCSI needs to be defined before others macros are using it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Alexander Graf <agraf@suse.de>
* microblaze: Move MSR instruction selection to KconfigMichal Simek2016-06-06-1/+4
| | | | | | Select MSR instructions via Kconfig instead of xparameters.h. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Add option to pass cpu version numberMichal Simek2016-06-06-0/+8
| | | | | | Toolchain can use some flags by default based on cpu version. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Select compilation flags via KconfigMichal Simek2016-06-06-10/+26
| | | | | | Remove autogenerated config.mk and select CPU options via Kconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM: zynq: Simplify zynq configurationMichal Simek2016-05-24-12/+1
| | | | | | | | | | Extending Kconfig for adding new platform is a lot of work for nothing. Setting SYS_CONFIG_NAME directly in Kconfig and remove all dependencies on TARGET_ZYNQ_* options including SPL. As a side-effect it also remove custom init folder for ps7_init_gpl.* files. Folder is chosen based on device-tree file. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Add SPL support supportMichal Simek2016-05-24-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support RAM and MMC boot mode in SPL also with SPL_FIT images. In MMC boot mode two boot options are available: 1) Boot flow with ATF(EL3) and full U-Boot(EL2): aarch64-linux-gnu-objcopy -O binary bl31.elf bl31.bin mkimage -A arm64 -O linux -T kernel -C none -a 0xfffe5000 -e 0xfffe5000 -d bl31.bin atf.ub cp spl/boot.bin <sdcard fat partition> cp atf.ub <sdcard fat partition> cp u-boot.bin <sdcard fat partition> 2) Boot flow with full U-Boot(EL3): cp spl/boot.bin <sdcard> cp u-boot*.img <sdcard> 3) emmc boot mode dd if=/dev/zero of=sd.img bs=1024 count=1024 parted sd.img mktable msdos parted sd.img mkpart p fat32 0% 100% kpartx -a sd.img mkfs.vfat /dev/mapper/loop0p1 mount /dev/mapper/loop0p1 /mnt/ cp spl/boot.bin /mnt cp u-boot.img /mnt cp u-boot.bin /mnt cp atf.ub /mnt umount /dev/mapper/loop0p1 kpartx -d sd.img cp sd.img /tftpboot/ and program it via u-boot tftpb 10000 sd.img mmcinfo mmc write 10000 0 $filesize mmc rescan mmc part ls mmc 0 psu_init() function contains low level SoC setup generated for every HW design by Xilinx design tools. xil_io.h is only supporting file to fix all dependencies from tools. The same solution was used on Xilinx Zynq. The patch also change CONFIG_SYS_INIT_SP_ADDR to the end of OCM which stays at the same location all the time. Bootrom expects starting address to be at 0xfffc0000 that's why this address is SPL_TEXT_BASE. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Add support for reading MAC from eepromMichal Simek2016-05-24-0/+17
| | | | | | | | | | | | | | | | | | | | | | Add support for on board eeprom with programmed MAC for using in u-boot to have uniq address for every board. Most of the time uniq MAC address is on a label on the board. If address is not programmed use these command to program it. On zcu102: ZynqMP> mm.b 0 00000000: 00 ? 00 00000001: a0 ? 0a 00000002: 35 ? 35 00000003: 02 ? 02 00000004: 00 ? ef 00000005: 00 ? 67 00000006: 00 ? q i2c dev 5 i2c write 0 54 20 6 i2c md 54 20 Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Remove netdev.h from board fileMichal Simek2016-04-13-1/+0
| | | | | | | | | | | | | | | | Including netdev.h is causing compilation warning: + int fecmxc_register_mii_postcall(struct eth_device *dev, int (*cb)(int)); + ^ w+In file included from ../board/xilinx/zynqmp/zynqmp.c:9:0: w+../include/netdev.h:204:41: warning: ‘struct eth_device’ declared inside parameter list [enabled by default] w+../include/netdev.h:204:41: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] This patch removes it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Make DDR detection code work on 32bit systemMichal Simek2016-04-13-3/+3
| | | | | | | Define u64 types to be usable on 32bit system because of 64bit address and size cells and 32bit shifts in the code. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM: zynq: Support systems with more memory banksMichal Simek2016-04-13-12/+120
| | | | | | | This is example how to change u-boot to support more memory banks read from DT. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* block: Add support for Ceva sataMichal Simek2016-04-04-0/+4
| | | | | | | Initial Ceva Sata init code. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* ARM64: zynqmp: Simplify MAINTAINERS file to support more boardsMichal Simek2016-04-04-4/+3
| | | | | | Handle all Xilinx ZynqMP boards with one fragment. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Read RAM information from DTMichal Simek2016-04-04-0/+121
| | | | | | | | | | | | | | | Read information about memory from DT. This patch simplify life with synchronization between DT and board files. dram_init() only needs maximum RAM size below 4GB that's why please sort banks in memory node. dram_init_banksize() copies memory setup to bi_dram[]. This will avoid reading information from DT twice. Memory test start/end were changed to DDR location to let memtest still compiled. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Remove !OF_CONTROL code for timer and interruptMichal Simek2016-04-04-11/+0
| | | | | | OF_CONTROL is enabled by default that's why this is dead code. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM: zynq: Fix default ps7_init_gpl.c/h for ZYBOMichal Simek2016-04-04-244/+1342
| | | | | | | | | There is incorrect setting for USB which didn't work with origin ps7_init_gpl.X files. Use default setting for Digilent Zybo projects with HDMI in PL. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* net: gem: Allow to set the MAC from an EEPROMJoe Hershberger2016-04-04-0/+13
| | | | | | | | | | Provide board specific option how to read MAC address from ROM. Do it in generic way to be reusable by differnet boards. If this is not enough board specific functions can be created. Signed-off-by: Joe Hershberger <joe.hershberger@gmail.com> # driver part Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM: zynq: Read memory size setting from DTMichal Simek2016-02-22-4/+0
| | | | | | | OF_CONTROL is setup by default and memory reading is done via DT. Remove all config files with memory references. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ppc: xilinx-ppc440-generic: Wire LL_TEMAC driverRicardo Ribalda Delgado2016-01-27-0/+26
| | | | | | | | | | | If the xparameters file contains a LL_TEMAC definition compile its driver and the net commands. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* ppc: xilinx_ppc440_generic: Remove uncalled functionsRicardo Ribalda Delgado2016-01-27-5/+0
| | | | | | | | | | | | board_pre_init was not called because CONFIG_BOARD_EARLY_INIT_F was not set. Remove unused function. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* ppc: xilinx_ppc405_generic: Remove uncalled functionsRicardo Ribalda Delgado2016-01-27-5/+0
| | | | | | | | | | | | board_pre_init was not called because CONFIG_BOARD_EARLY_INIT_F was not set. Remove unused function. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* ppc: xilinx_ppc440_generic: Remove weak attributesRicardo Ribalda Delgado2016-01-27-11/+7
| | | | | | | | | | | | | | Now that the specific boards have been removed there is no need to maintain the weak functions. Fix also CamelCase to make checkpatch happy Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* ppc: xilinx_ppc405_generic: Remove weak attributesRicardo Ribalda Delgado2016-01-27-14/+8
| | | | | | | | | | | | | | Now that the specific boards have been removed there is no need to maintain the weak functions. Fix also CamelCase to make checkpatch happy Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* ppc: xilinx-ppc4xx: Port to DM serialRicardo Ribalda Delgado2016-01-27-2/+8
| | | | | | | | | | | xilinx_uartlite has been ported to DM, this patch makes the xilinx-ppc405-generic and the xilinx-ppc440-generic boards use the new DM driver. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* ARM: zynq: zynqmp: Line up checkboard messageMichal Simek2016-01-27-2/+2
| | | | | | | | | Use space instead of tab in checkboard print to aligned it with others boards. Reported-by: David Glessner <david.glessner@rockwellcollins.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
* ARM64: zynqmp: Remove unneeded timer_init functionMichal Simek2016-01-27-5/+0
| | | | | | Empty weak function is used instead. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* ARM64: zynqmp: Fix bootmode SD_MODE1Michal Simek2016-01-27-1/+4
| | | | | | | | | | | | | When only sdhci1 IP is enabled and SD_MODE1 bootmode is selected U-Boot using sdboot1 variable which refers to mmc dev 1. But this device doesn't exist because only one controller is available. This patch fix logic around sdboot mode with using sdbootdev internal variable. Reported-by: Chris Kohn <ckohn@xilinx.com> Acked-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>