oweals/u-boot.git
4 years agofirmware: ti_sci: Parse all resource ranges even if some is not available
Vignesh Raghavendra [Mon, 5 Aug 2019 17:26:44 +0000 (12:26 -0500)]
firmware: ti_sci: Parse all resource ranges even if some is not available

Do not fail if any of the requested subtypes are not available, but set the
number of resources to 0 and continue parsing the resource ranges.

Based on Linux kernel patch by Peter Ujfalusi <peter.ujfalusi@ti.com>

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoARM: da850-evm: Enable SPI Flash and NAND Flash when booting NOR
Adam Ford [Sat, 3 Aug 2019 12:56:10 +0000 (07:56 -0500)]
ARM: da850-evm: Enable SPI Flash and NAND Flash when booting NOR

Historically there have been various boot options, SPI flash,
NAND or NOR. The NOR flash is mutually exclusive with MMC, but
it isn't mutually exclusive with NAND or SPI Flash, so this patch
enables both NAND flash and SPI Flash when booting from NOR.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: da850-evm: Enable filesystem commands when booting from NOR
Adam Ford [Fri, 2 Aug 2019 21:21:55 +0000 (16:21 -0500)]
ARM: da850-evm: Enable filesystem commands when booting from NOR

The configuration with NOR is mutually exclusive with MMC, and as
such, the filesystem commands were disabled.  With the USB host
enabled, this patch enables the file system command which can
be executed on storage devices attached to the USB.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: da850-evm: Increase environment NOR partition offset
Adam Ford [Fri, 2 Aug 2019 12:03:39 +0000 (07:03 -0500)]
ARM: da850-evm: Increase environment NOR partition offset

The current size allocated to U-Boot is 384k, but U-Boot has grown
to 436K which means that saving the environmental variables wipes
out part of the U-Boot source and the board ceases to function.
Due to the sector and erase size for the NOR part and a desire to
not have to change partition sizes often, this patch moves the
U-Boot environmental variables to an offset of 1M so saveenv
does not brick the board.  This patch also sets up MTDIDS and
MTDPARTS to clearly show where U-Boot and U-Boot's environmental
variables are located.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoARM: da850-evm: Fix Lowlevel init
Adam Ford [Thu, 1 Aug 2019 13:47:55 +0000 (08:47 -0500)]
ARM: da850-evm: Fix Lowlevel init

A previous patch for enabling the NAND config set a flag called
CONFIG_SKIP_LOWLEVEL_INIT when it should have been called
CONFIG_SKIP_LOWLEVEL_INIT_ONLY.  The affect this had was creating
a delay on startup for the NOR version which is XIP and doesn't have
SPL, so the lowlevel initialization functions need to operate.
This delay was not really noticeable at first, but the delays have been
getting longer, finally reached the point of nearly seven seconds
before the board would appear to start.

This patch sets the CONFIG_SKIP_LOWLEVEL_INIT_ONLY instead which means
"The normal CP15 init (such as enabling the instruction cache) is still
performed" per the README.  It doesn't appear to have any adverse
behavior on the SPI Flash or the NAND flash boards which use SPL.

Fixes: 93f3362762f0 ("ARM: configs: Add da850evm_nand to boot from NAND")

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoconfigs: am65x_evm_a53: enable support for PCIe ethernet cards
Sekhar Nori [Thu, 1 Aug 2019 13:43:01 +0000 (19:13 +0530)]
configs: am65x_evm_a53: enable support for PCIe ethernet cards

Enable support for Intel E1000 based PCIe ethernet cards that
can be used to test PCIe RC functionality on AM65x EVM.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoarm: dts: k3-am65: add support for PCIe and SERDES
Sekhar Nori [Thu, 1 Aug 2019 13:43:00 +0000 (19:13 +0530)]
arm: dts: k3-am65: add support for PCIe and SERDES

Add needed device-tree nodes to support PCIe 0
and SERDES on AM65x SoC. The nodes are kept
disabled by default.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoconfigs: am65x_evm_a53: enable PCIe support
Sekhar Nori [Thu, 1 Aug 2019 13:42:59 +0000 (19:12 +0530)]
configs: am65x_evm_a53: enable PCIe support

Enable support for PCIe and related configurations
on AM654 EVM platform.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agophy: add support for AM654x SERDES
Sekhar Nori [Thu, 1 Aug 2019 13:42:58 +0000 (19:12 +0530)]
phy: add support for AM654x SERDES

Add a new SERDES driver for TI's AM654x SoC which configures
the SERDES only for PCIe. Support fo USB3 can be added later.

SERDES in am654x has three input clocks (left input, external
reference clock and right input) and two output clocks (left
output and right output) in addition to a PLL mux clock which
the SERDES uses for Clock Multiplier Unit (CMU refclock).

The PLL mux clock can select from one of the three input
clocks. The right output can select between left input and
external reference clock while the left output can select
between the right input and external reference clock.

The driver has support to select PLL mux and left/right output
mux as specified in device tree.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agopcie: ti: add driver for AM65x PCIe RC
Sekhar Nori [Thu, 1 Aug 2019 13:42:57 +0000 (19:12 +0530)]
pcie: ti: add driver for AM65x PCIe RC

Add driver supporting PCIe root-complex available
on TI's AM65x SoC.

Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agodm: core: add support for getting register address and size
Sekhar Nori [Thu, 1 Aug 2019 13:42:56 +0000 (19:12 +0530)]
dm: core: add support for getting register address and size

Current dev_read_*() API lacks support to get address and size
of a "reg" property by name or index. Add support for the same.

Livetree support has been added but not tested on real hardware.

The existing unit tests testing reading address from device-tree
have been updated to test address as well as size.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agoclk: add support for clk_is_match()
Sekhar Nori [Thu, 1 Aug 2019 13:42:55 +0000 (19:12 +0530)]
clk: add support for clk_is_match()

Add support for clk_is_match() which is required to
know if two clock pointers point to the same exact
physical clock.

Also add a unit test for the new API.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
4 years agopower: domain: ti-sci-power-domain: Add device ID info to get/set_device failure
Nishanth Menon [Thu, 1 Aug 2019 13:38:24 +0000 (19:08 +0530)]
power: domain: ti-sci-power-domain: Add device ID info to get/set_device failure

Failure log for ti_sci_power_domain_on/off is as below:
"ti_sci_power_domain_on: get/set_device failed (-19)"

The above information is useless for debug without information
on what specific device access failed. So add that information as well.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoboard/BuR/brsmarc1: initial commit
Hannes Schmelzer [Thu, 1 Aug 2019 05:04:46 +0000 (07:04 +0200)]
board/BuR/brsmarc1: initial commit

This commit adds support for the B&R brsmarc1 SoM.

The SoM is based on TI's AM335x SoC.
Mainly vxWorks 6.9.4.x is running on the board,
doing some PLC stuff on various carrier boards.

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
4 years agowatchdog: omap_wdt: Disable DM watchdog support in SPL
Suniel Mahesh [Wed, 31 Jul 2019 16:24:07 +0000 (21:54 +0530)]
watchdog: omap_wdt: Disable DM watchdog support in SPL

This patch disables DM watchdog support for SPL builds and uses
the legacy omap watchdog driver on TI AM335x chipsets.

The following build error is reported if DM watchdog support was
enabled in SPL:

  CC      spl/drivers/usb/gadget/rndis.o
  LD      spl/drivers/usb/gadget/built-in.o
  LD      spl/drivers/usb/musb-new/built-in.o
  LD      spl/drivers/built-in.o
  LD      spl/u-boot-spl
arm-linux-ld.bfd: u-boot-spl section .u_boot_list will not fit in region .sram
arm-linux-ld.bfd: region .sram overflowed by 440 bytes
make[1]: *** [spl/u-boot-spl] Error 1
make: *** [spl/u-boot-spl] Error 2

Adjusted WATCHDOG_RESET macro accordingly. Earlier it was pointing
to hw_watchdog_reset. Since CONFIG_WATCHDOG replaces CONFIG_HW_WATCHDOG,
now WATCHDOG_RESET macro points to watchdog_reset. This watchdog_reset
is not defined anywhere for am33xx/omap2 and needs to be defined. Fixed
this by simply calling hw_watchdog_reset in watchdog_reset.

Built and tested on AM335x device (BeagleboneBlack), compile tested for
all other AM33xx/omap2 based boards.

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
[trini: Fix watchdog.h logic]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agowatchdog: omap_wdt: Convert watchdog driver to use DT and DM
Suniel Mahesh [Wed, 31 Jul 2019 16:24:06 +0000 (21:54 +0530)]
watchdog: omap_wdt: Convert watchdog driver to use DT and DM

This patch adds device tree and driver model watchdog support,
converts the legacy omap watchdog driver to driver model for
TI AM335x chipsets. The following compile warning is removed:

===================== WARNING ======================
This board does not use CONFIG_WDT (DM watchdog support).
Please update the board to use CONFIG_WDT before the
v2019.10 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

CONFIG_HW_WATCHDOG is no more a default option for AM33XX devices
after DT/DM conversion, adjusted kconfig accordingly.

DM watchdog support is enabled by default in SPL. The SPL image
doesn't fit into SRAM because of size constraints and build breaks
with an overflow. For this reason DM watchdog support should be
disabled in SPL, driver code should be adjusted accordingly to serve
this purpose.
Built and tested on AM335x device (BeagleboneBlack), compile tested
for all other AM33xx based boards.

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
4 years agoARM: omap3: overo: Fix MMC init for SPL
Anselm Busse [Wed, 31 Jul 2019 15:30:28 +0000 (17:30 +0200)]
ARM: omap3: overo: Fix MMC init for SPL

The SPL for the Overo board does not initialise the MMC. Hence, it
cannot load the main boot loader from the SD card susequently. This
patch moves the initialisation code for the MMC so it gets included in
the SPL.

[trini: Add missing header]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoboard: siemens: extend factoryset reading for giedi and deneb boards
Anatolij Gustschin [Wed, 10 Jul 2019 17:44:16 +0000 (19:44 +0200)]
board: siemens: extend factoryset reading for giedi and deneb boards

giedi and deneb are i.MX8X based and have additional data with
WLAN MAC in factoryset container. Enable building for these
boards and adapt factoryset functions to set WLAN MAC and dtb
name in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
4 years agoboard: siemens: adapt factoryset reading for DM_I2C enabled boards
Anatolij Gustschin [Wed, 10 Jul 2019 17:44:15 +0000 (19:44 +0200)]
board: siemens: adapt factoryset reading for DM_I2C enabled boards

For new boards we always enable DM_I2C. Extend factoryset functions
to support EEPROM reading on these boards.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Sat, 10 Aug 2019 21:57:58 +0000 (17:57 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- R8A77980 V3H support

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Sat, 10 Aug 2019 16:21:27 +0000 (12:21 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

- DaVinci USB updates
- Various OHCI fixes
- Gadget fixes

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Sat, 10 Aug 2019 03:27:15 +0000 (23:27 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- Enable SD slot on Intel Edison
- Populate CSRT ACPI table for shared DMA controller on Intel Tangier
- Convert Intel ICH-SPI driver to use new spi-mem ops
- Enable config_distro_bootcmd for QEMU x86
- Support U-Boot as a payload for Intel Slim Bootloader
- Avoid writing temporary asl files into the source tree which fixes the
  parallel build issue occasionally seen

4 years agoARM: renesas: Add R8A77980 V3H Condor board code
Marek Vasut [Mon, 29 Jul 2019 17:59:44 +0000 (19:59 +0200)]
ARM: renesas: Add R8A77980 V3H Condor board code

Add board code for the R8A77980 V3H Condor board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoARM: renesas: Add R8A77980 V3H platform code
Marek Vasut [Mon, 29 Jul 2019 17:59:44 +0000 (19:59 +0200)]
ARM: renesas: Add R8A77980 V3H platform code

Add a few bits of platform code to support R8A77980 V3H SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoARM: dts: renesas: Add R8A77980 V3H DTs and headers
Marek Vasut [Mon, 29 Jul 2019 17:59:44 +0000 (19:59 +0200)]
ARM: dts: renesas: Add R8A77980 V3H DTs and headers

Import R8A77980 V3H DTs and headers from Linux 5.2.7 , commit 5697a9d3d55f.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoclk: renesas: Add R8A77980 V3H clock tables
Marek Vasut [Mon, 29 Jul 2019 17:59:44 +0000 (19:59 +0200)]
clk: renesas: Add R8A77980 V3H clock tables

Import R8A77980 V3H clock tables from Linux 5.2.7 , commit 5697a9d3d55f.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agopinctrl: renesas: Add R8A77980 V3H PFC tables
Marek Vasut [Mon, 29 Jul 2019 17:59:44 +0000 (19:59 +0200)]
pinctrl: renesas: Add R8A77980 V3H PFC tables

Import R8A77980 V3H PFC tables from Linux 5.2.7 , commit 5697a9d3d55f.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agonet: sh_eth: Fix 64bit build warnings
Marek Vasut [Wed, 31 Jul 2019 12:48:17 +0000 (14:48 +0200)]
net: sh_eth: Fix 64bit build warnings

Fix various type warnings when building this driver for 64bit machine.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agonet: sh_eth: Add R8A77980 V3H gether support
Marek Vasut [Wed, 31 Jul 2019 10:58:06 +0000 (12:58 +0200)]
net: sh_eth: Add R8A77980 V3H gether support

The R8A77980 V3H gether needs a few minor adjustments to the sh_eth
driver, add them to support ethernet on R8A77980.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Fri, 9 Aug 2019 17:21:53 +0000 (13:21 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

4 years agoapalis-tk1: configs: remove legacy usbboot command
Igor Opaniuk [Tue, 25 Jun 2019 14:06:41 +0000 (17:06 +0300)]
apalis-tk1: configs: remove legacy usbboot command

Remove obsolete legacy usbboot wrapper, as distroboot can handle
booting from USB drivers.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: support v1.2 hardware revision
Marcel Ziswiler [Fri, 9 Aug 2019 10:21:46 +0000 (13:21 +0300)]
apalis-tk1: support v1.2 hardware revision

Support the V1.2 hardware revision with the following pin muxing
changes:

Ddc_scl_pv4 and ddc_sda_pv5 previously used as Apalis GPIO3 and GPIO4
are now used as DDC pins.

Gen2_i2c_scl_pt5 and gen2_i2c_sda_pt6 previously used as DDC pins are
now used as USB power enable signals.

Usb_vbus_en0_pn4 and usb_vbus_en1_pn5 previously used as USB power
enable signals are now used as GPIO3 and GPIO4.

Additionally a new device tree file tegra124-apalis-v1.2-eval.dtb is
loaded on V1.2 and later modules and resp. USB power enable signals
activated.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: remove non-essential power rails on boot
Dominik Sliwa [Thu, 1 Aug 2019 08:06:39 +0000 (11:06 +0300)]
apalis-tk1: remove non-essential power rails on boot

When mainline kernels reboot TK1 they use SW_RESET,
that reset mode does not reset PMIC. Some rails
need to be off for RAM Re-repair to work correctly.

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: remove default vesa vga mode from vidargs
Marcel Ziswiler [Thu, 1 Aug 2019 08:06:38 +0000 (11:06 +0300)]
apalis-tk1: remove default vesa vga mode from vidargs

Remove video=tegrafb0:640x480-16@60 aka VESA VGA mode from vidargs in
order for the panel specification in the device tree to be used. This
causes the default to be the 10.1" LVDS display which will be available
in the Toradex webshop shortly.

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1/t30: colibri_t30: display reset reason
Dominik Sliwa [Thu, 1 Aug 2019 08:06:37 +0000 (11:06 +0300)]
apalis-tk1/t30: colibri_t30: display reset reason

Display proper reset reason after the SoC info.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: switch to zImage
Igor Opaniuk [Thu, 1 Aug 2019 08:06:36 +0000 (11:06 +0300)]
apalis-tk1: switch to zImage

Switch to the generic compressed Kernel image type (zImage) instead of
the U-Boot specific uImage format.

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: add pcie_aspm=off to defargs
Igor Opaniuk [Thu, 1 Aug 2019 08:06:35 +0000 (11:06 +0300)]
apalis-tk1: add pcie_aspm=off to defargs

Disabling ASPM fixes incompatibilities with some PCIe cards

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: enable user debug by default
Igor Opaniuk [Thu, 1 Aug 2019 08:06:34 +0000 (11:06 +0300)]
apalis-tk1: enable user debug by default

Let the kernel print some debug messages when a user program
crashes due to an exception.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: provide proper USB vendor id
Igor Opaniuk [Thu, 1 Aug 2019 08:06:33 +0000 (11:06 +0300)]
apalis-tk1: provide proper USB vendor id

Use unified values for USB Product/Vendor numbers
when the config block is missing

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: set apalis gpio 8 aka fan_en
Igor Opaniuk [Thu, 1 Aug 2019 08:06:32 +0000 (11:06 +0300)]
apalis-tk1: set apalis gpio 8 aka fan_en

Make sure the Apalis GPIO 8 aka FAN_EN is on when using Apalis TK1
modules.

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agoapalis-tk1: do not explicitly release reset_moci#
Marcel Ziswiler [Thu, 1 Aug 2019 08:06:31 +0000 (11:06 +0300)]
apalis-tk1: do not explicitly release reset_moci#

By keeping RESET_MOCI_CTRL low we avoid explicitly releasing
RESET_MOCI#.

Please note that module hardware versions up to V1.1A will already
release RESET_MOCI# in hardware coming out of reset.

Please further note that with this change the USB hub on the Apalis
Evaluation board is kept in reset in U-Boot and therefore none of its
ports are operational in U-Boot.

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agocolibri/apalis tegra: drop DFU support
Igor Opaniuk [Fri, 14 Jun 2019 07:59:10 +0000 (10:59 +0300)]
colibri/apalis tegra: drop DFU support

We never really added a sensible DFU configuration for platforms
based on eMMC. Most of the things one might want to do can also be done
with UMS or fastboot, so drop the DFU configuration.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Philippe Schenker <philippe.schenker@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agommc: Move tegra loopback disable option to be under tegra
Trent Piepho [Mon, 1 Apr 2019 23:05:49 +0000 (23:05 +0000)]
mmc: Move tegra loopback disable option to be under tegra

This is a configuration option specific to the tegra controller.

Doing it this way makes it show up directly under the tegra controller
option, indented one level, as "Disable external clock loopback".

The way it is now, it shows up at the end of the controller list, not
indented, as if it's some kind of generic MMC configuration option.

Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agosound: Add codec enable to the sound bindings
Simon Glass [Wed, 24 Apr 2019 03:56:25 +0000 (21:56 -0600)]
sound: Add codec enable to the sound bindings

For U-Boot we allow a GPIO to be specified to enable the codec. Add this
to the relevant binding files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agosound: tegra: Add the binding file for tegra-audio
Simon Glass [Wed, 24 Apr 2019 03:56:24 +0000 (21:56 -0600)]
sound: tegra: Add the binding file for tegra-audio

This file was missed when adding the sound driver to U-Boot. Bring it in
from Linux 5.0.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agosound: snow: Add the binding file for snow
Simon Glass [Wed, 24 Apr 2019 03:56:23 +0000 (21:56 -0600)]
sound: snow: Add the binding file for snow

This file was missed when adding the sound driver to U-Boot. Bring it in
from Linux 5.0.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
4 years agox86: Skip setting up MTRRs in slimbootloader
Park, Aiden [Sat, 3 Aug 2019 08:31:20 +0000 (08:31 +0000)]
x86: Skip setting up MTRRs in slimbootloader

The setting up MTRRs have already been done in previous
Slim Bootloader stages.

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoboard: intel: Add new slimbootloader board
Park, Aiden [Sat, 3 Aug 2019 08:31:11 +0000 (08:31 +0000)]
board: intel: Add new slimbootloader board

Add slimbootloader board to run U-boot as a Slim Bootloader payload
- Add new board/intel/slimbootloader directory with minimum codes
- Add slimbootloader configuration files
- Add doc/board/intel/slimbootloader.rst

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: add slimbootloader board MAINTAINERS file]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: slimbootloader: Add a slimbootloader device tree
Park, Aiden [Sat, 3 Aug 2019 08:31:00 +0000 (08:31 +0000)]
x86: slimbootloader: Add a slimbootloader device tree

Add a new device tree which has very minimum nodes
- x86 reset
- x86 tsc_timer
- x86 pci
- Slim Bootloader serial

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: slimbootloader: Set TSC information for tsc_timer
Park, Aiden [Sat, 3 Aug 2019 08:30:52 +0000 (08:30 +0000)]
x86: slimbootloader: Set TSC information for tsc_timer

Slim Bootloader already calibrated TSC and provides it to U-Boot.
Therefore, U-Boot does not have to re-calibrate TSC.
Configuring tsc_base and clock_rate makes x86 tsc_timer driver bypass
TSC calibration and use the provided TSC frequency.
- Get TSC frequency from performance info hob
- Set tsc_base and clock_rate for tsc_timer driver

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: slimbootloader: Add serial driver
Park, Aiden [Sat, 3 Aug 2019 08:30:44 +0000 (08:30 +0000)]
x86: slimbootloader: Add serial driver

Slim Bootloader provides serial port info thru its HOB list pointer.
All these HOBs are eligible for Slim Bootloader based board only.
- Get serial port information from the serial port info HOB
- Leverage ns16550 driver with slimbootloader specific platform data

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: slimbootloader: Add memory configuration
Park, Aiden [Sat, 3 Aug 2019 08:30:36 +0000 (08:30 +0000)]
x86: slimbootloader: Add memory configuration

Slim Bootloader provides memory map info thru its HOB list pointer.
Configure memory size and relocation memory from the HOB data, and
provide e820 entries as well.
- Get memory size from the memory map info HOB
- Set available top memory lower than 4GB for U-Boot relocation
- Provide e820 entries from the memory map info HOB

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: Add a common HOB library
Park, Aiden [Sat, 3 Aug 2019 08:30:31 +0000 (08:30 +0000)]
x86: Add a common HOB library

FSP (CONFIG_HAVE_FSP) and Slim Bootloader (CONFIG_SYS_SLIMBOOTLOADER)
consume HOB (CONFIG_USE_HOB) data from the each HOB list pointer.
Add a common HOB library in lib/hob.c and include/asm/hob.h.

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: lib: fsp: Use EFI_GUID and efi_guid_t
Park, Aiden [Sat, 3 Aug 2019 08:30:20 +0000 (08:30 +0000)]
x86: lib: fsp: Use EFI_GUID and efi_guid_t

Use existing EFI_GUID and efi_guid_t instead of struct efi_guid.
This is pre-work before making a common HOB library.
- Change 'struct efi_guid' to efi_guit_t
- Remove 'struct efi_guid'
- Define GUIDs with EFI_GUID() macro
- Use guidcmp() instead of compare_guid()
- Remove compare_guid()

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested on MinnowMax
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: Add new slimbootloader CPU type
Park, Aiden [Sat, 3 Aug 2019 08:30:12 +0000 (08:30 +0000)]
x86: Add new slimbootloader CPU type

This slimbootloader CPU type is to enable U-Boot as a payload which
runs on top of Slim Bootloader (https://github.com/slimbootloader).
The Slim Bootloader is designed with multi-stage architecture for
the execution from reset vector to OS booting, and supports QEMU,
Apollolake, Whiskeylake and Coffeelake platforms consuming Intel
FSP (https://github.com/IntelFsp) for silicon initialization
including CAR and memory initialization.
The Slim Bootloader generates new HOB (Hand Off Block) which are
serial port info, memory map info, performance data info and so on,
and passes it to a Payload. U-Boot as a payload will use these HOB
information for basic initialization such as serial console.

As an initial commit,
- Add CONFIG_SYS_SLIMBOOTLOADER to enable slimbootloader CPU type
- Add new arch/x86/cpu/slimbootloader directory with minimum codes
- Get hob_list pointer from Slim Bootloader

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: ich-spi: Convert driver to spi-mem ops
Bernhard Messerklinger [Fri, 2 Aug 2019 06:38:34 +0000 (08:38 +0200)]
x86: ich-spi: Convert driver to spi-mem ops

With the introduction of the new spi-mem model operations changed
slightly. The new spi-mem operations make things a bit easier to
handle for ich-spi flash interface. This patch converts the ich-spi
driver by using spi-mem operations.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested on Intel CrownBay and MinnowMax
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: fix compiler warnings when building the driver for 64-bit]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agobios_emulator: remove stray break
Heinrich Schuchardt [Thu, 1 Aug 2019 17:37:08 +0000 (19:37 +0200)]
bios_emulator: remove stray break

Remove a stray break which suppresses some debug messages.

Indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: Avoid writing temporary asl files into the source tree
Simon Glass [Sun, 28 Jul 2019 20:16:28 +0000 (14:16 -0600)]
x86: Avoid writing temporary asl files into the source tree

At present the iasl tool (Intel ACPI (Advanced Configuration and Power
Interface) Source Language Compiler) is called in such a way that it uses
the source directory for its temporary files.

This means we end up with these files when building x86 boards:

   board/dfi/dfi-bt700/dsdt.aml
   board/dfi/dfi-bt700/dsdt.asl.tmp

Update the code to put temporary files in the target directory instead.

The iasl tool is quite confusing since it generates files with different
extensions and does not allow these to be individually specified. Add some
documentation to help with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: remove dsdt.hex from 'make clean' rules and correct U-Boot spelling]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: tangier: Populate CSRT for shared DMA controller
Andy Shevchenko [Sun, 14 Jul 2019 16:23:59 +0000 (19:23 +0300)]
x86: tangier: Populate CSRT for shared DMA controller

Intel Tangier has a shared DMA controller that, according to Microsoft spec,
has to be presented in CSRT table.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: acpi: Enable ACPI companion for Intel iDMA 32-bit
Andy Shevchenko [Sun, 14 Jul 2019 16:23:58 +0000 (19:23 +0300)]
x86: acpi: Enable ACPI companion for Intel iDMA 32-bit

ACPI has a capability to specify DMA parameters for DMA channel consumers.
To enable this for Intel Edison, describe GP DMA device in ACPI table
in order to get an ACPI handle to it in OS.

This works in conjunction with CSRT, which must be in align with DSDT.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: acpi: Introduce a stub to generate CSRT
Andy Shevchenko [Sun, 14 Jul 2019 16:23:57 +0000 (19:23 +0300)]
x86: acpi: Introduce a stub to generate CSRT

Here is a stub function that generates an empty CSRT. If the target platform
provides acpi_fill_csrt() function, it will be used to populate the table.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: acpi: Add CSRT description
Andy Shevchenko [Sun, 14 Jul 2019 16:23:56 +0000 (19:23 +0300)]
x86: acpi: Add CSRT description

Add CSRT [1] description as it provided in Linux kernel.

[1]: http://www.uefi.org/sites/default/files/resources/CSRT%20v2.pdf

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: qemu: Fix non-working ramboot and nfsboot environment variables
Bin Meng [Sun, 28 Jul 2019 15:13:58 +0000 (08:13 -0700)]
x86: qemu: Fix non-working ramboot and nfsboot environment variables

With qemu-x86 starting to use config_distro_bootcmd, the pre-defined
ramboot and nfsboot commands do not work any more. This is caused by
undefined environment variable 'ramdiskaddr' that was previously set
in CONFIG_EXTRA_ENV_SETTINGS but later CONFIG_EXTRA_ENV_SETTINGS was
redefined for distro boot.

Update the x86 generic CONFIG_EXTRA_ENV_SETTINGS to consider distro
boot, and remove the one in qemu-x86.h.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoqemu-x86: Use config_distro_bootcmd
Joshua Watt [Wed, 3 Jul 2019 17:45:32 +0000 (12:45 -0500)]
qemu-x86: Use config_distro_bootcmd

Converts qemu x86 machines to boot using distro_config. The intent is to
allow u-boot in qemu to be maximally compatible with many boot methods
without having to change the config. Previously, u-boot would only boot
in a very limited set of circumstances where there was a /boot/vmlinuz
on scsi 0:3 with no ramdisk.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: convert doc updates to reST]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: edison: Enable SD slot
Andy Shevchenko [Tue, 25 Jun 2019 20:52:04 +0000 (23:52 +0300)]
x86: edison: Enable SD slot

Enable SD slot on Intel Edison platform.

By default firmware doesn't put device on active state. Thus,
we have to do this explicitly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMerge tag 'mmc-8-9' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Fri, 9 Aug 2019 11:29:54 +0000 (07:29 -0400)]
Merge tag 'mmc-8-9' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- mmc test fix
- sdhci driver fix

4 years agoMerge tag 'u-boot-rockchip-20190809' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Fri, 9 Aug 2019 11:29:20 +0000 (07:29 -0400)]
Merge tag 'u-boot-rockchip-20190809' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Add rk3399 boards Khadas Edge/-V/-Captain
- Add fully souce code support for rk3328 including TPL/DRAM init
- Enable boot from eMMC for rk3399 rock960/ficus boards
- turn on the IO supply for dw_mmc

4 years agommc: tangier_sdhci: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:48:04 +0000 (02:48 +0000)]
mmc: tangier_sdhci: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: sdhci-cadence: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:48:02 +0000 (02:48 +0000)]
mmc: sdhci-cadence: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
4 years agommc: s5p: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:59 +0000 (02:47 +0000)]
mmc: s5p: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: pci: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:56 +0000 (02:47 +0000)]
mmc: pci: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: msm_sdhci: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:53 +0000 (02:47 +0000)]
mmc: msm_sdhci: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: bcm: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:50 +0000 (02:47 +0000)]
mmc: bcm: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Matthias Brugger <mbrugger@suse.com>
Cc: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: atmel_sdhci: fix uninitialized pointer deref on probe
Peng Fan [Tue, 6 Aug 2019 02:47:47 +0000 (02:47 +0000)]
mmc: atmel_sdhci: fix uninitialized pointer deref on probe

Commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field.

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Wenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Eugen Hristev <eugen.hristev@microchip.com>
4 years agotest/py: Fix MMC/SD block write test dependency
Michal Simek [Fri, 2 Aug 2019 04:48:44 +0000 (06:48 +0200)]
test/py: Fix MMC/SD block write test dependency

Test is using random command which has own Kconfig symbol CMD_RANDOM which
already depends on CMD_MEMORY. That's why replace cmd_memory by cmd_random.

Fixes: 09da18deab8b ("test/py: add MMC/SD block write test")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agommc: zynq_sdhci: fix uninitialized pointer deref on probe
Matwey V. Kornilov [Thu, 1 Aug 2019 15:00:05 +0000 (18:00 +0300)]
mmc: zynq_sdhci: fix uninitialized pointer deref on probe

Since commit 3d296365e4e8 ("mmc: sdhci: Add support for
sdhci-caps-mask") sdhci_setup_cfg() expects a valid sdhci_host mmc
field. Move the mmc field initialization before sdhci_setup_cfg()
call to avoid crash on mmc pointer dereference.

[this patch is based on commit 41a9fab8dac8 ("mmc: mv_sdhci: fix
uninitialized pointer deref on probe") by Baruch Siach]

Fixes: 3d296365e4e8 ("mmc: sdhci: Add support for sdhci-caps-mask")
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Michal Simek <michal.simek@xilinx.com> (on zcu102/zc706)
4 years agommc: Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected
Faiz Abbas [Thu, 1 Aug 2019 11:03:36 +0000 (16:33 +0530)]
mmc: Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected

Select SPL_HS200_SUPPORT if SPL_HS400_SUPPORT is selected as is being
done for the U-boot case.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 8 Aug 2019 13:19:08 +0000 (09:19 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Remove unused bcm2835 watchdog driver (still non-DM)
- Cosmetic fixup of mtk_wdt.c

4 years agofastboot: Remove "bootloader-version" variable
Sam Protsenko [Wed, 3 Jul 2019 16:34:07 +0000 (19:34 +0300)]
fastboot: Remove "bootloader-version" variable

As per [1], there is no such fastboot variable as "bootloader-version".
Only "version-bootloader" is supported. Let's reflect this and not
confuse users further.

[1] https://android.googlesource.com/platform/system/core/+/refs/tags/android-q-preview-4/fastboot/README.md

Fixes: 3aab70afc531d1 ("usb/gadget: add the fastboot gadget")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
4 years agofastboot: getvar: Add "is-userspace" variable
Sam Protsenko [Wed, 3 Jul 2019 16:00:22 +0000 (19:00 +0300)]
fastboot: getvar: Add "is-userspace" variable

As per documentation [1], Android-Q requires for bootloader to provide
"is-userspace" variable. "no" value should be always returned. This
patch implements this fastboot variable.

[1] https://android.googlesource.com/platform/system/core/+/refs/tags/android-q-preview-4/fastboot/README.md

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
4 years agousb: gadget: f_dfu.c: fix memory leak
Ralph Siemsen [Fri, 28 Jun 2019 14:42:02 +0000 (10:42 -0400)]
usb: gadget: f_dfu.c: fix memory leak

dfu_prepare_function() allocates N+1 descriptor header structures,
the last one being the "DFU Functional Descriptor".

dfu_unbind() handles de-allocation, but fails to free the final
one (eg. "DFU Functional Descriptor"), leading to memory leak.

Fixed by incrementing counter, as in dfu_prepare_function().

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
4 years agothor: fix crash after usb initialization failure
Marek Szyprowski [Fri, 21 Jun 2019 13:39:29 +0000 (15:39 +0200)]
thor: fix crash after usb initialization failure

Registration of USB download gadget might fail for various reasons, so
add a check for g_dnl_register() funtion return value. Without this fix,
thor_init() will try to access the registered gadget structures resulting
in NULL pointer dereference issue.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
4 years agofastboot: Remove "slot-suffixes" variable
Sam Protsenko [Tue, 18 Jun 2019 14:55:25 +0000 (17:55 +0300)]
fastboot: Remove "slot-suffixes" variable

"slot-suffixes" variable was dropped in fastboot tool (in [1]). Let's
track AOSP/master and drop this variable in U-Boot as well.

[1] https://android.googlesource.com/platform/system/core/+/42b18a518bac85c3eea14206f6cbafbd1e98a31f

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
[lukma: Remove getvar_slot_suffixes() declaration]
Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agousb, ohci, pci: add DM support for PCI-based OHCI USB controller
Heiko Schocher [Tue, 16 Jul 2019 08:49:07 +0000 (10:49 +0200)]
usb, ohci, pci: add DM support for PCI-based OHCI USB controller

add new DM based PCI driver ohci-pci for PCI-based
OHCI USB support.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agousb, ohci: add warning if none on pci found
Heiko Schocher [Tue, 16 Jul 2019 08:49:06 +0000 (10:49 +0200)]
usb, ohci: add warning if none on pci found

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agousb, ohci-hcd: set OHCI_USE_NPS if DM_PCI
Heiko Schocher [Tue, 16 Jul 2019 08:49:05 +0000 (10:49 +0200)]
usb, ohci-hcd: set OHCI_USE_NPS if DM_PCI

set OHCI_USE_NPS if DM_PCI is enabled.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agousb, ohci: fix ohci swap register access
Heiko Schocher [Tue, 16 Jul 2019 08:49:04 +0000 (10:49 +0200)]
usb, ohci: fix ohci swap register access

commit 57faca19a82f ("drivers: USB: OHCI: allow compilation for 64-bit targets")
broke ohci support for the mpc85xx based socrates board,
as it removed volatile keyword from ohci_readl/writel.

Fix this so usb works again on socrates board.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agousb, ohci-hdc: fix warning 'ohci_pci_ids' defined but not used
Heiko Schocher [Tue, 16 Jul 2019 08:49:03 +0000 (10:49 +0200)]
usb, ohci-hdc: fix warning 'ohci_pci_ids' defined but not used

var ohci_pci_ids is only used if DM_USB is not enabled.
So define this varaible only if
!CONFIG_IS_ENABLED(DM_USB)

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agoARM: da850-evm: Enable the USB PHY and MUSB Driver
Adam Ford [Wed, 10 Jul 2019 18:59:11 +0000 (13:59 -0500)]
ARM: da850-evm: Enable the USB PHY and MUSB Driver

This patch will enable the MUSB driver to support mass storage
devices connected to the OTG port in host mode.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agousb: musb-new: Add support for da8xx-musb
Adam Ford [Wed, 10 Jul 2019 18:59:10 +0000 (13:59 -0500)]
usb: musb-new: Add support for da8xx-musb

With the recently added phy driver, this patch will enable the
musb driver on the da8xx to operate in host mode.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agophy: Add support for phy-da8xx-usb
Adam Ford [Wed, 10 Jul 2019 18:59:09 +0000 (13:59 -0500)]
phy: Add support for phy-da8xx-usb

In preparation for supporting the musb driver, this patch
adds support for the usb phy associated with the musb driver.

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agotest/py: avb: Move AVB test to android dir
Sam Protsenko [Tue, 2 Jul 2019 18:18:02 +0000 (21:18 +0300)]
test/py: avb: Move AVB test to android dir

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
4 years agoMerge branch '2019-08-07-master-imports'
Tom Rini [Thu, 8 Aug 2019 03:13:35 +0000 (23:13 -0400)]
Merge branch '2019-08-07-master-imports'

- Misc Android / AVB bugfixes (including updating the header from
  Android).
- MediaTek updates
- Other assorted bugfixes.

4 years agoUpdate include/android_image.h from AOSP
Alex Deymo [Mon, 5 Aug 2019 20:24:45 +0000 (22:24 +0200)]
Update include/android_image.h from AOSP

This takes the latest changes from AOSP from the file
include/bootimg/bootimg.h from the repository:
https://android.googlesource.com/platform/system/tools/mkbootimg
and update the U-Boot version with the latest changes.

This file keeps the changes from AOSP to a minimum:
 * Comments were converted from C++ to C style.
 * Code inside __cplusplus #ifdef blocks were removed.
 * C++11 struct extensions replaced with a single struct.

Signed-off-by: Alex Deymo <deymo@google.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
4 years agocommon: image-android-dt: Fix logic in print fdt info routine
Sam Protsenko [Mon, 5 Aug 2019 17:11:03 +0000 (20:11 +0300)]
common: image-android-dt: Fix logic in print fdt info routine

Do not attempt to print fdt info if root node wasn't found.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
4 years agofit: Do not automatically decompress ramdisk images
Julius Werner [Fri, 2 Aug 2019 22:52:28 +0000 (15:52 -0700)]
fit: Do not automatically decompress ramdisk images

The Linux ramdisk should always be decompressed by the kernel itself,
not by U-Boot. Therefore, the 'compression' node in the FIT image should
always be set to "none" for ramdisk images, since the only point of
using that node is if you want U-Boot to do the decompression itself.

Yet some systems populate the node to the compression algorithm used by
the kernel instead. This used to be ignored, but now that we support
decompression of all image types it becomes a problem. Since ramdisks
should never be decompressed by U-Boot anyway, this patch adds a special
exception for them to avoid these issues. Still, setting the
'compression' node like that is wrong in the first place, so we still
want to print out a warning so that third-party distributions doing this
can notice and fix it.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agoconsole: execute flush on uart when silent is removed
Patrick Delaunay [Fri, 2 Aug 2019 12:58:10 +0000 (14:58 +0200)]
console: execute flush on uart when silent is removed

Avoid to flush buffer when silent console is activated as the
console can be reactivate later, after relocation, when the env will
be updated with the saved one.

Solve issue (missing beginning of U-Boot trace) when:
- CONFIG_SILENT_CONSOLE is activated
- silent=1 is defined in default environment (CONFIG_EXTRA_ENV_SETTINGS)
- silent is removed in saved environment with:
      > env delete silent; env save

Only functional when PRE_CONSOLE_BUFFER is activated.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoconsole: update silent tag after env load
Patrick Delaunay [Fri, 2 Aug 2019 12:58:09 +0000 (14:58 +0200)]
console: update silent tag after env load

Update the "silent" property with the variable "silent" get from
saved environment, it solves the issue when:
- CONFIG_SILENT_CONSOLE and CONFIG_SYS_CONSOLE_IS_IN_ENV are activated
- silent is not defined in default environment
- silent is requested in saved environment with:
  > env set silent 1; env save

On next reboot the console is not disabled as expected after relocation
and the environment load from flash (the callback is not called when
the INSERT is requested in the created hash table)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
4 years agocmd: avb: Fix compiler warnings
Sam Protsenko [Wed, 31 Jul 2019 16:59:09 +0000 (19:59 +0300)]
cmd: avb: Fix compiler warnings

When building U-Boot with AVB enabled, compiler shows next warnings:

    cmd/avb.c: In function 'do_avb_read_pvalue':
    cmd/avb.c:371:18: warning: format '%ld' expects argument of type
                      'long int', but argument 2 has type 'size_t'
                      {aka 'unsigned int'} [-Wformat=]
       printf("Read %ld bytes, value = %s\n", bytes_read,
                    ~~^                       ~~~~~~~~~~
                    %d

    cmd/avb.c: In function 'do_avb_write_pvalue':
    cmd/avb.c:404:19: warning: format '%ld' expects argument of type
                      'long int', but argument 2 has type '__kernel_size_t'
                      {aka 'unsigned int'} [-Wformat=]
       printf("Wrote %ld bytes\n", strlen(value) + 1);
                     ~~^           ~~~~~~~~~~~~~~~~~
                     %d

Fix those by using "%zu" specified.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
4 years agoavb: Fix build when CONFIG_OPTEE_TA_AVB is disabled
Sam Protsenko [Wed, 31 Jul 2019 16:59:08 +0000 (19:59 +0300)]
avb: Fix build when CONFIG_OPTEE_TA_AVB is disabled

When having only these AVB related configs enabled:

    CONFIG_AVB_VERIFY=y
    CONFIG_CMD_AVB=y
    CONFIG_LIBAVB=y

build fails with next errors:

    common/avb_verify.c: In function 'read_persistent_value':
    common/avb_verify.c:867:6: warning: implicit declaration of function
                                        'get_open_session'
    common/avb_verify.c:870:45: error: 'struct AvbOpsData' has no member
                                        named 'tee'
    common/avb_verify.c:894:7: warning: implicit declaration of function
                                        'invoke_func'
    common/avb_verify.c: In function 'write_persistent_value':
    common/avb_verify.c:931:45: error: 'struct AvbOpsData' has no member
                                       named 'tee'

Guard read_persistent_value() and write_persistent_value() functions
by checking if CONFIG_OPTEE_TA_AVB is enabled (as those are only used in
that case) to fix the build with mentioned configuration.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>