platform/kernel/u-boot.git
3 years agoarm: cpu: armv8: add L3 memory flush support
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:56 +0000 (22:48 +0530)]
arm: cpu: armv8: add L3 memory flush support

Add L3 memory flush support for NS3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoboard: ns3: add support for Broadcom Northstar 3
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:55 +0000 (22:48 +0530)]
board: ns3: add support for Broadcom Northstar 3

Add support for Broadcom Northstar 3 SoC.
NS3 is a octo-core 64-bit ARMv8 Cortex-A72 processors
targeting a broad range of networking applications.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoMerge branch '2020-07-28-misc-soc-improvements'
Tom Rini [Wed, 29 Jul 2020 13:26:11 +0000 (09:26 -0400)]
Merge branch '2020-07-28-misc-soc-improvements'

- Assorted MediaTek improvements
- s5p4418 support
- QEMU ARM platform improvements
- Qualcomm IPQ40xx support

3 years agoboard: mediatek: Add support for UniElec U7623 board
David Woodhouse [Sun, 12 Jul 2020 22:33:03 +0000 (23:33 +0100)]
board: mediatek: Add support for UniElec U7623 board

This is an MT7623A-based board, very similar to the Banana Pi R2.

http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoboard: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment
David Woodhouse [Sun, 12 Jul 2020 22:33:02 +0000 (23:33 +0100)]
board: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment

Rather than hard-coding it to the Banana Pi R2.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoboard: mediatek: fix mmc_get_boot_dev() for platforms without external SD
David Woodhouse [Sun, 12 Jul 2020 22:33:01 +0000 (23:33 +0100)]
board: mediatek: fix mmc_get_boot_dev() for platforms without external SD

On the UniElec U7623 board there is no external SD slot and the preloader
doesn't fill in the magic field at 0x81dffff0 to indicate that it was
booted from eMMC.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
3 years agoarm: add (default) config for nanopi2 board
Stefan Bosch [Fri, 10 Jul 2020 17:07:38 +0000 (19:07 +0200)]
arm: add (default) config for nanopi2 board

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- Configuration changed, mainly several "CONFIG_..." moved from
  s5p4418_nanopi2.h to s5p4418_nanopi2_defconfig and USB related
  configs removed because USB is not supported yet.
- s5p4418_nanopi2.h: "CONFIG_" removed from several s5p4418/nanopi2
  specific defines because the appropriate values do not need to be
  configurable.
- pinctrl is supported now, therefore "CONFIG_PINCTRL=y" added to
  s5p4418_nanopi2_defconfig.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agoarm: add support for SoC s5p4418 (cpu) / nanopi2 board
Stefan Bosch [Fri, 10 Jul 2020 17:07:37 +0000 (19:07 +0200)]
arm: add support for SoC s5p4418 (cpu) / nanopi2 board

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- SPL not supported yet --> no spl-dir in arch/arm/cpu/armv7/s5p4418/.
  Appropriate line in Makefile removed.
- cpu.c: '#include <cpu_func.h>' added.
- arch/arm/cpu/armv7/s5p4418/u-boot.lds removed, is not required
  anylonger.
- "obj-$(CONFIG_ARCH_NEXELL) += s5p-common/" added to
  arch/arm/cpu/armv7/Makefile since s5p-common/pwm.c is used instead
  of drivers/pwm/pwm-nexell.c.
- s5p4418.dtsi: '#include "../../../include/generated/autoconf.h"'
  removed, is not necessary, error at out-of-tree building.
  '#ifdef CONFIG_CPU_NXP4330'-blocks (2x) removed. Some minor changes
  regarding mmc. 'u-boot,dm-pre-reloc' added to dp0 because of added
  DM_VIDEO support.
- board/s5p4418/ renamed to board/friendlyarm/
- All s5p4418-boards except nanopi2 removed because there is no
  possibility to test the other boards.
- Kconfig: Changes to have a structure like mach-bcm283x (RaspberryPi),
  e.g. "config ..." entries moved from/to other Kconfig.
- "CONFIG_" removed from several s5p4418/nanopi2 specific defines
  because the appropriate values do not need to be configurable.
- nanopi2/board.c: All getenv(), getenv_ulong(), setenv() and saveenv()
  renamed to env_get(), env_get_ulong(), env_set() and env_save(),
  respectively. MACH_TYPE_S5P4418 is not defined anymore, therefore
  appropriate code removed (not necessary for DT-kernels).
- nanopi2/onewire.c: All crc8() renamed to crc8_ow() because crc8() is
  already defined in lib/crc8.c (with different parameters).
- dts: "nexell,s5pxx18-i2c" used instead of "i2c-gpio", i2c0 and
  i2c1 added. gmac-, ehci- and dwc2otg-entries removed because the
  appropriate functionality is not supported yet. New mmc-property
  "mmcboost" added.
  s5p4418-pinctrl.dtsi: gmac-entries removed, mmc- and i2c-entries
  added.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agovideo: add nexell video driver (display/video driver)
Stefan Bosch [Fri, 10 Jul 2020 17:07:36 +0000 (19:07 +0200)]
video: add nexell video driver (display/video driver)

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- nexell_display.c: Changed to DM, CONFIG_FB_ADDR can not be used
  anymore because framebuffer is allocated by video_reserve() in
  video-uclass.c. Therefore code changed appropriately.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).
- livetree API (dev_read_...) is used instead of fdt one (fdt...).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agovideo: add nexell video driver (soc: dpc, makefile)
Stefan Bosch [Fri, 10 Jul 2020 17:07:35 +0000 (19:07 +0200)]
video: add nexell video driver (soc: dpc, makefile)

Low level functions for DPC (Display Controller) and Makefile for all
nexell video low level functions.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agovideo: add nexell video driver (soc: lvds, hdmi)
Stefan Bosch [Fri, 10 Jul 2020 17:07:34 +0000 (19:07 +0200)]
video: add nexell video driver (soc: lvds, hdmi)

Low level functions for LVDS and HDMI display interfaces.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agovideo: add nexell video driver (soc: mlc, mipi)
Stefan Bosch [Fri, 10 Jul 2020 17:07:33 +0000 (19:07 +0200)]
video: add nexell video driver (soc: mlc, mipi)

Low level functions for MLC (Multi Layer Control) and MIPI (Mobile
Industry Processor Interface).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agovideo: add nexell video driver (soc: displaytop)
Stefan Bosch [Fri, 10 Jul 2020 17:07:32 +0000 (19:07 +0200)]
video: add nexell video driver (soc: displaytop)

Low level functions for DisplayTop (Display Topology).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agopwm: add driver for nexell
Stefan Bosch [Fri, 10 Jul 2020 17:07:31 +0000 (19:07 +0200)]
pwm: add driver for nexell

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- Since drivers/pwm/pwm-nexell.c is an adapted version of
  s5p-common/pwm.c an appropriately changed version of s5p-common/pwm.c
  is used instead. Therefore arch/arm/mach-s5pc1xx/include/mach/pwm.h
  copied to arch/arm/mach-nexell/include/mach and s5p-common/Makefile
  changed appropriately.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agopinctrl: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:30 +0000 (19:07 +0200)]
pinctrl: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- livetree API (dev_read_...) is used instead of fdt one (fdt...).
- doc/device-tree-bindings/pinctrl/nexell,s5pxx18-pinctrl.txt added.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agommc: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:29 +0000 (19:07 +0200)]
mmc: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- driver changed to DM.
- pinctrl-driver/dt is used now instead of configuring the mmc I/O-pins
  in the mmc-driver.
- nexell_dwmmc_ofdata_to_platdata() reworked, i.e. valid default values
  are used now (where possible) and the appropriate if-blocks have
  been removed.
- new dt-property "mmcboost" is used now instead of "CONFIG_BOOST_MMC"
  which was not defined anywhere.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agoi2c: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:28 +0000 (19:07 +0200)]
i2c: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- i2c/nx_i2c.c: Some adaptions mainly because of changes in
  "struct udevice".
- several Bugfixes in nx_i2c.c.
- the driver has been for s5p6818 only. Code extended appropriately
  in order s5p4418 is also working.
- "probe_chip" added.
- pinctrl-driver/dt is used instead of configuring the i2c I/O-pins
  in the i2c-driver.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).
- livetree API (dev_read_...) is used instead of fdt one (fdt...).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agogpio: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:27 +0000 (19:07 +0200)]
gpio: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- livetree API (dev_read_...) is used instead of fdt one (fdt...).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agoarm: add mach-nexell (all files except header files)
Stefan Bosch [Fri, 10 Jul 2020 17:07:26 +0000 (19:07 +0200)]
arm: add mach-nexell (all files except header files)

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- SPL not supported yet --> no spl-directory in arch/arm/mach-nexell.
  Appropriate line in Makefile removed.
- clock.c: 'section(".data")' added to declaration of clk_periphs[] and
  core_hz.
- Kconfig: Changes to have a structure like in mach-bcm283x/Kconfig,
  e.g. "config ..." entries moved from other Kconfig.
- timer.c: 'section(".data")' added to declaration of timestamp and
  lastdec.
- arch/arm/mach-nexell/serial.c removed because this is for the UARTs
  of the S5P6818 SoC which is not supported yet. S5P4418 UARTs are
  different, here the (existing) PL011-code is used.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agoarm: add mach-nexell (header files)
Stefan Bosch [Fri, 10 Jul 2020 17:07:25 +0000 (19:07 +0200)]
arm: add mach-nexell (header files)

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- DM_VIDEO support (display_dev.h).
- boot0.h added, handles NSIH --> tools/nexell obsolete.
- gpio.h: Include-path to errno.h changed.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
3 years agoarm: qemu: override flash accessors to use virtualizable instructions
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:11 +0000 (12:07 +0200)]
arm: qemu: override flash accessors to use virtualizable instructions

Some instructions in the ARM ISA have multiple output registers, such
as ldrd/ldp (load pair), where two registers are loaded from memory,
but also ldr with indexing, where the memory base register is incremented
as well when the value is loaded to the destination register.

MMIO emulation under KVM is based on using the architecturally defined
syndrome information that is provided when an exception is taken to the
hypervisor. This syndrome information describes whether the instruction
that triggered the exception is a load or a store, what the faulting
address was, and which register was the destination register.

This syndrome information can only describe one destination register, and
when the trapping instruction is one with multiple outputs, KVM throws an
error like

  kvm [615929]: Data abort outside memslots with no valid syndrome info

on the host and kills the QEMU process with the following error:

  U-Boot 2020.07-rc3-00208-g88bd5b179360-dirty (Jun 06 2020 - 11:59:22 +0200)

  DRAM:  1 GiB
  Flash: error: kvm run failed Function not implemented
  R00=00000001 R01=00000040 R02=7ee0ce20 R03=00000000
  R04=7ffd9eec R05=00000004 R06=7ffda3f8 R07=00000055
  R08=7ffd9eec R09=7ef0ded0 R10=7ee0ce20 R11=00000000
  R12=00000004 R13=7ee0cdf8 R14=00000000 R15=7ff72d08
  PSR=200001d3 --C- A svc32
  QEMU: Terminated

This means that, in order to run U-Boot in QEMU under KVM, we need to
avoid such instructions when accessing emulated devices. For the flash
in particular, which is a hybrid between a ROM (backed by a read-only
KVM memslot) when in array mode, and an emulated MMIO device (when in
write mode), we need to take care to only use instructions that KVM can
deal with when they trap.

So override the flash read accessors that are used when running on QEMU
under KVM. Note that the the 64-bit wide read and write accessors have
been omitted: they are never used when running under QEMU given that it
does not emulate CFI flash that supports it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
3 years agoarm: qemu: disable the EFI workaround for older GRUB
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:10 +0000 (12:07 +0200)]
arm: qemu: disable the EFI workaround for older GRUB

The QEMU/mach-virt targeted port of u-boot currently only runs on
QEMU under TCG emulation, which does not model the caches at all,
and so no users can exist that are relying on the GRUB hack for
EFI boot.

We will shortly enable support for running under KVM, but the GRUB
hack (which disables all caches without doing cache cleaning by VA
during ExitBootServices()) is likely to cause more problems than it
solves, given that KVM hosts require correct maintenance if they
incorporate non-architected system caches.

So let's disable the GRUB hack by default on the QEMU/mach-virt
port.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoarm: qemu: implement enable_caches()
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:09 +0000 (12:07 +0200)]
arm: qemu: implement enable_caches()

Add an override for enable_caches to enable the I and D caches, along
with the cached 1:1 mapping of all of DRAM. This is needed for running
U-Boot under virtualization with QEMU/kvm.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
3 years agoarm: qemu: enable LPAE on 32-bit
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:08 +0000 (12:07 +0200)]
arm: qemu: enable LPAE on 32-bit

QEMU's mach-virt machine only supports selecting CPU models that
implement the virtualization extensions, and are therefore guaranteed
to support LPAE as well.

Initially, QEMU would not allow emulating these CPUs running in HYP
mode (or EL2, for AArch64), but today, it also contains a complete
implementation of the virtualization extensions themselves.

This means we could be running U-Boot in HYP mode, in which case the
LPAE long descriptor page table format is the only format that is
supported. If we are not running in HYP mode, we can use either.

So let's enable CONFIG_ARMV7_LPAE for qemu_arm_defconfig so that we
get the best support for running with the MMU and caches enabled at
any privilege level.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 years agoarm: enable allocate-on-read for LPAE's DCACHE_WRITEBACK/_WRITETHROUGH
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:07 +0000 (12:07 +0200)]
arm: enable allocate-on-read for LPAE's DCACHE_WRITEBACK/_WRITETHROUGH

The LPAE versions of DCACHE_WRITEBACK and DCACHE_WRITETHROUGH are currently
defined as no-allocate for both reads and writes, which deviates from the
non-LPAE definition, and mostly defeats the purpose of enabling the caches
in the first place.

So align LPAE with !LPAE, and enable allocate-on-read for both. And while
at it, add some clarification about the meaning of the chosen values.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
3 years agomsm_gpio: Add support for Qualcomm IPQ40xx
Robert Marko [Mon, 6 Jul 2020 08:37:56 +0000 (10:37 +0200)]
msm_gpio: Add support for Qualcomm IPQ40xx

Snapdragon SoCs and IPQ40xx use common TLMM IP,
so existing driver supports IPQ40xx as well.

So lets simply add a compatible for IPQ40xx.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
3 years agomsm_serial: Read bit rate register value from DT
Robert Marko [Mon, 6 Jul 2020 08:37:55 +0000 (10:37 +0200)]
msm_serial: Read bit rate register value from DT

IPQ40xx and currently supported Snapdragon boards don't use the same one
so enable reading it from DT, if no DT property is found default value
is the same as the previous define.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
3 years agoarm: Add support for Qualcomm IPQ40xx family
Robert Marko [Mon, 6 Jul 2020 08:37:54 +0000 (10:37 +0200)]
arm: Add support for Qualcomm IPQ40xx family

This introduces initial support for the popular Qualcomm
IPQ40x8 and IPQ40x9 WiSoC series.

IPQ40xx series have 4x Cortex A7 ARM-v7A cores.
Supported are: IPQ4018, IPQ4019, IPQ4028 and IPQ4029.

IPQ40x8 and IPQ40x9 use the same cores, but differ in
addressable RAM size (1GB for IPQ40x9 and 256MB for IPQ40x8)
and supported peripherals (IPQ40x8 lacks RGMII, LCD controller
and EMMC/SDHCI controllers).

IQP4028/IPQ4029 models differ from IPQ4018/IPQ4019 only
by their rated temperatures rates with IPQ402X models being
rated for wider temperature ranges.

Initially this supports:
* Simple clock driver (Only for UART1 now, will be extended)
* Pinctrl driver (Supports UARTX and GPIO now, will be extended)
* GPIOs already supported by msm_gpio driver with updates
* UARTs already supported by serial_msm driver with updates

Further peripherals will come in later patches.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
3 years agopinctrl: mediatek: add PUPD/R0/R1 support for MT7623
David Woodhouse [Fri, 19 Jun 2020 11:40:20 +0000 (12:40 +0100)]
pinctrl: mediatek: add PUPD/R0/R1 support for MT7623

The pins for the MMC controller weren't being set up correctly because the
pinctrl driver only sets the GPIO pullup/pulldown config and doesn't
handle the special cases with PUPD/R0/R1 control.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
3 years agoarm: dts: mediatek: enable sgmii mode and mt7531 switch for mt7629
MarkLee [Fri, 19 Jun 2020 11:17:17 +0000 (19:17 +0800)]
arm: dts: mediatek: enable sgmii mode and mt7531 switch for mt7629

This patch enable sgmii mode and mt7531 switch support in mt7629
ethernet dts node

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
3 years agoeth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver
MarkLee [Fri, 19 Jun 2020 11:17:16 +0000 (19:17 +0800)]
eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
3 years agoMerge branch '2020-07-28-Kconfig-migrations'
Tom Rini [Tue, 28 Jul 2020 22:27:34 +0000 (18:27 -0400)]
Merge branch '2020-07-28-Kconfig-migrations'

- Migration of more symbols to Kconfig

3 years agoconfigs: migrate CONFIG_SPL_LOAD_FIT_ADDRESS to defconfigs
Peng Fan [Mon, 6 Jul 2020 07:35:01 +0000 (15:35 +0800)]
configs: migrate CONFIG_SPL_LOAD_FIT_ADDRESS to defconfigs

Done with:
./tools/moveconfig.py -S SPL_LOAD_FIT_ADDRESS
./tools/moveconfig.py -S SPL_LOAD_FIT_ADDRESS -H

Signed-off-by: Peng Fan <peng.fan@nxp.com>
[trini: A few more migrations]
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoKconfig: add SPL_LOAD_FIT_ADDRESS
Peng Fan [Mon, 6 Jul 2020 07:35:00 +0000 (15:35 +0800)]
Kconfig: add SPL_LOAD_FIT_ADDRESS

Add SPL_LOAD_FIT_ADDRESS to make user could add it in defconfig

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoConvert CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to Kconfig
Adam Ford [Fri, 3 Jul 2020 15:17:30 +0000 (10:17 -0500)]
Convert CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_MMCSD_FS_BOOT_PARTITION

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoconfigs: Remove dead CONFIG options
Adam Ford [Fri, 3 Jul 2020 14:06:36 +0000 (09:06 -0500)]
configs: Remove dead CONFIG options

BOOTP_DEFAULT is defined in several boards, but this config
option is never checked or used.

This patch removes this config option from config files and
the whitelist.txt

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoConvert CONFIG_BOOTP_SEND_HOSTNAME to Kconfig
Adam Ford [Fri, 3 Jul 2020 14:00:14 +0000 (09:00 -0500)]
Convert CONFIG_BOOTP_SEND_HOSTNAME to Kconfig

This converts the following to Kconfig:
   CONFIG_BOOTP_SEND_HOSTNAME

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoConvert CONFIG_DRIVER_TI_EMAC_USE_RMII to Kconfig
Adam Ford [Fri, 3 Jul 2020 13:27:12 +0000 (08:27 -0500)]
Convert CONFIG_DRIVER_TI_EMAC_USE_RMII to Kconfig

This converts the following to Kconfig:
   CONFIG_DRIVER_TI_EMAC_USE_RMII

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoConvert CONFIG_SPL_NAND_BASE et al to Kconfig
Adam Ford [Fri, 3 Jul 2020 13:09:45 +0000 (08:09 -0500)]
Convert CONFIG_SPL_NAND_BASE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SPL_NAND_BASE
   CONFIG_SPL_NAND_IDENT

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoConvert CONFIG_SPL_NAND_DRIVERS et al to Kconfig
Adam Ford [Fri, 3 Jul 2020 13:09:44 +0000 (08:09 -0500)]
Convert CONFIG_SPL_NAND_DRIVERS et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SPL_NAND_DRIVERS
   CONFIG_SPL_NAND_ECC
   CONFIG_SPL_NAND_SIMPLE

Signed-off-by: Adam Ford <aford173@gmail.com>
3 years agoConvert CONFIG_ENV_OVERWRITE to Kconfig
Adam Ford [Fri, 3 Jul 2020 11:48:56 +0000 (06:48 -0500)]
Convert CONFIG_ENV_OVERWRITE to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_OVERWRITE

Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Rerun migration, remove some comments]
Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge branch '2020-07-28-update-azure-tests'
Tom Rini [Tue, 28 Jul 2020 12:49:42 +0000 (08:49 -0400)]
Merge branch '2020-07-28-update-azure-tests'

- Update Azure to fix some recent issues with Windows host tool builds

3 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 28 Jul 2020 12:46:52 +0000 (08:46 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoazure: Switch to use the MSYS2 official installer as the CI base
Bin Meng [Tue, 28 Jul 2020 09:06:44 +0000 (02:06 -0700)]
azure: Switch to use the MSYS2 official installer as the CI base

Recent CI failures were seen [1] when building MSYS2 Windows host
tools. The error messages are something like:

  downloading mingw32.db...
  downloading mingw32.db.sig...
  error: mingw32: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
  error: mingw32: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
  error: failed to update mingw32 (invalid or corrupted database (PGP signature))

Per the MSYS2 official news [2], this was caused by a packager
switch and several solutions were suggested, e.g.: a new package
of msys2-keyring and a new msys2 installer that includes them are
released. However right now we have been using the MSYS2 github
CI base repo [3] for the MSYS2 build in U-Boot, but per the project
information on the github webpage, it says: "This repository is
unused/deprecated and will be remove after 2021-01-01". Since it is
unmaintained it's unlikely the new PGP keys will be included in the
git repo, and the only choice is to switch to use the MSYS2 official
installer as the CI base instead.

[1] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=975
[2] https://www.msys2.org/news/#2020-06-29-new-packagers
[3] https://github.com/msys2/msys2-ci-base

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoazure: Add the missing build dependency for MSYS2 build
Bin Meng [Tue, 28 Jul 2020 09:06:43 +0000 (02:06 -0700)]
azure: Add the missing build dependency for MSYS2 build

Package 'flex' is needed when building the U-Boot host tool, but
is currently missing in the build dependency in the CI pipeline.

This is to prepare switching to an installer based CI build.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoazure: Drop 32-bit MSYS2 build
Bin Meng [Tue, 28 Jul 2020 09:06:42 +0000 (02:06 -0700)]
azure: Drop 32-bit MSYS2 build

As of 2020-05-17, 32-bit MSYS2 is no longer actively supported by
the upstream [1]. Let's drop the 32-bit Windows host tool build.

[1] https://www.msys2.org/news/#2020-05-17-32-bit-msys2-no-longer-actively-supported

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoazure: Use a login shell everywhere for MSYS2 build
Bin Meng [Tue, 28 Jul 2020 09:06:41 +0000 (02:06 -0700)]
azure: Use a login shell everywhere for MSYS2 build

This simplifies things a bit to just use a login shell everywhere.

This keeps in sync with MSYS2 upstream commit:
9d11b7f0aa93 ("azure-pipelines: simplify things a bit").

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoPrepare v2020.10-rc1
Tom Rini [Tue, 28 Jul 2020 02:46:03 +0000 (22:46 -0400)]
Prepare v2020.10-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge tag 'u-boot-amlogic-20200727' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Tue, 28 Jul 2020 01:40:26 +0000 (21:40 -0400)]
Merge tag 'u-boot-amlogic-20200727' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- Handle errors in Meson serial driver
- Enable HDMI, keyboard and ADC for Odroid-C2

3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Mon, 27 Jul 2020 19:18:15 +0000 (15:18 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- Bug fixes and updates on ls2088a,ls1028a, ls1046a, ls1043a, ls1012a
- lx2-watchdog support
- layerscape: pci-endpoint support, spin table relocation fixes and
  cleanups
- fsl-crypto: RNG support and bug fixes

3 years agotravis: Install pyelftools via pip
Tom Rini [Mon, 27 Jul 2020 15:11:27 +0000 (11:11 -0400)]
travis: Install pyelftools via pip

With the migration to python3 for all of our tests, we need to install
pyelftools via pip now rather than the system tools as they will
otherwise not be present in our virtualenv.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v2: Switch to pip

3 years agoMerge tag 'dm-pull-20jul20-take2a' of https://gitlab.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 27 Jul 2020 15:15:37 +0000 (11:15 -0400)]
Merge tag 'dm-pull-20jul20-take2a' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

binman support for FIT
new UCLASS_SOC
patman switch 'test' command
minor fdt fixes
patman usability improvements

3 years agoconfigs: odroid-c2: update for HDMI output, ADC & USB keyboard
Anand Moon [Thu, 23 Jul 2020 08:06:35 +0000 (08:06 +0000)]
configs: odroid-c2: update for HDMI output, ADC & USB keyboard

Enable options to permit HDMI output on Odroid-C2 GXBB boards.
Enable VPU Power Domain.
Enable ADC and USB_KERBOARD.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
3 years agoserial: meson: handle RX errors
Neil Armstrong [Tue, 21 Jul 2020 11:41:14 +0000 (13:41 +0200)]
serial: meson: handle RX errors

This checks and handles RX errors on the Amlogic UART controller
after experiencing errors on the Khadas VIM3 & VIM3L when UART AO A
lines are not connected.

When the RX line is not connected, the first byte is erroneous and breaks
the U-Boot autoboot, breaking automatic boot.

This checks and drops any erroneous RX byte on pending and getc callbacks
to avoid returning true to pending when an error byte is in the FIFO.

Fixes: bfcef28ae4 ("arm: add initial support for Amlogic Meson and ODROID-C2")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Guillaume La Roque <glaroque@baylibre.com>
3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 27 Jul 2020 13:41:18 +0000 (09:41 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sh

- R8A774A1 / Beacon EmbeddedWorks RZG2M Dev Kit support

3 years agoMerge branch 'net' of https://gitlab.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 27 Jul 2020 13:40:06 +0000 (09:40 -0400)]
Merge branch 'net' of https://gitlab.denx.de/u-boot/custodians/u-boot-sh

- Convert dc2114x driver to DM.

3 years agoMerge branch '2020-07-27-misc-env-improvements'
Tom Rini [Mon, 27 Jul 2020 13:25:53 +0000 (09:25 -0400)]
Merge branch '2020-07-27-misc-env-improvements'

- Assorted environment fixes.
- Enhance environment in MMC and controlled via OF_CONTROL
- Allow for environment in FAT to use the same device we boot from
  rather than be hard-coded.

3 years agoconfigs: ls2088a: Restore CONFIG_ENV_ADDR to IFC-NOR
Kuldeep Singh [Wed, 22 Jul 2020 09:35:44 +0000 (15:05 +0530)]
configs: ls2088a: Restore CONFIG_ENV_ADDR to IFC-NOR

Restore CONFIG_ENV_ADDR value to fix boot hang with IFC-NOR
which is default boot source.

Signed-off-by: Ashish Kumar <ashish.kumar@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarm: dts: ls1028a: Add dspi flash device node to qds
Zhao Qiang [Tue, 14 Jul 2020 05:53:36 +0000 (13:53 +0800)]
arm: dts: ls1028a: Add dspi flash device node to qds

Add dspi flash device node to fsl-ls1028a-qds.dtsi

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoconfigs: lx2160a: Enable Watchdog support
Zhao Qiang [Fri, 10 Jul 2020 08:55:20 +0000 (16:55 +0800)]
configs: lx2160a: Enable Watchdog support

Enable support to compile SBSA driver.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarm64: lx2160a: dts: Add watchdog node
Zhao Qiang [Fri, 10 Jul 2020 08:55:19 +0000 (16:55 +0800)]
arm64: lx2160a: dts: Add watchdog node

Add watchdog node which is sbsa into lx2160a dtsi

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoWatchdog: introduce ARM SBSA watchdog driver
Zhao Qiang [Fri, 10 Jul 2020 08:55:18 +0000 (16:55 +0800)]
Watchdog: introduce ARM SBSA watchdog driver

According to Server Base System Architecture (SBSA) specification,
the SBSA Generic Watchdog has two stage timeouts: the first signal
(WS0) is for alerting the system by interrupt, the second one (WS1) is a
real hardware reset.
More details about the hardware specification of this device:
ARM DEN0029B - Server Base System Architecture (SBSA)

This driver can operate ARM SBSA Generic Watchdog as a single stage
In the single stage mode, when the timeout is reached, your system
will be reset by WS1. The first signal (WS0) is ignored.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci: layerscape: Add specific config entry for RC and EP mode driver
Hou Zhiqiang [Thu, 9 Jul 2020 15:31:42 +0000 (23:31 +0800)]
pci: layerscape: Add specific config entry for RC and EP mode driver

Add Root Complex and Endpoint mode specific config entries, such that
it's feasible to enable the RC and/or EP mode driver indepently.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci_ep: layerscape: Add the PCIe EP mode support for lx2160a-v2
Xiaowei Bao [Thu, 9 Jul 2020 15:31:41 +0000 (23:31 +0800)]
pci_ep: layerscape: Add the PCIe EP mode support for lx2160a-v2

Add the PCIe EP mode support for lx2160a-v2 platform.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci: layerscape: Modify the ls_pcie_dump_atu function
Xiaowei Bao [Thu, 9 Jul 2020 15:31:40 +0000 (23:31 +0800)]
pci: layerscape: Modify the ls_pcie_dump_atu function

Modify the ls_pcie_dump_atu function, make it can print the INBOUND
windows registers.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci_ep: layerscape: Add the SRIOV VFs of PF support
Xiaowei Bao [Thu, 9 Jul 2020 15:31:39 +0000 (23:31 +0800)]
pci_ep: layerscape: Add the SRIOV VFs of PF support

Add the INBOUND configuration for VFs of PF.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci_ep: layerscape: Add Support for ls2085a and ls2080a EP mode
Xiaowei Bao [Thu, 9 Jul 2020 15:31:38 +0000 (23:31 +0800)]
pci_ep: layerscape: Add Support for ls2085a and ls2080a EP mode

Due to the ls2085a and ls2080a use different way to set the BAR size,
so add the BAR size init code here.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci_ep: layerscape: Add the workaround for errata A-009460
Xiaowei Bao [Thu, 9 Jul 2020 15:31:37 +0000 (23:31 +0800)]
pci_ep: layerscape: Add the workaround for errata A-009460

The VF_BARn_REG register's Prefetchable and Type bit fields
are overwritten by a write to VF's BAR Mask register.
workaround: Before writing to the VF_BARn_MASK_REG register,
write 0b to the PCIE_MISC_CONTROL_1_OFF register.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopcie_ep: layerscape: Add the multiple function support
Xiaowei Bao [Thu, 9 Jul 2020 15:31:36 +0000 (23:31 +0800)]
pcie_ep: layerscape: Add the multiple function support

Add the multiple function support for Layerscape platform, some PEXs
of Layerscaple platform have more than one PF.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarmv8: dts: ls1046a: Add the PCIe EP node
Xiaowei Bao [Thu, 9 Jul 2020 15:31:35 +0000 (23:31 +0800)]
armv8: dts: ls1046a: Add the PCIe EP node

Add the PCIe EP node for ls1046a.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci_ep: Add the init function
Xiaowei Bao [Thu, 9 Jul 2020 15:31:34 +0000 (23:31 +0800)]
pci_ep: Add the init function

Some EP deivces need to initialize before RC scan it, e.g. NXP
layerscape platform, so add the init function in pci_ep uclass.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agopci: layerscape: Split the EP and RC driver
Xiaowei Bao [Thu, 9 Jul 2020 15:31:33 +0000 (23:31 +0800)]
pci: layerscape: Split the EP and RC driver

Split the RC and EP driver, and reimplement the EP driver base on
the EP framework.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
[Rebased]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarm: dts: lx2160a: Increase configuration window size
Wasim Khan [Thu, 9 Jul 2020 08:51:08 +0000 (14:21 +0530)]
arm: dts: lx2160a: Increase configuration window size

lx2160a rev2 requires 4KB space for type0 and 4KB
space for type1 iATU window. Increase configuration
size to 8KB to have sufficient space for type0
and type1 window.

Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoconfigs:ls1046afrwy: Add tfa secure boot defonfig
Manish Tomar [Wed, 8 Jul 2020 09:25:03 +0000 (14:55 +0530)]
configs:ls1046afrwy: Add tfa secure boot defonfig

Add TFA secure boot defconfig and Enables secure boot related
configs in it.

Signed-off-by: Manish Tomar <manish.tomar@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agofreescale: ls1043aqds: drop ifdef CONFIG_SYS_I2C
Biwen Li [Thu, 2 Jul 2020 03:13:04 +0000 (11:13 +0800)]
freescale: ls1043aqds: drop ifdef CONFIG_SYS_I2C

- Drop ifdef CONFIG_SYS_I2C to initialize
  baudrate of i2c

- Drop warning of i2c_early_init_f as follows,
  warning: implicit declaration of function 'i2c_early_init_f'; did you
  mean 'arch_early_init_r'? [-Wimplicit-function-declaration]

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agofreescale: ls1043aqds: enable secure system counter
Biwen Li [Thu, 2 Jul 2020 03:13:03 +0000 (11:13 +0800)]
freescale: ls1043aqds: enable secure system counter

Enable secure system counter in board_early_init_f for udelay()
to fix a bug that always return 0 by timer_read_counter()
when boot from qspi(No TFA)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agofreescale: ls1046aqds: drop ifdef CONFIG_SYS_I2C
Biwen Li [Thu, 2 Jul 2020 03:13:02 +0000 (11:13 +0800)]
freescale: ls1046aqds: drop ifdef CONFIG_SYS_I2C

- Drop ifdef CONFIG_SYS_I2C to initialize
  baudrate of i2c

- Drop warning of i2c_early_init_f as follows,
  warning: implicit declaration of function 'i2c_early_init_f'; did you
  mean 'arch_early_init_r'? [-Wimplicit-function-declaration]

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agofreescale: ls1046aqds: enable secure system counter
Biwen Li [Thu, 2 Jul 2020 03:13:01 +0000 (11:13 +0800)]
freescale: ls1046aqds: enable secure system counter

Enable secure system counter in board_early_init_f for udelay()
to fix a bug that always return 0 by timer_read_counter()
when boot from qspi(No TFA)

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoi2c: mxc: move i2c_early_init_f to common function
Biwen Li [Thu, 2 Jul 2020 03:13:00 +0000 (11:13 +0800)]
i2c: mxc: move i2c_early_init_f to common function

Move i2c_early_init_f to common function
to initialize baudrate of i2c

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: add RNG support
Michael Walle [Sat, 27 Jun 2020 20:58:53 +0000 (22:58 +0200)]
crypto/fsl: add RNG support

Register the random number generator with the rng subsystem in u-boot.
This way it can be used by EFI as well as for the 'rng' command.

Signed-off-by: Michael Walle <michael@walle.cc>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: instantiate the RNG with prediciton resistance
Michael Walle [Sat, 27 Jun 2020 20:58:52 +0000 (22:58 +0200)]
crypto/fsl: instantiate the RNG with prediciton resistance

If it is already instantiated tear it down first and then reinstanciate
it again with prediction resistance.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: don't regenerate secure keys
Michael Walle [Sat, 27 Jun 2020 20:58:51 +0000 (22:58 +0200)]
crypto/fsl: don't regenerate secure keys

The secure keys (TDKEK, JDKEK, TDSK) can only be generated once after a
POR. Otherwise the RNG4 will throw an error.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: support newer SEC modules
Michael Walle [Sat, 27 Jun 2020 20:58:50 +0000 (22:58 +0200)]
crypto/fsl: support newer SEC modules

Since Era 10, the version registers changed. Add the version registers
and use them on newer modules.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: export caam_get_era()
Michael Walle [Sat, 27 Jun 2020 20:58:49 +0000 (22:58 +0200)]
crypto/fsl: export caam_get_era()

We need the era in other modules, too. For example, to get the RNG
version.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: make SEC%u status line consistent
Michael Walle [Sat, 27 Jun 2020 20:58:48 +0000 (22:58 +0200)]
crypto/fsl: make SEC%u status line consistent

Align the status line with all the other output in U-Boot.

Before the change:
DDR    3.9 GiB (DDR3, 32-bit, CL=11, ECC on)
SEC0: RNG instantiated
WDT:   Started with servicing (60s timeout)

After the change:
DDR    3.9 GiB (DDR3, 32-bit, CL=11, ECC on)
SEC0:  RNG instantiated
WDT:   Started with servicing (60s timeout)

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: unused value in caam_hash_update()
Heinrich Schuchardt [Sat, 27 Jun 2020 08:13:55 +0000 (10:13 +0200)]
crypto/fsl: unused value in caam_hash_update()

The value 0 assigned to final is overwritten before ever being used.

Remove the assignment.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: correct printf() statement.
Heinrich Schuchardt [Sat, 27 Jun 2020 08:08:49 +0000 (10:08 +0200)]
crypto/fsl: correct printf() statement.

The sequence of arguments should match the format string.
For printing unsigned numbers we should use %u.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarm64: ls1043a: Remove the workaround of erratum A-009929
Hou Zhiqiang [Thu, 25 Jun 2020 14:23:53 +0000 (22:23 +0800)]
arm64: ls1043a: Remove the workaround of erratum A-009929

The workaround has been implemented in PBI phase, so remove
the duplicated implementation from U-Boot.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoconfigs: ls1012a: Increase CONFIG_SYS_MALLOC_LEN value
Kuldeep Singh [Thu, 25 Jun 2020 07:26:22 +0000 (12:56 +0530)]
configs: ls1012a: Increase CONFIG_SYS_MALLOC_LEN value

Previous attempt to increase CONFIG_SYS_MALLOC_LEN was done in commit
c084a8edf4e2 ("configs: ls1012a: Increase CONFIG_SYS_MALLOC_LEN size")
which increased malloc memory to ~1M.

PFE firmware alone requires 3M of dynamic memory allocation and
therefore, increase the config value to a larger value i.e 5M. This size
should be enough as of now to accommodate further memory requirements.

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoconfigs: lx2160aqds: enable CONFIG_BOARD_EARLY_INIT_R
Yangbo Lu [Wed, 17 Jun 2020 10:09:00 +0000 (18:09 +0800)]
configs: lx2160aqds: enable CONFIG_BOARD_EARLY_INIT_R

Enable CONFIG_BOARD_EARLY_INIT_R for SDHC adapter card
identification and configuration.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoboard: fsl: lx2160aqds: identify SDHC adapter during board init
Yangbo Lu [Wed, 17 Jun 2020 10:08:59 +0000 (18:08 +0800)]
board: fsl: lx2160aqds: identify SDHC adapter during board init

Add support for SDHC adapter identification and configuration
during board init.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoMove eSDHC adapter card identification to board files
Yangbo Lu [Wed, 17 Jun 2020 10:08:58 +0000 (18:08 +0800)]
Move eSDHC adapter card identification to board files

The eSDHC adapter card identification and multiplexing configuration
through FPGA had been implemented in both common mmc driver and
fsl_esdhc driver. However it is proper to move these code to board
files and do it during board initialization. The FPGA registers are
also board specific.

This patch is to move eSDHC adapter card identification and
multiplexing configuration from mmc driver to specific board files.
And the option CONFIG_FSL_ESDHC_ADAPTER_IDENT is no longer needed.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
[Rebased, Removed T1040QDS change as board does not exist]
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoDrop global data sdhc_adapter for powerpc
Yangbo Lu [Wed, 17 Jun 2020 10:08:57 +0000 (18:08 +0800)]
Drop global data sdhc_adapter for powerpc

The sdhc_adapter of global data has not been used, and we
do not have to use it as global data even we may need it
in the future.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarmv8: ls1028ardb: add xspi parameter to qixis command
Yuantian Tang [Wed, 10 Jun 2020 08:13:50 +0000 (16:13 +0800)]
armv8: ls1028ardb: add xspi parameter to qixis command

Add xspi boot source to qixis command to let the soc boot from
flex-nor flash chip.

Signed-off-by: Yuantian Tang <andy.tang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarmv8: ls1012a: RGMII ports require internal delay
Chaitanya Sakinam [Tue, 9 Jun 2020 10:51:48 +0000 (16:21 +0530)]
armv8: ls1012a: RGMII ports require internal delay

The correct setting for the RGMII ports on LS1012ARDB is to
enable delay on both Rx and Tx so the interface mode used should
be PHY_INTERFACE_MODE_RGMII_ID

Signed-off-by: Chaitanya Sakinam <chaitanya.sakinam@nxp.com>
Signed-off-by: Anji J <anji.jagarlmudi@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoinclude/configs: ls1012a: Remove fdt_high env variable
Udit Agarwal [Mon, 8 Jun 2020 13:25:44 +0000 (18:55 +0530)]
include/configs: ls1012a: Remove fdt_high env variable

Remove "fdt_high" environment variable to use the bootm_size
to safely contain a kernel, device tree and initrd for
relocation.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoconfig: lx2160/2a: enable dspi
Zhao Qiang [Mon, 8 Jun 2020 03:28:25 +0000 (11:28 +0800)]
config: lx2160/2a: enable dspi

Enable dspi in lx2160aqds tfa defconfig
Enable CONFIG_SPI_FLASH_SST/EON in config file.

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoarmv8: dts: fsl-lx2160a: add flash node under dspi to qds dts
Zhao Qiang [Mon, 8 Jun 2020 03:28:24 +0000 (11:28 +0800)]
armv8: dts: fsl-lx2160a: add flash node under dspi to qds dts

Add flash node under dspi into fsl-lx2160a-qds.dtsi

Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agocrypto/fsl: fix unaligned access
Michael Walle [Thu, 4 Jun 2020 19:05:33 +0000 (21:05 +0200)]
crypto/fsl: fix unaligned access

On aarch64 running with dcache off, will result in an unaligned access
exception:

   => dcache off
   => hash sha1 $kernel_addr_r 100
   "Synchronous Abort" handler, esr 0x96000061
   elr: 00000000960317d8 lr : 00000000960316a4 (reloc)
   elr: 00000000fbd787d8 lr : 00000000fbd786a4
   [..]

The compiler emits a "stur x1, [x0, #12]". x1 is might just be 32 bit
aligned pointer. Remove the unused u64 element from the union to drop
the minimal alignment to 32 bit. Also remove the union, because it is
no more needed.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
3 years agoI2C: ls1043a, ls1046a: enable SYS_I2C_MXC
Biwen Li [Thu, 4 Jun 2020 10:42:14 +0000 (18:42 +0800)]
I2C: ls1043a, ls1046a: enable SYS_I2C_MXC

This enables SYS_I2C_MXC to fix a bug that
failed to boot from sd card with
image u-boot-with-spl-pbl.bin

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>