platform/kernel/u-boot.git
5 years agocmd: mmc: Force mmc reinit when no card present
Marek Vasut [Thu, 3 Jan 2019 21:09:43 +0000 (22:09 +0100)]
cmd: mmc: Force mmc reinit when no card present

In case the card is removed, force-init the MMC to start the internal
machinery which deregisters and invalidate the MMC device.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
5 years agommc: Add support for downgrading HS200/HS400 to HS mode
Marek Vasut [Thu, 3 Jan 2019 20:19:24 +0000 (21:19 +0100)]
mmc: Add support for downgrading HS200/HS400 to HS mode

The mmc_select_mode_and_width() function can be called while the card
is in HS200/HS400 mode and can be used to downgrade the card to lower
mode, e.g. HS. This is used for example by mmc_boot_part_access_chk()
which cannot access the card in HS200/HS400 mode and which is in turn
called by saveenv if env is in the MMC.

In such case, forcing the card clock to legacy frequency cannot work.
Instead, the card must be switched to HS mode first, from which it can
then be reprogrammed as needed.

However, this procedure needs additional code changes, since the current
implementation checks whether the card correctly switched to HS mode in
mmc_set_card_speed(). The check only expects that the card will be going
to HS mode from lower modes, not from higher modes, hence add a parameter
which indicates that the HS200/HS400 to HS downgrade is happening. This
makes the code send the switch command first, reconfigure the controller
next and finally perform the EXT_CSD readback check. The last two steps
cannot be done in reverse order as the card is already in HS mode when
the clock are being switched on the controller side.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
5 years agoam335x: igep003x: Add Device Tree Support and DM_MMC driver
Enric Balletbo i Serra [Fri, 28 Dec 2018 10:55:48 +0000 (11:55 +0100)]
am335x: igep003x: Add Device Tree Support and DM_MMC driver

This adds device tree and the DM_MMC driver for the AM335x IGEP based
boards.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
5 years agoam335x: sl50: Add Device Tree Support and DM_MMC driver
Enric Balletbo i Serra [Thu, 27 Dec 2018 16:34:11 +0000 (17:34 +0100)]
am335x: sl50: Add Device Tree Support and DM_MMC driver

This adds device tree and the DM_MMC driver for the SL50 board.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
5 years agoomap3: igep00x0: Add Device Tree Support and DM_MMC driver
Enric Balletbo i Serra [Thu, 27 Dec 2018 16:03:30 +0000 (17:03 +0100)]
omap3: igep00x0: Add Device Tree Support and DM_MMC driver

This adds device tree for OMAP3 IGEP based boards and the DM_MMC driver.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoomap3: igep00x0: Switch to simple malloc in SPL
Enric Balletbo i Serra [Thu, 27 Dec 2018 16:03:29 +0000 (17:03 +0100)]
omap3: igep00x0: Switch to simple malloc in SPL

To save more space, switch to simple malloc here.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
5 years agoomap3: igep00x0: Switch to using TI_COMMON_CMD_OPTION
Enric Balletbo i Serra [Thu, 27 Dec 2018 16:03:28 +0000 (17:03 +0100)]
omap3: igep00x0: Switch to using TI_COMMON_CMD_OPTION

Enable TI_COMMON_CMD_OPTIONS and remove similar options
from the defconfig.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
5 years agoomap3: igep00x0: Remove USB support due DM_USB deadline
Enric Balletbo i Serra [Thu, 27 Dec 2018 16:03:27 +0000 (17:03 +0100)]
omap3: igep00x0: Remove USB support due DM_USB deadline

The USB support for this board was never really tested, in fact, the
presence of these options are more a copy & paste error from the
Beagleboard than a feature that really was used. As doesn't work, remove
for now. If someone at some point want to add this support he'll need to
migrate the board to use CONFIG_DM_USB instead.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
5 years agoomap3: igep00x0: Remove unmaintained IGEP0032 defconfig
Enric Balletbo i Serra [Thu, 27 Dec 2018 16:03:26 +0000 (17:03 +0100)]
omap3: igep00x0: Remove unmaintained IGEP0032 defconfig

The IGEP0032 board was never officially pushed upstream and actually I
don't have access to this hardware, unless someone with the hardware
wants to start working on this doesn't makes sense have this defconfig
here. So remove it.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
5 years agotest: Use single quote consistently
Simon Glass [Thu, 27 Dec 2018 15:11:13 +0000 (08:11 -0700)]
test: Use single quote consistently

Some tests have ended up using double quotes where single quotes could be
used. Adjust this for consistency with the rest of U-Boot's Python code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoarm: dts: Add MMC nodes for HiKey board
Manivannan Sadhasivam [Thu, 27 Dec 2018 13:34:05 +0000 (19:04 +0530)]
arm: dts: Add MMC nodes for HiKey board

Add MMC nodes for HiKey board based on HI6220 SoC. There are three MMC
controllers in this SoC, first one used for eMMC, second one used
for SD card and third one is not used by u-boot.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agommc: Convert HI6220 MMC driver to driver model
Manivannan Sadhasivam [Thu, 27 Dec 2018 13:34:04 +0000 (19:04 +0530)]
mmc: Convert HI6220 MMC driver to driver model

Convert HiSilicon HI6220 MMC driver based on DWMMC IP to driver
model.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Enable this on poplar]
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoi2c: Reflect correct dependency for !DM cadence driver
Michal Simek [Wed, 9 Jan 2019 11:00:32 +0000 (12:00 +0100)]
i2c: Reflect correct dependency for !DM cadence driver

Setup proper DM_I2C dependency.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoi2c: mux: Covert to livetree functions
Michal Simek [Wed, 9 Jan 2019 10:58:24 +0000 (11:58 +0100)]
i2c: mux: Covert to livetree functions

Updates i2c muxes drivers to support livetree.
Similar changes were done by:
"net: zynq_gem: convert to use livetree"
(sha1: 26026e695afa794ac018a09e79a48120d322b60d)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoi2c: i2c-cdns: Use proper input frequency
Tomasz Gorochowik [Thu, 3 Jan 2019 12:36:33 +0000 (13:36 +0100)]
i2c: i2c-cdns: Use proper input frequency

This is needed to properly calculate i2c bus speed divisors.

Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Signed-off-by: Wojciech Tatarski <wtatarski@antmicro.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoi2c: xiic: Add Xilinx AXI I2C driver
Marek Vasut [Wed, 19 Dec 2018 11:26:27 +0000 (12:26 +0100)]
i2c: xiic: Add Xilinx AXI I2C driver

Add Xilinx AXI I2C controller driver based on the Linux i2c-xiic driver.
This driver is stripped of all the IRQ handling and uses pure polling,
yet tries to retain most of the structure of the Linux driver to make
backporting of fixes easy.

Note that the IP has a known limitation on 255 bytes read and write,
according to xilinx this is still being worked on [1].

[1] https://forums.xilinx.com/t5/Embedded-Processor-System-Design/AXI-IIC-V2-0-I2C-Master-Reading-multiple-bytes-from-I2C-slave/m-p/854419/highlight/true#M39387

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoriscv: qemu: define standalone load address
Lukas Auer [Fri, 4 Jan 2019 00:37:34 +0000 (01:37 +0100)]
riscv: qemu: define standalone load address

We need to define the standalone load address to use standalone
application on qemu-riscv. Define it and set it equal to
CONFIG_SYS_LOAD_ADDR.

To not overwrite it, change the assigned of CONFIG_STANDALONE_LOAD_ADDR
in arch/riscv/config.mk to a conditional one.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: support standalone applications on RV64I systems
Lukas Auer [Fri, 4 Jan 2019 00:37:33 +0000 (01:37 +0100)]
riscv: support standalone applications on RV64I systems

Add an implementation of EXPORT_FUNC() for RV64I systems to support them
in standalone applications.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: replace use of callee-saved register in standalone
Lukas Auer [Fri, 4 Jan 2019 00:37:32 +0000 (01:37 +0100)]
riscv: replace use of callee-saved register in standalone

Register x19 (s3) is a callee-saved register. It must not be used to
load and jump to exported functions without saving it beforehand.
Replace it with t0, a temporary and caller-saved register.

Change the code comment to reflect this and fix it to correctly list gp
as the register with the pointer to global data.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: remove RISC-V standalone linker script
Lukas Auer [Fri, 4 Jan 2019 00:37:31 +0000 (01:37 +0100)]
riscv: remove RISC-V standalone linker script

Standalone applications do not require a separate linker script and can
use the default linker script of the compiler instead. Remove the RISC-V
standalone linker script.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: use invalidate/flush_*cache_range functions in cache.c
Lukas Auer [Fri, 4 Jan 2019 00:37:30 +0000 (01:37 +0100)]
riscv: use invalidate/flush_*cache_range functions in cache.c

The flush_cache() function in lib/cache.c ignores its arguments and
flushes the complete data and instruction caches. Use the
invalidate/flush_*cache_range() functions instead to only flush the
requested memory region.

This patch does not change the current behavior of U-Boot, since the
implementation of the invalidate/flush_*cache_range() functions flush
the complete data and instruction caches. It is in preparation for CPUs
with the necessary functionality for flushing a selectable memory range.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: move the AX25-specific implementation of flush_dcache_all
Lukas Auer [Fri, 4 Jan 2019 00:37:29 +0000 (01:37 +0100)]
riscv: move the AX25-specific implementation of flush_dcache_all

The fence instruction is used to enforce device I/O and memory ordering
constraints in RISC-V. It can not be relied on to directly affect the
data cache on every CPU.
Andes' AX25 does not have a coherence agent. Its fence instruction
flushes the data cache and is used to keep data in the system coherent.
The implementation of flush_dcache_all in lib/cache.c is therefore
specific to the AX25. Move it into the AX25-specific cache.c in
cpu/ax25/.

This also adds a missing new line between flush_dcache_all and
flush_dcache_range in lib/cache.c.

Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoriscv: clarify error message on undefined exceptions
Lukas Auer [Fri, 4 Jan 2019 00:37:28 +0000 (01:37 +0100)]
riscv: clarify error message on undefined exceptions

Undefined exceptions are treated as reserved. This is not clearly
communicated to the user. Adjust the error message to clarify that a
reserved exception has occurred and add additional details.

Fixes: e8b522b ("riscv: treat undefined exception codes as reserved")
Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agolib: fdtdec: fdtdec_get_addr_size_fixed remove checks
Keerthy [Fri, 21 Dec 2018 16:24:30 +0000 (21:54 +0530)]
lib: fdtdec: fdtdec_get_addr_size_fixed remove checks

With 8 bytes addressing even on 32 bit machines these checks
are no longer valid. Remove them.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: i2c_emul_find() No emulators for device 'rtc@43'
Heinrich Schuchardt [Sat, 5 Jan 2019 21:30:07 +0000 (22:30 +0100)]
sandbox: i2c_emul_find() No emulators for device 'rtc@43'

when running the date command on sandbox_defconfig an error occurs:

    ./u-boot -D u-boot.dtb

    => date
    i2c_emul_find() No emulators for device 'rtc@43'
    ## Get date failed

Correct the references to the emulator devices in the sandbox device trees
using test.dts as a reference.

Fixes: 031a650e1309 ("dm: sandbox: i2c: Use new emulator parent uclass")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dropped unnecessary #address/size-cells property in i2c_emul:
Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agodm: serial: Tidy up header file comments
Simon Glass [Fri, 28 Dec 2018 21:23:11 +0000 (14:23 -0700)]
dm: serial: Tidy up header file comments

The getconfig() comment is out of date. Fix this and add comments for
recently added functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
5 years agodm: serial: Adjust serial_getinfo() to use proper API
Simon Glass [Fri, 28 Dec 2018 21:23:10 +0000 (14:23 -0700)]
dm: serial: Adjust serial_getinfo() to use proper API

All driver-model functions should have a device as the first parameter.
Update this function accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
5 years agodm: serial: Adjust serial_setconfig() to use proper API
Simon Glass [Fri, 28 Dec 2018 21:23:09 +0000 (14:23 -0700)]
dm: serial: Adjust serial_setconfig() to use proper API

All driver-model functions should have a device as the first parameter.
Update this function accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
5 years agodm: serial: Adjust serial_getconfig() to use proper API
Simon Glass [Fri, 28 Dec 2018 21:23:08 +0000 (14:23 -0700)]
dm: serial: Adjust serial_getconfig() to use proper API

All driver-model functions should have a device as the first parameter.
Update this function accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
5 years agoserial: Move new functions to serial.h
Simon Glass [Fri, 28 Dec 2018 21:23:07 +0000 (14:23 -0700)]
serial: Move new functions to serial.h

We should not be adding new functions to common.h. Move these recently
added functions to serial.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
5 years agobuildman: Fix tabs in GetWrapper()
Simon Glass [Mon, 7 Jan 2019 23:44:24 +0000 (16:44 -0700)]
buildman: Fix tabs in GetWrapper()

This function has tabs instead of spaces. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agonet: Fix error handling in sb_eth_raw_ofdata_to_platdata()
Simon Glass [Mon, 7 Jan 2019 23:44:22 +0000 (16:44 -0700)]
net: Fix error handling in sb_eth_raw_ofdata_to_platdata()

At present this stores the error number in an unsigned int so an error is
never detected. Use the existing signed variable instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
5 years agotravis: Use buildman for building with clang
Simon Glass [Mon, 7 Jan 2019 23:44:21 +0000 (16:44 -0700)]
travis: Use buildman for building with clang

Now that buildman supports clang, use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agobuildman: Add support for building with clang
Simon Glass [Mon, 7 Jan 2019 23:44:20 +0000 (16:44 -0700)]
buildman: Add support for building with clang

Add a -O option which allows building with clang.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agolog: Check printf() arguments
Simon Glass [Mon, 7 Jan 2019 23:44:19 +0000 (16:44 -0700)]
log: Check printf() arguments

At present logging does not check printf() arguments. Now that all users
have been corrected, enable this to prevent further problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agoefi_loader: Add a wchar_t cast in efi_file_open()
Simon Glass [Mon, 7 Jan 2019 23:44:18 +0000 (16:44 -0700)]
efi_loader: Add a wchar_t cast in efi_file_open()

The printf() string here is not actually correct. Add a cast to avoid
a warning when checking is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: Correct SDL build flags
Simon Glass [Mon, 17 Dec 2018 16:12:16 +0000 (09:12 -0700)]
sandbox: Correct SDL build flags

The check for CONFIG_SANDBOX_SDL in config.mk does not work since the
build config is not available by the time that file is included. Remove it
so that we always call sdl-config except when NO_SDL is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agobuildman: Deal nicely with invalid build-status file
Simon Glass [Mon, 10 Dec 2018 16:05:23 +0000 (09:05 -0700)]
buildman: Deal nicely with invalid build-status file

The 'done' files created by buildman may end up being empty if buildman
runs out of disk space while writing them. This error is then persistent,
since even if disk space is reclaimed and the build retries, the empty
file causes an exception in the builder thread.

Deal with this silently by doing a rebuild.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agotest: dm: regmap: Fix the long test delay
Simon Glass [Mon, 10 Dec 2018 00:11:10 +0000 (17:11 -0700)]
test: dm: regmap: Fix the long test delay

At present one of the regmap tests takes 5 seconds to run since it waits
for a timeout. This should be handled using sandbox_timer_add_offset()
which advances time for test purposes.

This requires a little change to make the regmap_read_poll_timeout()
testable.

Update the macro and the test.

Fixes: ebe3497c9c ("test: regmap: add regmap_read_poll_timeout test")

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agocommon: fdt_support: print hexadecimal numbers in debug
Sekhar Nori [Thu, 6 Dec 2018 09:50:47 +0000 (15:20 +0530)]
common: fdt_support: print hexadecimal numbers in debug

We usually deal with hexadecimal addresses and sizes in
device-tree. Its much easier if debug logs print hexadecimal
values too.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agodm: Tidy up 'dm tree' output when there are many devices
Simon Glass [Thu, 6 Dec 2018 01:42:52 +0000 (18:42 -0700)]
dm: Tidy up 'dm tree' output when there are many devices

At present the 'Index' column assumes there is only one digit. But on some
devices (e.g. snow) there are a lot of regulators and GPIO banks. Adjust
the output to allow for two digits without messing up the display.

Also capatalise the heading to match.

Fixes: 5197dafc42 (dm: core: Widen the dump tree to show more of the
driver's name.)

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Liviu Dudau <liviu.dudau@foss.arm.com>
5 years agobuildman: Drop comment about Ctrl-C problem
Simon Glass [Wed, 5 Dec 2018 12:35:26 +0000 (05:35 -0700)]
buildman: Drop comment about Ctrl-C problem

This bug is now fixed, so drop this comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 years agosandbox: add memset_io(..), memcpy_fromio(..) and memcpy_toio(..)
Christian GMEINER [Tue, 4 Dec 2018 19:35:24 +0000 (20:35 +0100)]
sandbox: add memset_io(..), memcpy_fromio(..) and memcpy_toio(..)

These functions could be used by drivers.

Signed-off-by: Christian GMEINER <christian.GMEINER@bachmann.info>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoinclude: configs: Add gunzip size for HiKey board
Manivannan Sadhasivam [Thu, 27 Dec 2018 13:34:03 +0000 (19:04 +0530)]
include: configs: Add gunzip size for HiKey board

Default 8MB gunzip size is not enough to load the release kernel, hence
fix 64MB size for uncompressing the kernel.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoconfigs: MediaTek: use OF_SEPARATE instead of OF_EMBED
Weijie Gao [Thu, 20 Dec 2018 08:12:59 +0000 (16:12 +0800)]
configs: MediaTek: use OF_SEPARATE instead of OF_EMBED

This patch replace OF_EMBED with OF_SEPARATE of defconfig files of
MediaTek boards because now OF_EMBED is only used for debugging purpose.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoMAINTAINERS: ARM MEDIATEK: update file entries
Weijie Gao [Thu, 20 Dec 2018 08:12:58 +0000 (16:12 +0800)]
MAINTAINERS: ARM MEDIATEK: update file entries

This patch adds new file entries for MediaTek SoCs

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agoarm: MediaTek: add ethernet support for MT7629 boards
Weijie Gao [Thu, 20 Dec 2018 08:12:57 +0000 (16:12 +0800)]
arm: MediaTek: add ethernet support for MT7629 boards

Enable ethernet related configs to mt7629_rfb_defconfig.
Add default IP addresses.
Enable noncached memory region required by ethernet driver.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
5 years agoarm: MediaTek: add ethernet support for MT7623 boards
Weijie Gao [Thu, 20 Dec 2018 08:12:56 +0000 (16:12 +0800)]
arm: MediaTek: add ethernet support for MT7623 boards

Enable ethernet related configs to mt7623n_bpir2_defconfig.
Add default IP addresses.
Enable noncached memory region required by ethernet driver.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
5 years agoarm: dts: add ethernet related node for MT7629 SoC
Weijie Gao [Thu, 20 Dec 2018 08:12:55 +0000 (16:12 +0800)]
arm: dts: add ethernet related node for MT7629 SoC

This patch adds ethernet gmac node for MT7629 with internal gigabit phy.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
5 years agoarm: dts: add ethernet related node for MT7623 SoC
Weijie Gao [Thu, 20 Dec 2018 08:12:54 +0000 (16:12 +0800)]
arm: dts: add ethernet related node for MT7623 SoC

This patch adds ethernet gmac node for MT7623 with MT7530 gigabit switch.

Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
5 years agoethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs
Weijie Gao [Thu, 20 Dec 2018 08:12:53 +0000 (16:12 +0800)]
ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs

This patch adds ethernet support for Mediatek ARM-based SoCs, including
a minimum setup of the integrated switch.

Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Mark Lee <Mark-MC.Lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-By: "Frank Wunderlich" <frank-w@public-files.de>
5 years agoclk: MediaTek: bind ethsys reset controller
Weijie Gao [Thu, 20 Dec 2018 08:12:52 +0000 (16:12 +0800)]
clk: MediaTek: bind ethsys reset controller

The ethsys contains not only the clock gating controller, but also the
reset controller for the whole ethernet subsystem and its components.

This patch adds binding of the reset controller so that the ethernet node
can have references on it.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agoreset: MedaiTek: add reset controller driver for MediaTek SoCs
Weijie Gao [Thu, 20 Dec 2018 08:12:51 +0000 (16:12 +0800)]
reset: MedaiTek: add reset controller driver for MediaTek SoCs

This patch adds reset controller driver for MediaTek SoCs.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 years agopoplar_defconfig: enable fastboot support
Shawn Guo [Tue, 18 Dec 2018 09:52:07 +0000 (17:52 +0800)]
poplar_defconfig: enable fastboot support

It enables fastboot support on Poplar board by using DWC2 OTG gadget
driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
5 years agopoplar: add DWC2 OTG gadget support
Shawn Guo [Tue, 18 Dec 2018 09:52:06 +0000 (17:52 +0800)]
poplar: add DWC2 OTG gadget support

It enables DWC2 OTG gadget driver support for Poplar board.  As
usb2_phy_init() is being always called from board_init(), we can save
the call from board_usb_init().

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
5 years agoimage: fix compiling without CMD_FDT
Simon Goldschmidt [Mon, 17 Dec 2018 19:14:42 +0000 (20:14 +0100)]
image: fix compiling without CMD_FDT

Booting an image currently sets the environment variable "fdtaddr"
by calling into 'cmd/fdt.c'. As a result, linking U-Boot fails if
CMD_FDT is not enabled.

Fix this by adding 'if (CONFIG_IS_ENABLED(CMD_FDT))' to the two
places where 'set_working_fdt_addr()' is called.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agoam57xx_evm_defconfig: Enable YMODEM support
Yan Liu [Mon, 17 Dec 2018 14:27:59 +0000 (09:27 -0500)]
am57xx_evm_defconfig: Enable YMODEM support

Enable CONFIG_SPL_YMODEM_SUPPORT to support UART boot

Signed-off-by: Yan Liu <yan-liu@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
5 years agotest: bootcount: add bootcount-uclass test
Philipp Tomsich [Fri, 14 Dec 2018 20:14:29 +0000 (21:14 +0100)]
test: bootcount: add bootcount-uclass test

Add a test for the bootcount uclass, which uses the RTC bootcount backend
(i.e. drivers/bootcount/rtc.c is implictly also tested).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoPrepare v2019.01 v2019.01
Tom Rini [Mon, 14 Jan 2019 22:02:36 +0000 (17:02 -0500)]
Prepare v2019.01

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agommc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()
Fabio Estevam [Mon, 19 Nov 2018 12:31:53 +0000 (10:31 -0200)]
mmc: fsl_esdhc: Avoid infinite loop in esdhc_send_cmd_common()

The following hang is observed on a Hummingboard 2 MicroSOM
i2eX iMX6D - rev 1.3 with no eMMC populated on board:

U-Boot SPL 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)
Trying to boot from MMC1

U-Boot 2018.11+gf6206f8587 (Nov 16 2018 - 00:56:34 +0000)

CPU:   Freescale i.MX6D rev1.5 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 33C
Reset cause: POR
Board: MX6 HummingBoard2
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

No panel detected: default to HDMI
Display: HDMI (1024x768)
In:    serial
Out:   serial
Err:   serial
---> hangs

which is caused by the following infinite loop inside esdhc_send_cmd_common()

while (!(esdhc_read32(&regs->irqstat) & flags))
;

Instead of looping forever, provide an exit path so that a timeout
error can be propagated in the case irqstat does not report
any interrupts, which may happen when no eMMC is populated on
board.

Reported-by: Ricardo Salveti <rsalveti@rsalveti.net>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Ricardo Salveti <rsalveti@rsalveti.net>
5 years agoimx8mq_evk_defconfig: Move file system options to Kconfig
Fabio Estevam [Sat, 29 Dec 2018 12:02:24 +0000 (10:02 -0200)]
imx8mq_evk_defconfig: Move file system options to Kconfig

Chris Spencer reports that when enabling ext4 read support without
also enabling write support the following error is seen:

fs/fs.c:198:12: error: 'ext4_write_file' undeclared here (not in a
function); did you mean 'ext4_read_file'?
   .write = ext4_write_file,
            ^~~~~~~~~~~~~~~
Fix this problem by moving these options to Kconfig.

Reported-by: Chris Spencer <spencercw@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agopoplar: save environment at a different offset
Alex Elder [Tue, 18 Dec 2018 03:08:18 +0000 (11:08 +0800)]
poplar: save environment at a different offset

Change CONFIG_ENV_OFFSET for Poplar to be 1MB further into the eMMC
than before.  This puts it immediately prior to the space we are
reserving offset 0x200000-0x400000 for UEFI to save its persistent
data.  Define CONFIG_ENV_SIZE as a product of env_mmc_nblks and the
sector size, like CONFIG_ENV_OFFSET is.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Fri, 11 Jan 2019 15:47:53 +0000 (10:47 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Fri, 11 Jan 2019 15:47:41 +0000 (10:47 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

5 years agoRevert "fs: fat: assign rootdir sector when accessing root directory"
Tom Rini [Fri, 11 Jan 2019 14:54:44 +0000 (09:54 -0500)]
Revert "fs: fat: assign rootdir sector when accessing root directory"

This particular commit is causing a regression on stih410-b2260 and
other platforms when reading from FAT16.  Noting that I had rebased the
original fix from Thomas onto then-current master, there is also
question from Akashi-san if the change is still needed after other FAT
fixes that have gone in.

This reverts commit a68b0e11ea774492713a65d9fd5bb525fcaefff3.

Reported-by: Patrice Chotard <patrice.chotard@st.com>
Cc: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Thomas RIENOESSL <thomas.rienoessl@bachmann.info>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoRevert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"
Lukasz Majewski [Wed, 9 Jan 2019 22:05:02 +0000 (23:05 +0100)]
Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"

This reverts commit a7f4b4b344396590845e6552c82829ef68ef9f89.

As reported by Alex Kiernan the above optimization introduces a
regression in the below use case where:

1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node)

2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux
pins are NOT probed/configured in MLO/SPL).

3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case
the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't
configure pins (as it thinks that those were initialized in MLO/SPL).

As we are very close to release - please revert this commit.

Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agoARM: dts: socfpga: Add missing SDMMC reset
Tien Fong Chee [Sun, 30 Dec 2018 08:13:45 +0000 (16:13 +0800)]
ARM: dts: socfpga: Add missing SDMMC reset

The SDMMC reset is missing from DT, so the reset manager cannot unreset
the SDMMC. Add the missing DT reset entry.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
5 years agodm: usb: gadget: Fix boot breakage on sunxi platforms
Jean-Jacques Hiblot [Fri, 21 Dec 2018 08:50:21 +0000 (09:50 +0100)]
dm: usb: gadget: Fix boot breakage on sunxi platforms

Fixes commit 013116243950 ("dm: usb: create a new UCLASS ID for USB gadget
devices")

The UCLASS_DRIVER for id UCLASS_USB_GADGET_GENERIC needs to be declared
even for platforms that do not enable DM_USB_GADGET. Otherwise the driver
for their usb peripheral controller fails to bind.

Reported-by: Priit Laes <plaes@plaes.org>
Reported-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Priit Laes <plaes@plaes.org>
Acked-by: Jagan Teki <jagan@openedev.com>
5 years agousb: Make compiling gadget support optional
Jean-Jacques Hiblot [Thu, 10 Jan 2019 14:44:14 +0000 (15:44 +0100)]
usb: Make compiling gadget support optional

There is no need to compile and include this code if it is not used.
CONFIG_USB_GADGET can be used for the purpose.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agoKconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET
Jean-Jacques Hiblot [Thu, 10 Jan 2019 14:44:13 +0000 (15:44 +0100)]
Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET

The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agoARM: dts: define USB aliases for all omap5 platforms
Jean-Jacques Hiblot [Sat, 15 Dec 2018 16:43:28 +0000 (17:43 +0100)]
ARM: dts: define USB aliases for all omap5 platforms

This allows us to properly map the USB controller indexes

Tested on dra76 evm, am572 evm

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
5 years agodm: usb: udc: Use SEQ_ALIAS to index the USB gadget ports
Jean-Jacques Hiblot [Sat, 15 Dec 2018 16:43:27 +0000 (17:43 +0100)]
dm: usb: udc: Use SEQ_ALIAS to index the USB gadget ports

dfu, fastbot and other usb gadget commands take the USB port index as a
parameter. Currently this index is assigned in the order of the driver
bindings.
Changing this behavior using the SEQ_ALIAS feature. This option assign to
the device a SEQ number based on its alias (if it exists)

To use it we must set the DM_UC_FLAG_SEQ_ALIAS flag and follow the existing
naming convention: use "usb" for the name of the gadget UCLASS_DRIVER
(same as for the UCLASS_USB).

If no alias is provided, then the index falls back to the order in which
the bindings took place.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reported-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Sam Protsenko <semen.protsenko@linaro.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 10 Jan 2019 14:28:28 +0000 (09:28 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

5 years agoMerge tag 'u-boot-imx-20190110' of git://git.denx.de/u-boot-imx
Tom Rini [Thu, 10 Jan 2019 14:28:16 +0000 (09:28 -0500)]
Merge tag 'u-boot-imx-20190110' of git://git.denx.de/u-boot-imx

Fixes for 2019.01

5 years agommc: sunxi: Fix mmc clocks for DM_MMC
Jagan Teki [Wed, 9 Jan 2019 11:28:39 +0000 (16:58 +0530)]
mmc: sunxi: Fix mmc clocks for DM_MMC

Existing clock configure code has been followed based on the
legacy MMC dt node definitions and it cannot work with recent
dts(i) sync from Linux.

So, add clock configure code for Allwinner platforms which support
DM_MMC and eventually this will drop once CLK support is in Mainline.

Fixes: 3c92cca3cda0 ("ARM: dts: sun4i: Update A10 dts(i) files from Linux-v4.18-rc3")
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Priit Laes <plaes@plaes.org> # Gemei G9 A10 Tablet
Tested-by: Marek Kraus <gamelasterv2@gmail.com> # A10-OLinuXino-Lime
5 years agoMerge branch '2019-01-08-master-imports'
Tom Rini [Wed, 9 Jan 2019 21:02:29 +0000 (16:02 -0500)]
Merge branch '2019-01-08-master-imports'

- stm32f7 GPIO fixes
- SATA env fixes
- More DM migration deadline warnings
- Regression fix for non-DM MMC drivers
- dma_alloc_coherent size fix on ARM.

5 years agoimx8m: clock: Fix oscillator values
Fabio Estevam [Fri, 28 Dec 2018 18:43:01 +0000 (16:43 -0200)]
imx8m: clock: Fix oscillator values

OSC_27M_CLK should return 27MHz and OSC_32K_CLK should return
32768Hz to reflect the reality.

This also keeps the values in sync with the Linux clock tree.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agotools: imx8image: set dcd_skip to true
Peng Fan [Sat, 15 Dec 2018 12:19:58 +0000 (12:19 +0000)]
tools: imx8image: set dcd_skip to true

To B0[+] chips, dcd_skip needs to be true. For A0 chip, it needs
to be false, however A0 chip is no longer being supported anymore.
Considering we are moving code from imx-mkimage to uboot mkimage,
to make sure we not introduce some surprise, we still keep dcd_skip
code there.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: cpu: correct info
Peng Fan [Sat, 15 Dec 2018 12:19:55 +0000 (12:19 +0000)]
imx8: cpu: correct info

The CPU banner printed is as following:
CPU:   CPU:   Freescale i.MX8QXP RevB A35 at 147228 MHz

1. Drop the CPU:
2. Change vendor from Freescale to NXP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agomisc: imx8: scu: use platdata instead of priv data
Peng Fan [Sat, 15 Dec 2018 12:19:52 +0000 (12:19 +0000)]
misc: imx8: scu: use platdata instead of priv data

priv data has not been allocated when doing bind, so it is
wrong to use dev_get_priv in bind call back.

Let's switch to use platdata in the driver to fix the issue.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agomisc: imx: scu: avoid write null pointer
Peng Fan [Sat, 15 Dec 2018 12:19:49 +0000 (12:19 +0000)]
misc: imx: scu: avoid write null pointer

When boot_dev is true, fill boot device. However the original logic is when
boot_dev is false, fill boot device, this will trigger data abort.

Also fix sc_misc_get_control when using pointer val.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoclk: imx8: fix build warning
Peng Fan [Sat, 15 Dec 2018 12:19:46 +0000 (12:19 +0000)]
clk: imx8: fix build warning

When build clk driver in spl, met the warning:
"
drivers/clk/imx/clk-imx8.c:21:25: warning: ‘imx8_clk_names’ defined but not used [-Wunused-variable]
 static struct imx8_clks imx8_clk_names[] = {
                         ^~~~~~~~~~~~~~
"

Fix with wrapping the array with CONFIG_CMD_CLK.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoMAINTAINERS: update NXP i.MX mail list address
Peng Fan [Sat, 15 Dec 2018 12:07:02 +0000 (12:07 +0000)]
MAINTAINERS: update NXP i.MX mail list address

Update NXP i.MX mail list address

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agoboard: tbs2910: Remove FIT support in defconfig to reduce u-boot size
Soeren Moch [Sat, 5 Jan 2019 08:31:18 +0000 (09:31 +0100)]
board: tbs2910: Remove FIT support in defconfig to reduce u-boot size

The current defconfig build generates a u-boot.imx file that is too large
for the available space on a eMMC/SD card. Installing this file overwrites
the u-boot environment. So disable the unused FIT support to reduce the
size of the u-boot binary.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoboard: tbs2910: Add u-boot.imx size limit check
Soeren Moch [Sat, 5 Jan 2019 08:31:17 +0000 (09:31 +0100)]
board: tbs2910: Add u-boot.imx size limit check

Check the size of the generated u-boot.imx file. Report an error
if it would be too big and overwrite the u-boot environment.

Signed-off-by: Soeren Moch <smoch@web.de>
5 years agoimx: Add Makefile dependency for mkimage_fit_atf.sh
Chris Spencer [Thu, 20 Dec 2018 09:25:24 +0000 (09:25 +0000)]
imx: Add Makefile dependency for mkimage_fit_atf.sh

The mkimage_fit_atf.sh SPL FIT generator script requires
u-boot-nodtb.bin, but this was not enforced by the Makefile. This could
cause the generator script to be executed before u-boot-nodtb.bin has
been created.

Signed-off-by: Chris Spencer <christopher.spencer@sea.co.uk>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
5 years agoarm: mx5: Enable WDT and bootcounter on M53Menlo
Marek Vasut [Fri, 7 Dec 2018 01:36:38 +0000 (02:36 +0100)]
arm: mx5: Enable WDT and bootcounter on M53Menlo

Enable watchdog and bootcounter support on the M53Menlo board.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoARM: vf610: ddrmc: do not write CR79 by default
Stefan Agner [Tue, 4 Dec 2018 10:10:21 +0000 (11:10 +0100)]
ARM: vf610: ddrmc: do not write CR79 by default

The current value CTLUPD_AREF(0) is the reset value of the register,
so there is no need to write a value. If needed, the register can be
written using board specific CR settings.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agoARM: vf610: ddrmc: fix initialization completion detection
Stefan Agner [Tue, 4 Dec 2018 10:10:20 +0000 (11:10 +0100)]
ARM: vf610: ddrmc: fix initialization completion detection

The CR80 register has multiple interrupt bits, the code is supposed
to check bit 8 but instead uses a logical and. In most cases this
probably did not affect real operations since at that stage typically
none of the other bits are set.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoARM: vf610: ddrmc: fix CR138 preprocessor define
Stefan Agner [Tue, 4 Dec 2018 10:10:19 +0000 (11:10 +0100)]
ARM: vf610: ddrmc: fix CR138 preprocessor define

According to the data sheet bits 10-8 are PHYDRAM_CK_EN. Fix mask
to allow setting PHYDRAM_CK_EN correctly.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agotoradex: colibri_vf: fix memory initialization
Stefan Agner [Tue, 4 Dec 2018 10:10:18 +0000 (11:10 +0100)]
toradex: colibri_vf: fix memory initialization

Commit 3f353ceccbbb ("vf610: refactor DDRMC code") changed on-die
termination (ODT) values from 120 Ohm to 60 Ohm and enabled a static
read/write leveling which has not been tested with this board. This
commit reverts both changes and makes sure that memory gets
initialized as it has been done before the mentioned commit.

Fixes: 3f353ceccbbb ("vf610: refactor DDRMC code")
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
5 years agoARM: vf610: ddrmc: program Dummy DDRBYTE1/2
Stefan Agner [Fri, 14 Dec 2018 14:26:00 +0000 (15:26 +0100)]
ARM: vf610: ddrmc: program Dummy DDRBYTE1/2

The Vybrid reference manual VFXXXRM Rev. 0 10/2016 states in chapter
5.2.6.1 DUMMY PADS (DDR/QuadSPI) that those pads need to be programed
for correct operation of DDR. Assume the default DDR pin configuration
which seems to work well on a Colibri VF50.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoboard: toradex: colibri_vf: unset NFS and LOADS/B
Stefan Agner [Thu, 6 Dec 2018 13:55:03 +0000 (14:55 +0100)]
board: toradex: colibri_vf: unset NFS and LOADS/B

Safe some space by not selecting CMD_NFS and CMD_LOADS/B.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agousb: xhci-mem: Fix scratchpad array issue
Ye Li [Mon, 7 Jan 2019 02:45:46 +0000 (02:45 +0000)]
usb: xhci-mem: Fix scratchpad array issue

After updating the value of dev_context_ptrs[0], we should flush this
from cache to memory. Otherwise the xhci controller won't use it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
5 years agogpio: stm32f7: Fix SPL code size
Patrice Chotard [Fri, 4 Jan 2019 09:55:06 +0000 (10:55 +0100)]
gpio: stm32f7: Fix SPL code size

In order to keep SPL code size below the 32Kb limit,
put under CONFIG_SPL_BUILD flag all unused code in SPL.
This is needed for stm32f7xx board which are using SPL.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agogpio: stm32f7: Fix gpio bank hole management
Patrice Chotard [Fri, 4 Jan 2019 09:55:05 +0000 (10:55 +0100)]
gpio: stm32f7: Fix gpio bank hole management

In case "gpio-ranges" property is not present in device tree,
use default value for gpio_count and gpio_range.
This fixes an issue on stm32 F7 and H7 boards where "pinmux status -a"
command didn't return any pin status due to the fact that both stm32 F7
and H7 board DT doesn't use the gpio-ranges property.

Fixes: dbf928dd2634a6("gpio: stm32f7: Add gpio bank holes management")

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
5 years agoenv: sata: Fix saveenv issue
Ye Li [Mon, 7 Jan 2019 09:22:35 +0000 (09:22 +0000)]
env: sata: Fix saveenv issue

Wrong env buffer was passed into sata write function, cause the saveenv
not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
5 years agoarm: ti: boot: Remove legacy Android partitions
Sam Protsenko [Fri, 4 Jan 2019 20:09:08 +0000 (22:09 +0200)]
arm: ti: boot: Remove legacy Android partitions

Remove unused Android partitions:
  - efs, crypto, cache: we don't use it anymore (images are not built
    in AOSP
  - ipu1, ipu2: IPU firmware is now a part of vendor image and doesn't
    reside as a separate partition

While at it, rename "reserved" partition to "uboot-env", as it's
actually stores U-Boot environment.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
5 years agoenv: sata: Add missed env location for SATA boot
Ye Li [Fri, 4 Jan 2019 09:34:24 +0000 (09:34 +0000)]
env: sata: Add missed env location for SATA boot

The env location label ENVL_ESATA is missed in location tables, so
when we configure the ENV in SATA, u-boot fails to get correct env
location and cause boot hang in board_f.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoarm: Round the dma_alloc_coherent memory size to cache line aligned
Ye Li [Fri, 4 Jan 2019 09:24:14 +0000 (09:24 +0000)]
arm: Round the dma_alloc_coherent memory size to cache line aligned

When running usb dwc3 gadget driver, we meet random USB enumeration failure in fastboot.
The root cause is a cache coherence issue. When it happens, the ctrl_req in
gadget driver is allocated at 0xfe932f40, and the usb_composite_dev (cdev)
is allocated at 0xfe932f60. So after we submit the setup request (cache flushed) to USB
controller, any accessing to usb_composite_dev variable will cause the cache line refill, then
when setup transfer is completed, reading the setup data in ctrl_req will gets old value from
cache not from memory.

The ctrl_req is allocated by API dma_alloc_coherent, but u-boot don't have cohernet memory.
so it still needs cache maintain operations before/after HW accessing. Since the cache flush or
invalidate bases on cache line, so when the allocated memory size is not cache line aligned,
potentially it may meet such issue.

This patch modifies the dma_alloc_coherent API to round the size to cache line aligned.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>