summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '2020-08-21-stdio-cleanup'Tom Rini2020-08-23186-305/+444
|\ | | | | | | - Clean up common/stdio.c and migrate some related options to Kconfig
| * stdio: Tidy up the coding styleWIP/2020-08-21-stdio-cleanupSimon Glass2020-08-232-21/+25
| | | | | | | | | | | | Bring the coding style in this file up to the current level. Signed-off-by: Simon Glass <sjg@chromium.org>
| * stdio: Drop brackets around &devs.listSimon Glass2020-08-231-6/+6
| | | | | | | | | | | | These brackets are not needed. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
| * stdio: Update to use compiler for Kconfig checksSimon Glass2020-08-231-89/+83
| | | | | | | | | | | | Drop use of the preprocessor where possible. Signed-off-by: Simon Glass <sjg@chromium.org>
| * stdio: Drop #ifdefs in the header fileSimon Glass2020-08-231-28/+12
| | | | | | | | | | | | | | These prevent the use of IS_ENABLED() and are unnecessary. Drop them and fix a few code-style nits nearby. Signed-off-by: Simon Glass <sjg@chromium.org>
| * stdio: Tidy up use of CONFIG_SYS_DEVICE_NULLDEVSimon Glass2020-08-232-20/+11
| | | | | | | | | | | | | | | | Now that this is in Kconfig we can move the logic at the top of the file to Kconfig, and use if() instead of #if. Update the file with these changes. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Convert CONFIG_SYS_DEVICE_NULLDEV to KconfigSimon Glass2020-08-237-6/+19
| | | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_SYS_DEVICE_NULLDEV Signed-off-by: Simon Glass <sjg@chromium.org>
| * Convert CONFIG_SPLASH_SCREEN et al to KconfigSimon Glass2020-08-23122-118/+234
| | | | | | | | | | | | | | | | | | | | This converts the following to Kconfig: CONFIG_SPLASH_SCREEN CONFIG_SPLASH_SCREEN_ALIGN CONFIG_SPLASHIMAGE_GUARD CONFIG_SPLASH_SOURCE Signed-off-by: Simon Glass <sjg@chromium.org>
| * moveconfig: Skip binary and ELF filesSimon Glass2020-08-231-1/+2
| | | | | | | | | | | | | | Add a few more file extensions to the list of files that should not be processed. This avoids unicode errors, for example. Signed-off-by: Simon Glass <sjg@chromium.org>
| * Convert CONFIG_NETCONSOLE to KconfigTom Rini2020-08-2366-16/+52
|/ | | | | | | This converts the following to Kconfig: CONFIG_NETCONSOLE Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'xilinx-for-v2020.10-rc3' of ↵WIP/20Aug2020Tom Rini2020-08-2057-241/+457
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2020.10-rc3 - Fix fdtfile variable setup - Fix bootm_*/fdt_high/initrd_high variables handling - Fix Kconfig dependencies for Xilinx drivers - Fix booting u-boot from lowest memory - Fix firmware payload argument count for Versal - Fix dfu configurations - Fix mio_bank property handling - Fix and align code around ID detection - Start to use ENV_VARS_UBOOT_RUNTIME_CONFIG - Simplify logic around reading MAC from eeprom - Decrease malloc length for zynqmp mini qspi - Enable preboot for ZynqMP and Versal i2c: - Fix i2c eeprom partitions handling mmc: - Fix logic around HS mode enabling and use proper functions
| * clk: versal: Move pm_query_id out of clock driverMichal Simek2020-08-202-17/+17
| | | | | | | | | | | | | | | | | | There is no reason to have firmware specific structure in clock driver. Move it to generic location and also initialize enum values which is based on https://lore.kernel.org/linux-arm-kernel/20200318125003.GA2727094@kroah.com/ recommended way to go to make sure that values guaranteed by compiler. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * mmc: sdhci: Use upper/lower_32_bits macrosMichal Simek2020-08-201-4/+4
| | | | | | | | | | | | | | Instead of recasting and shifting use macros which are designed for taking upper/lower 32bit value from 64bit variable. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * mmc: sdhci: Enable high speed conditional on the corresponding bitFaiz Abbas2020-08-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | The capabilities register has a field to indicate whether the host supports high speed mode or not. Add high speed host_caps based on this bit instead of enabling it by default. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Michal Simek <michal.simek@xilnx.com> Tested-by: Michal Simek <michal.simek@xilnx.com> (zcu104 with sdhci-caps-mask = <0 0x200000>;)
| * 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: common: Get rid of fdt_high variableMichal Simek2020-08-203-3/+0
| | | | | | | | | | | | | | | | There is no need to setup this variable if bootm_low and bootm_size variable are properly setup. If fdt_high variable is missing U-Boot is asking LMB to return free memory which is not used. 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: Add support for ENV_VARS_UBOOT_RUNTIME_CONFIGMichal Simek2020-08-204-0/+18
| | | | | | | | | | | | | | 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>
| * xilinx: versal: Enable i2c misc eeprom driverMichal Simek2020-08-201-0/+3
| | | | | | | | | | | | Enable this driver to be able to work with i2c based eeproms on Versal. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: zynqmp: fix incorrect map not align with IPI HWIbai Erkiaga2020-08-201-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Current IPI module register description is not align with IPI HW. The registers with the wrong offset are not used so it does not cause real issues. This patch aligns the register description. Additionally comments added to explain why recv function does not check any flag prior copying rx data. Fixes: 660b0c77d816 ("mailbox: zynqmp: ipi mailbox driver") Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: zynqmp: remove chip_id functionIbai Erkiaga2020-08-202-38/+20
| | | | | | | | | | | | | | | | | | 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>
| * xilinx: zynqmp: get chip ID at EL3Ibai Erkiaga2020-08-201-6/+4
| | | | | | | | | | | | | | | | 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>
| * xilinx: zynqmp: get chip ID using firmware driverIbai Erkiaga2020-08-201-52/+27
| | | | | | | | | | | | | | | | | | 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>
| * xilinx: zynqmp: merge firmware calls for EL2 and EL3Ibai Erkiaga2020-08-201-41/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch merges ZynqMP firmware calls under xilinx_pm_request in order to make trainsparent the EL. Calls at EL3 are send through IPI messages and EL2 through SMC calls. The EL2 call uses fixed payload and arg size as the EL3 call. The firmware is capable to handle PMUFW_PAYLOAD_ARG_CNT bytes but the firmware API is limited by the SMC call size. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: zynqmp: synchronize firmware call return payloadIbai Erkiaga2020-08-205-6/+11
| | | | | | | | | | | | | | | | | | 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>
| * mmc: zynq: Fix default value for xlnx,mio-bankMichal Simek2020-08-201-1/+1
| | | | | | | | | | | | | | | | DT binding is saying that default value is 0 not -1 that's why fix it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Peng Fan <peng.fan@nxp.com>
| * xilinx: Fix xlnx,mio_bank propertyMichal Simek2020-08-2023-30/+30
| | | | | | | | | | | | | | | | | | | | | | s/xlnx,mio_bank/xlnx,mio-bank/g DT binding is describing mio-bank not mio_bank that's why fix all DTSes and also driver itself. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Peng Fan <peng.fan@nxp.com>
| * i2c: eeprom: Use reg property instead of offset and sizeMichal Simek2020-08-206-18/+41
| | | | | | | | | | | | | | | | Remove adhoc dt binding for fixed-partition definition for i2c eeprom. fixed-partition are using reg property instead of offset/size pair. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * xilinx: zynqmp: Enable DFU tftp supportMichal Simek2020-08-202-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable DFU tftp support for firmware update. Fill dfu_ram_tftp variable to have command present for showing how to use it. boot FIT image has been created from below fragment. Key part is that type of image has to be firmware. Also based on experiment load property is completely ignored and base addresses are taken from dfu_alt_info variable. $ cat update_uboot.its /dts-v1/; / { description = "Automatic U-Boot update"; #address-cells = <1>; images { Image { description = "Kernel"; data = /incbin/("/tftpboot/Image"); compression = "none"; arch = "arm64"; type = "firmware"; os = "linux"; load = <0x80000>; entry = <0x80000>; hash-1 { algo = "sha1"; }; }; system.dtb { description = "DTB"; data = /incbin/("/tftpboot/system.dtb"); compression = "none"; arch = "arm64"; type = "firmware"; load = <0>; hash-1 { algo = "sha1"; }; }; }; }; $ mkimage -f update_uboot.its /tftpboot/boot When U-Boot starts get IP address and server IP. dhcp setenv serverip 192.168.0.105 And then run prepared command. run dfu_ram_tftp Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: Align dfu ram with booti commandMichal Simek2020-08-202-3/+5
| | | | | | | | | | | | | | | | Image should be loaded to 0x80000 address and not to $kernel_addr_r. Also kernel_addr, fdt_addr and fdt_size in zynqmp case are not defined that's why define it to be aligned with Versal. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm64: zynqmp: Reduce malloc memory for mini QSPI configurationAshok Reddy Soma2020-08-201-1/+1
| | | | | | | | | | | | | | | | Mini U-boot runs on lower foot print of 256KB OCM. Hence 8K memory for malloc may not be required. Reduce it by 1.5K. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: versal: Use lowest memory for U-BootMichal Simek2020-08-201-1/+1
| | | | | | | | | | | | | | 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>
| * lib: fdt: Convert fdtdes_setup_mem..() to livetree APIMichal Simek2020-08-201-32/+35
| | | | | | | | | | | | | | | | | | | | | | Convert fdtdec_setup_mem_size_base(), get_next_memory_node(), fdtdec_setup_memory_banksize() and fdtdec_setup_mem_size_base_lowest() to livetree API. Tested on ZynqMP zcu104 board. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * lib: fdt: Introduce fdtdec_setup_mem_size_base_lowest()Michal Simek2020-08-202-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New function should be called from board dram_init() because it initialized gd->ram_base/ram_size. It finds the lowest available memory. On systems with multiple memory nodes finding out the first memory node by fdtdec_setup_mem_size_base() is not enough because this memory can be above actual U-Boot VA mapping. Currently only mapping till 39bit is supported (Full 44bit mapping was removed by commit 7985cdf74b28 ("arm64: Remove non-full-va map code")). If DT starts with the first memory node above 39bit address then system can be unpredictable. The function is available only when multiple memory bank support is enabled. Calling fdtdec_setup_memory_banksize() from dram_init() is not possible because fdtdec_setup_memory_banksize() is saving dram information to bd structure which is placed on stack but not initialized at this time. Also stack is placed at location setup in dram_init(). Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * versal: fix versal PM ret payload sizeIbai Erkiaga2020-08-201-1/+1
| | | | | | | | | | | | | | | | | | The PM return payload size is defined as 4 bytes for Versal arquitecture while the PM calls implemented both in the Versal clock driver and ZynqMP firmware driver expects 5 bytes length. Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: versal: Add new versal loadpdi commandT Karthik Reddy2020-08-204-0/+121
| | | | | | | | | | | | | | | | 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>
| * arm64: zynqmp: Fix set_fdtfile() not to break u-boots DTBIgor Lantsman2020-08-201-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * xilinx: Enable preboot feature for ZynqMP and VersalMichal Simek2020-08-202-0/+2
| | | | | | | | | | | | Enable preboot functionality for ZynqMP and Versal platforms. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: kconfig: Change Kconfig dependencies for Xilinx driversMichal Simek2020-08-204-7/+6
| | | | | | | | | | | | | | | | | | Zynq/ZynqMP/Versal IPs should be possible to called also from Microblaze in PL and vice versa. That's why change dependencies and do not limit enabling just for some platforms. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
| * 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>
* | Merge branch '2020-08-19-mediatek-updates'Tom Rini2020-08-2013-7/+1177
|\ \ | |/ |/| | | - Assorted updates for MediaTek platforms
| * dts: r64: add sata- and asm_sel nodesWIP/2020-08-19-mediatek-updatesFrank Wunderlich2020-08-192-0/+41
| | | | | | | | | | | | | | | | | | | | | | asm_sel is for switching between sata and pcie mode on r64 there is GPIO90 connected to ASM1480 which switches RX/TX pairs to PCIe/SATA connector output-low means sata-controller is active with 2020-10 now reg is also needed for the phy itself Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
| * ahci: mediatek: add ahci driverFrank Wunderlich2020-08-193-0/+139
| | | | | | | | | | | | | | | | add AHCI driver ported from linux https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ata/ahci_mtk.c Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
| * reset: add basic reset controller for pciesysFrank Wunderlich2020-08-191-0/+15
| | | | | | | | | | | | bind reset controller to pciesys Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
| * phy: mtk-tphy: add PHY_TYPE_SATAFrank Wunderlich2020-08-191-0/+105
| | | | | | | | | | | | | | add support for PHY_TYPE_SATA to Mediateks TPHY driver Signed-off-by: Frank Wunderlich <frank-w@public-files.de> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
| * arm: dts: mt7622: add SATA reset constantsFrank Wunderlich2020-08-191-1/+4
| | | | | | | | | | | | add reset constants used for SATA to header file Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
| * arm: dts: mt7622: add PCIe nodes for BananaPi-R64Frank Wunderlich2020-08-191-0/+31
| | | | | | | | | | | | | | | | this patch adds PCIe-Nodes for BananaPi R64 original nodes from Chuanjia Liu for mt7622-rfb Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
| * dts: r64: add r64 dtsFrank Wunderlich2020-08-192-0/+207
| | | | | | | | | | | | add a separate DTS for BananaPi R64 because it has 1GB RAM and SATA-Support Signed-off-by: Frank Wunderlich <frank-w@public-files.de>