project/bcm63xx/u-boot.git
6 years agorockchip: dts: rk3399-evb: support boot from sd-card
Kever Yang [Wed, 20 Dec 2017 02:40:40 +0000 (10:40 +0800)]
rockchip: dts: rk3399-evb: support boot from sd-card

Enable sdmmc node in SPL and add it to boot order.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Fixed commit tags:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: rk3399-puma: reduce env size to 8kiB
Jakob Unterwurzacher [Thu, 21 Dec 2017 10:03:01 +0000 (11:03 +0100)]
rockchip: rk3399-puma: reduce env size to 8kiB

This commit changes the size of the enviroment (for the RK3399-Q7) to
8kiB for all possible locations of the environment (i.e. even when the
environment is saved to SD card).

With the default of 32kiB, the environment overwrites the SPL
stage which lives at 16kiB.

Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[Reworked commit-message:]
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoMerge git://git.denx.de/u-boot-imx
Tom Rini [Fri, 29 Dec 2017 14:27:04 +0000 (09:27 -0500)]
Merge git://git.denx.de/u-boot-imx

6 years agoarm: imx: add tzic interrupt controller for imx53
Patrick Bruenn [Mon, 11 Dec 2017 12:09:14 +0000 (13:09 +0100)]
arm: imx: add tzic interrupt controller for imx53

Since commit 999a78d5cf00 ("scripts/dtc: Update to upstream version v1.4.5-3-gb1a60033c110")
dtc warns about:
arch/arm/dts/imx53-cx9020.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/aips@50000000/serial@53fc0000
arch/arm/dts/imx53-cx9020.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/aips@50000000/ccm@53fd4000
arch/arm/dts/imx53-cx9020.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/aips@50000000/gpio@53fe4000
arch/arm/dts/imx53-cx9020.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/aips@60000000/sdma@63fb0000
arch/arm/dts/imx53-cx9020.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/aips@60000000/ethernet@63fec000

Fix this by adding a node for the tzic interrupt controller.
Copied from "<Linux>/arch/arm/boot/dts/imx53.dts"

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoARM: imx6: Disable DDR DRAM calibration DHCOM i.MX6 PDK
Marek Vasut [Mon, 11 Dec 2017 15:19:33 +0000 (16:19 +0100)]
ARM: imx6: Disable DDR DRAM calibration DHCOM i.MX6 PDK

The DDR DRAM calibration doesn't work on T-topology sometimes, so disable it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
6 years agoimx: Fix missing spl_sd configuration for wandboard.
Vagrant Cascadian [Thu, 7 Dec 2017 00:31:50 +0000 (16:31 -0800)]
imx: Fix missing spl_sd configuration for wandboard.

In commit 6e6cf015e7cdd7ca83a933320a81201972bd5e5e ("Merge
git://www.denx.de/git/u-boot-imx") the line defining spl_sd
configuration for wandboard was removed, which resulted in no SPL
target being built.

Add it back.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: Kconfig: Add HAS_CAAM option
Breno Lima [Mon, 27 Nov 2017 23:09:00 +0000 (21:09 -0200)]
imx: Kconfig: Add HAS_CAAM option

Currently CONFIG_SECURE_BOOT is selecting FSL_CAAM for all i.MX devices,
this causes the following error when building mx6sl boards since
this SoC doesn't have the CAAM block:

In file included from drivers/crypto/fsl/jobdesc.c:12:0:
drivers/crypto/fsl/jobdesc.c: In function 'inline_cnstr_jobdesc_blob_dek':
include/fsl_sec.h:268:25: error: 'CAAM_ARB_BASE_ADDR' undeclared (first use
in this function)
 #define SEC_MEM_PAGE1  (CAAM_ARB_BASE_ADDR + 0x1000)
                         ^
drivers/crypto/fsl/jobdesc.c:140:21: note: in expansion of macro 'SEC_MEM_PAGE1'
  memcpy((uint32_t *)SEC_MEM_PAGE1, (uint32_t *)plain_txt, in_sz);
                     ^
include/fsl_sec.h:268:25: note: each undeclared identifier is reported only
once for each function it appears in
 #define SEC_MEM_PAGE1  (CAAM_ARB_BASE_ADDR + 0x1000)
                         ^
drivers/crypto/fsl/jobdesc.c:140:21: note: in expansion of macro 'SEC_MEM_PAGE1'
  memcpy((uint32_t *)SEC_MEM_PAGE1, (uint32_t *)plain_txt, in_sz);
                     ^
scripts/Makefile.build:280: recipe for target 'drivers/crypto/fsl/jobdesc.o'
failed
make[3]: *** [drivers/crypto/fsl/jobdesc.o] Error 1
scripts/Makefile.build:425: recipe for target 'drivers/crypto/fsl' failed
make[2]: *** [drivers/crypto/fsl] Error 2
scripts/Makefile.build:425: recipe for target 'drivers/crypto' failed
make[1]: *** [drivers/crypto] Error 2

Add HAS_CAAM configuration to avoid this error.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoKconfig: mx6ull: Deselect MX6UL from CONFIG_MX6ULL
Breno Lima [Mon, 27 Nov 2017 23:07:40 +0000 (21:07 -0200)]
Kconfig: mx6ull: Deselect MX6UL from CONFIG_MX6ULL

MX6UL contains features that MX6ULL doesn't support.
Deselect CONFIG_MX6UL and select SYS_L2CACHE_OFF and ROM_UNIFIED_SECTIONS.

The motivation for doing this change is that MX6UL supports CAAM and
MX6ULL does not.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6sl: Select MX6SL option via Kconfig
Breno Lima [Mon, 27 Nov 2017 23:06:01 +0000 (21:06 -0200)]
mx6sl: Select MX6SL option via Kconfig

Currently the MX6SL option is selected via CONFIG_SYS_EXTRA_OPTIONS,
but it is better to select it directly via Kconfig.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
6 years agowarp: imximage.cfg: Handle the CONFIG_SECURE_BOOT case
Breno Lima [Mon, 27 Nov 2017 23:04:11 +0000 (21:04 -0200)]
warp: imximage.cfg: Handle the CONFIG_SECURE_BOOT case

Secure boot is not enabled in warp imximage.cfg, add support for it.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agomx6slevk: imximage.cfg: Handle the CONFIG_SECURE_BOOT case
Breno Lima [Mon, 27 Nov 2017 23:02:43 +0000 (21:02 -0200)]
mx6slevk: imximage.cfg: Handle the CONFIG_SECURE_BOOT case

Secure boot is not enabled in mx6slevk imximage.cfg, add support for it.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
6 years agomx6sxsabresd: Load the correct dtb for revA board
Fabio Estevam [Mon, 27 Nov 2017 12:25:10 +0000 (10:25 -0200)]
mx6sxsabresd: Load the correct dtb for revA board

Currently only imx6sx-sdb.dtb is loaded, but if revA board is used the
correct dtb is imx6sx-sdb-reva.dtb, so make this possible.

While at it, remove an extra 'mmc dev'.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: Add a common way for detecting NXP boards revision
Fabio Estevam [Mon, 27 Nov 2017 12:25:09 +0000 (10:25 -0200)]
imx: Add a common way for detecting NXP boards revision

NXP development boards based on i.MX6/i.MX7 contain the board
revision information stored in the fuses.

Introduce a common function that can be shared by different boards and
convert mx6sabreauto to use this new mechanism.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoARM: imx: display5: config: Update display5_factory_defconfig to use USE_BOOTCOMMAND
Lukasz Majewski [Mon, 27 Nov 2017 11:29:18 +0000 (12:29 +0100)]
ARM: imx: display5: config: Update display5_factory_defconfig to use USE_BOOTCOMMAND

This commit switch display5_factory_defconfig to use new, generic
USE_BOOTCOMMAND Kconfig option.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
6 years agopower: pmic.h: include dm/ofnode.h
Peng Fan [Mon, 4 Dec 2017 04:31:20 +0000 (12:31 +0800)]
power: pmic.h: include dm/ofnode.h

Include dm/ofnode.h.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoARM: imx: cm_fx6: remove esdhc init code from board file
Christopher Spinrath [Thu, 30 Nov 2017 21:38:40 +0000 (22:38 +0100)]
ARM: imx: cm_fx6: remove esdhc init code from board file

Commit 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support")
enabled driver model support for MMC. Remove the old mmc init code, which
is no longer used, from the board file.

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: imx: cm_fx6: remove sata init code from board file
Christopher Spinrath [Thu, 30 Nov 2017 21:38:39 +0000 (22:38 +0100)]
ARM: imx: cm_fx6: remove sata init code from board file

Commit 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support")
enabled driver model support for AHCI. Remove the old, now unused, sata
init code from the board file.

Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: imx: cm_fx6: defconfig: enable CONFIG_DM_KEYBOARD
Christopher Spinrath [Thu, 30 Nov 2017 21:38:38 +0000 (22:38 +0100)]
ARM: imx: cm_fx6: defconfig: enable CONFIG_DM_KEYBOARD

Commit 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support")
enabled driver model support for USB. But it missed to enable driver
model support for keyboards. As a result, USB keyboards do no longer
work.

Fix this by enabling driver model support for keyboards.

Fixes: 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support")
Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoARM: imx: cm-fx6: reinstate USB support by syncing the devicetree with Linux
Christopher Spinrath [Thu, 30 Nov 2017 21:38:37 +0000 (22:38 +0100)]
ARM: imx: cm-fx6: reinstate USB support by syncing the devicetree with Linux

Commit 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support")
enabled driver model support for USB, thereby effectively removing USB
support because the cm_fx6 devicetree in the U-Boot does *not* enable the
USB nodes.

Reinstate the USB support by syncing the devicetree with Linux whose
devicetree enables the USB nodes properly.

More precisely, use the devicetree found in Linux v4.15-rc1 with the
following two changes:
  1) Remove the audio mux; the required dt-bindings header is not
     present in the U-Boot.
  2) Keep the usdhc3 MMC controller node currently present in the
     U-Boot's devicetree to retain the ability to boot from MMC.

Fixes: 5248930ebf48 ("dm: imx: cm_fx6: Enable more driver model support")
Signed-off-by: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoboard: ge: mx53ppd: Move check_time() to common location
Martyn Welch [Wed, 8 Nov 2017 15:59:35 +0000 (15:59 +0000)]
board: ge: mx53ppd: Move check_time() to common location

We are going to be using check_time() on more than the mx53ppd, move this
function to a common location.

Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
6 years agomx6_common: remove dead code
Adam Ford [Sat, 25 Nov 2017 19:39:09 +0000 (13:39 -0600)]
mx6_common: remove dead code

There is an #ifdef and #endif with nothing in between.  This patch simply
removes this dead/useless code.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agoimx: Unify CONFIG_BOOTDELAY
Fabio Estevam [Mon, 20 Nov 2017 13:54:33 +0000 (11:54 -0200)]
imx: Unify CONFIG_BOOTDELAY

In order to provide a consistent user experience for imx board users,
remove the custom CONFIG_BOOTDELAY values from defconfig files, so that
all boards can use the default two second delay.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Wed, 27 Dec 2017 13:17:05 +0000 (08:17 -0500)]
Merge git://git.denx.de/u-boot-dm

6 years agoMove CONFIG_PANIC_HANG to Kconfig
Masahiro Yamada [Mon, 4 Dec 2017 03:37:00 +0000 (12:37 +0900)]
Move CONFIG_PANIC_HANG to Kconfig

Freescale (NXP) boards have lots of defconfig files per board.
I used "imply PANIC_HANG" for them.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoboards: ls1046ardb: disable unavailable "ethernet" node in dts
Prabhakar Kushwaha [Thu, 23 Nov 2017 11:21:48 +0000 (16:51 +0530)]
boards: ls1046ardb: disable unavailable "ethernet" node in dts

Linux device tree contains "ethernet" node for all possible
interface supported by SoC i.e. LS1046A.

It is not necessary for a SerDes protocol to support all possible
interface. So disable unavailable "ethernet" node in device tree.

Also, enable FDT_SEQ_MACADDR_FROM_ENV to fetch MAC address
sequentially from environment variables

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarm: Add support of updating dts before fix-up
Prabhakar Kushwaha [Thu, 23 Nov 2017 11:21:41 +0000 (16:51 +0530)]
arm: Add support of updating dts before fix-up

"ethernet" node fix-up for device tree happens before Linux boot.

There can be requirement of updating "ethernet" node even before
fix-up. So, add support of updating "ethernet" node.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agocommon: Fix-up MAC addr in dts by fetching env variable serially
Prabhakar Kushwaha [Thu, 23 Nov 2017 11:21:32 +0000 (16:51 +0530)]
common: Fix-up MAC addr in dts by fetching env variable serially

The MAC addresses get fixed in the device tree for "ethernet" nodes
is by using trailing number behind "ethernet" found in "/aliases".
It may not be necessary for the "ethernet" nodes to be sequential.
There can be gaps in between or any node disabled

So provide a support to fetch MAC addr sequentially from env
and apply them to "ethernet" nodes in the order they appear in
device tree only if "ethernet" is not "disabled"

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Thu, 21 Dec 2017 14:54:10 +0000 (09:54 -0500)]
Merge git://git.denx.de/u-boot-x86

6 years agox86: tangier: Use official ACPI HID for FLIS IP
Andy Shevchenko [Tue, 12 Dec 2017 17:02:42 +0000 (19:02 +0200)]
x86: tangier: Use official ACPI HID for FLIS IP

FLIS IP since now gets its own ACPI ID.
Drop PRP0001 workaround in favour of official ACPI HID.

Corresponding kernel commit dabd4bc6de2b

pinctrl: intel: merrifield: Introduce ACPI device table

in the pin control subsystem tree [1] targeting v4.16.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?h=for-next&id=dabd4bc6de2b

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
6 years agoMerge git://git.denx.de/u-boot-spi
Tom Rini [Tue, 19 Dec 2017 12:57:40 +0000 (07:57 -0500)]
Merge git://git.denx.de/u-boot-spi

6 years agoMerge git://git.denx.de/u-boot-sunxi
Tom Rini [Tue, 19 Dec 2017 12:57:33 +0000 (07:57 -0500)]
Merge git://git.denx.de/u-boot-sunxi

6 years agoefi_loader: Setup logical_partition media information
Emmanuel Vadot [Mon, 11 Dec 2017 18:22:33 +0000 (19:22 +0100)]
efi_loader: Setup logical_partition media information

When adding a partition, set the logical_partition member in the media
structure as mandated by the UEFI spec.

Signed-off-by: Emmanuel Vadot <manu@freebsd.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agomtd/spi: fix block count for is25lq040b
Sean Nyekjaer [Fri, 15 Dec 2017 07:51:54 +0000 (08:51 +0100)]
mtd/spi: fix block count for is25lq040b

This spi-nor is 4Mbit/512KB

Fixes: b4fbcbc5a5 ("mtd/spi: add support for is25lq040b")
Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agoarm64: dts: sun50i: h5: Order nodes in alphabetic for orangepi-prime
Jagan Teki [Wed, 29 Nov 2017 07:44:23 +0000 (13:14 +0530)]
arm64: dts: sun50i: h5: Order nodes in alphabetic for orangepi-prime

Order sun50i-h5-orangepi-prime.dts nodes in alphabetic

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoconfigs: sunxi: Drop FASTBOOT_FLASH
Jagan Teki [Fri, 8 Dec 2017 11:33:17 +0000 (17:03 +0530)]
configs: sunxi: Drop FASTBOOT_FLASH

Now FASTBOOT_FLASH is auto select for sunxi platform,
so drop explicit addition.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agosunxi: arm64: Increase CONFIG_SYS_BOOTM_LEN to 32MB
Jagan Teki [Fri, 10 Nov 2017 16:51:09 +0000 (22:21 +0530)]
sunxi: arm64: Increase CONFIG_SYS_BOOTM_LEN to 32MB

The default value of CONFIG_SYS_BOOTM_LEN, 0x800000, causes error
when uncompressing Image.gz out of FIT image.

  Uncompressing Kernel Image ... Error: inflate() returned -5
Image too large: increase CONFIG_SYS_BOOTM_LEN

and loading Image out of FIT image.
   Loading Kernel Image ... Image too large: increase CONFIG_SYS_BOOTM_LEN
Must RESET board to recover

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoPrepare v2018.01-rc2
Tom Rini [Tue, 19 Dec 2017 01:55:17 +0000 (20:55 -0500)]
Prepare v2018.01-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 19 Dec 2017 01:19:09 +0000 (20:19 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Mon, 18 Dec 2017 23:39:18 +0000 (18:39 -0500)]
Merge git://git.denx.de/u-boot-rockchip

6 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Mon, 18 Dec 2017 23:39:00 +0000 (18:39 -0500)]
Merge git://git.denx.de/u-boot-fsl-qoriq

6 years agocommon: image.c: Fix CACHE: Misaligned operation output
Heiko Schocher [Thu, 14 Dec 2017 10:19:22 +0000 (11:19 +0100)]
common: image.c: Fix CACHE: Misaligned operation output

When booting a itb file with a Ramdisk on a imx6 based
board, U-Boot drops the warning:

Loading Kernel Image ... OK
Loading Ramdisk to 4ecf1000, end 4ef8b11f ... \
CACHE: Misaligned operation at range [4ecf1000,  4ef8b11f]

Fix it!

Signed-off-by: Heiko Schocher <hs@denx.de>
Tested-by: Ayoub Zaki <hs@denx.de>
6 years agoam335x_evm: Fix DFU for eMMC
Sam Protsenko [Tue, 12 Dec 2017 18:07:41 +0000 (20:07 +0200)]
am335x_evm: Fix DFU for eMMC

Use dfu_alt_info_emmc variable from include/environment/ti/dfu.h file.
It was probably overlooked when extracting DFU variables to mentioned
file.

This patch fixes DFU on BeagleBone Black, so that we can use commands
like ones below to upgrade various images on eMMC:

    => setenv dfu_alt_info $dfu_alt_info_emmc
    => dfu 0 mmc 1

    $ dfu-util -D MLO -a MLO.raw
    $ dfu-util -D u-boot.img -a u-boot.img.raw

Without this patch, the  user is forced to assign the value to
dfu_alt_info_emmc manually, which contradicts with instructions [1].

[1] http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
6 years agonet: phy: meson-gxl: detect LPA corruption
Jerome Brunet [Tue, 12 Dec 2017 15:03:55 +0000 (16:03 +0100)]
net: phy: meson-gxl: detect LPA corruption

This patch is ported from the Linux patch posted at [1] and applied to
net tree as commit f1e2400a80ff.

The purpose of this change is to fix the incorrect detection of the link
partner (LP) advertised capabilities which sometimes happens with this PHY
(roughly 1 time in a dozen)

This issue may cause the link to be negotiated at 10Mbps/Full or
10Mbps/Half when 100MBps/Full is actually possible. In some case, the link
is even completely broken and no communication is possible.

To detect the corruption, we must look for a magic undocumented bit in the
WOL bank (hint given by the SoC vendor kernel) but this is not enough to
cover all cases. We also have to look at the LPA ack. If the LP supports
Aneg but did not ack our base code when aneg is completed, we assume
something went wrong.

The detection of a corrupted LPA triggers a restart of the aneg process.
This solves the problem but may take up to 6 retries to complete.

[1] https://lkml.kernel.org/r/20171208110811.30789-1-jbrunet@baylibre.com

Fixes: 8995a96d1d67 ("net: phy: Add Amlogic Meson GXL Internal PHY support")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoARM: arch-meson: fix writel arguments order
Hans Verkuil [Tue, 12 Dec 2017 13:23:39 +0000 (14:23 +0100)]
ARM: arch-meson: fix writel arguments order

Using writel causes a "Synchronous Abort". Invert the arguments.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoMerge tag 'xilinx-for-v2018.01-rc2-v2' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Mon, 18 Dec 2017 17:23:27 +0000 (12:23 -0500)]
Merge tag 'xilinx-for-v2018.01-rc2-v2' of git://denx.de/git/u-boot-microblaze

Xilinx changes for v2018.01-rc2-v2

fpga:
- Enable loading bitstream via fit image for !xilinx platforms

zynq:
- Fix SPL SD boot mode

zynqmp:
- Not not reset in panic
- Do not use simple allocator because of fat changes
- Various dt chagnes
- modeboot variable setup
- Fix fpga loading on automotive devices
- Fix coverity issues

test:
- Fix env test for !hush case - Stephen's patch

6 years agoarmv8: ls1046aqds: Adjust IFC timing for NOR flash
York Sun [Mon, 11 Dec 2017 16:39:05 +0000 (08:39 -0800)]
armv8: ls1046aqds: Adjust IFC timing for NOR flash

Increase setup, assertion and hold time related to chip-select signal.
Additional delay is needed for the signal to propogate through FPGA.
This adjustment slightly increase the read and write cycle but has no
impact on burst read or write.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls2085a: Update README file for NAND boot
York Sun [Thu, 7 Dec 2017 22:37:40 +0000 (14:37 -0800)]
armv8: ls2085a: Update README file for NAND boot

Update README file to note LS2088A and LS1088A don't support booting
from NAND flash.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls2080a: Increase load image len for NAND boot
York Sun [Mon, 18 Dec 2017 16:24:55 +0000 (08:24 -0800)]
armv8: ls2080a: Increase load image len for NAND boot

Again the image size increases and the length needs to be adjusted.

Signed-off-by: York Sun <york.sun@nxp.com>
6 years agorockchip: add a common script for generate fit its
Kever Yang [Fri, 15 Dec 2017 03:15:03 +0000 (11:15 +0800)]
rockchip: add a common script for generate fit its

Rockchip release bl31.elf file for armv8 SoCs like rk3399, rk3328,
the elf have more than one section, we need to decode it first and
packed them into u-boot.itb with its file. This script is to generate
the its script.
Need default bl31.elf in root directory of U-Boot source and dtb
as parameter.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: firefly-rk3399: add FIT for rk3399
Kever Yang [Fri, 15 Dec 2017 03:15:04 +0000 (11:15 +0800)]
rockchip: firefly-rk3399: add FIT for rk3399

Enable SPL_FIT_GENERATOR with path for it.
With this patch you can get u-boot.itb for rk3399-firefly with:
> make u-boot.itb

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Tested-by: Mark Kettenis <kettenis@openbsd.org>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: evb-rk3399: update document for board bring up
Kever Yang [Fri, 15 Dec 2017 03:15:05 +0000 (11:15 +0800)]
rockchip: evb-rk3399: update document for board bring up

Since we support ATF in SPL and add script for it, let's make the
document up to date.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: update ROCKCHIP_SPL_RESERVE_IRAM to 0
Kever Yang [Mon, 18 Dec 2017 07:13:19 +0000 (15:13 +0800)]
rockchip: update ROCKCHIP_SPL_RESERVE_IRAM to 0

Only rk3399 atf need ROCKCHIP_SPL_RESERVE_IRAM. This commit updates
its default setting to 0 so that other SoCs do not need to define it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: update boot0 hook
Kever Yang [Mon, 18 Dec 2017 07:05:41 +0000 (15:05 +0800)]
rockchip: update boot0 hook

Rockchip SoCs only need boot0 hook at SPL, and the U-Boot proper do not
need it.

The very beginning of U-Boot proper is different between armv7 and armv8:
armv7 start with ARM_VECTORS while armv8 start with 'b reset'.

Here is the map of very beginning for all cases:
armv7 SPL: TAG(overwrite 'b 1f')+'b reset' + ARM_VECTORS
armv7 U-Boot: ARM_VECTORS
armv8 SPL: TAG(overwrite 'b 1f')+'b reset' + Reserved_iram(rk3399)
armv8 U-Boot: 'b reset'

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agotest/py: Setup variables based on HUSH selection
Stephen Warren [Fri, 10 Nov 2017 10:59:15 +0000 (11:59 +0100)]
test/py: Setup variables based on HUSH selection

After adding our small zynq uboot which has hush parser off same
variable tests start to failed. Use quotes only when hush is enabled.

Reported-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
6 years agoarm64: zynqmp: Access timestamp_ref_ctrl register only if running in el3
Siva Durga Prasad Paladugu [Thu, 7 Dec 2017 09:35:30 +0000 (15:05 +0530)]
arm64: zynqmp: Access timestamp_ref_ctrl register only if running in el3

Access the timestamp ref ctrl register only if runinng
at el3 level otherwise just return. This change fixes
the issue when CRL APB is marked as secure and accessing
when not in el3 causes exception.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agotools: zynqmpimage: Check return values from file functions
Michal Simek [Tue, 5 Dec 2017 14:42:25 +0000 (15:42 +0100)]
tools: zynqmpimage: Check return values from file functions

Check all return values from file functions.
In case of negative return exit immediately.
Also change fsize return value which can't be negative.

Reported-by: Coverity (CID: 23276, 23304, 169357)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Dont use 4K sector erase by default for spi-flashes
Siva Durga Prasad Paladugu [Tue, 31 Jan 2017 05:14:06 +0000 (10:44 +0530)]
arm64: zynqmp: Dont use 4K sector erase by default for spi-flashes

Dont use 4K sector erase by default, Disabling this
would use 64K sector erase and decreases erase time.
Also disabled by the fact that UBIFS and JFFS2 won't work
with 4K sector erase.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable spi flashes
Michal Simek [Fri, 8 Dec 2017 14:18:05 +0000 (15:18 +0100)]
arm64: zynqmp: Enable spi flashes

Enabling all spi flashes because some of these boards can have different
flashes compared to public version.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agorockchip: move CONFIG_ENV_SIZE and CONFIG_ENV_OFFSET to Kconfig
Klaus Goger [Mon, 11 Dec 2017 16:56:08 +0000 (17:56 +0100)]
rockchip: move CONFIG_ENV_SIZE and CONFIG_ENV_OFFSET to Kconfig

This commit adds ENV_SIZE and ENV_OFFSET configuration items for
ARCH_ROCKCHIP, but keeps these non-visible (i.e. not prompt is given).
With these new items present, the configuration from the header files
is moved to Kconfig.

Keeping these non-visible is necessary to have the possibility to
select new default values if CONFIG_IS_IN_* is changed (interactively
or with oldconfig). Otherwise it will always be set to a previous
value if used with a prompt.  As an example if we do a defconfig with
CONFIG_IS_IN_MMC and change it to CONFIG_IS_IN_SPI_FLASH via
menuconfig, ENV_SIZE and ENV_OFFSET will not be changed to the correct
values as defconfig will already have set them to the default values
of CONFIG_IS_IN_MMC in .config.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoMerge tag 'signed-efi-v2018.01' of git://github.com/agraf/u-boot
Tom Rini [Sun, 17 Dec 2017 20:37:29 +0000 (15:37 -0500)]
Merge tag 'signed-efi-v2018.01' of git://github.com/agraf/u-boot

Patch queue for efi - 2017-12-17

A few fixes for 2018.01:

  - Compile fix with helloworld example
  - DP match fix (fixes FreeBSD loader and grub on block storage)
  - More DP fixes for SD, block
  - Fix use-after-free

6 years agorockchip: rk3399-puma: set gpio4cd iodomain to 1.8V
Jakob Unterwurzacher [Fri, 15 Dec 2017 15:23:14 +0000 (16:23 +0100)]
rockchip: rk3399-puma: set gpio4cd iodomain to 1.8V

The PCIe reset signal is connected to GPIO4_C6 on the Puma
module. This pin is supplied by 1.8V, but the default iodomain
setting is 3.0V and in this situation the pin is unable to go
high.

Linux assumes that this signal works in early boot
as PCIe is probed before loading the iodomain driver.

Make PCIe work in Linux by setting the gpio4cd iodomain to 1.8V.

Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: config: update part table
Kever Yang [Tue, 31 Oct 2017 08:52:23 +0000 (16:52 +0800)]
rockchip: config: update part table

User do not need to access the reserved part in system, remove them
from partition table.
Rename atf to trust as generic name for armv7 do not use ATF.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agoefi_loader: comments for dp_part_fill()
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:42 +0000 (12:56 +0100)]
efi_loader: comments for dp_part_fill()

Add a description for dp_part_fill().
Reword a comment in the function.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: correct DeviceNodeToText for media types
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:41 +0000 (12:56 +0100)]
efi_loader: correct DeviceNodeToText for media types

When converting device nodes and paths to text we should
stick to the UEFI spec.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: correctly setup device paths for block devices
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:40 +0000 (12:56 +0100)]
efi_loader: correctly setup device paths for block devices

According to the UEFI spec the numbering of partitions has to
start with 1.

Partion number 0 is reserved for the optional device path for
the complete block device.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: correctly determine if an MMC device is an SD-card
Heinrich Schuchardt [Mon, 11 Dec 2017 11:56:39 +0000 (12:56 +0100)]
efi_loader: correctly determine if an MMC device is an SD-card

The SD cards and eMMC devices have different device nodes.
The current coding interpretes all MMC devices as eMMC.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: error handling in efi_load_image()
Heinrich Schuchardt [Mon, 4 Dec 2017 17:03:03 +0000 (18:03 +0100)]
efi_loader: error handling in efi_load_image()

If a failure occurs when trying to load an image, it is insufficient
to free() the EFI object. We must remove it from the object list,
too. Otherwise a use after free will occur the next time we
iterate over the object list.

Furthermore errors in setting up the image should be handled.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: new function efi_delete_handle()
Heinrich Schuchardt [Mon, 4 Dec 2017 17:03:02 +0000 (18:03 +0100)]
efi_loader: new function efi_delete_handle()

Provide a function to remove a handle from the object list
after removing all protocols.

To avoid forward declarations other functions have to move up
in the coding.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: return status from efi_setup_loaded_image()
Heinrich Schuchardt [Mon, 4 Dec 2017 17:03:01 +0000 (18:03 +0100)]
efi_loader: return status from efi_setup_loaded_image()

efi_setup_loaded_image() should return an error code indicating if
an error has occurred.

An error occurs if a protocol cannot be installed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: Ensure efi_dp_find_obj() finds exact matches
Alexander Graf [Mon, 11 Dec 2017 13:29:46 +0000 (14:29 +0100)]
efi_loader: Ensure efi_dp_find_obj() finds exact matches

When calling efi_dp_find_obj(), we usually want to find the *exact* match
of an object for a given device path. However, I ran into a nasty corner case
where I had the following objects with paths available:

Handle 0x9feffa70
  /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/EndEntire
Handle 0x9feffb58
  /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/HD(1,800,32000,2de808cb00000000,1,1)/EndEntire

and was searching for

  /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/HD(1,800,32000,2de808cb00000000,1,1)/EndEntire

But because our device path search looked for any substring match, it would
return

  /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/EndEntire

because that path is a full substring of the path we were searching for.

So this patch adapts the device path search logic to always look for exact
matches first. The way we distinguish between those cases is by looking at
whether our caller actually deals with remainders.

As a side effect, the code as is from all I can tell now never does a
substring match anymore, because it always gets called with rem=NULL, so
we always only do exact matches now.

Reported-by: Jonathan Gray <jsg@jsg.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: helloworld.c: Reduce file size
Alexander Graf [Mon, 11 Dec 2017 08:45:30 +0000 (09:45 +0100)]
efi_loader: helloworld.c: Reduce file size

The efi linker script includes sections needed for the dynamic linker.
However, in our EFI application environment we don't have a dynamic linker.

So let's remove them. That way we save on 4k padding and reduce the file
size of the hello world efi binary from ~4k to ~1k.

Signed-off-by: Alexander Graf <agraf@suse.de>
6 years agoefi_loader: helloworld.c: Explicitly use .rodata for loaded_image_guid
Alexander Graf [Mon, 11 Dec 2017 08:40:47 +0000 (09:40 +0100)]
efi_loader: helloworld.c: Explicitly use .rodata for loaded_image_guid

Commit bbf75dd9345d0b ("efi_loader: output load options in helloworld")
introduced a const variable in efi_main() called loaded_image_guid which
got populated from a constant struct.

While you would usually expect a compiler to realize that this variable
should really just be a global pointer to .rodata, gcc disagrees and instead
puts it on the stack. Unfortunately in some implementations of gcc it does
so my calling memcpy() which we do not implement in our hello world
environment.

So let's explicitly move it to a global variable which in turn puts it in
.rodata reliably and gets rid of the memcpy().

Fixes: bbf75dd9345d0b ("efi_loader: output load options in helloworld")
Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
6 years agoarmv8: ls1012ardb: support hwconfig for eSDHC1 enabling
Yangbo Lu [Fri, 8 Dec 2017 07:35:37 +0000 (15:35 +0800)]
armv8: ls1012ardb: support hwconfig for eSDHC1 enabling

I2C reading for DIP switch setting is not reliable for LS1012ARDB
RevD and later versions. This patch is to add hwconfig support to
enable/disable eSDHC1 manually for these boards. Also drop 'status'
fix-up for eSDHC0 and leave it as it is. It shouldn't always be
fixed up with 'okay'.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls1012ardb: add more board version information
Yangbo Lu [Fri, 8 Dec 2017 07:35:36 +0000 (15:35 +0800)]
armv8: ls1012ardb: add more board version information

Add LS1012ARDB RevC/RevC1/RevC2/RevD/RevE information and
detect it when u-boot starts up.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoarmv8: ls1012ardb: clean up definitions for I2C IO expanders
Yangbo Lu [Fri, 8 Dec 2017 07:35:35 +0000 (15:35 +0800)]
armv8: ls1012ardb: clean up definitions for I2C IO expanders

This patch is to clean up definitions for I2C IO expanders.
The value 0x10 of __SW_BOOT_EMU is wrong. It should be 0x2.
Fixed it in this patch.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoboard/ls2080a, ls1088a: Add check for mc-dpl applied in fdt
Yogesh Gaur [Thu, 7 Dec 2017 05:40:14 +0000 (11:10 +0530)]
board/ls2080a, ls1088a: Add check for mc-dpl applied in fdt

Function fdt_fixup_board_enet() performs fdt fixup. Only return
fdt_status_okay() when both MC is applied and DPL is deployed, else
return fdt_status_fail().

This check is added to LS1088A/LS2080A/LS2088A boards.

Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
6 years agoMerge git://git.denx.de/u-boot-dm
Tom Rini [Thu, 14 Dec 2017 20:46:07 +0000 (15:46 -0500)]
Merge git://git.denx.de/u-boot-dm

6 years agoarm64: zynqmp: Enable fpga bitstream loading
Michal Simek [Fri, 8 Dec 2017 14:03:26 +0000 (15:03 +0100)]
arm64: zynqmp: Enable fpga bitstream loading

Enable fpga loadb and loadbp for zynqmp platforms.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable SPL ram support
Michal Simek [Fri, 8 Dec 2017 14:01:19 +0000 (15:01 +0100)]
arm64: zynqmp: Enable SPL ram support

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable misc devices
Michal Simek [Fri, 8 Dec 2017 13:46:30 +0000 (14:46 +0100)]
arm64: zynqmp: Enable misc devices

Enable misc devices for zynqmp targets.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add support for zynqmp automotive silicons
Michal Simek [Wed, 6 Dec 2017 07:33:50 +0000 (08:33 +0100)]
arm64: zynqmp: Add support for zynqmp automotive silicons

Remove silicon prefix. Automotive grade devices are using xazu instead
of xczu prefix.

The patch "fpga: xilinx: Check for substring in device ID validation"
(sha1: f72132673a01216e760864e442f168977cce2bd2)
enables this functionality for zynq devices that only substrings are
checked.
Unfortunately there is no way how to detect device grade that's why
this change is reasonable.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add missing zynq_board_read_rom_ethaddr() prototype
Michal Simek [Mon, 31 Jul 2017 08:37:09 +0000 (10:37 +0200)]
arm64: zynqmp: Add missing zynq_board_read_rom_ethaddr() prototype

Add missing zynq_board_read_rom_ethaddr() prototype reported by sparse.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoarm64: zynqmp: Use only earlycon bootargs instead of full one
Michal Simek [Mon, 27 Feb 2017 07:11:38 +0000 (08:11 +0100)]
arm64: zynqmp: Use only earlycon bootargs instead of full one

This is the same patch as was done earlier.
Please look at Linux patch:
"arm64: zynqmp: Use only earlycon bootargs instead of full one"
(sha1: f3609c8d4af28b9cc22ca49bf8e529b582ec188c)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Remove undocumented dma properties
Michal Simek [Mon, 30 Oct 2017 08:46:52 +0000 (09:46 +0100)]
arm64: zynqmp: Remove undocumented dma properties

Remove overfetch, ratectrl, include-sg and src-issue dma properties.
Driver is not using them and they are also not documented in the binding
doc.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Kedareswara rao Appana <appanad@xilinx.com>
6 years agoarm64: zynqmp: Add generic compatible string for I2C EEPROM
Javier Martinez Canillas [Thu, 15 Jun 2017 18:54:13 +0000 (20:54 +0200)]
arm64: zynqmp: Add generic compatible string for I2C EEPROM

The at24 driver allows to register I2C EEPROM chips using different vendor
and devices, but the I2C subsystem does not take the vendor into account
when matching using the I2C table since it only has device entries.

But when matching using an OF table, both the vendor and device has to be
taken into account so the driver defines only a set of compatible strings
using the "atmel" vendor as a generic fallback for compatible I2C devices.

So add this generic fallback to the device node compatible string to make
the device to match the driver using the OF device ID table.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable clock command for all boards
Michal Simek [Fri, 1 Dec 2017 14:35:43 +0000 (15:35 +0100)]
arm64: zynqmp: Enable clock command for all boards

clk command provides an option to see actual clock setting.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable phys for zcu102
Michal Simek [Fri, 1 Dec 2017 14:50:31 +0000 (15:50 +0100)]
arm64: zynqmp: Enable phys for zcu102

Enable USB3.0 and SATA phy for zcu102 boards.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Setup modeboot variable based on bootmode
Michal Simek [Fri, 1 Dec 2017 14:18:24 +0000 (15:18 +0100)]
arm64: zynqmp: Setup modeboot variable based on bootmode

Setup bootmode variable based on bootmode selection.
This is helping with setting up boot method.
Also setup sdbootdevice.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Read boot mode register using zynqmp_mmio_read
Siva Durga Prasad Paladugu [Tue, 21 Feb 2017 12:28:28 +0000 (17:58 +0530)]
arm64: zynqmp: Read boot mode register using zynqmp_mmio_read

Dont read boot mode register directly read it using
zynqmp_mmio_read().

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Enable SPL_CLK when SPL is enabled
Michal Simek [Fri, 1 Dec 2017 14:13:36 +0000 (15:13 +0100)]
arm64: zynqmp: Enable SPL_CLK when SPL is enabled

Setup proper dependency in Kconfig for SPL_CLK.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add support for generic QSPI boot
Michal Simek [Mon, 16 Jan 2017 11:07:33 +0000 (12:07 +0100)]
arm64: zynqmp: Add support for generic QSPI boot

This patch is enabling support for SPL QSPI boot.

First of all it is necessary to generate atf-spi.ub which is different
format than atf-uboot.ub (this can be made as legacy image too)

ADDR=`arm-xilinx-linux-gnueabi-readelf -a bl31.elf | grep "Entry point
address" | cut -d ':' -f 2 | sed -e 's/^[ \t]*//'`
aarch64-linux-gnu-objcopy -O binary bl31.elf bl31.bin
./tools/mkimage -f auto -A arm64 -T firmware -C none -O u-boot -a $ADDR
-e $ADDR -n "atf1" -E -b arch/arm/dts/zynqmp-zcu102.dtb -d bl31.bin
atf-uboot.ub
./tools/mkimage -A arm64 -T firmware -C none -O u-boot -a $ADDR -e $ADDR
-n "atf-for-qspi" -E -d bl31.bin atf-spi.ub

This patch is using this QSPI layout with offsets:
0 boot.bin
512k atf-ub
640k u-boot.bin
1280k u-boot.img

Which corresponding by writing these images(read from MMC)
mmcinfo
sf probe
load mmc 0 10000000 boot.bin
sf erase 0 +$filesize
sf write 10000000 0 $filesize
load mmc 0 10000000 atf-spi.ub
sf erase 0x80000 +$filesize
sf write 10000000 0x80000 $filesize
load mmc 0 10000000 u-boot.bin
sf erase 0xa0000 +$filesize
sf write 10000000 0xa0000 $filesize
load mmc 0 10000000 u-boot.img
sf erase 0x140000 +$filesize
sf write 10000000 0x140000 $filesize

For testing u-boot running in EL3 you can break atf-spi.ub like this:
sf probe
sf erase 0x80000 +4

Then u-boot.img is executed.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Add reference to pmu firmware node
Michal Simek [Fri, 1 Dec 2017 13:43:05 +0000 (14:43 +0100)]
arm64: zynqmp: Add reference to pmu firmware node

This reference is needed for pinctrl driver where some signals can be
routed directly to platform management unit (PMU).

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Do not use SPL_SYS_MALLOC_SIMPLE allocator
Michal Simek [Fri, 1 Dec 2017 13:34:03 +0000 (14:34 +0100)]
arm64: zynqmp: Do not use SPL_SYS_MALLOC_SIMPLE allocator

This was caused by: "fs/fat: Reduce stack usage"
 (sha1:2460098cffacd18729262e3ed36656e6943783ed) which converted
fat code to use malloc. But simple malloc is not freeing space
that's why full malloc implementation is needed.
Malloc space is added to RAM.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm64: zynqmp: Do not perform reset in case of panic
Michal Simek [Mon, 6 Feb 2017 13:34:01 +0000 (14:34 +0100)]
arm64: zynqmp: Do not perform reset in case of panic

Do not perform reset when panic happens because in the next reset
panic happens again and logs are overflood by the same errors.
This can be enabled by default and reset can be performed via watchdog.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoarm: zynq: Fix SPL SD boot mode
Michal Simek [Fri, 1 Dec 2017 12:50:33 +0000 (13:50 +0100)]
arm: zynq: Fix SPL SD boot mode

This patch is fixing two issues:
1. Insufficient stack size for fat fs buffers
2. Insufficient space in malloc area

Tested on zc702 and zc706.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agofpga: allow programming fpga from FIT image for all FPGA drivers
Goldschmidt Simon [Fri, 10 Nov 2017 14:17:41 +0000 (14:17 +0000)]
fpga: allow programming fpga from FIT image for all FPGA drivers

This drops the limit that fpga is only loaded from FIT images for Xilinx.
This is done by moving the 'partial' check from 'common/image.c' to
'drivers/fpga/xilinx.c' (the only driver supporting partial images yet)
and supplies a weak default implementation in 'drivers/fpga/fpga.c'.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (On zcu102)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Wed, 13 Dec 2017 22:58:46 +0000 (17:58 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

6 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Wed, 13 Dec 2017 22:58:36 +0000 (17:58 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

6 years agoMerge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh
Tom Rini [Wed, 13 Dec 2017 22:58:27 +0000 (17:58 -0500)]
Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh

6 years agoMerge git://git.denx.de/u-boot-samsung
Tom Rini [Wed, 13 Dec 2017 22:58:18 +0000 (17:58 -0500)]
Merge git://git.denx.de/u-boot-samsung