platform/kernel/u-boot.git
2 years agofirmware: psci: bind arm smccc features when discovered
Etienne Carriere [Wed, 1 Jun 2022 08:27:33 +0000 (10:27 +0200)]
firmware: psci: bind arm smccc features when discovered

Use PSCI device to query Arm SMCCC v1.1 support from secure monitor
and if so, bind drivers for the SMCCC features that monitor supports.

Drivers willing to be bound from Arm SMCCC features discovery can use
macro ARM_SMCCC_FEATURE_DRIVER() to register to smccc feature discovery,
providing target driver name and a callback function that returns
whether or not the SMCCC feature is supported by the system.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: psci: reorder header files inclusion
Etienne Carriere [Wed, 1 Jun 2022 08:27:32 +0000 (10:27 +0200)]
firmware: psci: reorder header files inclusion

Fixes ordering of header files inclusion in PSCI firmware driver.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agosmccc: define generic IDs for feature discovery
Etienne Carriere [Wed, 1 Jun 2022 08:27:31 +0000 (10:27 +0200)]
smccc: define generic IDs for feature discovery

Defines function IDs ARM_SMCCC_ARCH_FEATURES used to query SMCCC feature
support, applicable from Arm SMCCC v1.1 specification.

Defines macro ARM_SMCCC_RET_NOT_SUPPORTED as generic return identifier
for when a SMCCC feature is not supported.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: use multi channel in mailbox, optee and smccc agents
Etienne Carriere [Tue, 31 May 2022 16:09:29 +0000 (18:09 +0200)]
firmware: scmi: use multi channel in mailbox, optee and smccc agents

Updates .process_msg operators of the SCMI transport drivers that
supports multi-channel to use it now that drivers do provide
the reference through channel argument. These are the mailbox
agent, the optee agent and the smccc agent.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agopower: regulator: scmi: simplify scmi_voltd_set_enable()
Etienne Carriere [Tue, 31 May 2022 16:09:28 +0000 (18:09 +0200)]
power: regulator: scmi: simplify scmi_voltd_set_enable()

Simplify scmi_voltd_set_enable() exit sequence.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agopower: regulator: scmi: support SCMI multi-channel
Etienne Carriere [Tue, 31 May 2022 16:09:27 +0000 (18:09 +0200)]
power: regulator: scmi: support SCMI multi-channel

Update SCMI regulator controller driver to get its assigned SCMI channel
during initialization. This change allows SCMI voltage domain protocol
to use a dedicated channel when defined in the DT. The reference is
saved in SCMI regulator controller driver private data.

Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agoreset: scmi: support SCMI multi-channel
Etienne Carriere [Tue, 31 May 2022 16:09:26 +0000 (18:09 +0200)]
reset: scmi: support SCMI multi-channel

Update SCMI reset controller driver to get its assigned SCMI channel
during initialization. This change allows SCMI reset domain protocol
to use a dedicated channel when defined in the DT. The reference is
saved in SCMI reset controller driver private data.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agoclk: scmi: support SCMI multi-channel
Etienne Carriere [Tue, 31 May 2022 16:09:25 +0000 (18:09 +0200)]
clk: scmi: support SCMI multi-channel

Update SCMI clock driver to get its assigned SCMI channel during
initialization. This change allows SCMI clock protocol to use a
dedicated channel when defined in the DT. The reference is saved
in SCMI clock driver private data.

Cc: Lukasz Majewski <lukma@denx.de>
Cc: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: optee transport: implement multi-channel
Etienne Carriere [Tue, 31 May 2022 16:09:24 +0000 (18:09 +0200)]
firmware: scmi: optee transport: implement multi-channel

Implements multi SCMI channel support in OP-TEE SCMI transport. An
SCMI protocol may use a dedicated channel, specified by the DT.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: smccc transport: implement multi-channel
Etienne Carriere [Tue, 31 May 2022 16:09:23 +0000 (18:09 +0200)]
firmware: scmi: smccc transport: implement multi-channel

Updates SCMI SMCCC transport driver to get SCMI channel reference
at initialization and use when posting SCMI messages.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: mailbox transport: implement multi-channel
Etienne Carriere [Tue, 31 May 2022 16:09:22 +0000 (18:09 +0200)]
firmware: scmi: mailbox transport: implement multi-channel

Updates SCMI mailbox transport driver to get SCMI channel reference
at initialization and use when posting SCMI messages.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: add multi-channel support
Etienne Carriere [Tue, 31 May 2022 16:09:21 +0000 (18:09 +0200)]
firmware: scmi: add multi-channel support

Adds resources for SCMI protocols to possibly use a dedicated SCMI
channel instead of the default channel allocated by the SCMI agent
during initialization. As per DT binding documentation, some SCMI
transports can define a specific SCMI communication channel for
given SCMI protocols. It allows SCMI protocols to pass messages
concurrently each other.

This change introduces new scmi agent uclass API function
devm_scmi_of_get_channel() for SCMI drivers probe sequences to get
a reference to the SCMI channel assigned to its related SCMI protocol.
The function queries the channel reference to its SCMI transport driver
through new scmi agent uclass operator .of_get_channel that uses Device
Tree information from related SCMI agent node.

Operator .of_get_channel returns a reference to the SCMI channel
assigned to SCMI protocol used by the caller device. SCMI transport
drivers that do not support multi-channel are not mandated to register
this operator. When so, API function devm_scmi_of_get_channel() returns
NULL and SCMI transport driver are expected to retrieve by their own
means the reference to the unique SCMI channel, for example using
platform data as these drivers currently do in U-Boot source tree.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: factorize scmi transport look up
Etienne Carriere [Tue, 31 May 2022 16:09:20 +0000 (18:09 +0200)]
firmware: scmi: factorize scmi transport look up

Defines local helper function find_scmi_transport_device() with the
instructions to find the SCMI transport device from a SCMI protocol
device.

Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: prepare uclass to pass channel reference
Etienne Carriere [Tue, 31 May 2022 16:09:19 +0000 (18:09 +0200)]
firmware: scmi: prepare uclass to pass channel reference

Changes SCMI transport operator ::process_msg to pass the SCMI channel
reference provided by caller SCMI protocol device.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: prepare scmi uclass API to multi-channel
Etienne Carriere [Tue, 31 May 2022 16:09:18 +0000 (18:09 +0200)]
firmware: scmi: prepare scmi uclass API to multi-channel

Changes SCMI driver API function devm_scmi_process_msg() to add
an SCMI channel reference argument for when SCMI agent supports
SCMI protocol specific channels. First argument of devm_scmi_process_msg()
is also change to point to the caller SCMI protocol device rather
than its parent device (the SCMI agent device).

The argument is a pointer to opaque struct scmi_channel known from
the SCMI transport drivers. It is currently unused and caller a pass
NULL value. A later change will enable such support once SCMI protocol
drivers have means to get the channel reference during initialization.

Cc: Lukasz Majewski <lukma@denx.de>
Cc: Sean Anderson <seanga2@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: optee: fix inline description of PTA_SCMI_CMD_GET_CHANNEL
Etienne Carriere [Tue, 31 May 2022 16:09:17 +0000 (18:09 +0200)]
firmware: scmi: optee: fix inline description of PTA_SCMI_CMD_GET_CHANNEL

Removes inaccurate inline description of OP-TEE SCMI PTA command
PTA_SCMI_CMD_GET_CHANNEL.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofirmware: scmi: optee: use TEE shared memory for SCMI messages
Etienne Carriere [Tue, 31 May 2022 16:09:16 +0000 (18:09 +0200)]
firmware: scmi: optee: use TEE shared memory for SCMI messages

Changes implementation when using TEE dynamically allocated shared
memory to synchronize with the Linux implementation where the legacy
SMT protocol cannot be used with such memory since it is expected from
device mapped memory whereas OP-TEE shared memory is cached and
hence should not be accessed using memcpy_toio()/memcpy_fromio().

This change implements the MSG shared memory protocol introduced
in Linux [1]. The protocol uses a simplified SMT header of 32bit
named MSG_SMT to carry SCMI protocol information and uses side channel
means to carry exchanged buffer size information, as TEE invocation API
parameters when used in the SCMI OP-TEE transport.

Link: [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f301bba0ca7392d16a6ea4f1d264a91f1fadea1a
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
2 years agofuzz: virtio: Add fuzzer for vring
Andrew Scull [Mon, 30 May 2022 10:00:13 +0000 (10:00 +0000)]
fuzz: virtio: Add fuzzer for vring

Add a fuzzer to test the vring handling code against unexpected
mutations from the virtio device.

After building the sandbox with CONFIG_FUZZ=y, the fuzzer can be invoked
with by:

   UBOOT_SB_FUZZ_TEST=fuzz_vring ./u-boot

This fuzzer finds unvalidated inputs in the vring driver that allow a
buggy or malicious device to make the driver chase wild pointers.

Signed-off-by: Andrew Scull <ascull@google.com>
2 years agosandbox: Implement fuzzing engine driver
Andrew Scull [Mon, 30 May 2022 10:00:12 +0000 (10:00 +0000)]
sandbox: Implement fuzzing engine driver

Add a fuzzing engine driver for the sandbox to take inputs from
libfuzzer and expose them to the fuzz tests.

Signed-off-by: Andrew Scull <ascull@google.com>
2 years agosandbox: Add libfuzzer integration
Andrew Scull [Mon, 30 May 2022 10:00:11 +0000 (10:00 +0000)]
sandbox: Add libfuzzer integration

Add an implementation of LLVMFuzzerTestOneInput() that starts the
sandbox on a secondary thread and exposes a function to synchronize the
generation of fuzzing inputs with their consumption by the sandbox.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agosandbox: Decouple program entry from sandbox init
Andrew Scull [Mon, 30 May 2022 10:00:10 +0000 (10:00 +0000)]
sandbox: Decouple program entry from sandbox init

Move the program's entry point to os.c, in preparation for a separate
fuzzing entry point to be added.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotest: fuzz: Add framework for fuzzing
Andrew Scull [Mon, 30 May 2022 10:00:09 +0000 (10:00 +0000)]
test: fuzz: Add framework for fuzzing

Add the basic infrastructure for declaring fuzz tests and a command to
invoke them.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agofuzzing_engine: Add fuzzing engine uclass
Andrew Scull [Mon, 30 May 2022 10:00:08 +0000 (10:00 +0000)]
fuzzing_engine: Add fuzzing engine uclass

This new class of device will provide fuzzing inputs from a fuzzing
engine.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoCI: Azure: Build with ASAN enabled
Andrew Scull [Mon, 30 May 2022 10:00:07 +0000 (10:00 +0000)]
CI: Azure: Build with ASAN enabled

In order to prevent build regressions with ASAN, add the builds to CI.
The longer term objective will be to enabled test targets with ASAN
enabled, but there are too many at the moment.

Signed-off-by: Andrew Scull <ascull@google.com>
2 years agotest/py: test_stackprotector: Disable for ASAN
Andrew Scull [Mon, 30 May 2022 10:00:06 +0000 (10:00 +0000)]
test/py: test_stackprotector: Disable for ASAN

The stack protector test intentionally overflows a buffer in order to
corrupt the stack canary so that it can test that the corruption is
detected as expected. However, this is incompatible with ASAN, which
detects the buffer overflow and interrupts the test, so disable the test
for such configurations.

Signed-off-by: Andrew Scull <ascull@google.com>
2 years agosandbox: Add support for Address Sanitizer
Andrew Scull [Mon, 30 May 2022 10:00:05 +0000 (10:00 +0000)]
sandbox: Add support for Address Sanitizer

Add CONFIG_ASAN to build with the Address Sanitizer. This only works
with the sandbox so the config is likewise dependent. The resulting
executable will have ASAN instrumentation, including the leak detector
that can be disabled with the ASAN_OPTIONS environment variable:

   ASAN_OPTIONS=detect_leaks=0 ./u-boot

Since u-boot uses its own dlmalloc, dynamic allocations aren't
automatically instrumented, but stack variables and globals are.

Instrumentation could be added to dlmalloc to poison and unpoison memory
as it is allocated and deallocated, and to introduce redzones between
allocations. Alternatively, the sandbox may be able to play games with
the system allocator and somehow still keep the required memory
abstraction. No effort to address dynamic allocation is made by this
patch.

The config is not yet enabled for any targets by default.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agolinker_lists: Rename sections to remove . prefix
Andrew Scull [Mon, 30 May 2022 10:00:04 +0000 (10:00 +0000)]
linker_lists: Rename sections to remove . prefix

Rename the sections used to implement linker lists so they begin with
'__u_boot_list' rather than '.u_boot_list'. The double underscore at the
start is still distinct from the single underscore used by the symbol
names.

Having a '.' in the section names conflicts with clang's ASAN
instrumentation which tries to add redzones between the linker list
elements, causing expected accesses to fail. However, clang doesn't try
to add redzones to user sections, which are names with all alphanumeric
and underscore characters.

Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agosandbox: Rename getopt sections
Andrew Scull [Mon, 30 May 2022 10:00:03 +0000 (10:00 +0000)]
sandbox: Rename getopt sections

Rename the sections used for defining sandbox command line options so
that they don't start with a '.'. ELF says that sections starting with a
'.' are reserved for system use, but the sandbox runs as a normal user
process so should be using user sections instead.

Clang's ASAN adds redzones to non-user sections and the extra padding
meant that the list of options was being corrupted. Naming the sections
as user sections avoids this issue as clang handles them as we intended.

Signed-off-by: Andrew Scull <ascull@google.com>
2 years agosandbox: Rename EFI runtime sections
Andrew Scull [Mon, 30 May 2022 10:00:02 +0000 (10:00 +0000)]
sandbox: Rename EFI runtime sections

Rename the sections used for placing the EFI runtime so that they don't
start with a '.'. ELF says that sections starting with a '.' are
reserved for system use, but the sandbox runs as a normal user process
so should be using user sections instead.

Clang's ASAN adds redzones to non-user sections and the extra padding
meant that the list of options was being corrupted. Naming the sections
as user sections avoids this issue as clang handles them as we intended.

Signed-off-by: Andrew Scull <ascull@google.com>
2 years agoserial: sandbox: Fix buffer underflow in puts
Andrew Scull [Mon, 30 May 2022 10:00:01 +0000 (10:00 +0000)]
serial: sandbox: Fix buffer underflow in puts

Fix the buffer underflow that would occur if puts is called with length
of zero.

Fixes: efa51f2bd64 ("serial: sandbox: Implement puts")
Cc: Sean Anderson <sean.anderson@seco.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2 years agoMerge branch '2022-06-22-platform-updates-and-additions' into next
Tom Rini [Thu, 23 Jun 2022 12:16:21 +0000 (08:16 -0400)]
Merge branch '2022-06-22-platform-updates-and-additions' into next

- Add hpe gxp architecture and platform, Arm corstone1000 platform.
- ast2600, devkit8000, NPCM7xx improvements

2 years agocorstone1000: Convert to text file environment
Tom Rini [Wed, 22 Jun 2022 15:25:52 +0000 (11:25 -0400)]
corstone1000: Convert to text file environment

Convert this platform to using the text file environment rather than
defining CONFIG_EXTRA_ENV_SETTINGS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agogxp: Convert to text file environment
Tom Rini [Wed, 22 Jun 2022 15:23:03 +0000 (11:23 -0400)]
gxp: Convert to text file environment

Convert this platform to using the text file environment rather than
defining CONFIG_EXTRA_ENV_SETTINGS.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agomisc: nuvoton: Add NPCM7xx otp controller driver
Jim Liu [Tue, 7 Jun 2022 08:33:54 +0000 (16:33 +0800)]
misc: nuvoton: Add NPCM7xx otp controller driver

Add Nuvoton BMC npcm750 otp driver

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2 years agocrypto: nuvoton: Add NPCM7xx SHA driver
Jim Liu [Tue, 7 Jun 2022 08:32:09 +0000 (16:32 +0800)]
crypto: nuvoton: Add NPCM7xx SHA driver

add nuvoton BMC npcm750 SHA driver

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2 years agocrypto: nuvoton: Add NPCM7xx AES driver
Jim Liu [Tue, 7 Jun 2022 08:32:08 +0000 (16:32 +0800)]
crypto: nuvoton: Add NPCM7xx AES driver

add nuvoton BMC npcm750 AES driver

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2 years agoast2600: spl: Add boot mode detection
Chia-Wei Wang [Wed, 1 Jun 2022 08:43:52 +0000 (16:43 +0800)]
ast2600: spl: Add boot mode detection

AST2600 supports boot from SPI(mmap), eMMC, and UART.
This patch adds the boot mode detection and return the
corresponding boot device type.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
2 years agoconfigs: ast2600: Move SPL bss section to DRAM space
Chia-Wei Wang [Wed, 1 Jun 2022 08:21:15 +0000 (16:21 +0800)]
configs: ast2600: Move SPL bss section to DRAM space

The commit b583348ca8c8 ("image: fit: Align hash output buffers") places
the hash output buffer at the .bss section. However, AST2600 by default
executes SPL in the NOR flash XIP way. This results in the hash output
cannot be written to the buffer as it is located at the R/X only region.

We need to move the .bss section out of the SPL body to the DRAM space,
where hash output can be written to. This patch includes:
 - Define the .bss section base and size
 - A new SPL linker script is added with a separate .bss region specified
 - Enable CONFIG_SPL_SEPARATE_BSS kconfig option

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Neal Liu <neal_liu@aspeedtech.com>
2 years agoMAINTAINERS: Introduce HPE GXP Architecture
Nick Hawkins [Wed, 8 Jun 2022 21:21:42 +0000 (16:21 -0500)]
MAINTAINERS: Introduce HPE GXP Architecture

Create a section in MAINTAINERS for the GXP HPE architecture

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agoconfigs: gxp: add gxp_defconfig
Nick Hawkins [Wed, 8 Jun 2022 21:21:41 +0000 (16:21 -0500)]
configs: gxp: add gxp_defconfig

This is the initial very basic config that enables the U-Boot console on
the hpe gxp soc.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agoconfigs: gxp: add core support
Nick Hawkins [Wed, 8 Jun 2022 21:21:40 +0000 (16:21 -0500)]
configs: gxp: add core support

Add the include file for the gxp soc.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agoARM: dts: Add device tree files for hpe gxp soc
Nick Hawkins [Wed, 8 Jun 2022 21:21:39 +0000 (16:21 -0500)]
ARM: dts: Add device tree files for hpe gxp soc

The HPE SoC is new to linux. A basic device tree layout with minimum
required for linux to boot including a timer and watchdog support has
been created.

The dts file is empty at this point but will be updated in subsequent
updates as board specific features are enabled.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agodt-bindings: spi: Add hpe gxp spi
Nick Hawkins [Wed, 8 Jun 2022 21:21:38 +0000 (16:21 -0500)]
dt-bindings: spi: Add hpe gxp spi

Add support for the HPE GXP SPI Controller.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agoboard: hpe: gxp: add HPE GXP soc support
Nick Hawkins [Wed, 8 Jun 2022 21:21:37 +0000 (16:21 -0500)]
board: hpe: gxp: add HPE GXP soc support

Add basic support for the HPE GXP SoC. Reset the EHCI controller at
boot.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agospi: gxp_spi: Add GXP SPI controller driver
Nick Hawkins [Wed, 8 Jun 2022 21:21:36 +0000 (16:21 -0500)]
spi: gxp_spi: Add GXP SPI controller driver

The GXP supports 3 separate SPI interfaces to accommodate the system
flash, core flash, and other functions. The SPI engine supports variable
clock frequency, selectable 3-byte or 4-byte addressing and a
configurable x1, x2, and x4 command/address/data modes. The memory
buffer for reading and writing ranges between 256 bytes and 8KB. This
driver supports access to the core flash.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agotimer: gxp: Add HPE GXP timer support
Nick Hawkins [Wed, 8 Jun 2022 21:21:35 +0000 (16:21 -0500)]
timer: gxp: Add HPE GXP timer support

Add support for the HPE GXP SOC timer. The GXP supports several different
kinds of timers but for the purpose of this driver there is only support
for the General Timer. The timer has a 1us resolution and is 56 bits.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agoARM: hpe: gxp: add core support
Nick Hawkins [Wed, 8 Jun 2022 21:21:34 +0000 (16:21 -0500)]
ARM: hpe: gxp: add core support

The GXP is the HPE BMC SoC that is used in the majority
of current generation HPE servers. Traditionally the asic will
last multiple generations of server before being replaced.

Info about SoC:

HPE GXP is the name of the HPE Soc. This SoC is used to implement many BMC
features at HPE. It supports ARMv7 architecture based on the Cortex A9
core. It is capable of using an AXI bus to whicha memory controller is
attached. It has multiple SPI interfaces to connect boot flash and BIOS
flash. It uses a 10/100/1000 MAC for network connectivity. It has multiple
i2c engines to drive connectivity with a host infrastructure. There
currently are no public specifications but this process is being worked.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
2 years agocmd/misc: Stop using a function pointer
Tom Rini [Wed, 22 Jun 2022 20:08:56 +0000 (16:08 -0400)]
cmd/misc: Stop using a function pointer

Currently, enabling CMD_MISC gives:
cmd/misc.c:67:25: warning: assignment to 'int (*)(struct udevice *, int,  void *, int)' from incompatible pointer type 'int (*)(struct udevice *, int,  const void *, int)' [-Wincompatible-pointer-types]

Because 'misc_read' takes a void * and 'misc_write' takes a const void
*, both of which make sense for their operation.  Given there's one
place we make use of the function pointer, just call read or write
directly for the operation we're called with.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: add support to corstone1000 platform
Rui Miguel Silva [Wed, 11 May 2022 09:55:41 +0000 (10:55 +0100)]
arm: add support to corstone1000 platform

Corstone1000 is a platform from arm, which includes pre
verified Corstone SSE710 sub-system that combines Cortex-A and
Cortex-M processors [0].

This code adds the support for the Cortex-A35 implementation
at host side, it contains also the necessary bits to support
the Corstone 1000 FVP (Fixed Virtual Platform) [1] and also the
FPGA MPS3 board implementation of this platform. [2]

0: https://developer.arm.com/documentation/102360/0000
1: https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
2: https://developer.arm.com/documentation/dai0550/c/

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agocmd: load: add load command for memory mapped
Rui Miguel Silva [Wed, 11 May 2022 09:55:40 +0000 (10:55 +0100)]
cmd: load: add load command for memory mapped

cp.b is used a lot as a way to load binaries to memory and execute
them, however we may need to integrate this with the efi subsystem to
set it up as a bootdev.

So, introduce a loadm command that will be consistent with the other
loadX commands and will call the efi API's.

ex: loadm $kernel_addr $kernel_addr_r $kernel_size

with this a kernel with CONFIG_EFI_STUB enabled will be loaded and
then subsequently booted with bootefi command.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoARM: dts: omap3-devkit8000: Fix CONFIG_DM_ETH warning
Anthoine Bourgeois [Thu, 2 Jun 2022 20:27:08 +0000 (22:27 +0200)]
ARM: dts: omap3-devkit8000: Fix CONFIG_DM_ETH warning

Add the missing ethernet node in u-boot dts.

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
2 years agoARM: dts: omap3-devkit8000: Fix CONFIG_DM_I2C warning
Anthoine Bourgeois [Thu, 2 Jun 2022 20:27:07 +0000 (22:27 +0200)]
ARM: dts: omap3-devkit8000: Fix CONFIG_DM_I2C warning

Seems that u-boot can't probe i2c bus at 2.6Mhz speed, so lower
the speed to the default value 100Khz.

v2: fix i2c1 frequency in the root omap3-u-boot.dtsi include.

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
2 years agoARM: dts: omap3-devkit8000: Add support for Devkit8000
Anthoine Bourgeois [Thu, 2 Jun 2022 20:27:06 +0000 (22:27 +0200)]
ARM: dts: omap3-devkit8000: Add support for Devkit8000

This commit adds OMAP3 BeagleBoard devicetree files from Linux
v5.16.0.
This commit fixes CONFIG_DM_MMC warning.

v3: patch clean-up

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@gmail.com>
2 years agoMerge branch 'master' into next
Tom Rini [Mon, 20 Jun 2022 18:40:59 +0000 (14:40 -0400)]
Merge branch 'master' into next

Merge in v2022.07-rc5.

2 years agoPrepare v2022.07-rc5
Tom Rini [Mon, 20 Jun 2022 18:30:36 +0000 (14:30 -0400)]
Prepare v2022.07-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 20 Jun 2022 12:13:12 +0000 (08:13 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'u-boot-stm32-20220620' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 20 Jun 2022 12:09:24 +0000 (08:09 -0400)]
Merge tag 'u-boot-stm32-20220620' of https://source.denx.de/u-boot/custodians/u-boot-stm into next

- Add STM32MP13 SoCs support with associated board STM32M135F-DK
- Correct livetree support in stm32mp1 boards
- Activate livetree for stm32mp15 DHSOM boards

2 years agoMerge tag 'fsl-qoriq-2022-6-20-v2' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 20 Jun 2022 12:08:29 +0000 (08:08 -0400)]
Merge tag 'fsl-qoriq-2022-6-20-v2' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next

Layerscape:
 add sfp driver
 Kconfig cleanup
 sl28 board update
 support hdp firmware loading
powerpc:
 dts update for p2020
 p1_p2_rdb_pc board update
 fsl_esdhc fallback to 1-bit mode support

2 years agoboard: sl28: rename include guard macro
Michael Walle [Mon, 30 May 2022 21:02:10 +0000 (23:02 +0200)]
board: sl28: rename include guard macro

Avoid name clashes with an include file on board level.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoboard: sl28: support 8 GiB memory
Michael Walle [Mon, 30 May 2022 21:02:09 +0000 (23:02 +0200)]
board: sl28: support 8 GiB memory

The board supports up to 8 GiB memory. The memory is soldered on the
board but the configuration is equivalent to a dual chip select, dual
rank DIMM module.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoboard: sl28: remove unneeded ddr config parameter
Michael Walle [Mon, 30 May 2022 21:02:08 +0000 (23:02 +0200)]
board: sl28: remove unneeded ddr config parameter

config_2 doesn't need to be set to zero because that is already the
default value.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoboard: sl28: set CPO value
Michael Walle [Mon, 30 May 2022 21:02:07 +0000 (23:02 +0200)]
board: sl28: set CPO value

With a 8GiB memory board, it seems that the "very unlikely event" of a
DDR initialization with non-optimal values are not really that unlikely.
It happens in about every other reboot. As described in erratum
A-009942, preset the DEBUG_28 register with an optimal value. The value
iself depends on the memory configuration of the board, but the used
value seems to work well for all variants.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoarmv8: layerscape: add missing RCW source defines
Michael Walle [Mon, 30 May 2022 21:02:05 +0000 (23:02 +0200)]
armv8: layerscape: add missing RCW source defines

A board might need to get the source of the RCW word, which is also the
boot source in most cases.

These defines are taken from the LS1028A and I expect they are the same
across the SoCs with the same chassis, after all, there was already a
reset source for NOR flash.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agopowerpc: bootm: Fix sizes in memory adjusting warning
Pali Rohár [Thu, 26 May 2022 12:36:03 +0000 (14:36 +0200)]
powerpc: bootm: Fix sizes in memory adjusting warning

Old size is stored in size variable and new size is in bootm_size variable.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoboard: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.h
Pali Rohár [Thu, 26 May 2022 08:52:27 +0000 (10:52 +0200)]
board: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.h

Code for changing boot source is platform generic and can be used by any
P1* and P2* compatible RDB board. Not only by boards which use config
header file p1_p2_rdb_pc.h.

So move this code from p1_p2_rdb_pc.h to p1_p2_bootsrc.h and cleanup macros
for generating boot source env variables in CONFIG_EXTRA_ENV_SETTINGS.

This allows to use code for resetting board and rebooting to other boot
source also by other boards in future.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define PMC node
Pali Rohár [Tue, 24 May 2022 11:24:59 +0000 (13:24 +0200)]
powerpc: dts: p2020: Define PMC node

Copy definition of PMC node from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agommc: fsl_esdhc: Add new config option for default fallback mode
Pali Rohár [Wed, 11 May 2022 18:27:13 +0000 (20:27 +0200)]
mmc: fsl_esdhc: Add new config option for default fallback mode

Currently default fallback SDHC mode is 1-bit. Add new config option
CONFIG_SYS_FSL_ESDHC_DEFAULT_BUS_WIDTH to allow specifying default fallback
mode. This is useful e.g. for SPL builds which loads other parts from SD
card during boot process.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc: Set fallback mode to 1-bit
Pali Rohár [Wed, 11 May 2022 18:27:12 +0000 (20:27 +0200)]
mmc: fsl_esdhc: Set fallback mode to 1-bit

8-bit mode is not supported by SD cards and on P2020 are four SDHC pins
shared with SPI (so if P2020 board have also SPI then only 4-bit SDHC mode
is provided). So 8-bit SDHC mode is really bad default.

When max bus width is not provided then set mode to 1-bit. This mode is
supported by all cards, so it is the best option for fallback mode.

Also P2020 bootrom sets mode to 1-bit when booting from SD/MMC card.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agols1028a: hdp: Add config support for HDP firmware loading
Alison Wang [Tue, 10 May 2022 10:29:10 +0000 (18:29 +0800)]
ls1028a: hdp: Add config support for HDP firmware loading

This patch adds config support for HDP firmware loading on LS1028A.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2 years agopowerpc: mpc85xx: Set default SYS_IMMR value for P1/P2 CPUs
Pali Rohár [Mon, 2 May 2022 16:29:25 +0000 (18:29 +0200)]
powerpc: mpc85xx: Set default SYS_IMMR value for P1/P2 CPUs

This reduce usage of per-board custom settings.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agomtd: rawnand: fsl_elbc: Fix DM support in DTS code path
Pali Rohár [Mon, 2 May 2022 16:28:08 +0000 (18:28 +0200)]
mtd: rawnand: fsl_elbc: Fix DM support in DTS code path

For proper DM support it is required to fill also mtd->dev member.
Otherwise DM would not see nand device at all.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: mmu: Fix FSL_BOOKE_MAS2() macro
Pali Rohár [Sun, 1 May 2022 17:17:35 +0000 (19:17 +0200)]
powerpc: mmu: Fix FSL_BOOKE_MAS2() macro

Effective page number mask for MAS2 register is stored in macro MAS2_EPN.

Fixes: 2146cf56821c ("Reworked FSL Book-E TLB macros to be more readable")
Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: fsl_law: Add definition for first PCIe target interface
Pali Rohár [Sun, 1 May 2022 15:45:58 +0000 (17:45 +0200)]
powerpc: fsl_law: Add definition for first PCIe target interface

Header file asm/fsl_law.h already provides correct definition for second
and third PCIe controller (LAW_TRGT_IF_PCIE_2 and LAW_TRGT_IF_PCIE_3). But
is missing definition for the first PCIe controller (LAW_TRGT_IF_PCIE_1).

Note that existing definition for LAW_TRGT_IF_PCIE_2 and LAW_TRGT_IF_PCIE_3
are slightly complicated, but are really correct for P2020 platform.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoboard: freescale: p1_p2_rdb_pc: Implement board_reset()
Pali Rohár [Sun, 1 May 2022 12:23:14 +0000 (14:23 +0200)]
board: freescale: p1_p2_rdb_pc: Implement board_reset()

Do board reset via CPLD's system reset register.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoboard: freescale: p1_p2_rdb_pc: Enable TDM function only for P1010
Pali Rohár [Sun, 1 May 2022 12:20:48 +0000 (14:20 +0200)]
board: freescale: p1_p2_rdb_pc: Enable TDM function only for P1010

TDM function is supported only on P1010. P2020 does not have PMUXCR_TDM_ENA
register, so do not enable it.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: mpc85xx: Fix compilation with CONFIG_WDT
Pali Rohár [Thu, 28 Apr 2022 11:31:43 +0000 (13:31 +0200)]
powerpc: mpc85xx: Fix compilation with CONFIG_WDT

When CONFIG_WDT is enabled then non-DM watchdog code cannot be used due to
conflicting functions like watchdog_reset(). So disable compilation of
mpc85xx watchdog_reset() function when CONFIG_WDT is enabled.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define ecm, memory and guts nodes
Pali Rohár [Wed, 27 Apr 2022 14:05:01 +0000 (16:05 +0200)]
powerpc: dts: p2020: Define ecm, memory and guts nodes

Copy definition of these nodes from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define DMA nodes
Pali Rohár [Wed, 27 Apr 2022 14:05:00 +0000 (16:05 +0200)]
powerpc: dts: p2020: Define DMA nodes

Copy definition of DMA nodes from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define crypto node
Pali Rohár [Wed, 27 Apr 2022 14:04:59 +0000 (16:04 +0200)]
powerpc: dts: p2020: Define crypto node

Copy definition of crypto node from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define MPIC nodes
Pali Rohár [Wed, 27 Apr 2022 14:04:58 +0000 (16:04 +0200)]
powerpc: dts: p2020: Define MPIC nodes

Copy definition of MPIC nodes from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoARM: layerscape: Use ARCH_LS104?A insead of TARGET_LS104?ARDB
Sean Anderson [Tue, 26 Apr 2022 18:31:49 +0000 (14:31 -0400)]
ARM: layerscape: Use ARCH_LS104?A insead of TARGET_LS104?ARDB

These frequency calculations depend on the RCW format, which is not
dependent on any particular board. Switch to using ARCH symbols instead
of TARGET.

This whole function could probably use less ifdefs, but for now just do
a minimal conversion.

Fixes: 24cb6f2295 ("fsl-layerscape: Add fsl_esdhc peripheral clock support")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoarch: layerscape: Add SFP binding
Sean Anderson [Fri, 22 Apr 2022 18:34:20 +0000 (14:34 -0400)]
arch: layerscape: Add SFP binding

This adds an SFP binding for the processors it is present on. I have
only tested this for the LS1046A.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoARM: dts: ls1021a: update the clockgen node
Sean Anderson [Fri, 22 Apr 2022 18:34:19 +0000 (14:34 -0400)]
ARM: dts: ls1021a: update the clockgen node

QorIQ platforms now use different clock bindings. Although we don't use
the device tree for clocks on this platform, it is helpful to sync it
because then the bindings will more closely match Linux. Additionally,
it allows for using more clock fractions (such as platform/4).

This corresponds to Linux commit b6f5e7019391 ("ARM: dts: ls1021a:
update the clockgen node").

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoarm: layerscape: Add sfp driver
Sean Anderson [Fri, 22 Apr 2022 18:34:18 +0000 (14:34 -0400)]
arm: layerscape: Add sfp driver

This adds a driver for the Security Fuse Processor (SFP) present on
LS1012A, LS1021A, LS1043A, and LS1046A processors. It holds the
Super-Root Key (SRK), One-Time-Programmable Master Key (OTPMK), and
other "security" related fuses. Similar devices (sharing the same name)
are present on other processors, but for the moment this just supports
the LS2 variants.

The mirror registers are loaded during power-on reset. All mirror
registers must be programmed or read at once. Because of this, `fuse
prog` will program all fuses, even though only one might be specified.
To prevent accidentally burning through all your fuse programming cycles
with something like `fuse prog 0 0 A B C D`, we limit ourselves to one
programming cycle per reset. Fuses are numbered based on their address.
The fuse at 0x1e80200 is 0, the fuse at 0x1e80204 is 1, etc.

The TA_PROG_SFP supply must be enabled when programming fuses, but must
be disabled when reading them. Typically this supply is enabled by
inserting a jumper or by setting a register in the board's FPGA. I've
also added support for using a regulator. This could be helpful for
automatically issuing the FPGA write, or for toggling a GPIO controlling
the supply.

I suggest using the following procedure for programming:

1. Override the fuses you wish to program
   => fuse override 0 2 A B C D
2. Inspect the values and ensure that they are what you expect
   => fuse sense 0 2 4
3. Enable TA_PROG_SFP
4. Issue a program command using OSPR0 as a dummy. Since it contains the
   write-protect bit you will usually want to write it last anyway.
   => fuse prog 0 0 0
5. Disable TA_PROG_SFP
6. Read back the fuses and ensure they are correct
   => fuse read 0 2 4

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoMerge tag 'efi-2022-07-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 19 Jun 2022 15:30:29 +0000 (11:30 -0400)]
Merge tag 'efi-2022-07-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2020-07-rc5-2

Documentation:

* man-pages for booti and printenv

UEFI

* correct return value for printenv -e command
* initialize console size late

2 years agoefi_loader: initialize console size late
Heinrich Schuchardt [Tue, 14 Jun 2022 06:02:03 +0000 (08:02 +0200)]
efi_loader: initialize console size late

If CONFIG_VIDEO_DM=n we query the display size from the serial console.
Especially when using a remote console the response can be so late that
it interferes with autoboot.

Only query the console size when running an EFI binary.

Add debug output showing the determined console size.

Reported-by: Fabio Estevam <festevam@gmail.com>
Fixes: a57ad20d07e8 ("efi_loader: split efi_init_obj_list() into two stages")
Fixes: a9bf024b2933 ("efi_loader: disk: a helper function to create efi_disk objects from udevice")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: Fabio Estevam <festevam@denx.de>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
2 years agotest: work around for EFI terminal size probing
Heinrich Schuchardt [Sun, 19 Jun 2022 12:02:18 +0000 (14:02 +0200)]
test: work around for EFI terminal size probing

When the UEFI sub-system is initialized it sends an escape sequence to the
serial console to determine the terminal size. This stops the
run_command_list() function of the console emulation from recognizing the
U-Boot command line prompt.

Add a 'print -e' command as first command in the command list to work
around this issue.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agocmd: correct return value for printenv -e
Heinrich Schuchardt [Sun, 19 Jun 2022 11:36:48 +0000 (13:36 +0200)]
cmd: correct return value for printenv -e

If printenv -e is executed and the specified variable is not found, the
return value $? of the command should be 1 (false).

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: man-page for the printenv command
Heinrich Schuchardt [Sun, 19 Jun 2022 11:59:22 +0000 (13:59 +0200)]
doc: man-page for the printenv command

Privide a man-page for the printenv command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: man-page for bootz command
Heinrich Schuchardt [Sat, 11 Jun 2022 06:23:31 +0000 (08:23 +0200)]
doc: man-page for bootz command

Provide a man-page for the bootz command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoMerge tag 'u-boot-stm32-20220617' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Fri, 17 Jun 2022 13:41:11 +0000 (09:41 -0400)]
Merge tag 'u-boot-stm32-20220617' of https://source.denx.de/u-boot/custodians/u-boot-stm

- Fix the stm32prog command for stm32mp platform
- Add stm32mp15x DHCOR based DRC Compact board

2 years agoMerge commit '32e0379143b433e29d76404f5f4c279067e48853' of https://github.com/tienfon...
Tom Rini [Fri, 17 Jun 2022 13:35:28 +0000 (09:35 -0400)]
Merge commit '32e0379143b433e29d76404f5f4c279067e48853' of https://github.com/tienfong/uboot_mainline

2 years agoMerge branch '2022-06-16-assorted-bugfixes'
Tom Rini [Fri, 17 Jun 2022 13:13:50 +0000 (09:13 -0400)]
Merge branch '2022-06-16-assorted-bugfixes'

- A wide array of regression fixes and minor updates

2 years agostm32mp1: fix reference for STMicroelectronics
Patrick Delaunay [Fri, 20 May 2022 16:38:10 +0000 (18:38 +0200)]
stm32mp1: fix reference for STMicroelectronics

Replace reference to the correct name STMicroelectronics

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp: cleanup the stm32mp15 file
Patrick Delaunay [Wed, 15 Jun 2022 17:41:48 +0000 (19:41 +0200)]
configs: stm32mp: cleanup the stm32mp15 file

Remove STM32_SYSRAM_END and clean the comments in stm32mp15_common.h file
after moving some CONFIG to Kconfig: CONFIG_SYS_CBSIZE,
CONFIG_SPL_MAX_FOOTPRINT, CONFIG_SYS_SPL_MALLOC_START and
CONFIG_SYS_SPL_MALLOC_SIZE.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agostm32mp: stpmic1: remove the debug unit request by debugger
Patrick Delaunay [Wed, 1 Jun 2022 16:33:40 +0000 (18:33 +0200)]
stm32mp: stpmic1: remove the debug unit request by debugger

Depending on backup register value, U-Boot SPL maintains the debug unit
powered-on for debugging purpose; only BUCK1 is required for powering
the debug unit, so revert the setting for all the other power lanes,
except BUCK3 that has to be always on.

To be functional this patch requires a modification in the debugger
,openocd for example, to update the STM32MP15 backup register when it is
required to debug SPL after reset. After deeper analysis this behavior
will be never supported in tools so the associated code, will be never
used and the associated code can be removed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: stm32: activate OF_LIVE for DHSOM
Patrick Delaunay [Mon, 6 Jun 2022 14:04:16 +0000 (16:04 +0200)]
ARM: stm32: activate OF_LIVE for DHSOM

Activate the live DT with CONFIG_OF_LIVE to reduce the DT parsing
time.

Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoboard: dhelectronics: stm32mp1: convert to livetree
Patrick Delaunay [Mon, 6 Jun 2022 14:04:15 +0000 (16:04 +0200)]
board: dhelectronics: stm32mp1: convert to livetree

Replace call to fdt_*() functions and access to gd->fdt_blob
with call to ofnode_*() functions to support a live tree.

Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoboard: engicam: stm32mp1: convert to livetree
Patrick Delaunay [Thu, 19 May 2022 07:07:30 +0000 (09:07 +0200)]
board: engicam: stm32mp1: convert to livetree

Replace gd->fdt_blob access with fdt_getprop() function to the
function ofnode_get_property() to support a live tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoboard: stm32mp1: convert to livetree
Patrick Delaunay [Thu, 19 May 2022 07:07:29 +0000 (09:07 +0200)]
board: stm32mp1: convert to livetree

Replace gd->fdt_blob access with fdt_getprop() function to the
function ofnode_get_property() to support a live tree.

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