]> git.baikalelectronics.ru Git - uboot.git/log
uboot.git
2 years agoARM: dts: at91: sama7g5ek: Add QSPI0 node
Tudor Ambarus [Wed, 3 Nov 2021 17:07:41 +0000 (19:07 +0200)]
ARM: dts: at91: sama7g5ek: Add QSPI0 node

QSPI0 has a MX66LM1G45G SPI NOR flash connected.
Enable the controller and describe the flash.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
2 years agoARM: dts: at91: sama7g5: Add QSPI0 and OSPI1 nodes
Tudor Ambarus [Wed, 3 Nov 2021 17:07:40 +0000 (19:07 +0200)]
ARM: dts: at91: sama7g5: Add QSPI0 and OSPI1 nodes

sama7g5 embedds an OSPI and a QSPI controller:
1/ OSPI0 Supporting Up to 200 MHz DDR. Octal, TwinQuad, Hyperflash
   and OctaFlash Protocols Supported.
2/ QSPI1 Supporting Up to 90 MHz DDR/133 MHz SDR.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
2 years agospi: atmel-quadspi: Add support for SAMA7G5 QSPI
Tudor Ambarus [Wed, 3 Nov 2021 16:47:10 +0000 (18:47 +0200)]
spi: atmel-quadspi: Add support for SAMA7G5 QSPI

sama7g5 QSPI has:
1/ One Octal Serial Peripheral Interfaces (QSPI0) Supporting Up to
   200 MHz DDR. Octal, TwinQuad, Hyperflash and OctaFlash Protocols Supported
2/ One Quad Serial Peripheral Interfaces (QSPI1) Supporting Up to
   90 MHz DDR/133 MHz SDR

The QSPI controller of SAMA7G5 uses different clock domains, hence extra
synchronization operations must be performed before accessing some
registers. Differentiate between the versions of the IP using has_gclk.
Differentiate between QSPI0 and QSPI1 with has_octal.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
3 years agospi: atmel-quadspi: Fix QSPI_RD reg name on verbose debug
Tudor Ambarus [Wed, 3 Nov 2021 16:45:42 +0000 (18:45 +0200)]
spi: atmel-quadspi: Fix QSPI_RD reg name on verbose debug

It was wrongly set to "MR", fix it.

Fixes: dabac7b9c1 ("spi: atmel-quadspi: Add verbose debug facilities to monitor register accesses")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
3 years agoconfigs: at91: sam9x60ek: add CLK and GPIO commands
Mihai Sain [Wed, 27 Oct 2021 07:40:19 +0000 (10:40 +0300)]
configs: at91: sam9x60ek: add CLK and GPIO commands

Add clock command for CLK sub-system and gpio command for query and control gpio
pins.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
3 years agoARM: dts: at91: sam9x60: add pioC node
Mihai Sain [Wed, 27 Oct 2021 07:28:35 +0000 (10:28 +0300)]
ARM: dts: at91: sam9x60: add pioC node

Add node for pioC.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
3 years agoconfigs: sama5d2 boards: add DM and GPIO commands
Mihai Sain [Thu, 2 Sep 2021 12:21:08 +0000 (15:21 +0300)]
configs: sama5d2 boards: add DM and GPIO commands

Add dm command for driver model low level access and
gpio command for query and control gpio pins.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
3 years agoPrepare v2022.01-rc2
Tom Rini [Mon, 15 Nov 2021 16:58:37 +0000 (11:58 -0500)]
Prepare v2022.01-rc2

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agousb: Make USB_MUSB_PIO_ONLY selected by USB_MUSB_SUNXI
Samuel Dionne-Riel [Wed, 27 Nov 2019 19:56:02 +0000 (14:56 -0500)]
usb: Make USB_MUSB_PIO_ONLY selected by USB_MUSB_SUNXI

This ensures the USB_MUSB_PIO_ONLY config is set to an apppropriate
value from the changes enabling USB_MUSB_GADGET does.

Namely, USB_MUSB_PIO_ONLY default to =y on USB_MUSB_SUNXI being y.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
3 years agoDockerfile, CI: Update to latest "focal" tag
Tom Rini [Sat, 13 Nov 2021 23:37:00 +0000 (18:37 -0500)]
Dockerfile, CI: Update to latest "focal" tag

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoDockerfile: build swtpm
Heinrich Schuchardt [Tue, 9 Nov 2021 18:51:20 +0000 (19:51 +0100)]
Dockerfile: build swtpm

For testing the TPM drivers and the EFI_TCG2_PROTOCOL we need the tool
swtpm.

Once we move to Ubuntu Impish we can take libtpms from package libtpms-dev.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoMerge tag 'dm-pull-13nov21' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Sun, 14 Nov 2021 02:14:51 +0000 (21:14 -0500)]
Merge tag 'dm-pull-13nov21' of https://source.denx.de/u-boot/custodians/u-boot-dm

env tidy-ups
test fixes
binman fixes and ELF enhancements

3 years agoMerge tag 'efi-2022-01-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sat, 13 Nov 2021 23:13:35 +0000 (18:13 -0500)]
Merge tag 'efi-2022-01-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2022-01-rc2-2

UEFI:
* fix measurement of BootOrder variable for TCG2 protocol

TPM:
* TIS mmio driver. This driver supports QEMU's emulated TPM.

3 years agobinman: Fix replace subcommand help and comments
Jan Kiszka [Thu, 11 Nov 2021 07:13:30 +0000 (08:13 +0100)]
binman: Fix replace subcommand help and comments

Fix some copy&paste artifacts.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agobootstage: Differentiate boot progress kconfig entries
Jan Kiszka [Wed, 3 Nov 2021 14:09:36 +0000 (15:09 +0100)]
bootstage: Differentiate boot progress kconfig entries

Both U-Boot proper and SPL entries were using the same description.

Fixes: c326cc2e ("bootstage: Add SPL support")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agosandbox: fix sandbox_wdt_expire_now()
Heinrich Schuchardt [Tue, 2 Nov 2021 18:44:30 +0000 (19:44 +0100)]
sandbox: fix sandbox_wdt_expire_now()

With CONFIG_SYSRESET_WATCHDOG=y the sandbox can use a watchdog based system
reset.

To make this work calling sandbox_wdt_expire_now() must lead to a reset.

With this change we can test the development suggested in

  [PATCH 0/4] Improved sysreset/watchdog uclass integration
  https://lists.denx.de/pipermail/u-boot/2021-August/458656.html

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agotest/dm: fix watchdog test
Heinrich Schuchardt [Tue, 2 Nov 2021 18:44:29 +0000 (19:44 +0100)]
test/dm: fix watchdog test

For successful execution of the watchdog test we need both the GPIO as well
as the SANDBOX watchdog.

Avoid a build failure for CONFIG_WDT_GPIO=n.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoMakefile: Correct TPL rule for OF_REAL
Simon Glass [Mon, 1 Nov 2021 01:17:03 +0000 (19:17 -0600)]
Makefile: Correct TPL rule for OF_REAL

Correct an error in the tpl-dtb parameter to binman. At present the TPL
rule follows SPL but this is not correct, if TPL uses of-platdata, for
example.

Fixes: e67101947eb ("fdt: Update Makefile rules with the new OF_REAL Kconfig")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoenv: Simplify env_get_default()
Marek Behún [Wed, 3 Nov 2021 23:23:23 +0000 (00:23 +0100)]
env: Simplify env_get_default()

Instead of pretending that we don't have environment to force searching
default environment in env_get_default(), get the data from the
default_environment[] buffer directly.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoenv: Fix env_get() when returning empty string using env_get_f()
Marek Behún [Wed, 3 Nov 2021 23:23:22 +0000 (00:23 +0100)]
env: Fix env_get() when returning empty string using env_get_f()

The env_get_f() function returns -1 on failure. Returning 0 means that
the variable exists, and is empty string.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoenv: Don't set ready flag if import failed in env_set_default()
Marek Behún [Wed, 3 Nov 2021 23:23:21 +0000 (00:23 +0100)]
env: Don't set ready flag if import failed in env_set_default()

Do not set GD_FLG_ENV_READY nor GD_FLG_ENV_DEFAULT if failed importing
in env_set_default().

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agobinman: Support updating the dtb in an ELF file
Simon Glass [Thu, 4 Nov 2021 03:09:18 +0000 (21:09 -0600)]
binman: Support updating the dtb in an ELF file

WIth EFI we must embed the devicetree in an ELF image so that it is loaded
as part of the executable file. We want it to include the binman
definition in there also, which in some cases cannot be created until the
ELF (u-boot) is built. Add an option to binman to support writing the
updated dtb to the ELF file u-boot.out

This is useful with the EFI app, which is always packaged as an ELF file.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agobinman: Tidy up comments on _DoTestFile()
Simon Glass [Thu, 4 Nov 2021 03:09:17 +0000 (21:09 -0600)]
binman: Tidy up comments on _DoTestFile()

The comment for this function is missing an argument and the return value.
Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agobinman: Support reading the offset of an ELF-file symbol
Simon Glass [Thu, 4 Nov 2021 03:09:16 +0000 (21:09 -0600)]
binman: Support reading the offset of an ELF-file symbol

Binman needs to be able to update the contents of an ELF file after it has
been build. To support this, add a function to locate the position of a
symbol's contents within the file.

Fix the comments on bss_data.c and Symbol while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agobinman: Report an error if test files fail to compile
Simon Glass [Thu, 4 Nov 2021 03:09:15 +0000 (21:09 -0600)]
binman: Report an error if test files fail to compile

At present any error from the 'make' command is silently swallowed by the
test system. Fix this by showing it when detected.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agopatman: Use a ValueError exception if tools.Run() fails
Simon Glass [Thu, 4 Nov 2021 03:09:14 +0000 (21:09 -0600)]
patman: Use a ValueError exception if tools.Run() fails

The Exception base class is a very vague and could be confusing to the
test system. Use the more specific ValueError exception instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 years agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 12 Nov 2021 23:37:42 +0000 (23:37 +0000)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge branch '2021-11-12-Kconfig-migrations'
Tom Rini [Fri, 12 Nov 2021 23:33:12 +0000 (18:33 -0500)]
Merge branch '2021-11-12-Kconfig-migrations'

- An assortment of "finish migrating .." symbol patches.  This will help
  make it harder for migrated symbols to end up again in board config.h
  files.

3 years agoConvert CONFIG_LAST_STAGE_INIT to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:51 +0000 (22:59 -0500)]
Convert CONFIG_LAST_STAGE_INIT to Kconfig

This converts the following to Kconfig:
   CONFIG_LAST_STAGE_INIT

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoRemove CONFIG_SERIAL_MULTI
Tom Rini [Mon, 8 Nov 2021 03:59:50 +0000 (22:59 -0500)]
Remove CONFIG_SERIAL_MULTI

This symbol has been functionally dead for a long time.  Remove the last
and recent re-introductions of setting it, and update the whitelist so
it will not be re-introduced again.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_PL011_SERIAL et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:49 +0000 (22:59 -0500)]
Convert CONFIG_PL011_SERIAL et al to Kconfig

This converts the following to Kconfig:
   CONFIG_PL011_SERIAL
   CONFIG_PL01X_SERIAL

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_MACB to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:48 +0000 (22:59 -0500)]
Convert CONFIG_MACB to Kconfig

This converts the following to Kconfig:
   CONFIG_MACB

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_MD5 to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:47 +0000 (22:59 -0500)]
Convert CONFIG_MD5 to Kconfig

This converts the following to Kconfig:
   CONFIG_MD5

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_MX6 et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:46 +0000 (22:59 -0500)]
Convert CONFIG_MX6 et al to Kconfig

This converts the following to Kconfig:
   CONFIG_MX6
   CONFIG_MX7

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_IMX_BOOTAUX et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:45 +0000 (22:59 -0500)]
Convert CONFIG_IMX_BOOTAUX et al to Kconfig

This converts the following to Kconfig:
   CONFIG_IMX_BOOTAUX
   CONFIG_IMX_THERMAL

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_SYS_PROMPT et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:44 +0000 (22:59 -0500)]
Convert CONFIG_SYS_PROMPT et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_PROMPT
   CONFIG_SYS_PROMPT_HUSH_PS2

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_I2C_EDID et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:43 +0000 (22:59 -0500)]
Convert CONFIG_I2C_EDID et al to Kconfig

This converts the following to Kconfig:
   CONFIG_I2C_EDID
   CONFIG_I2C_EEPROM

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_PHYLIB et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:42 +0000 (22:59 -0500)]
Convert CONFIG_PHYLIB et al to Kconfig

This converts the following to Kconfig:
   CONFIG_PHYLIB
   CONFIG_PHY_ATHEROS
   CONFIG_PHY_GIGE
   CONFIG_MII

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_MISC_INIT_F et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:41 +0000 (22:59 -0500)]
Convert CONFIG_MISC_INIT_F et al to Kconfig

This converts the following to Kconfig:
   CONFIG_MISC_INIT_F
   CONFIG_MISC_INIT_R

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_TRACE et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:40 +0000 (22:59 -0500)]
Convert CONFIG_TRACE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_TRACE
   CONFIG_TRACE_BUFFER_SIZE
   CONFIG_TRACE_EARLY
   CONFIG_TRACE_EARLY_ADDR
   CONFIG_TRACE_EARLY_SIZE

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_SYS_CONSOLE_IS_IN_ENV to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:39 +0000 (22:59 -0500)]
Convert CONFIG_SYS_CONSOLE_IS_IN_ENV to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_CONSOLE_IS_IN_ENV

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_ENV_IS_IN_SPI_FLASH et al to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:38 +0000 (22:59 -0500)]
Convert CONFIG_ENV_IS_IN_SPI_FLASH et al to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_IS_IN_SPI_FLASH
   CONFIG_ENV_IS_NOWHERE
   CONFIG_ENV_OFFSET
   CONFIG_ENV_OVERWRITE
   CONFIG_ENV_SECT_SIZE
   CONFIG_SYS_MMC_ENV_DEV
   CONFIG_SYS_MMC_ENV_PART

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_FSL_USDHC to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:37 +0000 (22:59 -0500)]
Convert CONFIG_FSL_USDHC to Kconfig

This converts the following to Kconfig:
   CONFIG_FSL_USDHC

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_FSL_LAYERSCAPE to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:36 +0000 (22:59 -0500)]
Convert CONFIG_FSL_LAYERSCAPE to Kconfig

This converts the following to Kconfig:
   CONFIG_FSL_LAYERSCAPE

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_BITBANGMII to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:35 +0000 (22:59 -0500)]
Convert CONFIG_BITBANGMII to Kconfig

This converts the following to Kconfig:
   CONFIG_BITBANGMII

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_DOS_PARTITION to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:34 +0000 (22:59 -0500)]
Convert CONFIG_DOS_PARTITION to Kconfig

This converts the following to Kconfig:
   CONFIG_DOS_PARTITION

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_E1000 to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:33 +0000 (22:59 -0500)]
Convert CONFIG_E1000 to Kconfig

This converts the following to Kconfig:
   CONFIG_E1000

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoConvert CONFIG_ARCH_CPU_INIT to Kconfig
Tom Rini [Mon, 8 Nov 2021 03:59:32 +0000 (22:59 -0500)]
Convert CONFIG_ARCH_CPU_INIT to Kconfig

This converts the following to Kconfig:
   CONFIG_ARCH_CPU_INIT

Signed-off-by: Tom Rini <trini@konsulko.com>
3 years agoMerge branch '2021-11-12-assorted-updates'
Tom Rini [Fri, 12 Nov 2021 15:14:24 +0000 (10:14 -0500)]
Merge branch '2021-11-12-assorted-updates'

- A number of pxe related cleanups and related re-organization.
- A few related pxe/sysboot/extlinux improvements
- Remove some dead code.
- Update Azure to use a newer Windows build environment
- Add a .get_maintainer.conf file
- A few minor TI SoC platform updates

3 years agortc: ds1337: fix compatible string typo
Clemens Gruber [Fri, 5 Nov 2021 13:46:50 +0000 (14:46 +0100)]
rtc: ds1337: fix compatible string typo

The driver supports the ds1339 as well, which was probably intended by
the author but prevented by a typo. Fix the typo.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
3 years agoboards: siemens: iot2050: Ignore network errors during bootstage tracking
Jan Kiszka [Wed, 3 Nov 2021 14:12:30 +0000 (15:12 +0100)]
boards: siemens: iot2050: Ignore network errors during bootstage tracking

We need to filter out NET_ETH_START errors because we have to enable
networking in order to propagate the MAC addresses to the DT while there
is no network driver for the prueth in U-Boot yet.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
3 years agoboards: siemens: iot2050: Re-enable bootstage reporting
Jan Kiszka [Wed, 3 Nov 2021 14:11:53 +0000 (15:11 +0100)]
boards: siemens: iot2050: Re-enable bootstage reporting

This got lost while fixing up the condition in
board/siemens/iot2050/board.c

Fixes: c326cc2e ("bootstage: Add SPL support")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 years agoARM: dts: am335x-chiliboard: add /chosen/tick-timer
Marcin Niestroj [Tue, 2 Nov 2021 13:41:06 +0000 (14:41 +0100)]
ARM: dts: am335x-chiliboard: add /chosen/tick-timer

Commit a49c5088530b ("time: Fix get_ticks being non-monotonic") has
broken boot on chiliboard platform, as it requires '/chosen/tick-timer'
in device-tree. This resulted in following panic message:

  Could not initialize timer (err -19)

Provide missing chosen property in device-tree to fix chiliboard
support.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
3 years agoget_maintainer.pl: add .get_maintainer.conf
Michael Walle [Sun, 31 Oct 2021 22:38:12 +0000 (23:38 +0100)]
get_maintainer.pl: add .get_maintainer.conf

Since commit 1ab6ef926c45 ("get_maintainer.pl: update from Linux kernel
v5.13-rc6") only the top level MAINTAINERS file is used. This is because
this commit (accidentally) disabled the search of MAINTAINERS files
(find_maintainer_files is set to 0 again). Before that, commit
38920868880a ("scripts/get_maintainer.pl: enable find_maintainer_files")
explicitly enabled that feature. Nowadays, we also have to set
maintainer_path to a directory.

To fix it and enable recursive search of MAINTAINERS, create a
configuration file to set these two variables.

Signed-off-by: Michael Walle <michael@walle.cc>
3 years agoAzure: Move to windows-2019
Tom Rini [Sun, 31 Oct 2021 17:24:42 +0000 (13:24 -0400)]
Azure: Move to windows-2019

As per https://github.com/actions/virtual-environments/issues/4312 the
Windows-2016 environments are scheduled for deprecation and removal in
early 2022.  Move to windows-2019 now to avoid this (Visual Studio 2019
is included here, hence the tag naming scheme change).

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
3 years agoRemove LYNX KDI remainders
Thomas Huth [Tue, 26 Oct 2021 12:31:18 +0000 (14:31 +0200)]
Remove LYNX KDI remainders

The last board that used to set CONFIG_LYNXKDI has been removed in
commit 242836a893ae ("powerpc: ppc4xx: remove pcs440ep support"),
doc/README.lynxkdi only talks about a MPC8260 board being supported,
and the mpc8260 support has been removed four years ago in commit
e1cab4e2959b4 ("powerpc, 8260: remove support for mpc8260") already,
and common/lynxkdi.c only consists of an "#error" statement these
days, so it seems like the LYNX KDI code is dead code nowadays.
Let's remove it now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
3 years agopxe: Allow calling the pxe_get logic directly
Simon Glass [Thu, 14 Oct 2021 18:48:11 +0000 (12:48 -0600)]
pxe: Allow calling the pxe_get logic directly

Refactor this code so that we can call the 'pxe get' command without going
through the command-line interpreter. This makes it easier to get the
information we need, without going through environment variables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agodoc: Move distro boot doc to rST
Simon Glass [Thu, 14 Oct 2021 18:48:10 +0000 (12:48 -0600)]
doc: Move distro boot doc to rST

Move this over to the new rST format.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Refactor sysboot to have one helper
Simon Glass [Thu, 14 Oct 2021 18:48:09 +0000 (12:48 -0600)]
pxe: Refactor sysboot to have one helper

The only difference between the three helpers is the filesystem type.
Factor this out and call the filesystem functions directly, instead of
through the command-line interpreter. This allows the file size to be
obtained directly, instead of via an environment variable.

We cannot do the same thing with PXE's tftpboot since there is no API
at present to obtain information about the file that was read. So there
is no point in changing pxe_getfile_func to use a ulong for the address,
for example.

This is as far as the refactoring can go for the present.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Return the file size from the getfile() function
Simon Glass [Thu, 14 Oct 2021 18:48:08 +0000 (12:48 -0600)]
pxe: Return the file size from the getfile() function

It is pretty strange that the pxe code uses the 'filesize' environment
variable find the size of a file it has just read.

Partly this is because it uses the command-line interpreter to parse its
request to load the file.

As a first step towards unwinding this, return it directly from the
getfile() function. This makes the code a bit longer, for now, but will be
cleaned up in future patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agolib: Add a function to convert a string to a hex value
Simon Glass [Thu, 14 Oct 2021 18:48:07 +0000 (12:48 -0600)]
lib: Add a function to convert a string to a hex value

Add an xtoa() function, similar to itoa() but for hex instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
3 years agolib: Add tests for simple_itoa()
Simon Glass [Thu, 14 Oct 2021 18:48:06 +0000 (12:48 -0600)]
lib: Add tests for simple_itoa()

Add test and a comment for this function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
3 years agopxe: Drop get_bootfile_path()
Simon Glass [Thu, 14 Oct 2021 18:48:05 +0000 (12:48 -0600)]
pxe: Drop get_bootfile_path()

This function no longer makes sense, since it is pretty easy to prepend
the boot directory to the filename. Drop it and update its only caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Clean up the use of bootfile
Simon Glass [Thu, 14 Oct 2021 18:48:04 +0000 (12:48 -0600)]
pxe: Clean up the use of bootfile

The 'bootfile' environment variable is read in the bowels of pxe_util to
provide a directory to which all loaded files are relative.

This is not obvious from the API to PXE and it is strange to make the
caller set an environment variable rather than pass this as a parameter.

The code is also convoluted, which this feature implemented by
get_bootfile_path().

Update the API to improve this. Unfortunately this means that
pxe_setup_ctx() can fail, so add error checking.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Move common parsing coding into pxe_util
Simon Glass [Thu, 14 Oct 2021 18:48:03 +0000 (12:48 -0600)]
pxe: Move common parsing coding into pxe_util

Both the syslinux and pxe commands use essentially the same code to parse
and run extlinux.conf files. Move this into a common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Tidy up code style a little in pxe_utils
Simon Glass [Thu, 14 Oct 2021 18:48:02 +0000 (12:48 -0600)]
pxe: Tidy up code style a little in pxe_utils

There are a few more blank lines than makes sense for readability. Also
free() handles a NULL pointer so drop the pointless checks.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Tidy up some comments in pxe_utils
Simon Glass [Thu, 14 Oct 2021 18:48:01 +0000 (12:48 -0600)]
pxe: Tidy up some comments in pxe_utils

Some of these functions are a big vague in the comments. Tidy them up a
bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Move pxe_utils files
Simon Glass [Thu, 14 Oct 2021 18:48:00 +0000 (12:48 -0600)]
pxe: Move pxe_utils files

Move the header file into the main include/ directory so we can use it
from the bootmethod code. Move the C file into boot/ since it relates to
booting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Tidy up the is_pxe global
Simon Glass [Thu, 14 Oct 2021 18:47:59 +0000 (12:47 -0600)]
pxe: Tidy up the is_pxe global

Move this into the context to avoid a global variable. Also rename it
since the current name does not explain what it actually affects.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Add a userdata field to the context
Simon Glass [Thu, 14 Oct 2021 18:47:58 +0000 (12:47 -0600)]
pxe: Add a userdata field to the context

Allow the caller to provide some info which is passed back to the
readfile() method.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Move do_getfile() into the context
Simon Glass [Thu, 14 Oct 2021 18:47:57 +0000 (12:47 -0600)]
pxe: Move do_getfile() into the context

Rather than having a global variable, pass the function as part of the
context.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Use a context pointer
Simon Glass [Thu, 14 Oct 2021 18:47:56 +0000 (12:47 -0600)]
pxe: Use a context pointer

At present the PXE functions pass around a pointer to command-table entry
which is very strange. It is only needed in a few places and it is odd to
pass around a data structure from another module in this way.

For bootmethod we will need to provide some context information when
reading files.

Create a PXE context struct to hold the command-table-entry pointer and
pass that around instead. We can then add more things to the context as
needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agopxe: Move API comments to the header files
Simon Glass [Thu, 14 Oct 2021 18:47:55 +0000 (12:47 -0600)]
pxe: Move API comments to the header files

Put the function comments in the header file so that the full API can we
examined in one place.

Expand the comments to cover parameters and return values.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
3 years agoCreate a new boot/ directory
Simon Glass [Thu, 14 Oct 2021 18:47:54 +0000 (12:47 -0600)]
Create a new boot/ directory

Quite a lot of the code in common/relates to booting and images. Before
adding more it seems like a good time to move the code into its own
directory.

Most files with 'boot' or 'image' in them are moved, except:

- autoboot.c which relates to U-Boot automatically running a script
- bootstage.c which relates to U-Boot timing

Drop the removal of boot* files from the output directory, since this
interfers with the symlinks created by tools and there does not appear
to be any such file from my brief testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
Tested-by: Artem Lapkin <email2tema@gmail.com>
3 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Thu, 11 Nov 2021 14:04:20 +0000 (09:04 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- device-tree sync-up with Linux for ls1028a
- fixes/update in fsl-ddr driver, fsl-validate, lx2162a, fsl-mc,
  spintable code, configs, qspi node, pci
- enable EFI_SET_TIME support in sl28
- powerpc: Drop -mstring

3 years agoMAINTAINERS: Add entry for TPM drivers
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:22 +0000 (09:02 +0200)]
MAINTAINERS: Add entry for TPM drivers

TPM drivers have currently no maintainers.  Add myself since I contributed
the TIS implementation.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agodoc: qemu: Add instructions for swtpm usage
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:21 +0000 (09:02 +0200)]
doc: qemu: Add instructions for swtpm usage

A previous patch added support for an mmio based TPM.
Add an example in QEMU on it's usage

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoconfigs: Enable tpmv2 mmio on qemu for arm/arm64
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:20 +0000 (09:02 +0200)]
configs: Enable tpmv2 mmio on qemu for arm/arm64

A previous commit is adding an MMIO TPMv2 driver.  Include in the default
qemu arm configs, since we plan on using them on EFI testing

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agotpm: Use the new API on tpm2 spi driver
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:19 +0000 (09:02 +0200)]
tpm: Use the new API on tpm2 spi driver

Convert our SPI TPM driver and use the newly added API

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agotpm2: Add a TPMv2 MMIO TIS driver
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:18 +0000 (09:02 +0200)]
tpm2: Add a TPMv2 MMIO TIS driver

Add support for devices that expose a TPMv2 though MMIO.
Apart from those devices, we can use the driver in our QEMU setups and
test TPM related code which is difficult to achieve using the sandbox
driver (e.g test the EFI TCG2 protocol).

It's worth noting that a previous patch added TPMv2 TIS core functions,
which the current driver is consuming.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agotpm2: Introduce TIS tpm core
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:17 +0000 (09:02 +0200)]
tpm2: Introduce TIS tpm core

There's a lot of code duplication in U-Boot right now.  All the TPM TIS
compatible drivers we have at the moment have their own copy of a TIS
implementation.

So let's create a common layer which implements the core TIS functions.
Any driver added from now own, which is compatible with the TIS spec, will
only have to provide the underlying bus communication mechanisms.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agotpm: refactor function names for LPC based TPMs
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:16 +0000 (09:02 +0200)]
tpm: refactor function names for LPC based TPMs

With the upcoming TPM2 API, some of the functions name are part of the new
header file.  So switch conflicting internal function names and defines.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canaonical.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agotpm: refactor function names and macros for infineon v1.2 TPM
Ilias Apalodimas [Tue, 9 Nov 2021 07:02:15 +0000 (09:02 +0200)]
tpm: refactor function names and macros for infineon v1.2 TPM

With the upcoming TPM2 API, some of the functions name are part of the new
header file.  So switch conflicting internal function names and defines.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 years agoefi_loader: fix BootOrder variable measurement handling
Masahisa Kojima [Tue, 9 Nov 2021 09:44:54 +0000 (18:44 +0900)]
efi_loader: fix BootOrder variable measurement handling

UEFI specification does not require that BootOrder is defined.
In current implementation, boot variable measurement fails and
returns EFI_NOT_FOUND if BootOrder is not defined.

This commit correcly handles this case, skip the boot variable
measurement if BootOrder is not defined.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 years agoMerge tag 'u-boot-stm32-20211110' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 10 Nov 2021 19:11:30 +0000 (14:11 -0500)]
Merge tag 'u-boot-stm32-20211110' of https://source.denx.de/u-boot/custodians/u-boot-stm

- DHSOM update:
   - Remove nWP GPIO hog
   - Increase SF bus frequency to 50Mhz and enable SFDP
   - Disable video output for DHSOM
   - Disable EFI
   - Enable DFU_MTD support
- Create include file for STM32 gpio driver private data
- Split board and SOC STM32MP15 configuration
- Device tree alignement with v5.15-rc6 for STM32MP15
- Add binman support for STM32MP15x
- Normalise newlines for stm32prog
- Update OTP shadow registers in SPL

3 years agostm32mp15: tidy up #ifdefs in cpu.c
Patrick Delaunay [Mon, 11 Oct 2021 07:52:51 +0000 (09:52 +0200)]
stm32mp15: tidy up #ifdefs in cpu.c

We should avoid #ifdef in C modules and the unused functions
are eliminated by the linker.

Use the more readable IS_ENABLE() instead.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agostm32mp15: replace CONFIG_TFABOOT when it is possible
Patrick Delaunay [Mon, 11 Oct 2021 07:52:50 +0000 (09:52 +0200)]
stm32mp15: replace CONFIG_TFABOOT when it is possible

In some part of STM32MP15 support the CONFIG_TFABOOT can be replaced
by other config: CONFIG_ARMV7_PSCI and CONFIG_ARM_SMCCC.

This patch also simplifies the code in cpu.c, stm32mp1_ram.c and
clk_stml32mp1.c as execution of U-Boot in sysram (boot without SPL and
without TFA) is not supported: the associated initialization code is
present only in SPL.

This cleanup patch is a preliminary step to support SPL load of OP-TEE
in secure world, with SPL in secure world and U-Boot in no-secure world.

Reported-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agostm32mp15: remove configs dependency on CONFIG_TFABOOT
Patrick Delaunay [Mon, 11 Oct 2021 07:52:49 +0000 (09:52 +0200)]
stm32mp15: remove configs dependency on CONFIG_TFABOOT

Remove the dependency on CONFIG_TFABOOT in stm32mp Kconfig
- always activate the ARCH config: CONFIG_ARCH_SUPPORT_PSCI
  and CONFIG_CPU_V7_HAS_NONSEC
- CONFIG_ARMV7_NONSEC is deactivated in trusted defconfig
- the correct sysreset driver is activated in each defconfig:
  CONFIG_SYSRESET_PSCI or SYSRESET_SYSCON

Reported-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoarm: stm32mp: bsec: Update OTP shadow registers in SPL
Patrick Delaunay [Mon, 11 Oct 2021 07:52:48 +0000 (09:52 +0200)]
arm: stm32mp: bsec: Update OTP shadow registers in SPL

Currently the upper OTP (after 57) are shadowed in U-Boot proper,
when TFABOOT is not used.

This choice cause an issue when U-Boot is not executed after SPL,
so this BSEC initialization is moved in SPL and no more executed in U-Boot,
so it is still executed only one time.

After this patch this BSEC initialization is done in FSBL: SPL or TF-A.

To force this initialization in all the case, the probe of the BSEC
driver is forced in SPL in the arch st32mp function: spl_board_init().

Even if today BSEC driver is already probed in STM32MP15x clock driver
clk_stm32mp1.c because get_cpu_type() is called in
stm32mp1_get_max_opp_freq() function.

Reported-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoARM: stm32: Align mtdparts with SPI NOR layout on DHSOM
Marek Vasut [Sat, 23 Oct 2021 22:46:17 +0000 (00:46 +0200)]
ARM: stm32: Align mtdparts with SPI NOR layout on DHSOM

The DHSOM uses different SPI NOR layout than the ST devkit, stop
pulling in the ST specific runtime mtdparts settings and adjust
the mtdparts accordingly.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoARM: stm32: Disable video output on DHSOM
Marek Vasut [Sat, 23 Oct 2021 18:33:57 +0000 (20:33 +0200)]
ARM: stm32: Disable video output on DHSOM

The video output support is unused and disabling it saves about 20 kiB of space.
In case video output support is required, it can be re-enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoARM: stm32: Disable EFI on DHSOM
Marek Vasut [Sat, 23 Oct 2021 18:33:56 +0000 (20:33 +0200)]
ARM: stm32: Disable EFI on DHSOM

The EFI support is unused and disabling it saves about 70 kiB of space.
In case EFI support is required, it can be re-enabled.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoARM: stm32: Increase default SF bus frequency to 50 MHz and enable SFDP
Marek Vasut [Sat, 23 Oct 2021 18:33:34 +0000 (20:33 +0200)]
ARM: stm32: Increase default SF bus frequency to 50 MHz and enable SFDP

Increase default SPI NOR bus frequency from 1 MHz to 50 MHz and
enable SFDP parsing to obtain more accurate SPI NOR configuration.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoARM: dts: stm32: Drop nWP GPIO hog on DHSOM
Marek Vasut [Sat, 23 Oct 2021 18:33:33 +0000 (20:33 +0200)]
ARM: dts: stm32: Drop nWP GPIO hog on DHSOM

The nWP GPIO hog was used to unlock the SPI NOR write protect when U-Boot
used to operate the SPI NOR in 1-1-1 mode. Now that the SPI NOR is operated
in 1-1-4 mode, the hog has adverse effects and causes transfer corruption,
since the hogged pin is also the IO2 pin. Remove the hogs.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agoARM: stm32: Enable DFU MTD support on DHSOM
Marek Vasut [Sat, 23 Oct 2021 18:32:48 +0000 (20:32 +0200)]
ARM: stm32: Enable DFU MTD support on DHSOM

All the STM32MP1 based DHSOM have SPI NOR from which they boot,
enable DFU_MTD support to make it possible to expose that SPI NOR
via the DFU.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
3 years agogpio: stm32: create include file for driver private data
Patrick Delaunay [Fri, 22 Oct 2021 18:12:34 +0000 (20:12 +0200)]
gpio: stm32: create include file for driver private data

The stm32 gpio driver private data are not needed in arch include files,
they are not used by code except for stm32 gpio and pincontrol drivers,
using the same IP; the defines for this IP is moved in a new file
"stm32_gpio_priv.h" in driver/gpio.

This patch avoids to have duplicated file gpio.h for each SOC
in MPU directory mach-stm32mp and in each MCU directory arch-stm32*
and allows to remove CONFIG_GPIO_EXTRA_HEADER for all STM32.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoboard: stmp32mp1: split board and SOC STM32MP15 configuration
Patrick Delaunay [Fri, 22 Oct 2021 08:19:25 +0000 (10:19 +0200)]
board: stmp32mp1: split board and SOC STM32MP15 configuration

Add a configuration file "stm32mp15_st_common.h" to handle the
STMicroelectronics boards configuration and rename stm32mp1.h to
"stm32mp15_common.h" to handle the generic STM32MP15x series configuration.

The configuration file "dh_stm32mp1.h" is also renamed to
"stm32mp15_dh_dhcom" for the configuration of board based on the
dhelectronics STM32MP15x SOM.

In the STMicroelectronics board configuration the default bootcmd
"bootcmd_stm32mp" is updated to only select the extlinux file found on
SD-Card on STM32MP15x EV1 for boot from NOR device.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoarm: dts: stm32mp15: alignment with v5.15-rc6
Patrick Delaunay [Thu, 21 Oct 2021 09:54:11 +0000 (11:54 +0200)]
arm: dts: stm32mp15: alignment with v5.15-rc6

Device tree alignment with Linux kernel v5.15-rc6
- Set {bitclock,frame}-master phandles on ST DKx
- Add coprocessor detach mbox on stm32mp15x-dkx boards
- Add coprocessor detach mbox on stm32mp157c-ed1 board

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Wed, 10 Nov 2021 14:15:18 +0000 (09:15 -0500)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvell

- Minor kwboot improvements (Pali)
- Misc kwbimage improvements (Pali)
- pci_mvebu: Use global MBUS_PCI_MEM_SIZE macro (Pali)

3 years agostm32mp: add binman support for STM32MP15x
Patrick Delaunay [Wed, 13 Oct 2021 13:11:18 +0000 (15:11 +0200)]
stm32mp: add binman support for STM32MP15x

Use binman to add the stm32image header on SPL binary for basic boot
or on U-Boot binary when it is required, i.e. for TF-A boot without FIP
support, when CONFIG_STM32MP15x_STM32IMAGE is activated.

The "binman" tool is the recommended tool for specific image generation.
This patch allows to suppress the config.mk file and it is a preliminary
step to manage FIT generation with binman.

The init_r parsing of U-Boot device tree to search the binman
information is not required for STM32MP15, so the binman library
can be removed in U-Boot (CONFIG_BINMAN_FDT is deactivated).

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>