platform/kernel/u-boot.git
3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Tue, 8 Dec 2020 14:53:03 +0000 (09:53 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-imx

3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Mon, 7 Dec 2020 16:46:12 +0000 (11:46 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Espressobin: Simplify DT handling of board variants (Pali)
- Add Luka Perkov to maintainers of Puzzle-M801 (Luka)
- Armada 38x: Enable board specific USB2 high-speed impedance
  threshold configuration (Joshua)

3 years agoconfigs: migrate CONFIG_IMX_THERMAL to defconfigs
Tom Rini [Fri, 30 Oct 2020 01:22:03 +0000 (21:22 -0400)]
configs: migrate CONFIG_IMX_THERMAL to defconfigs

Done via moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoimx8mp_evk: README instruction fixes
Baruch Siach [Wed, 28 Oct 2020 07:38:52 +0000 (09:38 +0200)]
imx8mp_evk: README instruction fixes

Use the full name of firmware self extracting file to make it run.

Also, don't use sudo when not needed.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
3 years agodoc: board: imx8qm-rom7720-a1.rst: convert readme to reST
Oliver Graute [Fri, 20 Nov 2020 14:05:51 +0000 (15:05 +0100)]
doc: board: imx8qm-rom7720-a1.rst: convert readme to reST

Convert README to reStructuredText format.

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
3 years agoarm: mvebu: Espressobin: Detect presence of emmc at runtime
Pali Rohár [Wed, 25 Nov 2020 18:20:10 +0000 (19:20 +0100)]
arm: mvebu: Espressobin: Detect presence of emmc at runtime

Try to initialize emmc in board_late_init() and if it fails then we know
that emmc device is not connected.

This allows to use in U-Boot just one DTS file for all Espressobin variants
and also to correctly set fdtfile env variable for Linux kernel.

Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Gérald Kerma <gerald@gk2.net>
Reviewed-by: Andre Heider <a.heider@gmail.com>
3 years agoarm: mvebu: Espressobin: Add support for emmc into dts file
Pali Rohár [Wed, 25 Nov 2020 18:20:09 +0000 (19:20 +0100)]
arm: mvebu: Espressobin: Add support for emmc into dts file

To simplify setup, configuration and compilation of u-boot, define emmc
node for all Espressobin boards. Espressobin boards without populated emmc
works correctly, just detection and initialization of emmc obviously fails.

Code for emmc is extracted from commit f1a43c84a960 ("arm64: dts: a3720:
add support for espressobin with populated emmc").

Signed-off-by: Pali Rohár <pali@kernel.org>
Tested-by: Gérald Kerma <gerald@gk2.net>
3 years agoRevert "arm64: dts: a3720: add support for espressobin with populated emmc"
Pali Rohár [Wed, 25 Nov 2020 18:20:08 +0000 (19:20 +0100)]
Revert "arm64: dts: a3720: add support for espressobin with populated emmc"

This reverts commit f1a43c84a960265309fa8365759de271a70c5a7e.

3 years agoRevert "arm64: dts: armada-3720-espressobin: split common parts to .dtsi"
Pali Rohár [Wed, 25 Nov 2020 18:20:07 +0000 (19:20 +0100)]
Revert "arm64: dts: armada-3720-espressobin: split common parts to .dtsi"

This reverts commit 03bb6a9b1ed7085794c5f167307273d15c99d3f0.

3 years agoarm: mvebu: a38x: Configurable USB2 high-speed impedance threshold
Joshua Scott [Sun, 8 Nov 2020 21:14:08 +0000 (10:14 +1300)]
arm: mvebu: a38x: Configurable USB2 high-speed impedance threshold

Hardware testing of a board using the Armada 385 has shown that an
impedance threshold setting of 0x7 performs better in an eye-diagram
test than with Marvell's recommended value 0x6.

As other boards may still perform better with Marvell's reccomended value,
a configuration option is added with a default value of 0x6.

Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoarm: mvebu: puzzle-m801: Add a maintainer
Luka Kovacic [Thu, 29 Oct 2020 21:30:30 +0000 (22:30 +0100)]
arm: mvebu: puzzle-m801: Add a maintainer

Add Luka Perkov to Puzzle-M801 BOARD MAINTAINERS.

Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agocolibri-imx8x: add implementation for board_mem_get_layout
Igor Opaniuk [Thu, 22 Oct 2020 08:21:43 +0000 (11:21 +0300)]
colibri-imx8x: add implementation for board_mem_get_layout

Add implementation of board_mem_get_layout for overriding the memory
layout.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
3 years agoapalis-imx8x: add implementation for board_mem_get_layout
Igor Opaniuk [Thu, 22 Oct 2020 08:21:42 +0000 (11:21 +0300)]
apalis-imx8x: add implementation for board_mem_get_layout

Add implementation of board_mem_get_layout for overriding the memory
layout.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
3 years agoapalis-imx8: add implementation for board_mem_get_layout
Igor Opaniuk [Thu, 22 Oct 2020 08:21:41 +0000 (11:21 +0300)]
apalis-imx8: add implementation for board_mem_get_layout

Add implementation of board_mem_get_layout for overriding the memory
layout.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoimx8: allow overriding memory layout
Marcel Ziswiler [Thu, 22 Oct 2020 08:21:40 +0000 (11:21 +0300)]
imx8: allow overriding memory layout

Introduce weak function board_mem_get_layout() which allows overriding
the memory layout from board code in runtime, useful for handling
different SKU versions.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agodoc: board: apalis-imx8x: add documentation
Igor Opaniuk [Thu, 22 Oct 2020 08:21:39 +0000 (11:21 +0300)]
doc: board: apalis-imx8x: add documentation

This documents the u-boot build and deployment procedure.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoboard: toradex: add apalis-imx8x 2gb wb it v1.1a module support
Igor Opaniuk [Thu, 22 Oct 2020 08:21:38 +0000 (11:21 +0300)]
board: toradex: add apalis-imx8x 2gb wb it v1.1a module support

This commit adds initial support for the Toradex Apalis iMX8X 2GB WB
IT V1.1A System on Module support [1].

Boot log:
U-Boot 2020.10-02940-g894aebb7e8-dirty (Oct 22 2020 - 09:43:57 +0300)
CPU:   NXP i.MX8QXP RevB A35 at 1200 MHz at 30C
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In:    serial@5a070000
Out:   serial@5a070000
Err:   serial@5a070000
Model: Toradex Apalis iMX8 QuadXPlus 2GB Wi-Fi / BT IT V1.1A,
Serial# 06617018
Net:   eth0: ethernet@5b040000 [PRIME]
Hit any key to stop autoboot:  0

Functionality wise the following is known to be working:
  - eMMC and MMC/SD card
  - Ethernet (*)
  - GPIOs
  - I2C

Unfortunately, there is no USB functionality for the i.MX 8QXP as of
yet.

* With the SCU FW from the latest Toradex BSP 5.0.0 (SCU FW 1.5.1)
ETH PHY encounters bring up problems after reset, this will be fixed
soon on SCU FW side.

[1] https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-imx-8x
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoARM: dts: fsl-imx8qxp-apalis: add initial device tree
Igor Opaniuk [Thu, 22 Oct 2020 08:21:37 +0000 (11:21 +0300)]
ARM: dts: fsl-imx8qxp-apalis: add initial device tree

Introduce initial hierarchy of device trees for Apalis iMX8X
System on Module.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoimx8m: fix cache setup for dynamic sdram size
Tim Harvey [Fri, 25 Sep 2020 15:08:35 +0000 (08:08 -0700)]
imx8m: fix cache setup for dynamic sdram size

the mem_map structure containing the size of SDRAM is used in various
cache functions in cache_v8.c thus we need to update it with the
sdram size the board is configured with as well. Without this
the cache functions do not get setup properly and can hang
in the case where a board reports more SDRAM than defined in
PHYS_SDRAM_SIZE.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
3 years agoverdin-imx8mm: automatic ram size detection
Marcel Ziswiler [Wed, 28 Oct 2020 09:58:16 +0000 (11:58 +0200)]
verdin-imx8mm: automatic ram size detection

Implement board_phys_sdram_size() to automatically detect Verdin iMX8M
Mini DualLite 1GB vs. Verdin iMX8M Mini Quad 2GB.

Note: This only works if we keep using similar RAM chips!

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agotoradex: tdx-cfg-clock: fix i.mx 8m mini interactive
Marcel Ziswiler [Wed, 28 Oct 2020 09:58:15 +0000 (11:58 +0200)]
toradex: tdx-cfg-clock: fix i.mx 8m mini interactive

Now with them first Verdin iMX8M Mini DualLite modules in for bring-up
we got clarity how is_cpu_type() actually behaves.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoverdin-imx8mm: spl: enable pca9450 i2c level translator
Max Krummenacher [Wed, 28 Oct 2020 09:58:14 +0000 (11:58 +0200)]
verdin-imx8mm: spl: enable pca9450 i2c level translator

Enable PCA9450 i2c level translator, as this is used for the
on module ADC.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoverdin-imx8mm: implement hardware version detection
Max Krummenacher [Wed, 28 Oct 2020 09:58:13 +0000 (11:58 +0200)]
verdin-imx8mm: implement hardware version detection

And select the correct devicetree accordingly by setting the variant
environment variable.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
3 years agoverdin-imx8mm: spl: switch to pca9450 pmic
Max Krummenacher [Wed, 28 Oct 2020 09:58:12 +0000 (11:58 +0200)]
verdin-imx8mm: spl: switch to pca9450 pmic

V1.1A HW switched the PMIC from BD71837 to PCA9450.

- Disable combined DVS in PCA9450_BUCK123_DVS.
- Increase DDR Voltage to 0.95V as we use a 1.5GHz RAM.
- Configure WDOG_B behaviour.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agoARM: dts: imx8mm-verdin: follow changed pmic
Max Krummenacher [Wed, 28 Oct 2020 09:58:11 +0000 (11:58 +0200)]
ARM: dts: imx8mm-verdin: follow changed pmic

The used PMIC has been changed from RHOM BD71837 to NXP PCA9450A.
Adjust the device tree accordingly.
Remove the old ADC node as the ADC has been changed and has no longer
a separate power rail.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
3 years agopower: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig
Igor Opaniuk [Wed, 28 Oct 2020 09:58:10 +0000 (11:58 +0200)]
power: pmic: add SPL_DM_PMIC_PCA9450 symbol to Kconfig

Add SPL_DM_PMIC_PCA9450 symbol to Kconfig.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agopca9450a: fix i2c address
Max Krummenacher [Wed, 28 Oct 2020 09:58:09 +0000 (11:58 +0200)]
pca9450a: fix i2c address

The I2C address is 0x25, not 0x35. This according to the datasheet and
tests with a PCA9450A.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agotoradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus
Marcel Ziswiler [Wed, 28 Oct 2020 09:58:08 +0000 (11:58 +0200)]
toradex: tdx-cfg-clock: add new i.mx 8m mini/plus skus

Add new i.MX 8M Mini/Plus SKUs to ConfigBlock handling:

0058: Verdin iMX8M Plus Quad 4GB Wi-Fi / BT IT

0059: Verdin iMX8M Mini Quad 2GB IT

0060: Verdin iMX8M Mini DualLite 1GB WB IT

0061: Verdin iMX8M Plus Quad 2GB

Rename existing SKU (use correct one):
Verdin iMX8M Nano SoloLite 1GB -> Verdin iMX8M Nano Quad 1GB Wi-Fi

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
3 years agommc: fsl_esdhc_imx: optimize the timing setting
Haibo Chen [Tue, 3 Nov 2020 09:18:35 +0000 (17:18 +0800)]
mmc: fsl_esdhc_imx: optimize the timing setting

For imx usdhc/esdhc, once set the DDR_EN, enable the DDR mode, the
card clock will be divied by 2 automatically by the host. So need
to first config the DDR_EN correctly, then update the card clock.
This will make sure the actual card clock is as our expected.
IC also suggest config the DDR_EN firstly, then config the clock
divider.

For HS400/HS400ES mode, need to config the strobe dll, this need
to based on the correct target clock rate, so need to do this after
clock rate is update.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoimx: imx8qm_rom7720_a1: add missing DTS to the MAINTAINERS
Oliver Graute [Wed, 4 Nov 2020 11:02:23 +0000 (12:02 +0100)]
imx: imx8qm_rom7720_a1: add missing DTS to the MAINTAINERS

add the dts file to the MAINTAINERS entry

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: uboot-imx <uboot-imx@nxp.com>
3 years agoboard: ge: bx50v3: check b850v3 power management watchdog
Ian Ray [Wed, 4 Nov 2020 16:18:43 +0000 (17:18 +0100)]
board: ge: bx50v3: check b850v3 power management watchdog

Set `bootcause' from b850v3 power management watchdog status.

Boot cause "REVERT" is no longer used, remove it.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
3 years agoboard: ge: reduce VPD EEPROM partition size
Ian Ray [Wed, 4 Nov 2020 16:18:42 +0000 (17:18 +0100)]
board: ge: reduce VPD EEPROM partition size

Reduce vital product data size to match the latest specification.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
3 years agoboard: ge: bx50v3: reduce magic numbers
Sebastian Reichel [Wed, 4 Nov 2020 16:18:41 +0000 (17:18 +0100)]
board: ge: bx50v3: reduce magic numbers

Use VPD product ID instead of confidx, so that we can easily reuse the
product ID defines and avoid some magic numbers.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
3 years agoboard: ge: bx50v3: drop unused pinmux defines
Sebastian Reichel [Wed, 4 Nov 2020 16:18:40 +0000 (17:18 +0100)]
board: ge: bx50v3: drop unused pinmux defines

Remove pinmux defines, that are no longer used after
converting the code to devicetree.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
3 years agoboard: ge: bx50v3: correct CONFIG_CMD_NFS
Ian Ray [Wed, 4 Nov 2020 16:18:39 +0000 (17:18 +0100)]
board: ge: bx50v3: correct CONFIG_CMD_NFS

Fix typo in NFS command configuration check.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
3 years agoboard: ge: common: vpd: fix name
Sebastian Reichel [Wed, 4 Nov 2020 16:18:38 +0000 (17:18 +0100)]
board: ge: common: vpd: fix name

Commit f692b479f02d changed the VPD partition name from "vpd" to
"vpd@0". Fix the VPD reader code to use the new name, so that
the VPD code keeps working.

Fixes: f692b479f02d ("i2c: eeprom: Use reg property instead of offset and size")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
3 years agommc: fsl_esdhc_imx: add wait_dat0() support
Haibo Chen [Thu, 5 Nov 2020 06:57:13 +0000 (14:57 +0800)]
mmc: fsl_esdhc_imx: add wait_dat0() support

Add wait_dat0() support, upper layer will use this callback.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoimx: ahab: fix implicit declaration warning
Oliver Graute [Fri, 6 Nov 2020 08:09:29 +0000 (09:09 +0100)]
imx: ahab: fix implicit declaration warning

Fix the following warning:

arch/arm/mach-imx/imx8/ahab.c:105:3: warning: implicit declaration of function ‘flush_dcache_range’ [-Wimplicit-function-declaration]
   flush_dcache_range(s, e);
   ^~~~~~~~~~~~~~~~~~

Include cpu_func.h header which declares the flush_dcache_range()
function.

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: uboot-imx <uboot-imx@nxp.com>
3 years agoimx: ahab: fix compiler warnings in debug
Oliver Graute [Fri, 6 Nov 2020 08:09:30 +0000 (09:09 +0100)]
imx: ahab: fix compiler warnings in debug

arch/arm/mach-imx/imx8/ahab.c: In function ‘authenticate_os_container’:
arch/arm/mach-imx/imx8/ahab.c:96:9: warning: format ‘%x’ expects argument of type
‘unsigned int’, but argument 9 has type ‘ulong {aka long unsigned int}’ [-Wformat=]
   debug("img %d, dst 0x%x, src 0x%x, size 0x%x\n",

Fix those by using "%lu" specified.

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: uboot-imx <uboot-imx@nxp.com>
3 years agoimx: ahab: Fix compiler warnings in printf
Oliver Graute [Fri, 6 Nov 2020 08:09:31 +0000 (09:09 +0100)]
imx: ahab: Fix compiler warnings in printf

arch/arm/mach-imx/imx8/ahab.c:110:63: warning: format ‘%x’ expects
argument of type ‘unsigned int’, but argument 2 has type ‘u64 {aka long
long unsigned int}’ [-Wformat=]

Fix those by using %llx

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: uboot-imx <uboot-imx@nxp.com>
3 years agoimx: clk: added IPG Clock for I2C on imx8qm
Oliver Graute [Thu, 12 Nov 2020 10:51:04 +0000 (11:51 +0100)]
imx: clk: added IPG Clock for I2C on imx8qm

This patch fixes this clk issue on I2C on imx8qm

 => i2c bus
 Bus 3:  i2c@5a830000
 => i2c dev 3
 Setting bus to 3
 Failed to enable ipg clk
 Failure changing bus number (-524)

Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: uboot-imx <uboot-imx@nxp.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
3 years agoimx: aristainetos: enable U-Boot Environment variables protection
Heiko Schocher [Mon, 30 Nov 2020 19:46:05 +0000 (20:46 +0100)]
imx: aristainetos: enable U-Boot Environment variables protection

enable Environment protection with:

CONFIG_ENV_APPEND=y
CONFIG_ENV_WRITEABLE_LIST=y
CONFIG_ENV_ACCESS_IGNORE_FORCE

and add board specific env_get_location()
function.

Signed-off-by: Heiko Schocher <hs@denx.de>
3 years agoarm: dts: aristainetos: sync with changes in linux
Heiko Schocher [Mon, 30 Nov 2020 19:46:04 +0000 (20:46 +0100)]
arm: dts: aristainetos: sync with changes in linux

sync with comaptible changes in linux from
Krzysztof Kozlowski.

https://patchwork.kernel.org/project/linux-arm-kernel/patch/20200930190143.27032-12-krzk@kernel.org/

Signed-off-by: Heiko Schocher <hs@denx.de>
3 years agoimx6: add support for aristainetos2c_cslb board variant
Heiko Schocher [Mon, 30 Nov 2020 19:46:03 +0000 (20:46 +0100)]
imx6: add support for aristainetos2c_cslb board variant

add support for aristainetos2c_cslb board variant.

Signed-off-by: Heiko Schocher <hs@denx.de>
3 years agoimx6: remove not longer supported aristainetos boards
Heiko Schocher [Mon, 30 Nov 2020 19:46:02 +0000 (20:46 +0100)]
imx6: remove not longer supported aristainetos boards

Removed aristainetos2, 2b, 2b-csl. This boards have been
recalled and destroyed.

Adapt board code to remove stuff not needed anymore.

Fix checkpatch warning, remove fdt_high and initrd_high
from default environment.

Signed-off-by: Heiko Schocher <hs@denx.de>
zu remove

3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-tegra
Tom Rini [Sat, 5 Dec 2020 20:41:18 +0000 (15:41 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-tegra

- Assorted updates

3 years agoconfigs: cei-tk1-som: remove CONFIG_ARMV7_PSCI in include file
Patrick Delaunay [Thu, 18 Jun 2020 07:41:34 +0000 (09:41 +0200)]
configs: cei-tk1-som: remove CONFIG_ARMV7_PSCI in include file

Activate ARCH_SUPPORT_PSCI as other TEGRA124 target and remove
CONFIG_ARMV7_PSCI and CONFIG_ARMV7_PSCI_NR_CPUS in configs file as they
are migrated in Kconfig.

Select CONFIG_ARMV7_PSCI_0_1 (the first PSCI version),
because CONFIG_ARMV7_PSCI_0_2 and CONFIG_ARMV7_PSCI_1_0
are not activated in this product.

Hi,

This patch depend on the previous serie [1].

I don't test this patch on real hardware but
after this patch the size of the binary don't change.

In .config we have:
  CONFIG_ARCH_SUPPORT_PSCI=y
  CONFIG_ARMV7_PSCI=y
  # CONFIG_ARMV7_PSCI_1_0 is not set
  # CONFIG_ARMV7_PSCI_0_2 is not set
  CONFIG_ARMV7_PSCI_0_1=y
  CONFIG_ARMV7_PSCI_NR_CPUS=4

In u-boot.cfg, this patch only add the 2 lines
  #define CONFIG_ARCH_SUPPORT_PSCI 1
  #define CONFIG_ARMV7_PSCI_0_1 1

[1] "Convert CONFIG_ARMV7_PSCI_1_0 and CONFIG_ARMV7_PSCI_0_2 to Kconfig"
http://patchwork.ozlabs.org/project/uboot/list/?series=184029

Regards
Patrick

END

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Peter Chubb <peter.chubb@data61.csiro.au>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agoarm: tegra: add options for BOOTENV_EFI_SET_FDTFILE_FALLBACK for tegra186
Peter Robinson [Wed, 1 Apr 2020 23:28:55 +0000 (00:28 +0100)]
arm: tegra: add options for BOOTENV_EFI_SET_FDTFILE_FALLBACK for tegra186

Upstream linux DT naming doesn't align with the U-Boot DT, which may
not always be the case so this allows using BOOTENV_EFI_SET_FDTFILE_FALLBACK
where it might be appropriate for some boards.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agoarm: tegra: define fdtfile option for distro boot
Peter Robinson [Wed, 1 Apr 2020 23:28:54 +0000 (00:28 +0100)]
arm: tegra: define fdtfile option for distro boot

For booting via UEFI we need to define the fdtfile option so
bootefi has the option to load a fdtfile from disk. For arm64
the kernel dtb is located in a vendor directory so we define
that as nvidia for that architecture.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agocolibri_t30: disable rs232 serial transceiver forceoff pins
Marcel Ziswiler [Thu, 12 Sep 2019 09:12:56 +0000 (11:12 +0200)]
colibri_t30: disable rs232 serial transceiver forceoff pins

Use gpio_early_init_uart() function to disable RS232 serial transceiver
ForceOFF# pins on Iris.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agoapalis/colibri_t30: add note about colibri vs. nvidia uart mapping
Marcel Ziswiler [Thu, 12 Sep 2019 09:12:55 +0000 (11:12 +0200)]
apalis/colibri_t30: add note about colibri vs. nvidia uart mapping

The following mapping is applicable for Apalis T30:

Apalis UART1: NVIDIA UARTA
Apalis UART2: NVIDIA UARTD
Apalis UART3: NVIDIA UARTB
Apalis UART4: NVIDIA UARTC

The following mapping is applicable for Colibri T30:

Colibri UART-A: NVIDIA UARTA
Colibri UART-B: NVIDIA UARTD
Colibri UART-C: NVIDIA UARTB

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agoapalis/colibri_t30: avoid uart input from floating pins
Marcel Ziswiler [Thu, 12 Sep 2019 09:12:54 +0000 (11:12 +0200)]
apalis/colibri_t30: avoid uart input from floating pins

Avoid UART input from floating RX pins on UARTB and UARTC (Colibri T30)
and UARTB, UARTC and UARTD (Apalis T30).

Note: Floating pins may cause spurious break conditions potentially
interrupting U-Boot's autoboot.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agocolibri_t30: fix spi1 and uart2/3 resp. uartb/c pinmuxing
Marcel Ziswiler [Thu, 12 Sep 2019 09:12:53 +0000 (11:12 +0200)]
colibri_t30: fix spi1 and uart2/3 resp. uartb/c pinmuxing

Fix SPI1 and UART2/3 resp. UARTB/C pinmuxing.

Note: The former was illegally muxing multiple SoC balls onto the same
internal SoC signal which caused rather strange behaviour regarding
the RS232 serial transceiver ForceOFF# pins as available on Iris.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agoapalis/colibri_t30: add comment about tristate and input vs. output pinmuxing
Marcel Ziswiler [Thu, 12 Sep 2019 09:12:52 +0000 (11:12 +0200)]
apalis/colibri_t30: add comment about tristate and input vs. output pinmuxing

Add pinmuxing comment stating that TRISTATE means the output driver is
tri-stated and INPUT means the input driver is enabled vs. OUTPUT where
it is disabled.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
3 years agoMerge branch '2020-12-02-master-imports'
Tom Rini [Thu, 3 Dec 2020 14:43:47 +0000 (09:43 -0500)]
Merge branch '2020-12-02-master-imports'

- Assorted minor fixes

3 years agokm/common: remove CONFIG_MTD_CONCAT
Holger Brunck [Thu, 5 Nov 2020 09:28:51 +0000 (10:28 +0100)]
km/common: remove CONFIG_MTD_CONCAT

This was used for a board which is not supproted anymore and can
therefore be dropped.

CC: Stefan Roese <sr@denx.de>
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agoremove obsolete option CONFIG_JFFS2_CMDLINE
Holger Brunck [Thu, 5 Nov 2020 09:15:37 +0000 (10:15 +0100)]
remove obsolete option CONFIG_JFFS2_CMDLINE

This option is obsolete since 2009 and can be removed globally.

CC: Stefan Roese <sr@denx.de>
Signed-off-by: Holger Brunck <holger.brunck@hitachi-powergrids.com>
Reviewed-by: Stefan Roese <sr@denx.de>
3 years agomtd: spi-nor-ids: add Winbond W25Q32JW-IM flash
Michael Walle [Mon, 30 Nov 2020 23:12:39 +0000 (00:12 +0100)]
mtd: spi-nor-ids: add Winbond W25Q32JW-IM flash

The Kontron SMARC-sAL28 board uses that flash.

This is the same change as in the linux commit f3418718c0ec ("mtd:
spi-nor: Add support for w25q32jwm").

Signed-off-by: Michael Walle <michael@walle.cc>
Reported-by: Leo Krueger <leo.krueger@zal.aero>
3 years agoMAINTAINERS: assign include/log.h
Heinrich Schuchardt [Mon, 30 Nov 2020 08:08:12 +0000 (09:08 +0100)]
MAINTAINERS: assign include/log.h

include/log.h belongs to LOGGING.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agolog: typos in include/log.h
Heinrich Schuchardt [Mon, 30 Nov 2020 08:04:48 +0000 (09:04 +0100)]
log: typos in include/log.h

Correct several typos.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agocommon: update: fix an "unused" warning against update_flash()
AKASHI Takahiro [Thu, 19 Nov 2020 00:37:19 +0000 (09:37 +0900)]
common: update: fix an "unused" warning against update_flash()

Since update_flash() is used only in update_tftp(), it should be
guarded with appropriate config options.

After the commit 3149e524fc1e, common/update.c will be built under
either CONFIG_UDATE_TFTP, CONFIG_DFU_TFTP or CONFIG_UPDATE_FIT.
Since CONFIG_UPDATE_FIT, hence fit_update(), doesn't rely on
update_flash(), the compiler may cause an "unused" warning if
CONFIG_UPDATE_FIT=y and CONFIG_UPDATE_TFTP=n and CONFIG_DFU_TFTP=n.

This is, for example, the case for sandbox defconfig where
EFI_CAPSULE_FIRMWARE_FIT is enabled for test purpose.

Fixes: 3149e524fc1e ("common: update: add a generic interface for FIT
       image")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
3 years agoglobal_data: Fix comment for dm_driver_rt
Simon Glass [Mon, 30 Nov 2020 00:07:05 +0000 (17:07 -0700)]
global_data: Fix comment for dm_driver_rt

This comment is in the wrong format, so reports an error with
'make htmldocs'. Fix it.

Fixes: a294ead8d25 ("dm: Use an allocated array for run-time device info")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agolog: Fix comment for LOGC_BOOT
Simon Glass [Mon, 30 Nov 2020 00:07:04 +0000 (17:07 -0700)]
log: Fix comment for LOGC_BOOT

This comment is in the wrong format, so reports an error with
'make htmldocs'. Fix it.

Fixes: b73d61a5565 ("x86: zimage: Add a little more logging")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agolinux/compat.h: Remove debug() from spin_lock_irqsave()
Andy Shevchenko [Thu, 19 Nov 2020 19:26:20 +0000 (21:26 +0200)]
linux/compat.h: Remove debug() from spin_lock_irqsave()

It seems nobody tested the debug() option in spin_lock_irqsave().
Currently, when #define DEBUG, it spoils the compiler with

In file included from drivers/usb/dwc3/gadget.c:18:
drivers/usb/dwc3/gadget.c: In function ‘dwc3_gadget_set_selfpowered’:
include/log.h:235:4: warning: ‘flags’ is used uninitialized in this function [-Wuninitialized]
  235 |    printf(pr_fmt(fmt), ##args); \
      |    ^~~~~~
drivers/usb/dwc3/gadget.c:1347:17: note: ‘flags’ was declared here
 1347 |  unsigned long  flags;
      |                 ^~~~~

and so on...
Drop useless debug() call to make compiler happy.

Fixes: 0c06db598367 ("lib, linux: move linux specific defines to linux/compat.h")
Cc: Heiko Schocher <hs@denx.de>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
3 years agowatchdog: sbsa: timeout should be in "millisecond"
Zhao Qiang [Wed, 25 Nov 2020 04:55:47 +0000 (12:55 +0800)]
watchdog: sbsa: timeout should be in "millisecond"

timeout should be in "millisecond" instead of second,
so divided it by 1000 when calculate the load value.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
3 years agofs/squashfs: sqfs_close/sqfs_read_sblk: set ctxt.sblk to NULL after free
Richard Genoud [Tue, 24 Nov 2020 17:07:52 +0000 (18:07 +0100)]
fs/squashfs: sqfs_close/sqfs_read_sblk: set ctxt.sblk to NULL after free

This will prevent a double free error if sqfs_close() is called twice.

Signed-off-by: Richard Genoud <richard.genoud@posteo.net>
3 years agoMerge tag 'dm-pull-30nov20' of git://git.denx.de/u-boot-dm
Tom Rini [Wed, 2 Dec 2020 16:36:51 +0000 (11:36 -0500)]
Merge tag 'dm-pull-30nov20' of git://git.denx.de/u-boot-dm

Minor bugfixes

3 years agoMerge tag 'mips-fixes-for-v2021.01' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 1 Dec 2020 02:45:25 +0000 (21:45 -0500)]
Merge tag 'mips-fixes-for-v2021.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-mips

- MIPS: octeon: fix allocation bug in DDR driver
- MIPS: octeon: fix init of gd->ram_size
- MIPS: octeon: add support for Octeon boot header

3 years agobinman: Remove additional backslash
Michal Simek [Mon, 23 Nov 2020 08:08:19 +0000 (09:08 +0100)]
binman: Remove additional backslash

The origin patch didn't have this change and it was caused by manual
resolution where additional backslash was added.

Fixes: 6723b4c6ca7b ("binman: Call helper function binman_set_rom_offset() to fill offset")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agodm: core: Fix incorrect flag check
Marek Vasut [Sun, 15 Nov 2020 20:22:53 +0000 (21:22 +0100)]
dm: core: Fix incorrect flag check

The test should be checking whether $flags are non-zero and $drv_flags
contain specific flags, however these two sets of flags are separate,
and the two tests should be logically ANDed, not bitwise ANDed.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosandbox: cros_ec: Basic support for EC_CMD_GET_NEXT_EVENT
Alper Nebi Yasak [Fri, 13 Nov 2020 22:01:42 +0000 (01:01 +0300)]
sandbox: cros_ec: Basic support for EC_CMD_GET_NEXT_EVENT

Since commit 690079767803 ("cros_ec: Support keyboard scanning with
EC_CMD_GET_NEXT_EVENT") the cros-ec-keyb driver has started using this
command, but the sandbox EC emulator does not recognize it and
continuously prints:

    ** Unknown EC command 0x67

This patch makes the sandbox driver send basic responses to the command,
but the response only supports keyboard scans for now.

The EC side of this command stores and returns events from a queue, and
returns -EC_RES_UNAVAILABLE when there are no new events. This should be
possible to implement by hooking into the SDL event queue (perhaps via
sandbox_sdl_poll_events). Implementing that is a bit harder to do since
the existing sandbox code is discarding pending keyboard events, then
reading the current keyboard state.

Since the EC emulator never explicitly fails to work on this command,
the fallback to the older command will not trigger and will not be
tested anymore.

Fixes: 690079767803 ("cros_ec: Support keyboard scanning with EC_CMD_GET_NEXT_EVENT")
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agobinman: Handle tool paths containing '~' correctly
Simon Glass [Mon, 9 Nov 2020 14:45:02 +0000 (07:45 -0700)]
binman: Handle tool paths containing '~' correctly

At present if CROSS_COMPILE contains a tilde, such as
~/.buildman-toolchains/gcc-7.3.0-nolibc/i386-linux/bin/i386-linux-gcc
then binman gives a confusing error:

   binman: Error 255 running '~/..buildman-toolchains/gcc-7.3.0- ...

Fix this by expanding it out before running the tool.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoPrepare v2021.01-rc3
Tom Rini [Mon, 30 Nov 2020 18:09:42 +0000 (13:09 -0500)]
Prepare v2021.01-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 30 Nov 2020 17:50:32 +0000 (12:50 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agomips: octeon: tools: Add update_octeon_header tool
Stefan Roese [Mon, 30 Nov 2020 12:14:23 +0000 (13:14 +0100)]
mips: octeon: tools: Add update_octeon_header tool

Add a tool to update or insert an Octeon specific header into the U-Boot
image. This is needed e.g. for booting via SPI NOR, eMMC and NAND.

While working on this, move enum cvmx_board_types_enum and
cvmx_board_type_to_string() to cvmx-bootloader.h and remove the
unreferenced (unsupported) board definition.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 years agomips: octeon: bootoctlinux: Use gd->ram_size instead of ram_get_info()
Stefan Roese [Wed, 28 Oct 2020 14:10:02 +0000 (15:10 +0100)]
mips: octeon: bootoctlinux: Use gd->ram_size instead of ram_get_info()

Using ram_get_info() is complicated and does not work after relocation.
Now that gd->ram_size holds the full RAM size, let's use it instead and
remove the ram_get_size logic completely.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 years agomips: octeon: Report full DDR size in dram_init() to gd->ram_size
Stefan Roese [Wed, 28 Oct 2020 14:10:01 +0000 (15:10 +0100)]
mips: octeon: Report full DDR size in dram_init() to gd->ram_size

With this patch, gd->ram_size now holds to full RAM size detected by the
DDR init code. It introduces the get_effective_memsize() function to
report the maximum usable RAM size in U-Boot to the system instead.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 years agomips: octeon: Fix Octeon DDR driver to use the correct struct
Stefan Roese [Wed, 28 Oct 2020 14:10:00 +0000 (15:10 +0100)]
mips: octeon: Fix Octeon DDR driver to use the correct struct

Don't use "platdata_auto_alloc_size" but "priv_auto_alloc_size" instead
to auto allocate the private data struct, which is referenced via
dev_get_priv() in this driver. This fixes an ugly bug detected while
trying to boot via SPI NOR.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 years agomips: start.S: Add Octeon boot header compatibility
Stefan Roese [Wed, 28 Oct 2020 14:09:59 +0000 (15:09 +0100)]
mips: start.S: Add Octeon boot header compatibility

Octeon has a specific boot header, when booted via SPI NOR, NAND or MMC.
Here the only 2 instructions are allowed in the first few bytes of the
image. And these instructions need to be one branch and a nop. This
patch adds the necessary nop after the nop, to that the common MIPS
image is compatible with this Octeon header.

The tool to patch the Octeon boot header into the image will be send in
a follow-up patch.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Aaron Williams <awilliams@marvell.com>
Cc: Chandrakala Chavva <cchavva@marvell.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
3 years agoMerge tag 'mmc-2020-11-29' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Sun, 29 Nov 2020 16:12:59 +0000 (11:12 -0500)]
Merge tag 'mmc-2020-11-29' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- mmc minor update for better debug and error check
- fsl_esdhc sysctl set and make sure delay check for HS400

3 years agoMerge tag 'efi-2021-01-rc3-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 29 Nov 2020 16:12:49 +0000 (11:12 -0500)]
Merge tag 'efi-2021-01-rc3-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2021-01-rc3 (3)

The following errors are corrected:

* Linux crash when accessing UEFI variables at runtime.
* UEFI variable using standalone MM on 32 bit systems
  not working due to missing packing of communication
  structure
* NULL dereference when FAT16 root directory is full
* FAT files with a short file name starting with 0xE5 (0x05 in directory
  entry) where treated as deleted.

The UEFI SetTime() service is enabled on ARM QEMU.

3 years agocharset: make u16_strnlen accessible at runtime
Ilias Apalodimas [Sun, 22 Nov 2020 13:10:26 +0000 (15:10 +0200)]
charset: make u16_strnlen accessible at runtime

commit 1fabfeef506c ("efi_loader: parameter check in GetNextVariableName()")
introduces a check using u16_strnlen(). This code is used on EFI
runtime variables as well, so unless we mark it as runtime, the kernel
will crash trying to access it.

Fixes: 1fabfeef506c ("efi_loader: parameter check in GetNextVariableName()")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agolib/efi_loader: fix ABI in efi_mm_communicate_header
Etienne Carriere [Sat, 21 Nov 2020 10:59:33 +0000 (11:59 +0100)]
lib/efi_loader: fix ABI in efi_mm_communicate_header

Pack struct efi_mm_communicate_header as done in EDK2 as seen in
release 201808 [1]. If not packed sizeof() for the structure adds
4 additional bytes on 32bit targets which breaks the ABI.

Link: [1] https://github.com/tianocore/edk2/blob/edk2-stable201808/MdePkg/Include/Protocol/MmCommunication.h#L21
Fixes: 23a397d2e2fb ("efi_loader: Add headers for EDK2 StandAloneMM communication")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoefi_loader: enable EFI_SET_TIME on sandbox and QEMU ARM
Heinrich Schuchardt [Sat, 21 Nov 2020 19:52:18 +0000 (20:52 +0100)]
efi_loader: enable EFI_SET_TIME on sandbox and QEMU ARM

Enable EFI_SET_TIME on the sandbox and QEMU ARM to ensure that we compile
and test the relevant code.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agofs: fat: use ATTR_ARCH instead of anonymous 0x20
Heinrich Schuchardt [Sun, 22 Nov 2020 10:13:33 +0000 (11:13 +0100)]
fs: fat: use ATTR_ARCH instead of anonymous 0x20

Using constants instead of anonymous numbers increases code readability.

Fixes: 704df6aa0a28 ("fs: fat: refactor write interface for a file offset")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agofs: fat: directory entries starting with 0x05
Heinrich Schuchardt [Sat, 21 Nov 2020 11:34:20 +0000 (12:34 +0100)]
fs: fat: directory entries starting with 0x05

0x05 is used as replacement letter for 0xe5 at the first position of short
file names. We must not skip over directory entries starting with 0x05.

Cf. Microsoft FAT Specification, August 30 2005

Fixes: 39606d462c97 ("fs: fat: handle deleted directory entries correctly")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agofs: fat: avoid NULL dereference when root dir is full
Heinrich Schuchardt [Thu, 19 Nov 2020 11:24:44 +0000 (12:24 +0100)]
fs: fat: avoid NULL dereference when root dir is full

When trying to create a file in the full root directory of a FAT32
filesystem a NULL dereference can be observed.

When the root directory of a FAT16 filesystem is full fill_dir_slot() must
return -1 to signal that a new directory entry could not be allocated.

Fixes: cd2d727fff7e ("fs: fat: allocate a new cluster for root directory of fat32")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
Tom Rini [Sat, 28 Nov 2020 15:55:46 +0000 (10:55 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-i2c

3 years agoriscv: sifive/fu540: kconfig: Enable support for Opencores I2C controller
Pragnesh Patel [Sat, 14 Nov 2020 09:12:35 +0000 (14:42 +0530)]
riscv: sifive/fu540: kconfig: Enable support for Opencores I2C controller

Enable support for SiFive FU540 Opencores I2C master controller.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Rick Chen <rick@andestech.com>
3 years agoi2c: ocores: add i2c driver for OpenCores I2C controller
Pragnesh Patel [Sat, 14 Nov 2020 09:12:34 +0000 (14:42 +0530)]
i2c: ocores: add i2c driver for OpenCores I2C controller

Add support for the OpenCores I2C controller IP core
(See http://www.opencores.org/projects.cgi/web/i2c/overview).

This driver implementation is inspired from the Linux OpenCores
I2C driver available.

Thanks to Peter Korsgaard <peter@korsgaard.com> for writing Linux
OpenCores I2C driver.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Reviewed-by: Rick Chen <rick@andestech.com>
3 years agoi2c: designware_i2c: Don't warn if no reset controller
Simon Glass [Mon, 9 Nov 2020 14:12:49 +0000 (07:12 -0700)]
i2c: designware_i2c: Don't warn if no reset controller

At present if CONFIG_RESET is not enabled, this code shows a warning:

  designware_i2c_ofdata_to_platdata() i2c_designware_pci i2c2@16,0:
Can't get reset: -524

Avoid this by checking if reset is supported, first.

Fixes: 622597dee4f ("i2c: designware: add reset ctrl to driver")
Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoi2c: mvtwsi: disable i2c slave also on Armada 8k
Baruch Siach [Thu, 1 Oct 2020 11:49:02 +0000 (14:49 +0300)]
i2c: mvtwsi: disable i2c slave also on Armada 8k

The hidden I2C slave is also present on the Armada 8k AP806. Testing
shows that this I2C slave causes the same issues as Armada 38x.
Disabling that I2C slave fixes all these issues.

I2C blocks on the Armada 8k CP110 are not affected.

Extend the I2C slave disable to Armada 8k as well.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
3 years agommc: check a return value about regulator's always-on
Jaehoon Chung [Fri, 6 Nov 2020 11:30:41 +0000 (20:30 +0900)]
mmc: check a return value about regulator's always-on

Regulator can be set to "always-on".
It's not error about enable/disable. It needs to check about
its condition.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agommc: display an error number to debug
Jaehoon Chung [Mon, 16 Nov 2020 22:04:59 +0000 (07:04 +0900)]
mmc: display an error number to debug

It's useful to know an error number when it's debugging.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agommc: fsl_esdhc: make sure delay chain locked for HS400
Yangbo Lu [Tue, 20 Oct 2020 03:04:52 +0000 (11:04 +0800)]
mmc: fsl_esdhc: make sure delay chain locked for HS400

For eMMC HS400 mode, the DLL reset is a required step for mmc rescan.
This step has not been documented in reference manual, but the RM will
be fixed sooner or later.

In previous commit to support eMMC HS400,
  db8f936 mmc: fsl_esdhc: support eMMC HS400 mode

the steps to configure DLL could be found in commit message,
  13. Set DLLCFG0[DLL_ENABLE] and DLLCFG0[DLL_FREQ_SEL].
  14. Wait for delay chain to lock.

these would be fixed as,
  13.   Set DLLCFG0[DLL_ENABLE] and DLLCFG0[DLL_FREQ_SEL].
  13.1  Write DLLCFG0[DLL_RESET] to 1 and wait for 1us,
        then write DLLCFG0[DLL_RESET]
  14.   Wait for delay chain to lock.

This patch is to add the step of DLL reset, and make sure delay chain
locked for HS400.

Fixes: db8f93672b42 ("mmc: fsl_esdhc: support eMMC HS400 mode")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agommc: fsl_esdhc: set sysctl register for clock initialization
Yangbo Lu [Tue, 20 Oct 2020 03:04:51 +0000 (11:04 +0800)]
mmc: fsl_esdhc: set sysctl register for clock initialization

The initial clock setting should be through sysctl register only,
while the mmc_set_clock() will call mmc_set_ios() introduce other
configurations like bus width, mode, and so on.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agommc: Add some helper functions for retrying on error
Sean Anderson [Sat, 17 Oct 2020 12:36:27 +0000 (08:36 -0400)]
mmc: Add some helper functions for retrying on error

All of the existing quirks add retries to various calls of mmc_send_cmd.
mmc_send_cmd_quirks is a helper function to do this retrying behavior. It
checks if quirks mode is enabled, and if a specific quirk is activated it
retries on error.

This also adds mmc_send_cmd_retry, which retries on error every time
(instead of if a quirk is activated).

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 years agoMerge tag 'u-boot-stm32-20201125' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 25 Nov 2020 16:00:52 +0000 (11:00 -0500)]
Merge tag 'u-boot-stm32-20201125' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- STM32 MCU's DT update
- Add DHCOM based STM32MP15x PicoITX board
- Correct ALIGN macro usage for on syram for SPL dcache support
- Fixes on DHCOM: uSD card-detect GPIO and Drop QSPI CS2
- Fix compilation issue for spl_mmc_boot_partition
- Fix MTD partitions for serial boot
- Add support of MCU HOLD BOOT with reset for stm32 remoteproc
  (prepare alligneent with  kernel DT)
- Correct bias information and support in STM32 soc and STMFX
- Support optional vbus in usbphyc
- Update FIT examples to avoid kernel zImage relocation before decompression

3 years agoboard: st: stm32mp1: update load address for FIT examples
Patrick Delaunay [Wed, 25 Nov 2020 11:28:10 +0000 (12:28 +0100)]
board: st: stm32mp1: update load address for FIT examples

Update kernel load address for FIT examples to avoid relocation:
- Kernel example uses Image.gz with U-Boot gzip decompression
  at final kernel location 0x0xC0008000.
- Copro example loads zImage at a correct location (0xC4000000),
  to avoid zImage relocation before decompression by kernel code.

An other solution to avoid zImage relocation is to align
the kernel load and entry address with the real location in FIT
(the relocation of zImage is skipped in U-Boot bootm command for
identical address) but it is less flexible because this offset
depends on FIT content:

For example:

## Loading kernel from FIT Image at c2000000 ...
   Using 'ev1' configuration
   Trying 'kernel' kernel subimage
     Description:  Linux kernel
     Created:      2020-10-22   9:08:32 UTC
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0xc20000cc

The kernel offset in FIT is 0xCC in FIT and zImage is decompressed at
0xC0008000 by kernel code:

kernel {
description = "Linux kernel";
data = /incbin/("zImage");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0xC20000cc>;
entry = <0xC20000cc>;
hash-1 {
algo = "sha1";
};
};

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
3 years agophy: stm32: usbphyc: manage optional vbus regulator on phy_power_on/off
Patrick Delaunay [Thu, 15 Oct 2020 12:50:57 +0000 (14:50 +0200)]
phy: stm32: usbphyc: manage optional vbus regulator on phy_power_on/off

This patch adds support for optional vbus regulator.
It is managed on phy_power_on/off calls and may be needed for host mode.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>