]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agosh4: move reset_cpu() from watchdog.c to cpu.c
Rasmus Villemoes [Tue, 28 May 2024 11:13:22 +0000 (13:13 +0200)] 
sh4: move reset_cpu() from watchdog.c to cpu.c

The next patch will remove all the other code from watchdog.c, which
would leave just this function in there. It seems just as natural for
this function to be defined in cpu.c, allowing us to delete watchdog.c
completely.

Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoserial: ns16550: fix comment to mention schedule instead of watchdog_reset
Rasmus Villemoes [Tue, 28 May 2024 11:13:21 +0000 (13:13 +0200)] 
serial: ns16550: fix comment to mention schedule instead of watchdog_reset

watchdog_reset() is no more. Make the comments match the code and
today's reality.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agowdt-uclass: watchdog_reset cleanup
Rasmus Villemoes [Tue, 28 May 2024 11:13:20 +0000 (13:13 +0200)] 
wdt-uclass: watchdog_reset cleanup

watchdog_reset() is no longer called from anywhere, so we do not need
to define a dummy no-op function. Remove that definition, and update
references to say schedule() instead.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agom68k: remove dead code
Rasmus Villemoes [Tue, 28 May 2024 11:13:19 +0000 (13:13 +0200)] 
m68k: remove dead code

There are no calls of "watchdog_reset()" anymore anywhere in the tree
since the WATCHDOG_RESET macro got removed in 942d07df0e79 ("watchdog:
Remove WATCHDOG_RESET macro").

The only places the identifiers watchdog_disable and watchdog_init are
called are in arch/arm/mach-omap2/, so those can obviously not refer
to these instances.

Hence these functions are not actually used at all and can be
removed. As a bonus, this also removes two leftover references to
WATCHDOG_RESET.

Cc: Huan Wang <alison.wang@nxp.com>
Cc: Angelo Dureghello <angelo@kernel-space.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agocyclic: make clients embed a struct cyclic_info in their own data structure
Rasmus Villemoes [Tue, 21 May 2024 08:46:52 +0000 (10:46 +0200)] 
cyclic: make clients embed a struct cyclic_info in their own data structure

There are of course not a whole lot of examples in-tree yet, but
before they appear, let's make this API change: Instead of separately
allocating a 'struct cyclic_info', make the users embed such an
instance in their own structure, and make the convention that the
callback simply receives the 'struct cyclic_info *', from which the
clients can get their own data using the container_of() macro.

This has a number of advantages.

First, it means cyclic_register() simply cannot fail, simplifying the
code. The necessary storage will simply be allocated automatically
when the client's own structure is allocated (often via
uclass_priv_auto or similar).

Second, code for which CONFIG_CYCLIC is just an option can more easily
be written without #ifdefs, if we just provide an empty struct
cyclic_info {}. For example, the nested CONFIG_IS_ENABLED()s in
https://lore.kernel.org/u-boot/20240316201416.211480-1-marek.vasut+renesas@mailbox.org/
are mostly due to the existence of the 'struct cyclic_info *' member
being guarded by #ifdef CONFIG_CYCLIC.

And we do probably want to avoid the extra memory overhead of that
member when !CONFIG_CYCLIC. But that is automatic if, instead of a
'struct cyclic_info *', one simply embeds a 'struct cyclic_info',
which will have size 0 when !CONFIG_CYCLIC. Also, the no-op
cyclic_register() function can just unconditionally be called, and the
compiler will see that (1) the callback is referenced, so not emit a
warning for a maybe-unused function and (2) see that it can actually
never be reached, so not emit any code for it.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2 years agowdt-uclass: prevent multiple cyclic_register calls
Rasmus Villemoes [Tue, 21 May 2024 08:46:51 +0000 (10:46 +0200)] 
wdt-uclass: prevent multiple cyclic_register calls

Currently, the cyclic_register() done in wdt_start() is not undone in
wdt_stop(). Moreover, calling wdt_start multiple times (which is
perfectly allowed on an already started device, e.g. to change the
timeout value) will result in another struct cyclic_info being
registered, referring to the same watchdog device.

This can easily be seen on e.g. a wandboard:

=> cyclic list
function: watchdog@20bc000, cpu-time: 22 us, frequency: 1.01 times/s
=> wdt list
watchdog@20bc000 (imx_wdt)
=> wdt dev watchdog@20bc000
=> wdt start 50000
WDT:   Started watchdog@20bc000 with servicing every 1000ms (50s timeout)
=> cyclic list
function: watchdog@20bc000, cpu-time: 37 us, frequency: 1.03 times/s
function: watchdog@20bc000, cpu-time: 241 us, frequency: 1.01 times/s
=> wdt start 12345
WDT:   Started watchdog@20bc000 with servicing every 1000ms (12s timeout)
=> cyclic list
function: watchdog@20bc000, cpu-time: 36 us, frequency: 1.03 times/s
function: watchdog@20bc000, cpu-time: 100 us, frequency: 1.04 times/s
function: watchdog@20bc000, cpu-time: 299 us, frequency: 1.00 times/s

So properly unregister the watchdog device from the cyclic framework
in wdt_stop(). In wdt_start(), we cannot just skip the registration,
as the (new) timeout value may mean that we have to ask the cyclic
framework to call us more often. So if we're already running,
first unregister the old cyclic instance.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2 years agocyclic: stop strdup'ing name in cyclic_register()
Rasmus Villemoes [Tue, 21 May 2024 08:46:50 +0000 (10:46 +0200)] 
cyclic: stop strdup'ing name in cyclic_register()

We are not checking the return value of strdup(), nor
freeing the string in cyclic_unregister().

However, all current users either pass a string literal or the
dev->name of the client device. So in all cases the name string will
live at least as long as the cyclic_info is registered, so just make
that a requirement.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years agocmd: move ELF load and boot to lib/elf.c
Maxim Moskalets [Wed, 5 Jun 2024 18:43:34 +0000 (21:43 +0300)] 
cmd: move ELF load and boot to lib/elf.c

Loading and running the ELF image is the responsibility of the
library and should not be associated with the command line interface.

It is also required to run ELF images from FIT with the bootm command
so as not to depend on the command line interface.

Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
2 years agofs/erofs: fix an overflow issue of unmapped extents
Jianan Huang [Wed, 5 Jun 2024 14:05:54 +0000 (14:05 +0000)] 
fs/erofs: fix an overflow issue of unmapped extents

Here the size should be `length - skip`, otherwise it could cause
the destination buffer overflow.

Reported-by: jianqiang wang <wjq.sec@gmail.com>
Fixes: 65cb73057b65 ("fs/erofs: add lz4 decompression support")
Signed-off-by: Jianan Huang <jnhuang95@gmail.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2 years agoarm: dts: k3-am625-verdin: add combined binaries
Andrejs Cainikovs [Wed, 5 Jun 2024 09:10:57 +0000 (11:10 +0200)] 
arm: dts: k3-am625-verdin: add combined binaries

Add combined binaries for all Verdin AM62 variants.
These binaries can be used to flash the U-Boot via single
binary instead of few as it is done at the moment.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2 years agoMerge patch series "introduce basic support for TI's am625-lp-sk"
Tom Rini [Fri, 14 Jun 2024 16:42:50 +0000 (10:42 -0600)] 
Merge patch series "introduce basic support for TI's am625-lp-sk"

Bryan Brattlof <bb@ti.com> says:

Hello Again Everyone!

The am625-lp-sk is a variant of the am625-sk showcasing the low-power
features of the am625 SoC Family. Because it's essentially a board and
package spin of the am625-sk I've inherited the am625 configuration and
overridden what was needed.

This is a new spin of Nitin's original work which has been updated
significantly since October 2023

  https://lore.kernel.org/u-boot/20231030110138.1347603-1-n-yadav@ti.com/

For those of us interested here is proof of life using buildroot:

   https://paste.sr.ht/~bryanb/40f7787f7760bee383aa8fbc342a29e8544dbdab

This also works around a buildman issue not following #include
directives. To get around this I've redefined the variables it's looking
for inside the lp-sk defconfig to keep it happy for now. I made a pull
request on github and everything seems like it's happy

   https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8634&view=results

2 years agoMerge patch series "binman: am62a/62p: add support for signing TIFSStub"
Tom Rini [Fri, 14 Jun 2024 16:42:35 +0000 (10:42 -0600)] 
Merge patch series "binman: am62a/62p: add support for signing TIFSStub"

Dhruva Gole <d-gole@ti.com> says:

Add support for signing of TIFSSTUB images for HSSE, HSFS and GP devices
and include them in tispl.bin and tispl.bin_unsigned in AM62A.

AM62P doesn't have any GP support, hence not applicable.

These changes are required for Low Power Mode features to work on these
SoCs as this TIFS Stub gets used in the Low Power Exit sequences.

Boot tested on both platforms that are being touched:

[0] AM62A, [1] AM62P

[0] https://gist.github.com/DhruvaG2000/d5f2a46818d8025a540efe9289feacb4
[1] https://gist.github.com/DhruvaG2000/ce29f6e9315a78d3e9e5810f55f17f43

2 years agoMerge patch series "arm: dts: am625/am62a7: Switch over to OF_UPSTREAM"
Tom Rini [Fri, 14 Jun 2024 16:40:26 +0000 (10:40 -0600)] 
Merge patch series "arm: dts: am625/am62a7: Switch over to OF_UPSTREAM"

Nishanth Menon <nm@ti.com> says:

Cleanup am625 on by switching over the last two platforms (SK and
beagleplay) over to OF_UPSTREAM, and while at it, switch over am62a7
(last of the am62* family) over as well.

This superscedes the previous version of beagleplay only patch[1]

Test logs: https://gist.github.com/nmenon/ba310d3750a80789aca6a4fd90190135

2 years agoarm: dts: k3: binman: am62p: add support for signing TIFSStub images
Dhruva Gole [Fri, 7 Jun 2024 08:56:41 +0000 (14:26 +0530)] 
arm: dts: k3: binman: am62p: add support for signing TIFSStub images

Adds TIFS stub binaries, this is required for deepsleep functionality.

This implements the same change as commit 128f81290b7d ("arm: dts: k3:
binman: am625: add support for signing TIFSSTUB Images") did for TI AM62
SK board.

Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
2 years agoMerge patch series "efi_loader: select BLK not depends on BLK"
Tom Rini [Fri, 14 Jun 2024 16:39:40 +0000 (10:39 -0600)] 
Merge patch series "efi_loader: select BLK not depends on BLK"

Tom Rini <trini@konsulko.com> says:

Rework how the BLK symbol is used now that so much DM migration has been
completed.

2 years agoarm: dts: k3: binman: am62a: add support for signing TIFSStub Images
Dhruva Gole [Fri, 7 Jun 2024 08:56:40 +0000 (14:26 +0530)] 
arm: dts: k3: binman: am62a: add support for signing TIFSStub Images

Add support for signing of TIFSSTUB images for HSSE, HSFS and GP devices
and include them in tispl.bin and tispl.bin_unsigned.

This implements the same change as commit 128f81290b7d ("arm: dts: k3:
binman: am625: add support for signing TIFSSTUB Images") did for TI AM62
SK board.

Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
2 years agoMerge patch series "binman: ti: create binman nodes for EFI capsules"
Tom Rini [Fri, 14 Jun 2024 14:59:01 +0000 (08:59 -0600)] 
Merge patch series "binman: ti: create binman nodes for EFI capsules"

Jonathan Humphreys <j-humphreys@ti.com> says:

Add binman nodes for EFI capsules of firmware components so that capsules
are automatically created during the UBoot builds.

This is enabled for several TI SoC based platforms: AM64, AM62, AM62p,
BeaglePlay, AM69, J7, and BeagleboneAI.

2 years agodts: j784s4: binman: Include firmware capsules binman nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:10 +0000 (17:51 -0500)] 
dts: j784s4: binman: Include firmware capsules binman nodes

Fill in the AM69 SK's capsule GUID properties of the base binman
capsule nodes.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agodts: beagleboneai64: binman: Include firmware capsules binman nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:09 +0000 (17:51 -0500)] 
dts: beagleboneai64: binman: Include firmware capsules binman nodes

Fill in the BeagleBoneAI64's capsule GUID properties of the base binman
capsule nodes. Also add it's SYSFW binman capsule node.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agodts: am62x: binman: Include firmware capsules binman nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:08 +0000 (17:51 -0500)] 
dts: am62x: binman: Include firmware capsules binman nodes

Fill in the am62x SK's capsule GUID properties of the base binman capsule
nodes.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agodts: am62px: binman: Include firmware capsules binman nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:07 +0000 (17:51 -0500)] 
dts: am62px: binman: Include firmware capsules binman nodes

Fill in the am62px SK's capsule GUID properties of the base binman capsule
nodes.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agodts: beagleplay: binman: Include firmware capsules binman nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:06 +0000 (17:51 -0500)] 
dts: beagleplay: binman: Include firmware capsules binman nodes

Fill in the BeaglePlay's capsule GUID properties of the base binman capsule
nodes.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agodts: j721e: binman: Include firmware capsules binman nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:05 +0000 (17:51 -0500)] 
dts: j721e: binman: Include firmware capsules binman nodes

Fill in the J721e SK's capsule GUID properties of the base binman capsule
nodes.
Also add it's SYSFW binman capsule node.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agodts: am64x: binman: Include firmware capsules binman nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:04 +0000 (17:51 -0500)] 
dts: am64x: binman: Include firmware capsules binman nodes

Fill in the am64x SK's capsule GUID properties of the base binman capsule
nodes.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agodts: ti: binman: Add base K3 firmware capsule nodes
Jonathan Humphreys [Fri, 31 May 2024 22:51:03 +0000 (17:51 -0500)] 
dts: ti: binman: Add base K3 firmware capsule nodes

Create capsule files for tiboot3.bin, tispl.bin, and u-boot.img.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agotools: Build mkeficapsule tool by default if EFI_LOADER is set
Jonathan Humphreys [Fri, 31 May 2024 22:51:02 +0000 (17:51 -0500)] 
tools: Build mkeficapsule tool by default if EFI_LOADER is set

Trigger the building of the mkeficapsule tool if EFI_LOADER is enabled.
Previously it was triggered on EFI_CAPSULE_ON_DISK, but mkeficapsule is
needed when a capsule is being generated for a bootloader stage, not just
from the stage applying them. EFI_LOADER is a more accurate approximation
of when a capsule may need to be generated.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agoconfigs: add defconfigs for the am625-lp-sk
Bryan Brattlof [Fri, 7 Jun 2024 22:06:13 +0000 (17:06 -0500)] 
configs: add defconfigs for the am625-lp-sk

The am62x-lp-sk is a package and reference board spin of the am62x-sk to
showcase the low-power features of the am62x SoC family. Because it so
closely resembles the am62x-sk board, use the preprocessor to inherit
its configuration making the needed changes for this board where
necessary.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2 years agoarm: dts: add U-Boot dtbs for the am625-lp-sk
Nitin Yadav [Fri, 7 Jun 2024 22:06:12 +0000 (17:06 -0500)] 
arm: dts: add U-Boot dtbs for the am625-lp-sk

Add the U-Boot device tree overrides for the am62x-lp-sk reference
board.

Signed-off-by: Nitin Yadav <n-yadav@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Bryan Brattlof <bb@ti.com>
2 years agoarm: dts: am62a7_sk: Switch to OF_UPSTREAM
Nishanth Menon [Wed, 5 Jun 2024 15:27:52 +0000 (10:27 -0500)] 
arm: dts: am62a7_sk: Switch to OF_UPSTREAM

Enable OF_UPSTREAM for am62a7-sk board. Remove DT files that
are now available in dts/upstream. Update the appended files based on
version of latest OF_UPSTREAM sync point (v6.10-rc1).

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
2 years agoarm: dts: am625_sk: Switch to OF_UPSTREAM
Nishanth Menon [Wed, 5 Jun 2024 15:27:51 +0000 (10:27 -0500)] 
arm: dts: am625_sk: Switch to OF_UPSTREAM

Enable OF_UPSTREAM for am625-sk board. Remove DT files that
are now available in dts/upstream. Update the appended files based on
version of latest OF_UPSTREAM sync point (v6.10-rc1).

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
2 years agoarm: dts: am625_beagleplay: Switch to OF_UPSTREAM
Nishanth Menon [Wed, 5 Jun 2024 15:27:50 +0000 (10:27 -0500)] 
arm: dts: am625_beagleplay: Switch to OF_UPSTREAM

Enable OF_UPSTREAM for AM625-beagleplay board. Remove DT files that
are now available in dts/upstream. Update the appended files based on
version of latest OF_UPSTREAM sync point (v6.10-rc1).

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
2 years agoblock: Update BLK to be def_bool
Tom Rini [Wed, 5 Jun 2024 01:37:42 +0000 (19:37 -0600)] 
block: Update BLK to be def_bool

At this point in the DM migration, all platforms enable DM. BLK requires
DM. Make BLK "def_bool y" in the cases it had been "default y" to make
this clearer. Now remove the symbol requirement from other places as it
is redundant here.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agospl: nvme: Make this depend on SPL_BLK
Tom Rini [Wed, 5 Jun 2024 01:37:41 +0000 (19:37 -0600)] 
spl: nvme: Make this depend on SPL_BLK

As this is an SPL related driver, and in SPL enabling SPL_BLK is
optional, make this depend on the correct symbol.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoefi_loader: select BLK not depends on BLK
Tom Rini [Wed, 5 Jun 2024 01:37:40 +0000 (19:37 -0600)] 
efi_loader: select BLK not depends on BLK

The BLK symbol is used both for "we have a block device subsystem
enabled" and "we need to utilize the block device library functions". In
the case of efi_loader, it is the case of "we need to utilize the block
device library", so select rather than depends on it. In turn, also
disable EFI_LOADER on platforms which did not have it on previously due
to a lack of block devices. They can enable it themselves if desired.

Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years 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.

2 years 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>
2 years 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

2 years 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>
2 years 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>
2 years 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>
2 years agorockchip: puma-rk3399: get closer to other Theobroma defconfigs
Quentin Schulz [Wed, 12 Jun 2024 14:40:49 +0000 (16:40 +0200)] 
rockchip: puma-rk3399: get closer to other Theobroma defconfigs

Disable support for unused OSes as Linux is the primary target.

Disable support for bootz as zImage isn't a format compatible with
Aarch64 machines so it should never be attempted to be booted.

Enable a bunch of commands:
 - erofs
 - gpio
 - squashfs

that could be useful and are also found in Jaguar and Tiger defconfigs.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: ringneck-px30: get closer to other Theobroma defconfigs
Quentin Schulz [Wed, 12 Jun 2024 14:40:48 +0000 (16:40 +0200)] 
rockchip: ringneck-px30: get closer to other Theobroma defconfigs

RK3588 Jaguar and Tiger, and RK3399 Puma use standard boot with the full
feature set, so let's do that as well for PX30 Ringneck.

Disable support for unused OSes as Linux is the primary target.

Enable a bunch of commands:
 - boot/bootd
 - erofs
 - gpio
 - iminfo
 - imxtract
 - itest
 - pmic
 - regulator
 - sleep
 - squashfs

that could be useful and are also found in Jaguar and Tiger defconfigs.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: add support for Theobroma Systems SOM-RK3588-Q7 Tiger module
Quentin Schulz [Mon, 10 Jun 2024 13:13:38 +0000 (15:13 +0200)] 
rockchip: add support for Theobroma Systems SOM-RK3588-Q7 Tiger module

The RK3588-Q7 SoM is a Qseven-compatible (70mm x 70mm, MXM-230
connector) system-on-module from Theobroma Systems, featuring the
Rockchip RK3588.

It provides the following feature set:
 * up to 16GB LPDDR4x
 * on-module eMMC
 * SD card (on a baseboard) via edge connector
 * Gigabit Ethernet with on-module GbE PHY
 * HDMI/eDP
 * MIPI-DSI
 * 4x MIPI-CSI (3x on FPC connectors, 1x over Q7)
 * HDMI input over FPC connector
 * CAN
 * USB
   - 1x USB 3.0 dual-role (direct connection)
   - 2x USB 3.0 host + 1x USB 2.0 host
 * PCIe
   - 1x PCIe 2.1 Gen3, 4 lanes
   - 2xSATA / 2x PCIe 2.1 Gen1, 2 lanes
 * on-module ATtiny816 companion controller, implementing:
   - low-power RTC functionality (ISL1208 emulation)
   - fan controller (AMC6821 emulation)
 * on-module Secure Element with Global Platform 2.2.1 compliant
   JavaCard environment

The support is added for Tiger on Haikou devkit, similarly to RK3399
Puma and PX30 Ringneck.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: add dual-role usb3 hosts to rk3588 Tiger-Haikou
Heiko Stuebner [Mon, 10 Jun 2024 13:13:37 +0000 (15:13 +0200)] 
arm64: dts: rockchip: add dual-role usb3 hosts to rk3588 Tiger-Haikou

Apart from the host-only usb3 controller (host2) the rk3588 also provides
two dual-role controllers. On the Tiger-Haikou combination these are
connected to the lower usb3-host port in host-only mode and the micro-usb3
port for dual-role operation.

Add the necessary controllers, phys to the Tiger-Haikou board and enable
the usb-id extcon.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240422163951.2604273-4-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: d7b83921d098bd76623381f75f5cd2296f1315cc ]

(cherry picked from commit 193d3b2a0a98f2dcd8c43bcbf8a766098a9fa75d)

2 years agoarm64: dts: rockchip: add usb-id extcon on rk3588 tiger
Heiko Stuebner [Mon, 10 Jun 2024 13:13:36 +0000 (15:13 +0200)] 
arm64: dts: rockchip: add usb-id extcon on rk3588 tiger

The Q7 standard specifies a usb-id pin on the connector to distiuish
between host and device mode. Model this via the usb-id extcon binding.

While the pin is part of the Q7 standard, so part of the module, the
extcon stays disabled in the som dtsi and will only be enabled in a
baseboard using it.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240422163951.2604273-3-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: eabb53f5dacfd643b5255f35bad30b8f914decdc ]

(cherry picked from commit 4843cec4092318ef7feb0999b0d34ef817465b33)

2 years agoarm64: dts: rockchip: fix comment for upper usb3 port
Heiko Stuebner [Mon, 10 Jun 2024 13:13:35 +0000 (15:13 +0200)] 
arm64: dts: rockchip: fix comment for upper usb3 port

The comment for the host2_xhci points to the wrong port on the board.
The upper usb3 port is the correct one, so fix the comment to prevent
confusion.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240422163951.2604273-2-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 3482efee1144262dc839792103e6a9e29defecbc ]

(cherry picked from commit 56f3031edf22d163f10bc4b631d37a9aaa82d4d4)

2 years agoarm64: dts: rockchip: fix pcie-refclk frequency on rk3588 tiger
Heiko Stuebner [Mon, 10 Jun 2024 13:13:34 +0000 (15:13 +0200)] 
arm64: dts: rockchip: fix pcie-refclk frequency on rk3588 tiger

The clock-generator of course only produces a 100MHz clock rate,
not 1GHz.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240423114635.2637310-1-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 0eb2a93518fb4728bd1d55fcd3b57fce4797ef1d ]

(cherry picked from commit b574cbafae976cf508692088944e45c9764c0048)

2 years agoarm64: dts: rockchip: correct gpio_pwrctrl1 typos on rk3588(s) boards
Jing Luo [Mon, 10 Jun 2024 13:13:33 +0000 (15:13 +0200)] 
arm64: dts: rockchip: correct gpio_pwrctrl1 typos on rk3588(s) boards

gpio_pwrctrl2 gets duplicated by both rk806_dvs1_null and rk806_dvs2_null
gpio_pwrctrl1 is unset. This typo appears in multiple files. Let's fix them.

Note: I haven't had the chance to test them all because I don't own all
of these boards (obviously). Please test if it's needed.

Signed-off-by: Jing Luo <jing@jing.rocks>
Link: https://lore.kernel.org/r/20240420130355.639406-1-jing@jing.rocks
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: d7f2039e5321636069baa77ef2f1e5d22cb69a88 ]

(cherry picked from commit cb2b6d1d19ed10fcaec5f5859c08a3355d1c66e0)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: move uart2 pinmux to dtsi on rk3588-tiger
Heiko Stuebner [Mon, 10 Jun 2024 13:13:32 +0000 (15:13 +0200)] 
arm64: dts: rockchip: move uart2 pinmux to dtsi on rk3588-tiger

The association of uart2 to the q7-uart pins is part of the module
itself and not the baseboard used. Therefore move the pinctrl over
to the tiger dtsi.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240422143356.2596414-1-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 5adbad5c464a708a87cf5ade1bfe2ca947bb2f82 ]

(cherry picked from commit f8314a4fbc00a3d651a7e9b4d9462d10c6c02a12)

2 years agoarm64: dts: rockchip: enable gpu on rk3588-tiger
Heiko Stuebner [Mon, 10 Jun 2024 13:13:31 +0000 (15:13 +0200)] 
arm64: dts: rockchip: enable gpu on rk3588-tiger

Enable the mali gpu node and add the som-specific supply-regulator.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20240327112120.1181570-2-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: f5256f8ed4b729c3ab9d9cd7d406313773484b59 ]

(cherry picked from commit 27350b241eafea37dc94743cd9c5dd83295faca9)

2 years agorockchip: ringneck-px30: fix TPL_MAX_SIZE
Quentin Schulz [Thu, 6 Jun 2024 08:45:36 +0000 (10:45 +0200)] 
rockchip: ringneck-px30: fix TPL_MAX_SIZE

Ringneck was mistakenly set to allow up to 128KiB for the TPL code size
while PX30 SoC only has 16KiB of SRAM.

Therefore, let's use the default value of TPL_MAX_SIZE from the SoC
(which is 10KiB) so that the max code size is actually checked and
useful.

Fixes: c925be73a0a8 ("rockchip: add support for PX30 Ringneck SoM on Haikou Devkit")
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agopower: rk8xx: properly print all supported PMICs name
Quentin Schulz [Thu, 6 Jun 2024 08:45:35 +0000 (10:45 +0200)] 
power: rk8xx: properly print all supported PMICs name

The ID of the PMIC is stored in the 2 16b registers but the only part
that matters right now is the 3 MSB, which make the 3 digits (in hex) of
the part number.

Right now, only RK808 was properly displayed, with this all currently
supported PMICs should display the proper part number.

Additionally, when the PMIC variant is not found, print that value
instead of the masked unshifted value as all PMICs we support for now
have their LSB ignored to represent the actual part number.

Tested on RK806 (RK3588 Jaguar), RK808 (RK3399 Puma) and RK809 (PX30
Ringneck).

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: px30-ringneck: Update SPL_PAD_TO Kconfig option
Quentin Schulz [Thu, 6 Jun 2024 08:45:34 +0000 (10:45 +0200)] 
rockchip: px30-ringneck: Update SPL_PAD_TO Kconfig option

On px30-ringneck the FIT payload is located at sector 0x200 compared to
the more Rockchip common sector 0x4000 offset:
SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200

Because FIT payload is located at sector 0x200 and the TPL+SPL is
located at sector 64, the combined size of TPL+SPL cannot take up more
than 224KiB:
(0x200 - 64) x 512 = 0x38000 (224 KiB)

Adjust SPL_PAD_TO to match the used 0x200 sector offset.

While at it, update the px30-ringneck-u-boot.dtsi to remove the now
unnecessary override of simple-bin:fit:offset since SPL_PAD_TO matches
with the current formula.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: rk3399-puma: remove unnecessary simple-bin:fit:offset override
Quentin Schulz [Thu, 6 Jun 2024 08:45:33 +0000 (10:45 +0200)] 
rockchip: rk3399-puma: remove unnecessary simple-bin:fit:offset override

Since commit 6007b69d544e ("rockchip: rk3399-puma: Update SPL_PAD_TO
Kconfig option"), SPL_PAD_TO matches
(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512 and the default
value for simple-bin:fit:offset in rockchip-u-boot.dtsi is
SPL_PAD_TO, so let's remove this override.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: rk3399-puma: remove default value from defconfig
Quentin Schulz [Thu, 6 Jun 2024 08:45:32 +0000 (10:45 +0200)] 
rockchip: rk3399-puma: remove default value from defconfig

CONFIG_ENV_OFFSET already defaults to 0x3F8000, however it is stored in
lowercase hexdigits instead of uppercase like in the defconfig.

No change in behavior intended.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: jaguar-rk3588: use default env size for Rockchip on MMC
Quentin Schulz [Thu, 6 Jun 2024 08:45:31 +0000 (10:45 +0200)] 
rockchip: jaguar-rk3588: use default env size for Rockchip on MMC

The default env size is 0x8000 when building for Rockchip SoCs with
support for environment stored in MMC.

Jaguar hasn't entered mass production just yet, so it's a breaking
change we can afford in the name of consistency.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agoboard: rockchip: add ArmSoM Sige7 Rk3588 board
Jianfeng Liu [Tue, 28 May 2024 17:04:06 +0000 (01:04 +0800)] 
board: rockchip: add ArmSoM Sige7 Rk3588 board

ArmSoM Sige7 is a Rockchip RK3588 based SBC (Single Board Computer) by
ArmSoM.

There are two variants depending on the DRAM size : 8G and 16G.

Specification:

    Rockchip Rk3588 SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    8/16GB memory LPDDR4x
    Mali G610MC4 GPU
    2x MIPI CSI 2 multiple lanes connector
    64GB/128GB on board eMMC
    uSD slot
    1x USB 2.0 Type-A, 1x USB 3.0 Type-A, 1x USB 3.0 Type-C
    1x HDMI 2.1 output
    2x 2.5 Gbps Ethernet port
    40-pin IO header including UART, SPI and I2C
    USB PD over USB Type-C
    Size: 92mm x 62mm

Kernel commit:
81c828a67c78 (arm64: dts: rockchip: Add ArmSom Sige7 board)

Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: rk3588: Remove USB3 DRD nodes in u-boot.dtsi
Jianfeng Liu [Tue, 28 May 2024 17:04:05 +0000 (01:04 +0800)] 
rockchip: rk3588: Remove USB3 DRD nodes in u-boot.dtsi

After we sync USB3 DRD nodes from v6.10-rc1, these obsolete nodes
can be removed.

Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: Add ArmSom Sige7 board
Jianfeng Liu [Tue, 28 May 2024 17:04:04 +0000 (01:04 +0800)] 
arm64: dts: rockchip: Add ArmSom Sige7 board

Specification:
        Rockchip Rk3588 SoC
        4x ARM Cortex-A76, 4x ARM Cortex-A55
        8/16/32GB Memory LPDDR4/LPDDR4x
        Mali G610MP4 GPU
        2× MIPI-CSI Connector
        1× MIPI-DSI Connector
        1x M.2 Key M (PCIe 3.0 4-lanes)
        2x RTL8125 2.5G Ethernet
        Onboard AP6275P for WIFI6/BT5
        32GB/64GB/128GB eMMC
        MicroSD card slot
        1x USB2.0, 1x USB3.0 Type-A, 1x US3.0 Type-C
        1x HDMI Output, 1x type-C DP Output

Functions work normally:
        USB2.0 Host
        USB3.0 Type-A Host
        M.2 Key M (PCIe 3.0 4-lanes)
        2x RTL8125 2.5G Ethernet
        eMMC
        MicroSD card

More information can be obtained from the following website
        https://docs.armsom.org/armsom-sige7

Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Weizhao Ouyang <weizhao.ouyang@arm.com>
Link: https://lore.kernel.org/r/20240420034300.176920-4-liujianfeng1994@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 81c828a67c78bb03ea75819c417c93c7f3d637b5 ]

(cherry picked from commit d427a11542bcf5364a5260280e077f0a2e030dcb)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: add rk3588 pcie and php IOMMUs
Niklas Cassel [Tue, 28 May 2024 17:04:03 +0000 (01:04 +0800)] 
arm64: dts: rockchip: add rk3588 pcie and php IOMMUs

The mmu600_pcie is connected with the five PCIe controllers.
The mmu600_php is connected with the USB3 controller, the GMAC
controllers, and the SATA controllers.

See 8.2 Block Diagram, in rk3588 TRM (Technical Reference Manual).

The IOMMUs are disabled by default, as further patches are needed to
program the SID/SSIDs in to the IOMMUs.

iommu: Default domain type: Translated
iommu: DMA domain TLB invalidation policy: strict mode
arm-smmu-v3 fc900000.iommu: ias 48-bit, oas 48-bit (features 0x001c1eaf)
arm-smmu-v3 fc900000.iommu: allocated 65536 entries for cmdq
arm-smmu-v3 fc900000.iommu: allocated 32768 entries for evtq
arm-smmu-v3 fc900000.iommu: msi_domain absent - falling back to wired irqs

Additionally, the IOMMU correctly triggers an IOMMU fault when
a PCIe device performs a write (since the device hasn't been
assigned a SID/SSID):
arm-smmu-v3 fc900000.iommu: event 0x02 received:
arm-smmu-v3 fc900000.iommu:      0x0000010000000002
arm-smmu-v3 fc900000.iommu:      0x0000000000000000
arm-smmu-v3 fc900000.iommu:      0x0000000000000000
arm-smmu-v3 fc900000.iommu:      0x0000000000000000

While this doesn't provide much value as is, having the devices as
disabled in the device tree will allow developers to see that the rk3588
actually has IOMMUs on the SoC.

Signed-off-by: Niklas Cassel <cassel@kernel.org>
Link: https://lore.kernel.org/r/20240502140231.477049-2-cassel@kernel.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: cd81d3a0695cc54ad6ac0ef4bbb67a7c8f55d592 ]

(cherry picked from commit ea9a34aa0d786cbf4b87f1ba528e69b07219738f)
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: add USB3 DRD controllers on rk3588
Sebastian Reichel [Tue, 28 May 2024 17:04:02 +0000 (01:04 +0800)] 
arm64: dts: rockchip: add USB3 DRD controllers on rk3588

Add both USB3 dual-role controllers to the RK3588 devicetree.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240408225109.128953-8-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 33f393a2a990e16f56931ca708295f31d2b44415 ]

(cherry picked from commit c7ed588e14f7dd04a92fb55f12680f94c7b14edf)
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: add USBDP phys on rk3588
Sebastian Reichel [Tue, 28 May 2024 17:04:01 +0000 (01:04 +0800)] 
arm64: dts: rockchip: add USBDP phys on rk3588

Add both USB3-DisplayPort PHYs to RK3588 SoC DT.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240408225109.128953-7-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: e18e5e8188f2671abf63abe7db5f21555705130f ]

(cherry picked from commit 5110caca9865718616cf7093ed4a9a1bc54780db)
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: reorder usb2phy properties for rk3588
Sebastian Reichel [Tue, 28 May 2024 17:04:00 +0000 (01:04 +0800)] 
arm64: dts: rockchip: reorder usb2phy properties for rk3588

Reorder common DT properties alphabetically for usb2phy, according
to latest DT style rules.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240408225109.128953-6-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: abe68e0ca71dddce0e5419e35507cb464d61870d ]

(cherry picked from commit f6835a60a8a28ff14ffb3dd80c99ce1c137d06c5)
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: fix usb2phy nodename for rk3588
Sebastian Reichel [Tue, 28 May 2024 17:03:59 +0000 (01:03 +0800)] 
arm64: dts: rockchip: fix usb2phy nodename for rk3588

usb2-phy should be named usb2phy according to the DT binding,
so let's fix it up accordingly.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240408225109.128953-5-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 4e07a95f7402de092cd71b2cb96c69f85c98f251 ]

(cherry picked from commit 5a3e4638492497ae81b9bd4a8627f4727e312ccc)
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: Fix ordering of nodes on rk3588s
Diederik de Haas [Tue, 28 May 2024 17:03:58 +0000 (01:03 +0800)] 
arm64: dts: rockchip: Fix ordering of nodes on rk3588s

Fix the ordering of the main nodes by sorting them alphabetically and
then the ones with a memory address sequentially by that address.

Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Link: https://lore.kernel.org/r/20240406172821.34173-1-didi.debian@cknow.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: cbb97fe18e299ece1c0074924c630de6a19b320f ]

(cherry picked from commit bbf7c16f2f1208b96349f6f6648b69cfaa1a482b)
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agoarm64: dts: rockchip: Add rk3588 GPU node
Boris Brezillon [Tue, 28 May 2024 17:03:57 +0000 (01:03 +0800)] 
arm64: dts: rockchip: Add rk3588 GPU node

Add Mali GPU Node to the RK3588 SoC DT including GPU clock
operating points

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20240326165232.73585-3-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 6fca4edb93d335f29f81e484936f38a5eed6a9b1 ]

(cherry picked from commit 3cd15354ea0c8668812bc0b3a4136606c10803e9)
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 years agorockchip: px30/rk3326: migrate to OF_UPSTREAM
Quentin Schulz [Fri, 24 May 2024 09:23:33 +0000 (11:23 +0200)] 
rockchip: px30/rk3326: migrate to OF_UPSTREAM

Migrate PX30/RK3326 boards that exists in Linux v6.8 to use OF_UPSTREAM.

firefly-px30 is not migrated to OF_UPSTREAM because there's no Device
Tree in the Linux kernel.

Differences between U-Boot's Odroid-Go2 and Linux's are now moved to the
-u-boot.dtsi, though I have a gut feeling that the existing cru
overrides aren't necessary (anymore?).

The U-Boot GPIO led-0 is on GPIO0_C1 but such is the pin of PWM3 which
is used for Linux's PWM led-2 so keep Linux's.

I also doubt vcc_cam is actually used, though the Odroid-Go2 Black
Edition uses this dcdc regulator for WiFi, so let's just move it to the
-u-boot.dtsi to play it safe.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: evb-px30: make UART5 the debug UART
Quentin Schulz [Fri, 24 May 2024 09:23:32 +0000 (11:23 +0200)] 
rockchip: evb-px30: make UART5 the debug UART

In the Device Tree, UART5 is the system UART, but in the defconfig it
currently is UART2. Let's sync the two by making the defconfig use UART5
as well.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: evb-px30: do not remove pinctrl nodes from SPL DTB
Quentin Schulz [Fri, 24 May 2024 09:23:31 +0000 (11:23 +0200)] 
rockchip: evb-px30: do not remove pinctrl nodes from SPL DTB

In order to be able to properly mux UART on PX30 EVB, the pinmux needs
to be done at runtime, so let's not remove the pinctrl nodes from the
SPL DTB.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: px30: make UART pinmux accessible to TPL/SPL DTB
Quentin Schulz [Fri, 24 May 2024 09:23:30 +0000 (11:23 +0200)] 
rockchip: px30: make UART pinmux accessible to TPL/SPL DTB

This adds the default pinmux for UART2 and UART5 to the TPL/SPL DTB (if
not removed through the CONFIG_OF_SPL_REMOVE_PROPS symbol) as those two
controllers are always made available to all boards.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: px30-core-*: Use common bss and stack addresses
Quentin Schulz [Fri, 24 May 2024 09:23:29 +0000 (11:23 +0200)] 
rockchip: px30-core-*: Use common bss and stack addresses

U-Boot proper pre-reloc is currently running out of memory on PX30
Ringneck and it is thus impossible to boot into U-Boot CLI. It is
assumed the same problem can be seen on other PX30 boards though I
cannot guarantee it since I don't have access to them.

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>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: odroid-go2: Use common bss and stack addresses
Quentin Schulz [Fri, 24 May 2024 09:23:28 +0000 (11:23 +0200)] 
rockchip: odroid-go2: Use common bss and stack addresses

U-Boot proper pre-reloc is currently running out of memory on PX30
Ringneck and it is thus impossible to boot into U-Boot CLI. It is
assumed the same problem can be seen on other PX30 boards though I
cannot guarantee it since I don't have access to them.

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.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: firefly-px30: Use common bss and stack addresses
Quentin Schulz [Fri, 24 May 2024 09:23:27 +0000 (11:23 +0200)] 
rockchip: firefly-px30: Use common bss and stack addresses

U-Boot proper pre-reloc is currently running out of memory on PX30
Ringneck and it is thus impossible to boot into U-Boot CLI. It is
assumed the same problem can be seen on other PX30 boards though I
cannot guarantee it since I don't have access to them.

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>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years agorockchip: evb-px30: Use common bss and stack addresses
Quentin Schulz [Fri, 24 May 2024 09:23:26 +0000 (11:23 +0200)] 
rockchip: evb-px30: Use common bss and stack addresses

U-Boot proper pre-reloc is currently running out of memory on PX30
Ringneck and it is thus impossible to boot into U-Boot CLI. It is
assumed the same problem can be seen on other PX30 boards though I
cannot guarantee it since I don't have access to them.

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>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2 years 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>
2 years 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>
2 years 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>
2 years 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>
2 years 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
2 years 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
2 years 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
2 years 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>
2 years 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>
2 years agotest/py: net_boot: Add test cases for net boot
Love Kumar [Wed, 5 Jun 2024 09:49:35 +0000 (15:19 +0530)] 
test/py: net_boot: Add test cases for net boot

Add tests for booting image using tftpboot/pxe boot commands, tftpboot
boot case loads the FIT image into DDR and boots using bootm command
whereas pxe boot cases downloads the pxe configuration file from the
TFTP server and interprets it to boot the images mentioned in the pxe
configurations file.
This test relies on boardenv_* containing configuration values including
the parameter 'pattern'. tftpboot/pxe boot cases boots the Linux till the
boot log pattern value is matched. For example, if the parameter
'pattern' is defined as 'login:', it will boot till login prompt.

Signed-off-by: Love Kumar <love.kumar@amd.com>
Tested-by: Tom Rini <trini@konsulko.com>
2 years agotest/py: Add support to enable check for bad pattern
Love Kumar [Wed, 22 May 2024 13:15:13 +0000 (18:45 +0530)] 
test/py: Add support to enable check for bad pattern

Executing a u-boot command may raise an error or extra bad pattern,
beyond the default bad patterns. Providing a way to enable the console
output error check in test.

For example, description for OS boot test:
import re
check_type = 'kernel_boot_error'
check_pattern = re.compile('ERROR -2: can't get kernel image!')
with u_boot_console.enable_check(check_type, check_pattern):
    u_boot_console.run_command('<boot command>')

Signed-off-by: Love Kumar <love.kumar@amd.com>
2 years agocmd: bcb: Fix bcb compilation when CONFIG_CMD_BCB=n
Mattijs Korpershoek [Mon, 3 Jun 2024 09:04:58 +0000 (11:04 +0200)] 
cmd: bcb: Fix bcb compilation when CONFIG_CMD_BCB=n

commit dfeb4f0d7935 ("cmd: bcb: extend BCB C API to allow read/write the fields")
introduced the bcb_get() function.

When CONFIG_CMD_BCB=n, that function is stubbed.
The stubbed function has a wrong prototype: value_size arg is missing.

Add the missing argument to fix build when CONFIG_CMD_BCB=n.

Fixes: dfeb4f0d7935 ("cmd: bcb: extend BCB C API to allow read/write the fields")
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Guillaume La Roque <glaroque@baylibre.com>
Reviewed-by: Dmitrii Merkurev <dimorinny@google.com>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
2 years agoimxtract: add support for zstd-compressed images
Dmitry Gerasimov [Sun, 2 Jun 2024 15:25:52 +0000 (17:25 +0200)] 
imxtract: add support for zstd-compressed images

Allow extraction of zstd-compressed images from FIT using imxtract
command. This is especially useful when one has to load an image via
some interface (e.g. SPI) rather that just to the memory.

Signed-off-by: Dmitry Gerasimov <di.gerasimov@gmail.com>
2 years agobcmgenet: fix Rx buffer corruption caused by lack of cache flush
Yasuharu Shibata [Sun, 2 Jun 2024 08:24:03 +0000 (17:24 +0900)] 
bcmgenet: fix Rx buffer corruption caused by lack of cache flush

When bcmgenet complete to write Rx buffer with the DMA,
some U-Boot commands write data to the buffer directly.
Those write data will become dirty in CPU cache.
After this driver calls free_pkt to the buffer,
the buffer is assigned as the future Rx buffer.
At some point, if bcmgenet writes to a buffer with DMA
and CPU cache flushes dirty data to the buffer,
the buffer is corrupted.

This patch calls flush_dcache_range in free_pkt
to immediately flush the data written by U-Boot command
and prevent data corruption.

This issue can be reproduced using wget on Raspberry Pi4.
If wget receives data larger than
RX_BUF_LENGTH * RX_DESCS = 2048 * 256 bytes,
it will timeout due to data corruption.
In addition, if LOG_DEBUG is enabled in net/tcp.c,
the following error log is output.

TCP RX TCP xSum Error

Signed-off-by: Yasuharu Shibata <yasuharu.shibata@gmail.com>
2 years agoconfigs: j784s4: Enable OSPI NOR boot
Jonathan Humphreys [Fri, 31 May 2024 22:32:41 +0000 (17:32 -0500)] 
configs: j784s4: Enable OSPI NOR boot

Set necessary configs to enable the j784s4 device to boot from OSPI NOR
flash.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2 years agospl: Kconfig: ARCH_K3: Set default SPL_STACK_R_MALLOC_SIMPLE_LEN for R5 build
Vignesh Raghavendra [Fri, 31 May 2024 14:46:36 +0000 (20:16 +0530)] 
spl: Kconfig: ARCH_K3: Set default SPL_STACK_R_MALLOC_SIMPLE_LEN for R5 build

All ARCH_K3 platforms need about of 2MB of malloc space post
reallocation. Since, this space is allocated from SDRAM, provide a
generous 2MB space by default.

Platforms requiring more than 2MB can override in defconfig as needed.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2 years agoarm: dts: k3-*-binman: Make default DM file optional
Neha Malcom Francis [Wed, 29 May 2024 07:48:49 +0000 (13:18 +0530)] 
arm: dts: k3-*-binman: Make default DM file optional

The default DM firmware path is non-optional as of now. Make it
optional so that users that choose to provide DM via TI_DM argument
instead of BINMAN_INDIRS can do so without build errors.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Kamlesh Gurudasani <kamlesh@ti.com>
2 years agoenv: ti: k3_dfu: Drup mmcpart for rootfs
Neha Malcom Francis [Wed, 29 May 2024 06:05:59 +0000 (11:35 +0530)] 
env: ti: k3_dfu: Drup mmcpart for rootfs

According to [0], raw access to mmc should not have mmcpart in the
entry. This was fixed in k3_dfu_combined.env but k3_dfu.env had been
overlooked.

[0] doc/usage/dfu.rst

Fixes: 53b406369e9d ("DFU: Check the number of arguments and argument string strictly")
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2 years agoarm: dts: k3-j721s2-r5: Change GTC clock parent
Neha Malcom Francis [Tue, 28 May 2024 09:49:54 +0000 (15:19 +0530)] 
arm: dts: k3-j721s2-r5: Change GTC clock parent

MAIN_PLL0 has a flag set in DM (Device Manager) that removes its
capability to re-initialise clock frequencies. A72 CPU clock (GTC) and
RGMII has MAIN_PLL3 as their parent which does not have this flag. While
RGMII needs re-initialization to default frequency to be able to get
250MHz with its divider, GTC can not get its required 200MHz with its
dividers. Thus move GTC clock parent on J721S2 from MAIN_PLL3_HSDIV1 to
MAIN_PLL0_HSDIV6. This was already done on CPTS node in kernel which was
similarly affected (linked).

Link: https://lore.kernel.org/all/20230605110443.84568-1-n-francis@ti.com/
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>