platform/kernel/u-boot.git
4 years agoMerge tag 'u-boot-amlogic-20200928' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 28 Sep 2020 12:26:34 +0000 (08:26 -0400)]
Merge tag 'u-boot-amlogic-20200928' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- fix RNG driver probe & linux EFI KASLR boot on GXL, GXM, G12A, G12B & SM1 based boards

4 years agorng: meson: make core clock optional
Neil Armstrong [Fri, 25 Sep 2020 07:19:20 +0000 (09:19 +0200)]
rng: meson: make core clock optional

This fixes HWRNG support on Amlogic GXL, GXM, G12A, G12B & SM1
based boards dues to the lack of the core clock in the device tree.

It was reported breaking EFI boot in the Linux EFI stub, because the
EFI_RNG_PROTOCOL didn't check for the RNG device presence before
installing itself.

The Linux amlogic,meson-rng.yaml doesn't mandate the core clock,
this the clock should be ignores if not present.

Nevertheless, the clock should be present and this should be fixed
on the Linux meson-gxl.dtsi & meson-g12-common.dtsi then synced
with U-Boot.

The change has been tested on a Khadas VIM3, which uses the common
meson-g12-common.dtsi like the Odroid-C4 & Odroid-N2 in Scott's
report, along with the RNG cmd.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reported-by: Scott K Logan <logans@cottsay.net>
Fixes: bc40eb278b ("drivers/rng: add Amlogic hardware RNG driver")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Scott K Logan <logans@cottsay.net>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Fri, 25 Sep 2020 16:55:06 +0000 (12:55 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- Bug fixes related to PCIe, pfe, xfi, gpio, reset, vid, env, and usb on
  layerscape products

4 years agopci: layerscape: Fixup PCIe EP mode DT nodes for LX2160A rev2
Hou Zhiqiang [Sun, 13 Sep 2020 15:12:50 +0000 (23:12 +0800)]
pci: layerscape: Fixup PCIe EP mode DT nodes for LX2160A rev2

LX2160A rev2 uses different PCIe controller, so EP mode DT
nodes also need to be fixed up.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: pfe_eth: Remove non-DM code check from pfe_spi_flash_init
Kuldeep Singh [Fri, 11 Sep 2020 11:06:49 +0000 (16:36 +0530)]
net: pfe_eth: Remove non-DM code check from pfe_spi_flash_init

CONFIG_DM_SPI_FLASH is only supported now with passing of driver
conversion deadline from non-DM to DM model. Hence, it's safe to remove
non-DM code check from pfe_spi_flash_init.

Also use CONFIG_ENV_SPI_MODE and CONFIG_ENV_SPI_MAX_HZ instead of
reading reading values from DT.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agonet: pfe_eth: Fix resoure leak in pfe_spi_flash_init
Kuldeep Singh [Fri, 11 Sep 2020 11:06:48 +0000 (16:36 +0530)]
net: pfe_eth: Fix resoure leak in pfe_spi_flash_init

Fix Coverity issue: RESOURCE_LEAK.
leaked_storage: Variable addr going out of scope leaks the storage it
points to.

Fixes: e0152dbed683 ("net: pfe_eth: Use spi_flash_read API to access
flash memory")
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160a: Add IO range
Wasim Khan [Wed, 23 Sep 2020 14:04:45 +0000 (19:34 +0530)]
arm: dts: lx2160a: Add IO range

Add IO range property to fix below error on uboot
PCI: Failed autoconfig bar 18

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodriver: net: fm: add support for XFI
Madalin Bucur [Fri, 11 Sep 2020 07:24:09 +0000 (10:24 +0300)]
driver: net: fm: add support for XFI

All the 10G ports that were working in XFI mode were described as
using XGMII (as PHY_INTERFACE_MODE_XFI was not added at the time).
Add the minimal changes required for the FMan code to support XFI.

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agols1012a, pfe_eth: Update probe to avoid resource leak
Chaitanya Sakinam [Thu, 10 Sep 2020 11:20:54 +0000 (16:50 +0530)]
ls1012a, pfe_eth: Update probe to avoid resource leak

PFE DDR addresses are now stored on to a stack varaiable rather
dynamic allocation.

Signed-off-by: Chaitanya Sakinam <chaitanya.sakinam@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agols1012a, pfe_eth: correction in delay implementation
Chaitanya Sakinam [Thu, 10 Sep 2020 11:20:53 +0000 (16:50 +0530)]
ls1012a, pfe_eth: correction in delay implementation

correction in delay implementation before we exit out of tx timeout.

Signed-off-by: Chaitanya Sakinam <chaitanya.sakinam@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: phy: Use Aquantia driver for AQR113C
Madalin Bucur [Thu, 10 Sep 2020 10:23:39 +0000 (13:23 +0300)]
drivers: net: phy: Use Aquantia driver for AQR113C

Add support for AQR113C PHY

Signed-off-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodrivers: net: ldpaa_eth: lx2160a: fix bug in checking if a DPMAC is enabled
Grigore Popescu [Thu, 10 Sep 2020 09:59:03 +0000 (12:59 +0300)]
drivers: net: ldpaa_eth: lx2160a: fix bug in checking if a DPMAC is enabled

The next DPMAC was always verified if it is enabled.  In case of
DPMAC@6, the DPMAC@7 is verified.  As DPMAC@7 is disabled, DPMAC@6 will
be considered disabled and not detected by uboot.

Signed-off-by: Grigore Popescu <grigore.popescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: dts: fsl-lx2160a: add gpio0 gpio1 gpio3 DT nodes
hui.song [Thu, 10 Sep 2020 09:28:30 +0000 (17:28 +0800)]
armv8: dts: fsl-lx2160a: add gpio0 gpio1 gpio3 DT nodes

add gpio0 gpio1 gpio3 DT nodes to fsl-lx21600.dtsi

Signed-off-by: hui.song <hui.song_1@nxp.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: lx2160a: fix reset sequence
Meenakshi Aggarwal [Wed, 9 Sep 2020 08:36:05 +0000 (14:06 +0530)]
armv8: lx2160a: fix reset sequence

Make sure that SW_RST_REQ and RST_REQ_MSK are cleared
before triggering hardware reset request.

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agolx2160: Correct sd_boot environment variable
Meenakshi Aggarwal [Tue, 1 Sep 2020 07:26:28 +0000 (12:56 +0530)]
lx2160: Correct sd_boot environment variable

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: freescale: emc2305: Pass chip_addr to set_fan_speed
Wasim Khan [Thu, 27 Aug 2020 13:43:34 +0000 (19:13 +0530)]
board: freescale: emc2305: Pass chip_addr to set_fan_speed

emc2305 is a common driver. It should not use platform specific
i2c address for slave device.
Pass chip_addr as agrument to emc2305_init() and set_fan_speed()
so that emc2305 driver can be used with different platforms.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard/freescale/lsch3: Correct entry for 0.9v
Martin Kaistra [Fri, 21 Aug 2020 11:44:13 +0000 (13:44 +0200)]
board/freescale/lsch3: Correct entry for 0.9v

According to the reference manual of LS2088A, for a VDD voltage of
0.9V, the entry should be at 01000b.

Fixes: 4911948ec73 ("board/freescale,lsch3: Add entry for 0.9v")
Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm64: Layerscape: Survive LPI one-way reset workaround
Hou Zhiqiang [Thu, 6 Aug 2020 06:38:19 +0000 (14:38 +0800)]
arm64: Layerscape: Survive LPI one-way reset workaround

The workaround of LPI one-way reset issue is broken by the series:
https://patchwork.ozlabs.org/project/uboot/list/?series=192398

This patch is to add DT node for GIC RD tables and create corresponding
reserved-memory node in kernel DT to fix it.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agofsl-layerscape: enable dwc3 snooping feature
Ran Wang [Wed, 5 Aug 2020 07:07:27 +0000 (15:07 +0800)]
fsl-layerscape: enable dwc3 snooping feature

Configure DWC3’s cache type to ‘cacheable’ for better
performance. Actually related register definition and values are SoC
specific, which means this setting is only applicable to Layerscape SoC,
not generic for all platforms which have integrated DWC3 IP.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Thu, 24 Sep 2020 12:34:54 +0000 (08:34 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell

- Enable NET_RANDOM_ETHADDR on Espressobin (Acked-by Kosta)
- Espressobin & Clearfog: fdtfile enhancements
- A37xx PCI: Disable link training when unloading driver
- A37xx: increase CONFIG_SYS_BOOTM_LEN to 64MB
- Add Macronix mx25u12835f support, used on uDPU and ESPRESSObin v7
- dns325: Correct CONFIG_NR_DRAM_BANKS parameter

4 years agoarm64: a37xx: pci: Disable link training when unloading driver
Pali Rohár [Tue, 22 Sep 2020 11:21:38 +0000 (13:21 +0200)]
arm64: a37xx: pci: Disable link training when unloading driver

As required by PCI Express spec a delay for at least 100ms after
de-asserting PERST# signal is needed before link training is enabled.

Linux kernels prior to 5.8 version do not automatically disable link
training before de-asserting PERST# signal, therefore this requirement is
not fulfilled.

Above requirement is needed for proper detection of some Compex PCIe WiFi
cards. Otherwise Linux kernel cannot detect it.

To allow using those PCIe cards with older Linux kernel versions booted by
U-Boot compiled with U-Boot a37xx pci driver, disable link training in
U-Boot when unloading this pci driver.

Thanks to DM_FLAG_OS_PREPARE flag, U-Boot automatically unload this driver
when booting Linux kernel.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoarm: kirkwood: dns325: Correct CONFIG_NR_DRAM_BANKS parameter
Tom Rini [Mon, 14 Sep 2020 19:48:47 +0000 (15:48 -0400)]
arm: kirkwood: dns325: Correct CONFIG_NR_DRAM_BANKS parameter

Testing on a DNS-325 NAS has shown that in order for the device to work
we need to set CONFIG_NR_DRAM_BANKS to 1 and not 2.

Tested-by: Dmitry N. Kolesnikov <dk.diklab@gmail.com>
Reported-by: Dmitry N. Kolesnikov <dk.diklab@gmail.com>
Cc: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoarm: mvebu: Espressobin: Set environment variable fdtfile
Andre Heider [Fri, 11 Sep 2020 04:35:10 +0000 (06:35 +0200)]
arm: mvebu: Espressobin: Set environment variable fdtfile

Required for the generic distro mechanism.

Linux ships with 4 variants:
marvell/armada-3720-espressobin-v7-emmc.dtb
marvell/armada-3720-espressobin-v7.dtb
marvell/armada-3720-espressobin-emmc.dtb
marvell/armada-3720-espressobin.dtb

Use available information to determine the appropriate filename.

Fixes booting GRUB EFI arm64 on Fedora.

Reported-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Andre Heider <a.heider@gmail.com>
4 years agoarm: mvebu: clearfog: don't override set fdtfile env
Baruch Siach [Wed, 9 Sep 2020 12:14:39 +0000 (15:14 +0300)]
arm: mvebu: clearfog: don't override set fdtfile env

Only set the fdtfile environment variable when not already set.

Fixes: 867572f09ebe6 ("ARM: mvebu: clearfog: run-time selection of DT file")
Cc: Joel Johnson <mrjoel@lixil.net>
Reported-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Andre Heider <a.heider@gmail.com>
4 years agoarm: mvebu: defconfig: espressobin: enable NET_RANDOM_ETHADDR
Andre Heider [Tue, 8 Sep 2020 06:35:00 +0000 (08:35 +0200)]
arm: mvebu: defconfig: espressobin: enable NET_RANDOM_ETHADDR

The hardware does not provide a MAC address. Enable this so that
network access works with just the default environment.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Acked-by: Konstantin Porotchkin <kostap@marvell.com>
4 years agoarm64: a37xx: increase CONFIG_SYS_BOOTM_LEN to 64MB
Vladimir Vid [Mon, 7 Sep 2020 06:56:45 +0000 (08:56 +0200)]
arm64: a37xx: increase CONFIG_SYS_BOOTM_LEN to 64MB

Increase max gunzip size, required for booting itb recovery images on
uDPU.

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
[a.heider: adapt to mainline]
Signed-off-by: Andre Heider <a.heider@gmail.com>
4 years agomtd: spi-nor-ids: add support for Macronix mx25u12835f flash
Vladimir Vid [Mon, 7 Sep 2020 06:54:58 +0000 (08:54 +0200)]
mtd: spi-nor-ids: add support for Macronix mx25u12835f flash

Some of Marvell A3700 boards use mx25u12835f, specifically uDPU
and ESPRESSObin v7.

Signed-off-by: Vladimir Vid <vladimir.vid@sartura.hr>
[a.heider: adapt commit message to mainline]
Signed-off-by: Andre Heider <a.heider@gmail.com>
4 years agopci: layerscape: Fix spurious writes and panic
Michael Walle [Mon, 3 Aug 2020 22:16:33 +0000 (00:16 +0200)]
pci: layerscape: Fix spurious writes and panic

The fdt_fixup_pcie_ls() scans all PCI devices and assumes that all PCI
root devices are layerscape PCIe controllers. Unfortunately, this is not
true for the LS1028A. There is one additional static PCI root complex
(this contains the networking devices) which has nothing to do with the
layerscape PCIe controllers. On recent U-Boot versions this results in
the following panic:

"Synchronous Abort" handler, esr 0x96000044
elr: 000000009602fa04 lr : 000000009602f9f4 (reloc)
elr: 00000000fbd73a04 lr : 00000000fbd739f4
x0 : 0080000002000101 x1 : 0000000000000000
x2 : 00000000fbde9000 x3 : 0000000000000001
x4 : 0000000000000000 x5 : 0000000000000030
x6 : 00000000fbdbd460 x7 : 00000000fbb3d3a0
x8 : 0000000000000002 x9 : 000000000000000c
x10: 00000000ffffffe8 x11: 0000000000000006
x12: 000000000001869f x13: 0000000000000a2c
x14: 00000000fbb3d2cc x15: 00000000ffffffff
x16: 0000000000010000 x17: 0000000000000000
x18: 00000000fbb3fda0 x19: 0000000000000800
x20: 0000000000000000 x21: 00000001f0000000
x22: 0000000000000800 x23: 0000000000000009
x24: 00000000fbdc3c1b x25: 00000000fbdc28e5
x26: 00000000fbdcc008 x27: 00000000fbdc16e2
x28: 000000000f000000 x29: 00000000fbb3d3a0

Code: 394072a1 f94006a0 34000041 5ac00a94 (b8336814)
Resetting CPU ...

This bug already existed in former versions, but the spurious write was
never trapped, because the destination address was a valid address (by
pure luck).

Make sure the PCI root is actually one of the expected PCIe layerscape
controllers by matching its compatible string.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012a/ls1046a: Add CONFIG_ENV_OVERWRITE in defconfig
Kuldeep Singh [Thu, 30 Jul 2020 10:08:07 +0000 (15:38 +0530)]
configs: ls1012a/ls1046a: Add CONFIG_ENV_OVERWRITE in defconfig

CONFIG_ENV_OVERWRITE disables write protection on various environment
variables like "ethaddr" and "serial".

Enable this config in LS1046A and LS1012A defconfigs. This resolves an
error while setting multiple values of "ethaddr" variable.

Before the change:
=> setenv ethaddr 00:E0:0C:00:06:0
=> setenv ethaddr 00:E0:0C:00:06:1
Error: Can't overwrite "ethaddr"
Error inserting "ethaddr" variable, errno=1

After the change:
=> setenv ethaddr 00:E0:0C:00:06:0
=> setenv ethaddr 00:E0:0C:00:06:1

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agols1028a: use default scan_dev_for_boot
Mian Yousaf Kaukab [Thu, 23 Jul 2020 13:41:16 +0000 (15:41 +0200)]
ls1028a: use default scan_dev_for_boot

scan_dev_for_efi is supposed to be called from scan_dev_for_boot.
However this call is missing for ls1028ardb and ls1028aqds boards. As
a result EFI boot doesn’t work. Fix this issue by removing custom
definition of scan_dev_for_boot and use the default definition
instead.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: andy.tang@nxp.com
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoMerge tag 'mips-fixes-for-2020.10' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Wed, 23 Sep 2020 02:08:16 +0000 (22:08 -0400)]
Merge tag 'mips-fixes-for-2020.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-mips

- mips: vocore2: fix SPL image generation
- mips: vocore2: fix LZMA decompression errors
- mips: vocore2: fix console output
- mips: pic32mzda: fix DTC warnings and GPIO nodes
- mips: pic32mzda: make GPIO and MMC working again

4 years agomips: vocore2: fix various issues
Mauro Condarelli [Sun, 20 Sep 2020 16:28:59 +0000 (18:28 +0200)]
mips: vocore2: fix various issues

- fix SPL image generation
- fix incorrect console output
- increase malloc_f and malloc_r space to fix LZMA decompression errors
- increase SPI flash clock

Signed-off-by: Mauro Condarelli <mc5686@mclink.it>
[squashed to one patch, fix commit subject and description]
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
4 years agomips: dts: Fix PIC32MZDA GPIO register definitions
John Robertson [Tue, 1 Sep 2020 18:02:20 +0000 (18:02 +0000)]
mips: dts: Fix PIC32MZDA GPIO register definitions

The GPIO bank name for banks J and K are not correct when using the
'gpio' command from the console.

The driver derives the bank name from the device tree instance string by
using the instance value and adding 'A': gpio0@xxaddrxx is Bank A,
gpio1@yyaddryy is Bank B and so on.

On the PIC32, there is no Bank I so instances 8 and 9 need to be
incremented as a minimum change.

An alternative (less opaque) implementation would be to use a bank-name
property instead but this would require modifying the driver code too.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
4 years agomips: dts: Fix PIC32MZDA GPIO register definitions
John Robertson [Tue, 1 Sep 2020 18:02:13 +0000 (18:02 +0000)]
mips: dts: Fix PIC32MZDA GPIO register definitions

GPIO state cannot be changed via the device tree (e.g. with gpio-hog) or
using the 'gpio' command from the console.

The root cause is a discrepancy between the driver and the device tree:
the driver code expects an absolute I/O address in the <reg> property,
while the device tree defines the address relative to a declaration in
the parent pinctrl node.

Changing the device tree to fix a driver issue would normally be wrong,
however:
- I have run the first version of U-Boot in which this driver appears
  (v2016.03) and the same problem exists, so this is not a regression;
- There is no code that references a parent device tree node that might
  suggest the intent of the author was to parse the DT as it exists now;
- The equivalent Linux PIC32 GPIO driver also uses absolute addresses
  for the GPIO <reg> property. This change brings the U-Boot DT more
  into line with Linux.

Additionally, the data sheet (Microchip ref. 60001361H) shows that the
register set to control a GPIO bank spans 0xE0 bytes, but the device
tree specified size is only 0x48 bytes.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
4 years agomips: dts: Fix device tree warnings for PIC32MZDA
John Robertson [Tue, 1 Sep 2020 04:14:56 +0000 (04:14 +0000)]
mips: dts: Fix device tree warnings for PIC32MZDA

Signed-off-by: John Robertson <john.robertson@simiatec.com>
4 years agomips: pic32mzdask: enable CONFIG_BLK
John Robertson [Tue, 1 Sep 2020 02:55:56 +0000 (02:55 +0000)]
mips: pic32mzdask: enable CONFIG_BLK

CONFIG_BLK needs to be enabled by default to allow U-Boot to
compile after a 'make pic32mzdask_defconfig'.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
4 years agomips: pic32mzdask: disable SDHCI SDCD signal workaround
John Robertson [Tue, 1 Sep 2020 02:55:42 +0000 (02:55 +0000)]
mips: pic32mzdask: disable SDHCI SDCD signal workaround

The PIC32MZ DA Starter Kit does not need the card detect workaround
because the SDCD signal line is connected properly. Disable the
workaround in this case.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
4 years agopinmux: pic32: add SDHCI pin config
John Robertson [Tue, 1 Sep 2020 02:55:26 +0000 (02:55 +0000)]
pinmux: pic32: add SDHCI pin config

The GPIO pins used by the SDHCI controller need to be configured to
allow the interface to work.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
4 years agommc: pic32: Refresh PIC32 MMC driver
John Robertson [Tue, 1 Sep 2020 02:55:14 +0000 (02:55 +0000)]
mmc: pic32: Refresh PIC32 MMC driver

The existing driver is not compatible with the Driver Model.

This patch makes the necessary changes while also removing obsolescent
calls/properties as follows:

- fdtdec_* calls replaced with dev_read_* equivalents;
- 'clock-freq-min-max' property replaced by querying the frequency of
  the source clock 'base_clk';
- The card detect erratum workaround is applied during probe rather than
  overriding get_cd.

The card detect workaround (Microchip ref. DS80000736E, erratum #15) is
not always needed and can be disabled using a vendor specific DT
property.

Signed-off-by: John Robertson <john.robertson@simiatec.com>
4 years agoMerge branch '2020-09-22-assorted-bugfixes'
Tom Rini [Tue, 22 Sep 2020 20:47:48 +0000 (16:47 -0400)]
Merge branch '2020-09-22-assorted-bugfixes'

- Fix for environment location on some PowerPC boards
- Typo / documentation fix
- Two fixes for mpc8xxx

4 years agoconfigs: powerpc: Don't set CONFIG_ENV_ADDR for QorIQ SPIFLASH
Chris Packham [Sun, 6 Sep 2020 22:37:35 +0000 (10:37 +1200)]
configs: powerpc: Don't set CONFIG_ENV_ADDR for QorIQ SPIFLASH

Setting CONFIG_ENV_ADDR to something other than 0 stops gd->env_addr
from being allocated dynamically. When the environment is in SPI we need
it to be allocated as we can't use a direct memory mapped address.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
4 years agodisk: typo Terra Bytes
Heinrich Schuchardt [Thu, 17 Sep 2020 15:57:21 +0000 (17:57 +0200)]
disk: typo Terra Bytes

512 * 2^32 bytes equals 2 tebibytes.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodoc/build/gcc.rst: add missing apt-get *install*
Heinrich Schuchardt [Sun, 20 Sep 2020 10:31:47 +0000 (12:31 +0200)]
doc/build/gcc.rst: add missing apt-get *install*

The install command is missing for an apt-get command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agogpio/mpc83xx_spisel_boot.c: include log.h
Rasmus Villemoes [Mon, 21 Sep 2020 07:48:24 +0000 (09:48 +0200)]
gpio/mpc83xx_spisel_boot.c: include log.h

Fix build failure, it used to get this implicitly through common.h
until f7ae49fc4f (common: Drop log.h from common header).

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Heiko Schocher <hs@denx.de>
4 years agospi: mpc8xxx_spi.c: fix cs activate/deactivate
Rasmus Villemoes [Fri, 18 Sep 2020 14:26:06 +0000 (16:26 +0200)]
spi: mpc8xxx_spi.c: fix cs activate/deactivate

Somewhere between v2020.04 and v2020.07 the mpc8xxx_spi driver broke,
I'm guessing due to this hunk

@@ -559,6 +560,8 @@ int dm_gpio_set_dir_flags(struct gpio_desc *desc, ulong flags)
        if (ret)
                return ret;

+       /* combine the requested flags (for IN/OUT) and the descriptor flags */
+       flags |= desc->flags;
        ret = _dm_gpio_set_dir_flags(desc, flags);

from commit 695e5fd5469a ("gpio: update dir_flags management"). But
the blame is mostly on the driver itself which seems rather confused:
The chip select gpios are requested with GPIOD_ACTIVE_LOW, but then in
each activate/deactivate, dm_gpio_set_dir_flags() is called with
merely GPIOD_IS_OUT, and then the driver call set_value(0) for
activate.

That used to work, but with the above hunk, the ACTIVE_LOW setting
from the request becomes persistent, so the gpio driver ends up being
asked to set the value to 1 in mpc8xxx_spi_cs_activate().

So drop the dm_gpio_set_dir_flags() calls in the activate/deactivate
functions, and use a value of 1 to mean "logically enabled".

Ideally, I think we should also drop the GPIOD_ACTIVE_LOW from the
request and make it up to the list of gpio cs in DT to indicate
whether that CS is enabled when driven low (as is of course usually
the case), but that requires changing
arch/powerpc/dts/gdsys/gazerbeam-base.dtsi among others, and I don't
have that hardware to test on. I have, however, tested our
own (mpc8309-based) hardware with this change, and I have also tested
that removing the GPIOD_ACTIVE_LOW from the request and updating our
DT as

-                       gpios = <&spisel 0 0>;
+                       gpios = <&spisel 0 GPIO_ACTIVE_LOW>;

still works.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
4 years agoPrepare v2020.10-rc5
Tom Rini [Mon, 21 Sep 2020 17:45:23 +0000 (13:45 -0400)]
Prepare v2020.10-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 21 Sep 2020 17:45:07 +0000 (13:45 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Mon, 21 Sep 2020 15:01:07 +0000 (11:01 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- Several ACPI bug fixes
- Intel edison: Move config SYS_MALLOC_LEN to Kconfig
- Use "emmc" in ApolloLake FSP devicetree bindings

4 years agox86: acpi: Add memset to initialize SPCR table
Wolfgang Wallner [Wed, 16 Sep 2020 14:57:53 +0000 (16:57 +0200)]
x86: acpi: Add memset to initialize SPCR table

Add a missing memset to acpi_create_spcr().

The other acpi_create_xxxx() functions perform a memset on their
structures, acpi_create_spcr() does not and as a result the contents of
this table are partly uninitialized (and thus random after every reset).

Fixes: b288cd960072 ("x86: acpi: Generate SPCR table")
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: fix the tags format in the commit message]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: acpi: Fix calculation of DSDT length
Wolfgang Wallner [Wed, 16 Sep 2020 14:57:52 +0000 (16:57 +0200)]
x86: acpi: Fix calculation of DSDT length

Currently, the calculation for the length of the DSDT table includes any
bytes that are added for alignment, but those bytes are not initialized.

This is because the DSDT length is calculated after a call to
acpi_inc_align(). Split this up into the following sequence:

  * acpi_inc()
  * Calculate DSDT length
  * acpi_align()

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: fsp: Replace e-mmc with emmc in devicetree bindings
Wolfgang Wallner [Fri, 11 Sep 2020 14:52:28 +0000 (16:52 +0200)]
x86: fsp: Replace e-mmc with emmc in devicetree bindings

The term eMMC is used inconsistently within the FSP devicetree
bindings (e-mmc and emmc), especially for "emmc-host-max-speed"
documentation and code disagree.

Change all eMMC instances within the FSP bindings to consistently
use "emmc". The term "emmc" is already used a lot within U-Boot,
while "e-mmc" is only used in the FSP bindings.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: correct one typo in the commit message]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agocmd: acpi: Print revisions in hex format
Andy Shevchenko [Mon, 21 Sep 2020 08:34:21 +0000 (11:34 +0300)]
cmd: acpi: Print revisions in hex format

The revisions are usually dates in hex-decimal format representing
YYYYmmdd. Print them in hex to see this clearly.

Before:
  ...
  FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 538970376 INTL 0)
  DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 65536 INTL 538968870)
  ...
After:
  ...
  FACP 000e5420 0000f4 (v06 U-BOOT U-BOOTBL 20200908 INTL 0)
  DSDT 000e4780 000ba0 (v02 U-BOOT U-BOOTBL 10000 INTL 20200326)
  ...

Fixes: 0b885bcfd9b0 ("acpi: Add an acpi command")
Cc: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: edison: Move config SYS_MALLOC_LEN to Kconfig
Andy Shevchenko [Tue, 8 Sep 2020 13:57:22 +0000 (16:57 +0300)]
x86: edison: Move config SYS_MALLOC_LEN to Kconfig

This patch moves the the config SYS_MALLOC_LEN to Kconfig
as it is already done for zynq arch in commit 01aa5b8f0503
("Kconfig: Move config SYS_MALLOC_LEN to Kconfig for zynq").

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMerge tag 'efi-2020-10-rc5-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 19 Sep 2020 12:35:20 +0000 (08:35 -0400)]
Merge tag 'efi-2020-10-rc5-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-10-rc5 (2)

The following bugs are fixed:

* incorrect online help for setenv and env
* description of function efi_mem_carve_out()
* replace printf() by log_err() in stm32mp1_rng driver

A unit test is provided to check that the boot hart id is provided in the
RISC-V device-tree.

4 years agoMerge branch '2020-09-18-assorted-bugfixes'
Tom Rini [Sat, 19 Sep 2020 12:31:52 +0000 (08:31 -0400)]
Merge branch '2020-09-18-assorted-bugfixes'

- SquashFS Coverity fixes
- bitflip fix in the alternate memtest command
- Disable networking on bcmstb boards where we didn't have any network
  drivers enabled.

4 years agoefi: change 'env -e -i' usage syntax
Maxim Uvarov [Fri, 28 Aug 2020 19:20:10 +0000 (22:20 +0300)]
efi: change 'env -e -i' usage syntax

'env -e -i' syntax was changed from "," to ":". Account for this also
in the documentation.

Fixes: 2b3fbcb59f41 ("efi_loader: use ':' as separator for setenv -i")
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Correct the usage description for setenv -e too.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_selftest: check for RISC-V boot-hartid in FDT
Heinrich Schuchardt [Thu, 17 Sep 2020 05:33:29 +0000 (07:33 +0200)]
efi_selftest: check for RISC-V boot-hartid in FDT

On RISC-V check that the /chosen node has a boot-hartid property.

To run the test configure with CONFIG_CMD_BOOTEFI_SELFTEST=y and issue

    setenv efi_selftest device tree
    setenv serial# myserial
    bootefi selftest

If the test succeeds, it reports the boot-hartid, e.g.

    boot-hartid: 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_selftest: rework device tree test
Heinrich Schuchardt [Thu, 17 Sep 2020 05:33:29 +0000 (07:33 +0200)]
efi_selftest: rework device tree test

Allow specifying the node on which a property is searched.
Test the device tree consistency more rigorously.
Some efi_st_printf() calls have been converted to efi_st_error().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoefi_memory: refine overlap_only_ram description
Maxim Uvarov [Fri, 28 Aug 2020 19:47:41 +0000 (22:47 +0300)]
efi_memory: refine overlap_only_ram description

Refine text for overlap_only_ram description to
match to what exactly flag does and aling description
with other functions.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agorng: stm32mp1: use log() instead of printf()
Heinrich Schuchardt [Thu, 17 Sep 2020 14:49:02 +0000 (16:49 +0200)]
rng: stm32mp1: use log() instead of printf()

The logging system provides flexible filtering and enhanced output.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
4 years agocmd: mem: fix range of bitflip test
Ralph Siemsen [Wed, 9 Sep 2020 16:10:00 +0000 (12:10 -0400)]
cmd: mem: fix range of bitflip test

The bitflip test uses two equal sized memory buffers. This is achieved
by splitting the range of memory into two pieces. The address of the
second buffer, as well as the length of each buffer, were not correctly
calculated. This caused bitflip test to access beyond the end of range.
This patch fixes the pointer arithmetic problem.

A second problem arises because u-boot "mtest" command expects the
ending address to be inclusive. When computing (end - start) this
results in missing 1 byte of the requested length. The bitflip test
expects a count rather than an "ending" address. Thus it fails to test
the last word of the requested range. Fixed by using (end - start + 1).

Added Kconfig option to optionally disable the bitflip test, since it
does add significantly to the time taken for "mtest".

Fixes: 8e434cb705d463bc8cff935160e4fb4c77cb99ab ("cmd: mem: Add bitflip
memory test to alternate mtest")

Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>
Reviewed-by: Stefan Roese <sr@denx.de>
4 years agoconfigs: bcmstb: Disable networking support
Thomas Fitzsimmons [Fri, 11 Sep 2020 18:41:44 +0000 (14:41 -0400)]
configs: bcmstb: Disable networking support

Silence the "Driver Model for Ethernet drivers" migration warning for
the bcm7445 and bcm7260 ports, neither of which supports networking yet.

Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agofs/squashfs: Fix Coverity Scan defects
Joao Marcos Costa [Fri, 11 Sep 2020 10:21:06 +0000 (12:21 +0200)]
fs/squashfs: Fix Coverity Scan defects

Fix control flow issues and null pointer dereferences.

Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
4 years agoMerge tag 'u-boot-imx-20200918' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
Tom Rini [Fri, 18 Sep 2020 14:42:12 +0000 (10:42 -0400)]
Merge tag 'u-boot-imx-20200918' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

----------------------------------------------------------------
Fixes for 2020.10
-----------------

- Toradex boards
- mx6qsabrelite: fix env offset
- esdhc_imx: waiting for clock instead of sleep
- dyn RAM calibration for entry point i.MX6

Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/728274602

4 years agoboard: tbs2910: Disable CONFIG_ENV_VARS_UBOOT_CONFIG in defconfig
Soeren Moch [Thu, 27 Aug 2020 19:52:47 +0000 (21:52 +0200)]
board: tbs2910: Disable CONFIG_ENV_VARS_UBOOT_CONFIG in defconfig

This is not required for sysboot (we defined fdtfile), let's save a few
bytes in the binary image without these variables.

Signed-off-by: Soeren Moch <smoch@web.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoMerge branch '2020-09-16-assorted-fixes'
Tom Rini [Thu, 17 Sep 2020 13:53:57 +0000 (09:53 -0400)]
Merge branch '2020-09-16-assorted-fixes'

- Assorted bug fixes

4 years agoapalis-imx8qm: rename all occurences to apalis-imx8
Philippe Schenker [Fri, 28 Aug 2020 18:08:06 +0000 (21:08 +0300)]
apalis-imx8qm: rename all occurences to apalis-imx8

The Toradex product is called apalis-imx8 consisting of SoM with
i.MX8QM and i.MX8QP SoCs.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri-imx8qxp: rename all occurences to colibri-imx8x
Philippe Schenker [Fri, 28 Aug 2020 18:08:05 +0000 (21:08 +0300)]
colibri-imx8qxp: rename all occurences to colibri-imx8x

The Toradex product is called colibri-imx8x consisting of SoM with
i.MX8QXP and i.MX8DX SoCs.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agommc: fsl_esdhc_imx: check the clock stable status after config the clock rate.
Haibo Chen [Tue, 1 Sep 2020 07:34:06 +0000 (15:34 +0800)]
mmc: fsl_esdhc_imx: check the clock stable status after config the clock rate.

Currently, after config the clock rate, delay 10ms, this is quite a rough
method. Check the clock stable status in the present status register is
enough.

Tested-by: Ji Luo <ji.luo@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
4 years agoARM: mx6: ddr: Add support for iMX6UL/ULL/SL/SDL
Marek Vasut [Sat, 12 Sep 2020 23:35:08 +0000 (01:35 +0200)]
ARM: mx6: ddr: Add support for iMX6UL/ULL/SL/SDL

This patch adds support for iMX6UL/ULL/SL/SDL MMDC into the DDR calibration
code. The difference between MX6DQ and MX6UL/ULL/SL is that the later SoCs
have 2 SDQS registers, just like MX6SX, while the MX6DQ/MX6SDL has 8.

Fixes: 4f4c128c65 ("ARM: mx6: ddr: Add support for iMX6SX")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Eric Nelson <eric@nelint.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6qsabrelite: increase the environment offset
Denis Pynkin [Tue, 15 Sep 2020 11:37:14 +0000 (14:37 +0300)]
mx6qsabrelite: increase the environment offset

The size of the binary created with the default U-boot config is much
greater than the default offset for environment `0x60000`.
In case if that binary is used for booting via MMC it is overlapped with
the environment stored on MMC.
This leads to U-Boot corruption while saving environment with `saveenv`
command and non-bootable SabreLite board.

The offset for environment `CONFIG_ENV_OFFSET=0x60000` was added in
commit a09fea1 but did not count in the change to `0xC0000` if option
`CONFIG_ENV_IS_IN_MMC` is used.

The offset is also used for variant with environment saving onto SPI NOR
flash (with enabled option `CONFIG_ENV_IS_IN_SPI_FLASH`). In that case the
U-Boot binary flashed on SPI NOR is also corrupted after environment
saving with the original 0x60000 offset.

Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agoimx8mp: Remove parts MIMX8ML7 and MIMX8ML5 support
Peng Fan [Wed, 16 Sep 2020 07:17:22 +0000 (15:17 +0800)]
imx8mp: Remove parts MIMX8ML7 and MIMX8ML5 support

Latest datasheet revE has removed MIMX8ML7D/5D/7C/5C parts, so
update u-boot to remove decoding and support for those parts.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8m: clock_imx8mm: add missed return
Peng Fan [Wed, 16 Sep 2020 07:17:21 +0000 (15:17 +0800)]
imx8m: clock_imx8mm: add missed return

Add missed return

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8mq: fix SSCG_PLL_REFCLK_SEL_x
Peng Fan [Wed, 16 Sep 2020 07:17:20 +0000 (15:17 +0800)]
imx8mq: fix SSCG_PLL_REFCLK_SEL_x

Fix SSCG_PLL_REFCLK_SEL_x, the offset starts from 0, not 16

Reported-by: Coverity 3448860
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
4 years agoimx8mq: fix FRAC_PLL_REFCLK_SEL_MASK
Peng Fan [Wed, 16 Sep 2020 07:17:19 +0000 (15:17 +0800)]
imx8mq: fix FRAC_PLL_REFCLK_SEL_MASK

Coverity reported dead code, however it is FRAC_PLL_REFCLK_SEL_MASK
was wrongly set.

Reported-by: Coverity 10045172
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
4 years agoimx7: ccm: correct target interface num
Peng Fan [Wed, 16 Sep 2020 07:17:18 +0000 (15:17 +0800)]
imx7: ccm: correct target interface num

According to i.MX 7Dual Applications Processor Reference Manual, Rev. 1
The target interface CCM root index ranges [0,124], so the number
should be 125.

Reported-by: Coverity 18045
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
4 years agoapalis_imx6: provide fdtfile in env instead of setting it in runtime
Igor Opaniuk [Mon, 14 Sep 2020 08:01:12 +0000 (11:01 +0300)]
apalis_imx6: provide fdtfile in env instead of setting it in runtime

Provide fdtfile value in default env instead of setting
it dynamically in runtime.

Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx6: provide fdtfile in env instead of setting it in runtime
Igor Opaniuk [Mon, 14 Sep 2020 08:01:11 +0000 (11:01 +0300)]
colibri_imx6: provide fdtfile in env instead of setting it in runtime

Provide fdtfile value in default env instead of setting
it dynamically in runtime.

Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx7: use preboot for fdtfile evaluation
Igor Opaniuk [Mon, 14 Sep 2020 08:01:10 +0000 (11:01 +0300)]
colibri_imx7: use preboot for fdtfile evaluation

Enable and set preboot var with fdtfile evaluation.
preboot will be checked and run immediately before starting the
CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
entering interactive mode.

This provides possibility to use different boot cmds in interactive mode
without manual setting fdtfile value, as it it's already evaluated
before entering interactive mode.

Fixes: a62c60610f("colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module support")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_vf: use preboot for fdtfile evaluation
Igor Opaniuk [Mon, 14 Sep 2020 08:01:09 +0000 (11:01 +0300)]
colibri_vf: use preboot for fdtfile evaluation

Enable and set preboot var with fdtfile evaluation.
preboot will be checked and run immediately before starting the
CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
entering interactive mode.

This provides possibility to use different boot cmds in interactive mode
without manual setting fdtfile value, as it it's already evaluated
before entering interactive mode.

Fixes: 304042c1f3("colibri_vf: set fdtfile for distroboot")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri-imx6ull: use preboot for fdtfile evaluation
Igor Opaniuk [Mon, 14 Sep 2020 08:01:08 +0000 (11:01 +0300)]
colibri-imx6ull: use preboot for fdtfile evaluation

Enable and set preboot var with fdtfile evaluation.
preboot will be checked and run immediately before starting the
CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp.
entering interactive mode.

This provides possibility to use different boot cmds in interactive mode
without manual setting fdtfile value, as it it's already evaluated
before entering interactive mode.

Fixes: board: 31b1e17f44("toradex: add Colibri iMX6ULL support")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx7: wrap video specific funcs with ifdefs
Igor Opaniuk [Mon, 14 Sep 2020 08:01:07 +0000 (11:01 +0300)]
colibri_imx7: wrap video specific funcs with ifdefs

Wrap video specific functionality with ifdefs.

Fixes: 195011b24d("colibri-imx7: fix splash logo drawing")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agotoradex: drop legacy show_boot_logo function and use splashscreen
Igor Opaniuk [Mon, 14 Sep 2020 08:01:06 +0000 (11:01 +0300)]
toradex: drop legacy show_boot_logo function and use splashscreen

Drop show_boot_logo legacy function, as splashscreen functionality can
be used instead.

Fixes: d324189772("toradex: common: show boot logo")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri_imx7: use splashcreen value instead of legacy function
Igor Opaniuk [Mon, 14 Sep 2020 08:01:05 +0000 (11:01 +0300)]
colibri_imx7: use splashcreen value instead of legacy function

Set proper splashscreen env value instead of calling legacy function
to show embed boot logo.

Fixes: 195011b24d("colibri-imx7: fix splash logo drawing")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agocolibri-imx6ull: use splashcreen value instead of legacy function
Igor Opaniuk [Mon, 14 Sep 2020 08:01:04 +0000 (11:01 +0300)]
colibri-imx6ull: use splashcreen value instead of legacy function

Set proper splashscreen env value instead of calling legacy function
to show embed boot logo.

Fixes: 391c712dde("colibri-imx6ull: show boot logo")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
4 years agodoc: qemu: debug UART settings for QEMU ARM virt
Heinrich Schuchardt [Tue, 15 Sep 2020 22:17:55 +0000 (00:17 +0200)]
doc: qemu: debug UART settings for QEMU ARM virt

Provide the settings for the debug UART on the QEMU ARM virt board.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMAINTAINERS: add myself as reviewer for SquashFS
Miquel Raynal [Mon, 14 Sep 2020 15:44:36 +0000 (17:44 +0200)]
MAINTAINERS: add myself as reviewer for SquashFS

I also followed the development of the SquashFS support in U-Boot
as part of Joao Marcos internship, so I would also appreciate receiving
new contributions and bug reports related to this topic.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
4 years agoMAINTAINERS: add myself as reviewer for SquashFS
Thomas Petazzoni [Mon, 14 Sep 2020 11:52:39 +0000 (13:52 +0200)]
MAINTAINERS: add myself as reviewer for SquashFS

As I have followed the development of the SquashFS support in U-Boot
as part of Joao Marcos work, it makes sense to get Cc'ed on
contributions/bug reports related to the squashfs support.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
4 years agolib: fdt: Fix fdtdec_setup_mem..() conversion to livetree API
Marek Vasut [Sat, 12 Sep 2020 10:42:52 +0000 (12:42 +0200)]
lib: fdt: Fix fdtdec_setup_mem..() conversion to livetree API

Repair incorrectly negated condition in the original patch which broke
DT memory node parsing on everything which has more than one DT memory
node, e.g. R-Car3.

In case multiple valid memory nodes are present in the DT, the original
patch would complete parsing cycle for the first memory node, then move
on to the next one, identify it as a valid, and end the parsing. The fix
is to invert the condition, to make the code behave as it did before the
livetree conversion, so it would continue parsing the subsequent memory
nodes as well.

Fixes: c2f0950c33 ("lib: fdt: Convert fdtdes_setup_mem..() to livetree API")
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
4 years agoinclude: phy: fix NULL pointer check in phy_write()
Thirupathaiah Annapureddy [Tue, 18 Aug 2020 00:31:08 +0000 (17:31 -0700)]
include: phy: fix NULL pointer check in phy_write()

phy_write() uses bus->write() instead of bus->read(). This means NULL
pointer pre-check needs to happen on bus->write instead of bus->read.

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
4 years agoMAINTAINERS: update clk entry git tree
Baruch Siach [Tue, 25 Aug 2020 06:01:41 +0000 (09:01 +0300)]
MAINTAINERS: update clk entry git tree

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
4 years agoMerge tag 'efi-2020-10-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Wed, 16 Sep 2020 12:08:06 +0000 (08:08 -0400)]
Merge tag 'efi-2020-10-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-10-rc5

The following bugs are fixed:

* unaligned access in br_i32_decode()
* missing restore of global data pointer in UEFI selftest
* missing restore of global data pointer on RISC-V in UEfI subsystem
* efi_var_mem_notify_exit_boot_services() should not be __efi_runtime

4 years agoMerge tag 'u-boot-rockchip-20200916' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Wed, 16 Sep 2020 12:07:49 +0000 (08:07 -0400)]
Merge tag 'u-boot-rockchip-20200916' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Fix rv1108 grf access issue
- make_fit_atf: ignore empty PT_LOAD segment

4 years agorockchip: make_fit_atf: ignore empty PT_LOAD segment
Heinrich Schuchardt [Tue, 15 Sep 2020 01:43:29 +0000 (03:43 +0200)]
rockchip: make_fit_atf: ignore empty PT_LOAD segment

The linker sometimes creates PT_LOAD segments with length (p_filesz) zero
as described in https://man7.org/linux/man-pages/man5/elf.5.html. This
leads to build failures. We should ignore empty segments.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rv1108: enable board early init
Kever Yang [Mon, 13 Apr 2020 01:38:32 +0000 (09:38 +0800)]
rockchip: rv1108: enable board early init

Enable board early init callback to init board specific hardware.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rv1108: Enable grf as pre-reloc node
Kever Yang [Mon, 13 Apr 2020 01:38:31 +0000 (09:38 +0800)]
rockchip: rv1108: Enable grf as pre-reloc node

The grf node will be used before relocate, enable it in dts.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agorockchip: rv1108: use correct API for board callback
Kever Yang [Mon, 13 Apr 2020 01:38:30 +0000 (09:38 +0800)]
rockchip: rv1108: use correct API for board callback

Use board_early_init_f() instead of mach_cpu_init() for board, the
board_early_init_f() is used for board init and after dm_initf, while
the mach_cpu_init() is used for CPU/SOC and before dm_initf()(not able
to use syscon API).

Fixes: 9cec336708 ("rockchip: evb-rv1108: Use syscon API to get grf base")
Fixes: 4aa33690fc {"rockchip: elgin-rv1108: Use syscon API to get grf base")

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoMerge tag 'mmc-2020-9-15' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Tue, 15 Sep 2020 12:59:32 +0000 (08:59 -0400)]
Merge tag 'mmc-2020-9-15' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc

- Use mmc_of_parse for msm_sdhci
- Add missing common host caps for xenon_sdhci.

4 years agoAzure/GitLab/Travis: Add SH4 r2dplus machine with various PCI ethernet options
Marek Vasut [Mon, 14 Sep 2020 19:55:58 +0000 (21:55 +0200)]
Azure/GitLab/Travis: Add SH4 r2dplus machine with various PCI ethernet options

Add SH4 R2Dplus machine configured to test various U-Boot PCI ethernet
options -- RTL8139, EEPRO100, AMD PCnet, DEC Tulip.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agommc: xenon_sdhci: Add missing common host capabilities
Andre Heider [Thu, 10 Sep 2020 17:53:40 +0000 (19:53 +0200)]
mmc: xenon_sdhci: Add missing common host capabilities

Use mmc_of_parse() to set the common host properties. That includes
"bus-width", so parsing it can be removed from the driver.

But more importantly, "non-removable" is now respected, which fixes
the usage of eMMC.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Reviewed-by: Konstantin Porotchkin <kostap@marvell.com>
Tested-by: Marek Behún <marek.behun@nic.cz>