]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
6 months agoMerge tag 'efi-2024-07-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 16 Jun 2024 15:10:53 +0000 (09:10 -0600)]
Merge tag 'efi-2024-07-rc5-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-07-rc5-2

Documentation:

* Correct links and board names in PHYTEC board descriptions.
* Describe UEFI measured boot.
* Fix typos in include/bootmeth.h.
* Fix link reference to general verified boot docs.

UEFI:

* Measure device-tree into PCR1 instead of PCR0

6 months agoMerge tag 'u-boot-rockchip-20240614' of https://source.denx.de/u-boot/custodians...
Tom Rini [Sun, 16 Jun 2024 15:08:27 +0000 (09:08 -0600)]
Merge tag 'u-boot-rockchip-20240614' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/21111

- pmic fix for rk8xx;
- pinctrl fix for rk3188/rv1126/rk3588;
- mkimage fix for rockcihp "-l" option;

6 months agodoc: Fix link reference to general verified boot docs
Alexander Dahl [Tue, 11 Jun 2024 14:40:31 +0000 (16:40 +0200)]
doc: Fix link reference to general verified boot docs

Fixes: ad29e08b79fd ("doc: Bring in FIT signature files")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 months agodoc: describe UEFI measured boot
Ilias Apalodimas [Fri, 14 Jun 2024 12:14:03 +0000 (15:14 +0300)]
doc: describe UEFI measured boot

We currently only describe the process to enable measured boot using
bootm. Describe the UEFI requirements as well which predate bootm.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
6 months agotpm: measure DTB in PCR1 instead of PCR0
Ilias Apalodimas [Fri, 14 Jun 2024 12:09:50 +0000 (15:09 +0300)]
tpm: measure DTB in PCR1 instead of PCR0

The PC client spec [0], doesn't describe measurements for DTBs. It does
describe what do to for ACPI tables though.

There is a description for ACPI in 3.3.4.1 PCR[0] – SRTM, POST BIOS,
and Embedded Drivers and they explicitly mention ACPI in there. There's
no mention of ACPI in 3.3.4.2 PCR[1] – Host Platform Configuration.

However, in Figure 6 --  PCR Mapping of UEFI Components ACPI is shown
in PCR1. The general description also mentions PCR0 is for code and PCR1
is for data such as ACPI and SMBIOS.

So let's switch over the DTB measurements to PCR1 which seems a better
fit.

[0] https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Eddie James <eajames@linux.ibm.com>
6 months agodoc: board: phytec: phycore-am64: Fix phyBOARD Name
Daniel Schultz [Wed, 12 Jun 2024 16:16:39 +0000 (09:16 -0700)]
doc: board: phytec: phycore-am64: Fix phyBOARD Name

The Carrier-Board for the pyhCORE-AM64x is called phyBOARD-Electra.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
6 months agodoc: board: phytec: phycore-am64x: Fix Link to Documentation
Daniel Schultz [Wed, 12 Jun 2024 16:16:38 +0000 (09:16 -0700)]
doc: board: phytec: phycore-am64x: Fix Link to Documentation

We moved our documentation to another hoster and therefore the URL
changed. Point to the latest documentation instead of release versions
to not link out-dated documentation.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
6 months agodoc: board: phytec: phycore-am62x: Fix Link to Documentation
Daniel Schultz [Wed, 12 Jun 2024 16:16:37 +0000 (09:16 -0700)]
doc: board: phytec: phycore-am62x: Fix Link to Documentation

We moved our documentation to another hoster and therefore the URL
changed. Point to the latest documentation instead of release versions
to not link out-dated documentation.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
6 months agobootstd: Fix a handful of doc typos in bootmeth
Mattijs Korpershoek [Tue, 4 Jun 2024 15:15:21 +0000 (17:15 +0200)]
bootstd: Fix a handful of doc typos in bootmeth

Fix some trivial typos found by browsing the code.
Done with flyspell.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Guillaume La Roque<glaroque@baylibre.com>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
6 months agoMerge tag 'u-boot-imx-master-20240614' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Fri, 14 Jun 2024 16:37:53 +0000 (10:37 -0600)]
Merge tag 'u-boot-imx-master-20240614' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/21125

- Update imx8mn_s2 DDR initialization to fix USB boot.

6 months agoboard: imx8mn_s2: Update timing with production one
Michael Trimarchi [Mon, 10 Jun 2024 06:38:42 +0000 (08:38 +0200)]
board: imx8mn_s2: Update timing with production one

The timing upstream was wrong corresponding to the production.
This come evident after commit b614ddb5d33
(ddr: imx: Save the FW loading if it hasn't changed). This
change fix booting from usb

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
6 months agoMerge tag 'u-boot-stm32-20240614' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Fri, 14 Jun 2024 14:13:54 +0000 (08:13 -0600)]
Merge tag 'u-boot-stm32-20240614' of https://source.denx.de/u-boot/custodians/u-boot-stm

STM32MP1:
 _ Fix spl compilation warning
 _ Fix optee_get_reserved_memory()
 _ Fix livetree conversion on STM32MP15xx DHSOM

6 months agoARM: stm32: Fix livetree conversion on STM32MP15xx DHSOM
Marek Vasut [Thu, 6 Jun 2024 13:02:46 +0000 (15:02 +0200)]
ARM: stm32: Fix livetree conversion on STM32MP15xx DHSOM

Unlike fdt_node_check_compatible() which returns 0 if node is compatible,
ofnode_device_is_compatible() return true which is non-zero if node is
compatible. The intention of the code is to exit from the function in
case the node is not compatible with "micrel,ks8851-mll". Add the missing
invert into the conditional to reinstate original behavior.

This exposes a follow up problem caused by conversion to DM based FMC2 EBI
driver, where the FMC2 EBI is not configured when accessed by this code.
Probe the KS8851 MAC, which also configures the FMC2 EBI as a dependency,
so that the KS8851 MAC CCR register can be accessed over the FMC2 EBI bus
and checked for EEPROM present bit.

Fixes: 5a605b7c8615 ("board: dhelectronics: stm32mp1: convert to livetree")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 months agostm32mp1: spl: Update optee_get_reserved_memory() return value
Patrice Chotard [Tue, 11 Jun 2024 09:52:39 +0000 (11:52 +0200)]
stm32mp1: spl: Update optee_get_reserved_memory() return value

In case node "/reserved-memory/optee" is not found, return -ENOENT
instead of 0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 months agostm32mp1: spl: Fix compilation warnings
Patrice Chotard [Tue, 11 Jun 2024 09:52:38 +0000 (11:52 +0200)]
stm32mp1: spl: Fix compilation warnings

Fix the following compilation warnings :

../arch/arm/mach-stm32mp/stm32mp1/spl.c: In function 'stm32_init_tzc_for_optee':
../arch/arm/mach-stm32mp/stm32mp1/spl.c:148:37: warning: 'optee_size' may be used uninitialized [-Wmaybe-uninitialized]
  148 |         tee_shmem_base = optee_base + optee_size - CFG_SHMEM_SIZE;
      |                          ~~~~~~~~~~~^~~~~~~~~~~~
../arch/arm/mach-stm32mp/stm32mp1/spl.c:137:30: note: 'optee_size' was declared here
  137 |         uint32_t optee_base, optee_size, tee_shmem_base;
      |                              ^~~~~~~~~~
../arch/arm/mach-stm32mp/stm32mp1/spl.c:148:37: warning: 'optee_base' may be used
uninitialized [-Wmaybe-uninitialized]
  148 |         tee_shmem_base = optee_base + optee_size - CFG_SHMEM_SIZE;
      |                          ~~~~~~~~~~~^~~~~~~~~~~~
../arch/arm/mach-stm32mp/stm32mp1/spl.c:137:18: note: 'optee_base' was declared here
  137 |         uint32_t optee_base, optee_size, tee_shmem_base;
      |                  ^~~~~~~~~~

Fix also the following checkpatch "check" :

CHECK: Prefer kernel type 'u32' over 'uint32_t'
37: FILE: arch/arm/mach-stm32mp/stm32mp1/spl.c:137:
+ uint32_t optee_base = 0, optee_size = 0, tee_shmem_base;

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 months agorockchip: mkimage: fix mkimage -l for header v1
Quentin Schulz [Thu, 6 Jun 2024 11:44:04 +0000 (13:44 +0200)]
rockchip: mkimage: fix mkimage -l for header v1

There are two paths to reach this function, either through mkimage -l or
through dumpimage -l. The latter passes a NULL imagename while the
former passes an empty string. Therefore, let's make both tools behave
the same by handling the empty string the same way as for NULL.

Without this, the only way to get some information out of mkimage -l is
to provide "-n rk3399" for example, which isn't documented in the usage
of the tool.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 months agopinctrl: rockchip: rk3588: Fix support for rockchip_get_mux()
Jonas Karlman [Sun, 12 May 2024 12:16:16 +0000 (12:16 +0000)]
pinctrl: rockchip: rk3588: Fix support for rockchip_get_mux()

GPIO IOMUX control is located at PMU2_IOC or BUS_IOC offset on RK3588.

Based on Linux commit fdc33eba11c5 ("pinctrl/rockchip: add rk3588
support").

Compared to the Linux commit, this include a fix so that the iomux of
GPIO0_B4-D7 is reported correctly.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 months agopinctrl: rockchip: rv1126: Fix support for IOMUX_L_SOURCE_PMU flag
Jonas Karlman [Sun, 12 May 2024 12:16:15 +0000 (12:16 +0000)]
pinctrl: rockchip: rv1126: Fix support for IOMUX_L_SOURCE_PMU flag

GPIO0_C0-C4 iomux is set using PMUGRF_GPIO0C_IOMUX_L reg on RV1126. This
is indicated using the IOMUX_L_SOURCE_PMU flag. Fix reading current mux
by fully adopting the IOMUX_L_SOURCE_PMU related code in Linux kernel.

Based on Linux commit fd4ea48688c6 ("pinctrl: rockchip: Add RV1126
pinctrl support").

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 months agopinctrl: rockchip: rk3188: Fix support for IOMUX_GPIO_ONLY flag
Jonas Karlman [Sun, 12 May 2024 12:16:14 +0000 (12:16 +0000)]
pinctrl: rockchip: rk3188: Fix support for IOMUX_GPIO_ONLY flag

GPIO0_A0-A7 on RK3188 is IOMUX_GPIO_ONLY, however, trying to set gpio
mux return an -ENOTSUPP error code. Fix this by validating using the mux
function type and not the iomux flag.

Based on Linux commit c4a532dee6b6 ("pinctrl: rockchip: handle first
half of rk3188-bank0 correctly").

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 months agoregulator: rk8xx: clarify operator precedence
Quentin Schulz [Wed, 5 Jun 2024 09:33:23 +0000 (11:33 +0200)]
regulator: rk8xx: clarify operator precedence

My linter complains that the order isn't clear enough so let's put
parentheses around the ternary condition to make it happy.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook-bob
6 months agoregulator: rk8xx: pass pmic udevice instead of regulator to all internal functions
Quentin Schulz [Wed, 5 Jun 2024 09:33:22 +0000 (11:33 +0200)]
regulator: rk8xx: pass pmic udevice instead of regulator to all internal functions

For the sake of consistency, make all internal (starting with _)
functions expect a pmic udevice instead of a regulator udevice.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook-bob
6 months agoregulator: rk8xx: fix incorrect device used for _ldo_[sg]et_suspend_value
Quentin Schulz [Wed, 5 Jun 2024 09:33:21 +0000 (11:33 +0200)]
regulator: rk8xx: fix incorrect device used for _ldo_[sg]et_suspend_value

_ldo_get_suspend_value and _ldo_set_suspend_value get passed the parent
of the regulator (so the pmic) as first argument, therefore this udevice
should be used for pmic_* callbacks instead of using the parent of the
pmic.

To avoid further confusion, let's rename the argument to pmic instead of
dev, highlighting which kind of device we expect as argument.

Fixes: f047e4ab9762 ("regulator: rk8xx: add indirection level for some ldo callbacks")
Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook-bob
6 months agoboard: rockchip: rgxx3: Use sdmmc0 as first device
Chris Morgan [Tue, 21 May 2024 15:45:49 +0000 (10:45 -0500)]
board: rockchip: rgxx3: Use sdmmc0 as first device

Some of the rgxx3 devices do not have a way to recover from a poor
flash of a bootloader to eMMC. Set the device to always attempt to boot
from sdmmc0 first which ensures that we can override the boot from
emmc if we have a card present with a valid fit signature. The
expectation is that this will protect from the very unlikely chance
we have a valid FIT signature on the eMMC but the U-Boot stage fails
for some other reason.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 months agoRevert "board: rockchip: Add early ADC button detect for RGxx3"
Chris Morgan [Tue, 21 May 2024 15:45:48 +0000 (10:45 -0500)]
Revert "board: rockchip: Add early ADC button detect for RGxx3"

This reverts commit 41a60d0e5cef54a59596a58940fa7c9cf071034b.

On some of the supported devices the adc detect code always returns
that the button has been pushed, and as a result the device will
not boot normally.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
6 months agocmd: sound: fix help text
Quentin Schulz [Mon, 10 Jun 2024 16:11:44 +0000 (18:11 +0200)]
cmd: sound: fix help text

There's never been a -q or -s argument handled in the command, so let's
remove it. This was highlighted during review[1] but somehow still got
through.

While at it, slightly "reword" in the help text how the len + freq
arguments are defined. Indeed, len and freq work in pair, it is possible
to define none of either, n of both, or n - 1 of freq if there are n
len, in which case the freq that goes with the last len would be the n -
1 (and not the default of 400Hz if neither len nor freq is passed). I
assume this isn't what's expected but leaving it for another patch if
need be to fix what happens in that very odd scenario.

[1] https://lore.kernel.org/u-boot/CAPnjgZ0QWNqVFZfEWHxRcFOA3E3gRAZCYs77nGUXKL0pLp+JLQ@mail.gmail.com/

Fixes: ea58b9a404d4 ("cmd: allow sound command to play multiple sounds")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 months agodm: typo prbing
Heinrich Schuchardt [Sat, 8 Jun 2024 04:12:44 +0000 (06:12 +0200)]
dm: typo prbing

%s/prbing/probing/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
6 months agoFix typo in NVME show command
Thomas Perl [Fri, 31 May 2024 06:48:34 +0000 (06:48 +0000)]
Fix typo in NVME show command

Foramt -> Format

Signed-off-by: Thomas Perl <m@thp.io>
6 months agoMerge tag 'efi-2024-07-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 13 Jun 2024 14:21:24 +0000 (08:21 -0600)]
Merge tag 'efi-2024-07-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-07-rc5

Documentation:

* update build dependency Python request module to version 2.32.2
* fix typos

UEFI:

* Correct signature check when appending to EFI variables.

6 months agodoc/sphinx, test/py: Update requests module to 2.32.2
Tom Rini [Thu, 6 Jun 2024 16:44:25 +0000 (10:44 -0600)]
doc/sphinx, test/py: Update requests module to 2.32.2

The issue described in https://github.com/psf/requests/pull/6655 has
been assigned as a security issue. While unlikely to be exploited in our
usage, update to the current release to fix it. Furthermore, upstream
has now moved on to v2.23.2 as the release to use which has all of the
issues resolved.

Reported-by: GitHub dependabot
Signed-off-by: Tom Rini <trini@konsulko.com>
6 months agoefi_loader: Fix capsule_esl.dtsi.in comment style
Michal Simek [Thu, 30 May 2024 07:17:29 +0000 (09:17 +0200)]
efi_loader: Fix capsule_esl.dtsi.in comment style

Comment is not kernel-doc format that's why don't label it like that and
also fix indentation to have proper multiline comment.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 months agodoc: cmd: bootmeth: Fix extlinunx -> extlinux typo
Mattijs Korpershoek [Fri, 24 May 2024 13:28:21 +0000 (15:28 +0200)]
doc: cmd: bootmeth: Fix extlinunx -> extlinux typo

Fix a trivial typo in the bootmeth documentation.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 months agoefi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check
Weizhao Ouyang [Wed, 8 May 2024 11:13:12 +0000 (19:13 +0800)]
efi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check

According to UEFI v2.10 spec section 8.2.6, if a caller invokes the
SetVariables() service, it will produce a digest from hash(VariableName,
VendorGuid, Attributes, TimeStamp, DataNew_variable_content), then the
firmware that implements the SetVariable() service will compare the
digest with the result of applying the signer’s public key to the
signature. For EFI variable append write, efitools sign-efi-sig-list has
an option "-a" to add EFI_VARIABLE_APPEND_WRITE attr, and u-boot will
drop this attribute in efi_set_variable_int(). So if a caller uses
"sign-efi-sig-list -a" to create the authenticated variable, this append
write will fail in the u-boot due to "hash check failed".

This patch resumes writing the EFI_VARIABLE_APPEND_WRITE attr to ensure
that the hash check is correct. And also update the "test_efi_secboot"
test case to compliance with the change.

Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
6 months agoMerge tag 'u-boot-dfu-20240606' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Thu, 6 Jun 2024 14:24:15 +0000 (08:24 -0600)]
Merge tag 'u-boot-dfu-20240606' of https://source.denx.de/u-boot/custodians/u-boot-dfu

u-boot-dfu-20240606

- dwc3 fix crash when ep0 stalls or gadget is stopped
- Kconfig build fix for DFU_SF (SPI flash DFU driver)

6 months agoMerge tag 'doc-2024-07-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 6 Jun 2024 14:22:43 +0000 (08:22 -0600)]
Merge tag 'doc-2024-07-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Documentation:

* Update netconsole examples mentioning stderr.
* Describe what an "fpga" image is in FIT files.
* process.rst: Document device tree resync rules.

6 months agodoc: process.rst: Document device tree resync rules
Tom Rini [Fri, 17 May 2024 17:49:30 +0000 (11:49 -0600)]
doc: process.rst: Document device tree resync rules

Document the logic of when we do a full resync of the device trees used
by OF_UPSTREAM as well as that cherry-picking is allowed as needed.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months agodoc: process.rst: Use subsubheading for "Phases of the Development Process"
Tom Rini [Fri, 17 May 2024 17:49:29 +0000 (11:49 -0600)]
doc: process.rst: Use subsubheading for "Phases of the Development Process"

These sections which talk about the different phases of the development
process should be using the subsubheading identifier.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months agodoc: Update netconsole examples, mention stderr
Fiona Klute [Sat, 18 May 2024 10:47:06 +0000 (12:47 +0200)]
doc: Update netconsole examples, mention stderr

Stderr was missing from the initial description and example.

As I understand the env command documentation the subcommand style is
preferred, though the old format is still fully supported.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Reviewed-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 months agodoc: Detailed example for netconsole setup
Fiona Klute [Sat, 18 May 2024 10:47:05 +0000 (12:47 +0200)]
doc: Detailed example for netconsole setup

This adds details that I would have liked to have readily available,
in particular how to activate the network interface before enabling
netconsole, and how to integrate netconsole so you can use the U-Boot
prompt.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Reviewed-by: Tony Dinh <mibodhi@gmail.com>
6 months agodoc: add clarity to what a "fpga" image is
Sam Povilus [Tue, 4 Jun 2024 19:52:56 +0000 (13:52 -0600)]
doc: add clarity to what a "fpga" image is

Update fit documentation to clarify that FPGA images are vendor specific and opaque bitstreams.

Signed-off-by: Sam Povilus <sam.povilus@amd.com>
6 months agodoc: Remove extraneous curly braces
Sam Povilus [Tue, 4 Jun 2024 19:52:55 +0000 (13:52 -0600)]
doc: Remove extraneous curly braces

Update documentation to remove un-needed curly braces.

Signed-off-by: Sam Povilus <sam.povilus@amd.com>
6 months agodfu: add missing dependency for SPI flash DFU driver
Heinrich Schuchardt [Tue, 4 Jun 2024 05:44:25 +0000 (07:44 +0200)]
dfu: add missing dependency for SPI flash DFU driver

Building the SPI flash DFU driver fails if SPI flash support is missing.

    drivers/dfu/dfu_sf.c:123:29: error:
    ‘CONFIG_SF_DEFAULT_MODE’ undeclared (first use in this function);

Add the missing dependency.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240604054425.105902-1-heinrich.schuchardt@canonical.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
6 months agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Wed, 5 Jun 2024 16:59:10 +0000 (10:59 -0600)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb

6 months agousb: dwc3: gadget: fix crash in dwc3_gadget_giveback()
Neil Armstrong [Tue, 28 May 2024 08:35:03 +0000 (10:35 +0200)]
usb: dwc3: gadget: fix crash in dwc3_gadget_giveback()

If the ep0 stalls or request are dequeued when gagdet is stopped,
the request dma may not be mapped yet and dwc3_flush_cache() may be
called with a NULL pointer.

Check req->request.dma before calling dwc3_flush_cache() and later
the usb_gadget_unmap_request() functions since it means that
usb_gadget_map_request() hasn't been called yet.

Fixes: fd15b58c1a9 ("dwc3: flush cache only if there is a buffer attached to a request")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240528-topic-sm8x50-dwc3-gadget-crash-fix-v1-1-58434ab4b3d3@linaro.org
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
6 months agoPrepare v2024.07-rc4
Tom Rini [Tue, 4 Jun 2024 00:34:59 +0000 (18:34 -0600)]
Prepare v2024.07-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
6 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Mon, 3 Jun 2024 15:48:03 +0000 (09:48 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-samsung

6 months agoMerge branch 'master-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 3 Jun 2024 15:47:43 +0000 (09:47 -0600)]
Merge branch 'master-cleanup' of https://source.denx.de/u-boot/custodians/u-boot-sh

6 months agoconfigs: rzg2_beacon: Realign ENV location and offset
Adam Ford [Sat, 1 Jun 2024 14:55:20 +0000 (09:55 -0500)]
configs: rzg2_beacon: Realign ENV location and offset

The ENV size and offset were changed to different
values in Beacon's downstream release.  Change them to the
same values as the downstream for consistent behavior.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
6 months agorenesas: beacon-rzg2m: Add Marek to MAINTAINER file
Adam Ford [Sat, 1 Jun 2024 14:55:19 +0000 (09:55 -0500)]
renesas: beacon-rzg2m: Add Marek to MAINTAINER file

Since any changes to the RZ/G2 family go through Marek's tree,
update the MAINTAINER file to automatically show his name
when running get_maintainer.pl.  Without this, he is not
copied.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
6 months agoARM: dts: renesas: Reserve space in 64bit R-Car DTs
Marek Vasut [Sun, 19 May 2024 20:40:07 +0000 (22:40 +0200)]
ARM: dts: renesas: Reserve space in 64bit R-Car DTs

Reserve 4 kiB of space in 64bit R-Car DTs when those DTs are compiled
to permit patching in OpTee-OS /firmware node, /reserved-memory node,
possibly also additional /memory@ nodes and RPC node by TFA.

This duplicates behavior in arch/arm/dts/Makefile with OF_UPSTREAM.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
6 months agoARM: dts: renesas: Remove leftovers after OF_UPSTREAM conversion
Marek Vasut [Sun, 19 May 2024 20:39:19 +0000 (22:39 +0200)]
ARM: dts: renesas: Remove leftovers after OF_UPSTREAM conversion

Remove leftover DTSI files after OF_UPSTREAM conversion.
Those are no longer used and no longer necessary, remove them.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Acked-by: Adam Ford <aford173@gmail.com>
6 months agousb: remove not used variable in usb_ether_curr_dev
Heiko Schocher [Wed, 15 May 2024 06:24:41 +0000 (08:24 +0200)]
usb: remove not used variable in usb_ether_curr_dev

grepping for usb_ether_curr_dev in u-boot source code shows

$ grep -r usb_ether_curr_dev .
./cmd/usb.c:static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */
$

only declared but never used, so it can safely
removed from code.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
6 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 30 May 2024 13:23:30 +0000 (07:23 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

- board: fix support for icicle
- board: support Star64 board
- andes: minor fixes
- riscv: deprecate cache enablement in start.S

6 months agoMerge patch series "omap3: igep0x00: Fix boot failure and modernize the boards support"
Tom Rini [Thu, 30 May 2024 13:07:51 +0000 (07:07 -0600)]
Merge patch series "omap3: igep0x00: Fix boot failure and modernize the boards support"

Javier Martinez Canillas <javier@dowhile0.org> says:

Hello,

I noticed that the IGEPv2 board did not boot anymore with mainline U-Boot.
This was caused by a driver change to allocate its platform data before
relocation and U-Boot not having enough pre-relocation heap size for this.

This series fixes this issue and also makes the board support more modern,
by enabling DM for SPL and migrating the IGEP boards to use upstream DTBs.

6 months agoomap3: igep0x00: Migrate to use upstream DT
Javier Martinez Canillas [Sat, 18 May 2024 13:06:15 +0000 (15:06 +0200)]
omap3: igep0x00: Migrate to use upstream DT

Enable OF_UPSTREAM to use upstream DT and add a ti/omap/ prefix to the
DEFAULT_DEVICE_TREE config option.

That way, a DTS from the upstream dts/upstream/src/ directory is used
instead of the arch/$(ARCH)/dts/ directory. These in turn are removed.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoomap3: igep0x00: Update for DM SPL support
Javier Martinez Canillas [Sat, 18 May 2024 13:06:14 +0000 (15:06 +0200)]
omap3: igep0x00: Update for DM SPL support

This change is heavily based on commit e0cc7df9fdf2 ("omap3_beagle: Update
for DM SPL support"), that did the same update for the OMAP3 Beagle board.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoomap3: igep0x00: Drop unused SPI support
Javier Martinez Canillas [Sat, 18 May 2024 13:06:13 +0000 (15:06 +0200)]
omap3: igep0x00: Drop unused SPI support

There are no SPI peripherals in neither the IGEPv2 board nor the IGEP COM
Module, so there's no reason to have this enabled in the boards defconfig.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoomap3: igep00x0: Increase malloc() pool size
Javier Martinez Canillas [Sat, 18 May 2024 13:06:12 +0000 (15:06 +0200)]
omap3: igep00x0: Increase malloc() pool size

The IGEPv2 board boot started to fail since the commit afd4f15a39de ("spi:
omap3_spi: Read platform data in ofdata_to_platdata()"). Because this made
the OMAP3 SPI controller driver to allocate its platform data before doing
a relocation, but the igep0x00 config sets this pool size to just 1 KiB.

Increase the pre-relocation malloc heap size to 16 KiB, as is set by other
OMAP3 boards. This not only restores booting but also makes it consistent.

Leave the SPL pool size to the previous 1 KiB size since 16 KiB may not be
a possible size in that constrained environment and is also the value that
is set by other OMAP3 boards.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Enric Balletbo i Serra <eballetbo@gmail.com>
6 months agoandes: Use UCCTLCOMMAND instead of MCCTLCOMMAND
Leo Yu-Chi Liang [Tue, 28 May 2024 12:57:50 +0000 (20:57 +0800)]
andes: Use UCCTLCOMMAND instead of MCCTLCOMMAND

Use CSR_UCCTLCOMMAND instead of CSR_MCCTLCOMMAND
to do cache flush operation in M-mode and S-mode.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoriscv: remove cache enablement in start.S
Leo Yu-Chi Liang [Tue, 28 May 2024 12:49:57 +0000 (20:49 +0800)]
riscv: remove cache enablement in start.S

Cache could be enabled in harts_early_init board-specific hook,
so remove cache enablement in start.S

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoandes: l2 cache driver: fixes typos and cctl status
Leo Yu-Chi Liang [Tue, 28 May 2024 12:49:42 +0000 (20:49 +0800)]
andes: l2 cache driver: fixes typos and cctl status

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoboard: starfive: support Pine64 Star64 board
H Bell [Wed, 22 May 2024 19:12:51 +0000 (19:12 +0000)]
board: starfive: support Pine64 Star64 board

Add documentation files

Signed-off-by: Henry Bell <dmoo_dv@protonmail.com>
Cc: ycliang@andestech.com
Cc: heinrich.schuchardt@canonical.com
Reviewed-by: E Shattow <lucent@gmail.com>
6 months agoboard: starfive: support Pine64 Star64 board
H Bell [Wed, 22 May 2024 19:12:48 +0000 (19:12 +0000)]
board: starfive: support Pine64 Star64 board

Similar to the Milk-V Mars, The Star64 board contains few differences to the
VisionFive 2 boards, so can be part of the same U-boot build.

Signed-off-by: Henry Bell <dmoo_dv@protonmail.com>
Cc: ycliang@andestech.com
Cc: heinrich.schuchardt@canonical.com
Reviewed-by: E Shattow <lucent@gmail.com>
6 months agoboard: microchip: icicle: make both ethernets optional
Conor Dooley [Wed, 15 May 2024 15:04:31 +0000 (16:04 +0100)]
board: microchip: icicle: make both ethernets optional

A given AMP configuration for a board may make either one, or neither
of, the ethernet ports available to U-Boot. The Icicle's init code will
fail if mac1 is not present, so move it to the optional approach taken
for mac0.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoboard: microchip: icicle: correct type for node offset
Conor Dooley [Wed, 15 May 2024 15:04:30 +0000 (16:04 +0100)]
board: microchip: icicle: correct type for node offset

Node offsets returned by libfdt can contain negative error numbers, so
the variable type should be "int". As things stand, if the ethernet
nodes are not found in the early init callback, the if (node < 0) tests
pass and the code errors out while trying to set the local-mac-address
for a non-existent node.

Fixes: 64413e1b7c ("riscv: Add Microchip MPFS Icicle Kit support")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
6 months agoMerge branch '2024-05-29-assorted-small-fixes'
Tom Rini [Wed, 29 May 2024 17:18:09 +0000 (11:18 -0600)]
Merge branch '2024-05-29-assorted-small-fixes'

- A few maintainer updates, bump a python package version, TI K3-AM62P
  fix

6 months agoUpdate maintainer for Versatile Express.
Kristian Amlie [Fri, 24 May 2024 11:57:05 +0000 (13:57 +0200)]
Update maintainer for Versatile Express.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
6 months agorockchip: theobroma: update URLs to point to CHERRY website
Quentin Schulz [Fri, 24 May 2024 11:46:37 +0000 (13:46 +0200)]
rockchip: theobroma: update URLs to point to CHERRY website

Most of the current URLs should be redirected but some aren't already,
so let's anticipate more IT hiccups by migrating to new URLs.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months agomigrate Theobroma Systems mail addresses to CHERRY Embedded Solutions
Quentin Schulz [Fri, 24 May 2024 11:46:36 +0000 (13:46 +0200)]
migrate Theobroma Systems mail addresses to CHERRY Embedded Solutions

See
https://embedded.cherry.de/theobroma-systems-is-now-officially-part-of-cherry-se/

While the mail addresses on the theobroma-systems.com domain should be
redirect to cherry.de, let's anticipate IT hiccups and avoid important
mails not reaching us by swapping the domain name wherever appropriate
for the newer one.

Christoph Mueller isn't working at ~Theobroma~ CHERRY Embedded Solutions
anymore, but I don't know his new mail address so mails destined to him
will keep bouncing.

Cc: Heiko Stuebner <heiko.stuebner@cherry.de> <heiko.stuebner@theobroma-systems.com>
Cc: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de>
Cc: Klaus Goger <klaus.goger@cherry.de>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months ago.mailmap: redirect Philipp Tomsich Theobroma address to Vrull
Quentin Schulz [Fri, 24 May 2024 11:46:35 +0000 (13:46 +0200)]
.mailmap: redirect Philipp Tomsich Theobroma address to Vrull

The Theobroma address bounces as Philipp is not working there anymore,
so let's update with the one that seems to be working right now.

Cc: Philipp Tomsich <philipp.tomsich@vrull.eu>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
6 months agoarm: mach-k3: am62p: Fixup TF-A/OP-TEE reserved-memory node in FDT
Bryan Brattlof [Thu, 23 May 2024 16:43:20 +0000 (11:43 -0500)]
arm: mach-k3: am62p: Fixup TF-A/OP-TEE reserved-memory node in FDT

The address we load TFA and OPTEE is configurable by the
CONFIG_K3_{ATF,OPTEE)_LOAD_ADDR, but the DT node reservations remain
static which can cause some confusion about where exactly these firmware
are exactly. Fix this by updating the reserved-memory{} nodes when the
loaded address does not match the address in DT.

Reported-by: Andrew Davis <afd@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
6 months agoboard: toradex: change maintainer to Francesco
Francesco Dolcini [Wed, 22 May 2024 08:28:48 +0000 (10:28 +0200)]
board: toradex: change maintainer to Francesco

Marcel is leaving Toradex and the email will start bouncing in a few
weeks, move maintainership to myself.

Cc: Marcel Ziswiler <marcel@ziswiler.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 months agoarm: exynos: Map iRAM APM area for Exynos850 SoC
Sam Protsenko [Sat, 25 May 2024 21:53:30 +0000 (16:53 -0500)]
arm: exynos: Map iRAM APM area for Exynos850 SoC

This iRAM APM area is needed for I3C access to PMIC via APM block.
Without this mapping any access to APM iRAM leads to "Synchronous Abort"
exception.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
6 months agoarm: dts: e850-96: Remove not needed bootph-all flags
Sam Protsenko [Sat, 25 May 2024 21:51:38 +0000 (16:51 -0500)]
arm: dts: e850-96: Remove not needed bootph-all flags

Most of the nodes in e850-96 appended device tree that add bootph-all
flags are not necessary. All those nodes are instantiated as
dependencies of other nodes anyway. Remove those nodes to avoid
cluttering the appended dts. 'bdinfo' reports 768 bytes reduction for
"Early malloc usage", and 'dm tree' output doesn't change. Keep only
pmu_system_controller changes, which are actually needed for serial to
work properly.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
6 months agoarm: exynos: Migrate E850-96 board to OF_UPSTREAM
Sam Protsenko [Sat, 25 May 2024 21:18:36 +0000 (16:18 -0500)]
arm: exynos: Migrate E850-96 board to OF_UPSTREAM

Use upstream device tree files and bindings. To do so:
 - imply (enable) OF_UPSTREAM option for E850-96 target
 - point DEFAULT_DEVICE_TREE in E850-96 config to upstream dts
 - remove now not needed local dts files, binding docs and headers
 - update MAINTAINERS and board/samsung/e850-96/MAINTAINERS
   correspondingly

Upstream device tree files for Exynos850 SoC and E850-96 board are
pretty much the same as local (removed) ones, so the conversion is
rather straightforward and painless in this case. The appended dts file
(arch/arm/dts/exynos850-e850-96-u-boot.dtsi) stays unchanged.

The only remaining local dt-bindings doc for E850-96 board is
exynos-pmu.yaml. It wasn't removed as it's quite different from Linux
kernel version. Particularly U-Boot local version of exynos-pmu.yaml
describes "samsung,uart-debug-1" property, which is not present in Linux
kernel binding. Later it might be upstreamed to Linux kernel, and once
it's done the U-Boot exynos-pmu.yaml binding can be removed.

No functional change.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
6 months agoMerge tag 'tpm-master-27052024' of https://source.denx.de/u-boot/custodians/u-boot-tpm
Tom Rini [Mon, 27 May 2024 14:56:02 +0000 (08:56 -0600)]
Merge tag 'tpm-master-27052024' of https://source.denx.de/u-boot/custodians/u-boot-tpm

TPM fixes

6 months agotpm-v2: allow algorithm name to be configured for pcr_read and pcr_extend
Tim Harvey [Sat, 25 May 2024 20:00:49 +0000 (13:00 -0700)]
tpm-v2: allow algorithm name to be configured for pcr_read and pcr_extend

For pcr_read and pcr_extend commands allow the digest algorithm to be
specified by an additional argument. If not specified it will default to
SHA256 for backwards compatibility.

Additionally update test_tpm2.py for the changes in output in pcr_read
which now shows the algo and algo length in the output.

A follow-on to this could be to extend all PCR banks with the detected
algo when the <digest_algo> argument is 'auto'.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 months agotpm-v2: add support for mapping algorithm names to algos
Tim Harvey [Sat, 25 May 2024 20:00:48 +0000 (13:00 -0700)]
tpm-v2: add support for mapping algorithm names to algos

replace tpm2_supported_algorithms with an array of structures
relating algorithm names, to TCG id's, digest length and mask values.

While at it fix the tpm2_algorithm_to_mask to return the proper value.

Cc: Eddie James <eajames@linux.ibm.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Fixes: 97707f12fdab ("tpm: Support boot measurements")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
6 months agotpm: display warning if using gpio reset with TPM
Tim Harvey [Wed, 15 May 2024 23:21:38 +0000 (16:21 -0700)]
tpm: display warning if using gpio reset with TPM

Instead of displaying what looks like an error message if a
gpio-reset dt prop is missing for a TPM display a warning that
having a gpio reset on a TPM should not be used for a secure production
device.

TCG TIS spec [1] says:
"The TPM_Init (LRESET#/SPI_RST#) signal MUST be connected to the
platform CPU Reset signal such that it complies with the requirements
specified in section 1.2.7 HOST Platform Reset in the PC Client
Implementation Specification for Conventional BIOS."

The reasoning is that you should not be able to toggle a GPIO and reset
the TPM without resetting the CPU as well because if an attacker can
break into your OS via an OS level security flaw they can then reset the
TPM via GPIO and replay the measurements required to unseal keys
that you have otherwise protected.

Additionally restructure the code for improved readability allowing for
removal of the init label.

Before:
 - board with no reset gpio
u-boot=> tpm init && tpm info
tpm_tis_spi_probe: missing reset GPIO
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]
 - board with a reset gpio
u-boot=> tpm init && tpm info
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]

After:
 - board with no reset gpio
u-boot=> tpm init && tpm info
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]
 - board with a reset gpio
u-boot=> tpm init && tpm info
tpm@1: TPM gpio reset should not be used on secure production devices
tpm@1 v2.0: VendorID 0x1114, DeviceID 0x3205, RevisionID 0x01 [open]

[1] https://trustedcomputinggroup.org/wp-content/uploads/TCG_PCClientTPMInterfaceSpecification_TIS__1-3_27_03212013.pdf

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 months agoMerge tag 'u-boot-rockchip-20240525' of https://source.denx.de/u-boot/custodians...
Tom Rini [Sat, 25 May 2024 14:01:20 +0000 (08:01 -0600)]
Merge tag 'u-boot-rockchip-20240525' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/20844

- new board: rk3566 Powkiddy X55, rk3588s Indiedroid Nova;
- rv1126 migrate to OF_UPSTREAM;
- Fix for px30 ringneck board;
- Fix for rk3588 SPLL clock init;

7 months agoboard: rockchip: Add Indiedroid Nova
Chris Morgan [Fri, 24 May 2024 16:48:00 +0000 (11:48 -0500)]
board: rockchip: Add Indiedroid Nova

The Indiedroid Nova is a Rockchip RK3588S based SBC from Indiedroid.

Specifications:

    Rockchip RK3588S SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    4/8/16GB memory LPDDR4x
    Mali G610MC4 GPU
    Optional eMMC
    2x USB 2.0, 2x USB 3.0, 1x USB 3.0 C port with DP Alt
    1x MIPI-CSI Port (4-lane or 2x 2-lane)
    1x MIPI-DSI 4-lane connector
    1x Micro HDMI 2.1 output, 1x DP 1.4 output
    Gigabit Ethernet
    Realtek RTL8821CS WiFi
    4 pin debug UART connector
    40 pin GPIO header
    Size: 85mm x 56mm (Raspberry Pi Form Factor)

Kernel commit:
3900160e164b ("arm64: dts: rockchip: Add Indiedroid Nova board")

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
7 months agoboard: rockchip: add Powkiddy X55
Chris Morgan [Tue, 21 May 2024 15:25:33 +0000 (10:25 -0500)]
board: rockchip: add Powkiddy X55

The Powkiddy X55 is a Rockchip RK3566 based handheld gaming device.
UART, ADC, eMMC, and SDMMC are tested to work in U-Boot and this
successfully boots mainline Linux.

Kernel commit:
e99adc97e21a ("arm64: dts: rockchip: Add Powkiddy X55")

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
7 months agorockchip: ringneck_px30: Use common bss and stack addresses
Quentin Schulz [Thu, 23 May 2024 16:59:36 +0000 (18:59 +0200)]
rockchip: ringneck_px30: Use common bss and stack addresses

U-Boot proper pre-reloc is currently running out of memory and it is
thus impossible to boot into U-Boot CLI.

Fix this by migrating to the common bss and stack addresses for PX30,
which drastically increases the size of the pre-reloc allocation pool (8
times bigger now). The memory layout in SPL and U-Boot proper now
match the other SoCs' using ROCKCHIP_COMMON_STACK_ADDR.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
7 months agorockchip: Use common bss and stack addresses on PX30
Quentin Schulz [Thu, 23 May 2024 16:59:35 +0000 (18:59 +0200)]
rockchip: Use common bss and stack addresses on PX30

See commit 008ba0d56d00 ("rockchip: Add common default bss and stack
addresses") for memory layout. This migrates PX30 to use the new layout,
except for TPL. Indeed, PX30 is extremely limited in SRAM, so we need to
be extra careful about what goes into the TPL and how much we can
allocate there, so let's keep the current value for
TPL_SYS_MALLOC_F_LEN (already present in the PX30-specific Kconfig, from
an earlier commit).

This will allow us to use the same memory layout on one more Rockchip
SoC, which is always a nice thing. Additionally, this will make it
easier to fix U-Boot proper pre-reloc running out of memory on PX30 in a
subsequent commit.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
7 months agorockchip: px30: default TPL_SYS_MALLOC_F_LEN to 0x600 on PX30 Kconfig level
Quentin Schulz [Thu, 23 May 2024 16:59:34 +0000 (18:59 +0200)]
rockchip: px30: default TPL_SYS_MALLOC_F_LEN to 0x600 on PX30 Kconfig level

This is the kind of setting that typically doesn't need to be changed
between boards based on the same SoC, so let's make it the default in
PX30 Kconfig so we don't have to care about it in the defconfig if we
don't want to.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
7 months agoclk: rockchip: rk3588: Set SPLL frequency during SPL stage
Heiko Stuebner [Wed, 22 May 2024 17:31:29 +0000 (19:31 +0200)]
clk: rockchip: rk3588: Set SPLL frequency during SPL stage

All parts expect the SPLL to run at 702MHz. In U-Boot it's the SPLL_HZ
declaring this rate and in the kernel it's a fixed clock definition.

While everything is expecting 702MHz, the SPLL is not running that
frequency when coming from the bootrom though, instead it's running
at 351MHz and the vendor-u-boot just sets it to the expected frequency.

The SPLL itself is located inside the secure-BUSCRU and in theory
accessible as an SCMI clock, though this requires an unknown amount
of cooperation from trusted-firmware to set at a later stage, though
during the SPL stage we can still access the relevant CRU directly.

The SPLL is for example necessary for the DSI controllers to produce
output.

As the SPLL is "just" another rk3588 pll, just set the desired rate
directly during the SPL stage.

Tested on rk3588-rock5b and rk3588-tiger by reading back the PLL rate
and also observing working DSI output with this change.

Fixes: 6737771600d4 ("rockchip: rk3588: Add support for sdmmc clocks in SPL")
Suggested-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
7 months agorockchip: rv1126: Migrate to OF_UPSTREAM
Anand Moon [Tue, 14 May 2024 04:05:22 +0000 (09:35 +0530)]
rockchip: rv1126: Migrate to OF_UPSTREAM

Migrate RV1126 boards that exists in Linux v6.8 to use OF_UPSTREAM.

Following targets is migrated to use OF_UPSTREAM:

- rv1126-edgeble-neu2 : Board is an industrial form factor
                        IO board.
- sonoff-ihost-rv1126 : Gateway device designed to provide a
                        Smart Home Hub.

Cc: Tim Lunn <tim@feathertop.org>
Cc: Jagan Teki <jagan@edgeble.ai>
Reviewed-By: Tim Lunn <tim@feathertop.org>
Tested-By: Tim Lunn <tim@feathertop.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Anand Moon <anand@edgeble.ai>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
7 months agorockchip: rv1108: Remove unneeded local rv1108-cru.h
Fabio Estevam [Thu, 9 May 2024 16:42:25 +0000 (13:42 -0300)]
rockchip: rv1108: Remove unneeded local rv1108-cru.h

After the conversion of RV1108 to OF_UPSTREAM,
include/dt-bindings/clock/rv1108-cru.h is no longer needed because
there is dts/upstream/include/dt-bindings/clock/rv1108-cru.h from
upstream Linux.

Remove the unneeded rv1108-cru.h file.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
7 months agoPrepare v2024.07-rc3
Tom Rini [Mon, 20 May 2024 16:05:16 +0000 (10:05 -0600)]
Prepare v2024.07-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
7 months agoRevert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
Tom Rini [Sun, 19 May 2024 02:20:43 +0000 (20:20 -0600)]
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""

When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.

This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.

Reported-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 months agoInit virtio before loading ENV from EXT4 or FAT
Fiona Klute [Wed, 1 May 2024 08:54:09 +0000 (10:54 +0200)]
Init virtio before loading ENV from EXT4 or FAT

Specifying a file in an EXT4 or FAT partition on a virtio device as
environment location failed because virtio hadn't been initialized by
the time the environment was loaded. This patch mirrors commit
54ee5ae84191 ("Add SCSI scan for ENV in EXT4 or FAT") in issue and
fix, just for a different kind of block device.

The additional include in include/virtio.h is needed so all functions
called there are defined, the alternative would have been to include
dm/device.h separately in the env/ sources.

Checkpatch suggests using "if (IS_ENABLED(CONFIG...))" instead of
"#if defined(CONFIG_...)", I'm sticking to the style of the existing
code here.

Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
CC: Joe Hershberger <joe.hershberger@ni.com>
CC: Bin Meng <bmeng.cn@gmail.com>
CC: Rogier Stam <rogier@unrailed.org>
7 months agoMerge tag 'u-boot-dfu-20240516' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Thu, 16 May 2024 15:52:24 +0000 (09:52 -0600)]
Merge tag 'u-boot-dfu-20240516' of https://source.denx.de/u-boot/custodians/u-boot-dfu

u-boot-dfu-20240516

- Fix cdns3 low power hang via fast access bit
- Multiple dwc3 gadget fixes, mainly for USB support on TI AM6232
- Consistent USB_GADGET_MANUFACTURER for PHYTEC boards
- MAINTAINERS file update for u-boot-dfu

7 months agoMAINTAINERS: add USB gadget regex to u-boot-dfu tree
Mattijs Korpershoek [Thu, 16 May 2024 09:15:42 +0000 (11:15 +0200)]
MAINTAINERS: add USB gadget regex to u-boot-dfu tree

We try to split work with Marek on USB as following:
- Mattijs handles USB gadget
- Marek handles the rest of USB

Add additional gadget patterns to the maintainers file so that I
get cc'ed more often on USB gadget patches.

Acked-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20240516-gadget-maintainer-v2-2-23cc916df434@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agoMAINTAINERS: add tree link for fastboot
Mattijs Korpershoek [Thu, 16 May 2024 09:15:41 +0000 (11:15 +0200)]
MAINTAINERS: add tree link for fastboot

Fastboot patches go through the u-boot-dfu tree.

Add a link in the maintainers file for it.

Link: https://lore.kernel.org/r/20240516-gadget-maintainer-v2-1-23cc916df434@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agousb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End Transfer
Thinh Nguyen [Fri, 12 Apr 2024 20:26:06 +0000 (22:26 +0200)]
usb: dwc3: gadget: Disable GUSB2PHYCFG.SUSPHY for End Transfer

Upstream Linux commit 3aa07f72894d.

If there's a disconnection while operating in eSS, there may be a delay
in VBUS drop response from the connector. In that case, the internal
link state may drop to operate in usb2 speed while the controller thinks
the VBUS is still high. The driver must make sure to disable
GUSB2PHYCFG.SUSPHY when sending endpoint command while in usb2 speed.
The End Transfer command may be called, and only that command needs to
go through at this point. Let's keep it simple and unconditionally
disable GUSB2PHYCFG.SUSPHY whenever we issue the command.

This scenario is not seen in real hardware. In a rare case, our
prototype type-c controller/interface may have a slow response
triggerring this issue.

Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/5651117207803c26e2f22ddf4e5ce9e865dcf7c7.1668045468.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240412202611.3565052-7-alexander.sverdlin@siemens.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agousb: dwc3: gadget: properly check ep cmd
Felipe Balbi [Fri, 12 Apr 2024 20:26:05 +0000 (22:26 +0200)]
usb: dwc3: gadget: properly check ep cmd

Upstream Linux commit 5999914f227b.

The cmd argument we pass to
dwc3_send_gadget_ep_cmd() could contain extra
arguments embedded. When checking for StartTransfer
command, we need to make sure to match only lower 4
bits which contain the actual command and ignore the
rest.

Reported-by: Janusz Dziedzic <januszx.dziedzic@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
[A. Sverdlin: cherry-picked only DWC3_DEPCMD_CMD() define]
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240412202611.3565052-6-alexander.sverdlin@siemens.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agousb: dwc3: gadget: Check ENBLSLPM before sending ep command
Thinh Nguyen [Fri, 12 Apr 2024 20:26:04 +0000 (22:26 +0200)]
usb: dwc3: gadget: Check ENBLSLPM before sending ep command

Upstream Linux commit 87dd96111b0b.

When operating in USB 2.0 speeds (HS/FS), if GUSB2PHYCFG.ENBLSLPM or
GUSB2PHYCFG.SUSPHY is set, it must be cleared before issuing an endpoint
command.

Current implementation only save and restore GUSB2PHYCFG.SUSPHY
configuration. We must save and clear both GUSB2PHYCFG.ENBLSLPM and
GUSB2PHYCFG.SUSPHY settings. Restore them after the command is
completed.

DWC_usb3 3.30a and DWC_usb31 1.90a programming guide section 3.2.2

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240412202611.3565052-5-alexander.sverdlin@siemens.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agousb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED
Felipe Balbi [Fri, 12 Apr 2024 20:26:03 +0000 (22:26 +0200)]
usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED

Upstream Linux commit ab2a92e7a608.

As a micro-power optimization, let's only resume the
USB2 PHY if we're working on <=HIGHSPEED. If we're
gonna work on SUPERSPEED or SUPERSPEED+, there's no
point in resuming the USB2 PHY.

Fixes: 2b0f11df84bb ("usb: dwc3: gadget: clear SUSPHY bit before ep cmds")
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240412202611.3565052-4-alexander.sverdlin@siemens.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agousb: dwc3: gadget: clear SUSPHY bit before ep cmds
Felipe Balbi [Fri, 12 Apr 2024 20:26:02 +0000 (22:26 +0200)]
usb: dwc3: gadget: clear SUSPHY bit before ep cmds

Upstream Linux commit 2b0f11df84bb.

Synopsys Databook 2.60a has a note that if we're
sending an endpoint command we _must_ make sure that
DWC3_GUSB2PHY(n).SUSPHY bit is cleared.

This patch implements that particular detail.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240412202611.3565052-3-alexander.sverdlin@siemens.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agousb: dwc3: gadget: combine return points into a single one
Felipe Balbi [Fri, 12 Apr 2024 20:26:01 +0000 (22:26 +0200)]
usb: dwc3: gadget: combine return points into a single one

Upstream Linux commit c0ca324d09a0.

dwc3_send_gadget_ep_cmd() had three return
points. That becomes a pain to track when we need to
debug something or if we need to add more code
before returning.

Let's combine all three return points into a single
one just by introducing a local 'ret' variable.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240412202611.3565052-2-alexander.sverdlin@siemens.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
7 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Tue, 14 May 2024 13:45:49 +0000 (07:45 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/20690

- RISC-V: Add NULL check after parsing compatible string
- Board: Add Milk-V Mars CM board
- Andes: Unify naming policy