]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
5 months agodrivers: thermal: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:41:00 +0000 (14:41 +0200)]
drivers: thermal: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: sysreset: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:59 +0000 (14:40 +0200)]
drivers: sysreset: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: spi: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:58 +0000 (14:40 +0200)]
drivers: spi: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Michal Simek <michal.simek@amd.com>
5 months agodrivers: sound: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:57 +0000 (14:40 +0200)]
drivers: sound: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: soc: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:56 +0000 (14:40 +0200)]
drivers: soc: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: serial: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:55 +0000 (14:40 +0200)]
drivers: serial: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: scsi: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:54 +0000 (14:40 +0200)]
drivers: scsi: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: rtc: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:53 +0000 (14:40 +0200)]
drivers: rtc: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: reset: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:52 +0000 (14:40 +0200)]
drivers: reset: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: remoteproc: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:51 +0000 (14:40 +0200)]
drivers: remoteproc: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: ram: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:50 +0000 (14:40 +0200)]
drivers: ram: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: power: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:49 +0000 (14:40 +0200)]
drivers: power: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: pinctrl: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:48 +0000 (14:40 +0200)]
drivers: pinctrl: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: phy: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:47 +0000 (14:40 +0200)]
drivers: phy: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: pci: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:46 +0000 (14:40 +0200)]
drivers: pci: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: net: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:45 +0000 (14:40 +0200)]
drivers: net: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: mtd: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:44 +0000 (14:40 +0200)]
drivers: mtd: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: mmc: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:43 +0000 (14:40 +0200)]
drivers: mmc: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: misc: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:42 +0000 (14:40 +0200)]
drivers: misc: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: led: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:41 +0000 (14:40 +0200)]
drivers: led: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: input: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:40 +0000 (14:40 +0200)]
drivers: input: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: i2c: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:39 +0000 (14:40 +0200)]
drivers: i2c: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 months agodrivers: gpio: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:38 +0000 (14:40 +0200)]
drivers: gpio: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: fpga: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:37 +0000 (14:40 +0200)]
drivers: fpga: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Michal Simek <michal.simek@amd.com>
5 months agodrivers: firmware: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:36 +0000 (14:40 +0200)]
drivers: firmware: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: dma: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:35 +0000 (14:40 +0200)]
drivers: dma: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: dfu: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:34 +0000 (14:40 +0200)]
drivers: dfu: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: ddr: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:33 +0000 (14:40 +0200)]
drivers: ddr: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: crypto: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:32 +0000 (14:40 +0200)]
drivers: crypto: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: core: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:31 +0000 (14:40 +0200)]
drivers: core: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: clk: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:30 +0000 (14:40 +0200)]
drivers: clk: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: cache: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:29 +0000 (14:40 +0200)]
drivers: cache: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: block: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:28 +0000 (14:40 +0200)]
drivers: block: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: bios_emulator: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:27 +0000 (14:40 +0200)]
drivers: bios_emulator: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodrivers: ata: Remove duplicate newlines
Marek Vasut [Sat, 20 Jul 2024 12:40:26 +0000 (14:40 +0200)]
drivers: ata: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 months agodoc: define html_context in conf.py
Heinrich Schuchardt [Fri, 19 Jul 2024 21:23:26 +0000 (23:23 +0200)]
doc: define html_context in conf.py

The dictionary html_context is not passed into conf.py but must be created
there. See
https://dev.readthedocs.io/en/latest/design/theme-context.html#customizing-the-context

Fixes: df86796028df ("doc: enable ReadTheDocs addon management")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agotest/py/requirements.txt: Bump setuptools to 70.3.0
Tom Rini [Wed, 17 Jul 2024 17:41:18 +0000 (11:41 -0600)]
test/py/requirements.txt: Bump setuptools to 70.3.0

There is some potential security issue resolved by upgrading to v70.0.0
here and the latest is now v70.3.0.

Reported-by: GitHub dependabot
Suggested-by: Sebastian Kropatsch <seb-dev@mail.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agocmd: move CMD_DHCP6 options beneath CMD_DHCP6
Heinrich Schuchardt [Wed, 17 Jul 2024 14:54:46 +0000 (16:54 +0200)]
cmd: move CMD_DHCP6 options beneath CMD_DHCP6

All Kconfig options that depend on CONFIG_CMD_DHCP6 should immediately
follow it.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agozlib: Fix big performance regression
Christophe Leroy [Tue, 16 Jul 2024 14:35:46 +0000 (08:35 -0600)]
zlib: Fix big performance regression

Commit 340fdf1303dc ("zlib: Port fix for CVE-2016-9841 to U-Boot")
brings a big performance regression in inflate_fast(), which leads
to watchdog timer reset on powerpc 8xx.

It looks like that commit does more than what it describe, it
especially removed an important optimisation that was doing copies
using halfwords instead of bytes. That unexpected change multiplied
by almost 4 the time spent in inflate_fast() and increased by 40%
the overall time needed to uncompress linux kernel image.

So partially revert that commit but keep post incrementation as it
is the initial purpose of said commit.

[trini: Combine assorted patches in to this one, just restoring the
        performance commit]

Fixes: 340fdf1303dc ("zlib: Port fix for CVE-2016-9841 to U-Boot")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoboot: provide CONFIG_BOOTMETH_QFW Kconfig parameter
Heinrich Schuchardt [Tue, 16 Jul 2024 08:35:34 +0000 (10:35 +0200)]
boot: provide CONFIG_BOOTMETH_QFW Kconfig parameter

U-Boot is often used conjunction with QEMU to boot via EFI or syslinux.
Here the QFW boot method is not needed.

At least for qemu-riscv64_smode_defconfig the kernel parameter is used
to specify the U-Boot binary. Trying to run U-Boot as a kernel makes
no sense.

Provide Kconfig parameter CONFIG_BOOTMETH_QFW to decide if the QFW boot
method shall be provided.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agocmd: correct ELF-related commands dependencies
Maxim Moskalets [Mon, 15 Jul 2024 20:01:10 +0000 (23:01 +0300)]
cmd: correct ELF-related commands dependencies

Enable BOOTM_ELF by default for all configs with LIB_ELF selected.
Use OF_LIBFDT as dependency for CMD_ELF_FDT_SETUP.

Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
5 months agoconfigs: j784s4_evm : Increase Dynamic memory allocation size
Udit Kumar [Mon, 15 Jul 2024 17:43:01 +0000 (23:13 +0530)]
configs: j784s4_evm : Increase Dynamic memory allocation size

Increase malloc size to 32 MB to align with other J7
family devices.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
5 months agodrivers/mtd/nvmxip: nvmxip.h is a global include
Heinrich Schuchardt [Mon, 15 Jul 2024 13:19:50 +0000 (15:19 +0200)]
drivers/mtd/nvmxip: nvmxip.h is a global include

include/nvmxip.h is a global and not a local include.
So we should use angle brackets.

Fixes: dc3abd8006c5 ("nvmxip: move header to include")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agobootstash: Do not provide a default address for all
Tom Rini [Mon, 15 Jul 2024 11:42:00 +0000 (12:42 +0100)]
bootstash: Do not provide a default address for all

A valid memory location to stash bootstage information at will be
architecture dependent. Move the existing defaults to the main Kconfig
file for this option and set 0x0 as the default only for sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agosoc: ti: k3-socinfo: Add support for J721E SR2.0
Neha Malcom Francis [Mon, 15 Jul 2024 11:15:50 +0000 (16:45 +0530)]
soc: ti: k3-socinfo: Add support for J721E SR2.0

Add support for identifying J721E SR2.0

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
5 months agomx6sabresd: Disable VBE boot support
Tom Rini [Fri, 19 Jul 2024 22:46:26 +0000 (16:46 -0600)]
mx6sabresd: Disable VBE boot support

This is an older platform and as we need to save space on it from time
to time, disable VBE boot support.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoMerge tag 'efi-2024-10-rc1-3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 19 Jul 2024 14:53:23 +0000 (08:53 -0600)]
Merge tag 'efi-2024-10-rc1-3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2024-10-rc1-3

Documentation:

* Move out-of-tree building info to HTML
* Enable ReadTheDocs addon management
* Remove FIT documentation that is elsewhere
* Update table of contents for FIT images
* Add description for more boot methods

UEFI:

* Correct finding distro device-path for media devices
* Fix typo in EFI_RT_VOLATILE_STORE description

Other:

* MAINTAINERS: Rename BOOTDEVICE

5 months agodoc: Describe the bootstd settings
Simon Glass [Wed, 17 Jul 2024 08:31:04 +0000 (09:31 +0100)]
doc: Describe the bootstd settings

The bootstd node provides some configuration properties. Add these to
the documentation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agoboot: Correct indentation in efi bootmeth
Simon Glass [Wed, 17 Jul 2024 08:31:03 +0000 (09:31 +0100)]
boot: Correct indentation in efi bootmeth

Fix a minor indentation / whitespace problem in a comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glkp@gmx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Add a link to VBE from the bootstd docs
Simon Glass [Wed, 17 Jul 2024 08:31:02 +0000 (09:31 +0100)]
doc: Add a link to VBE from the bootstd docs

Link to this page to make it easier to find the VBE docs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Add a description for bootmeth_script
Simon Glass [Wed, 17 Jul 2024 08:31:01 +0000 (09:31 +0100)]
doc: Add a description for bootmeth_script

Add documentation for the script bootmeth.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agobootstd: Correct handling of script from network
Simon Glass [Wed, 17 Jul 2024 08:31:00 +0000 (09:31 +0100)]
bootstd: Correct handling of script from network

When reading a script from a network, no block device is available.
Update the implementation to support this correctly, avoiding setting
environment variables which relate only to block devices.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agobootstd: Tidy up comments on the boothmeth drivers
Simon Glass [Wed, 17 Jul 2024 08:30:59 +0000 (09:30 +0100)]
bootstd: Tidy up comments on the boothmeth drivers

Fix a typo in the comment and add one to the EFI driver too.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Add a description for bootmeth_sandbox
Simon Glass [Wed, 17 Jul 2024 08:30:58 +0000 (09:30 +0100)]
doc: Add a description for bootmeth_sandbox

Add documentation for the sandbox bootmeth.

Fix up the compatible string to drop the 'extlinux' part, which is not
relevant to this bootmeth.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Add a description for bootmeth_cros
Simon Glass [Wed, 17 Jul 2024 08:30:57 +0000 (09:30 +0100)]
doc: Add a description for bootmeth_cros

Add documentation for the cros bootmeth.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Add a description for bootmeth_qfw
Simon Glass [Wed, 17 Jul 2024 08:30:56 +0000 (09:30 +0100)]
doc: Add a description for bootmeth_qfw

Add documentation for the qfw bootmeth.

Fix up the compatible string to drop the 'extlinux' part, which is not
relevant to this bootmeth.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Add a description for bootmeth_pxe
Simon Glass [Wed, 17 Jul 2024 08:30:55 +0000 (09:30 +0100)]
doc: Add a description for bootmeth_pxe

Add documentation for the pxe bootmeth.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Add a description for bootmeth_extlinux
Simon Glass [Wed, 17 Jul 2024 08:30:54 +0000 (09:30 +0100)]
doc: Add a description for bootmeth_extlinux

Add documentation for the extlinux bootmeth.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: Mention automatic binding of bootmeths
Simon Glass [Wed, 17 Jul 2024 08:30:53 +0000 (09:30 +0100)]
doc: Mention automatic binding of bootmeths

Add a note about how bootmeth drivers are instantiated.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 months agodoc: Move bootstd into its own directory
Simon Glass [Wed, 17 Jul 2024 08:30:52 +0000 (09:30 +0100)]
doc: Move bootstd into its own directory

Before adding more files, move the bootstd docs into a new directory,
with an index.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agoMAINTAINERS: Rename BOOTDEVICE
Simon Glass [Wed, 17 Jul 2024 08:30:51 +0000 (09:30 +0100)]
MAINTAINERS: Rename BOOTDEVICE

Rename this to BOOTSTD which is the normal name for the feature.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agodoc: enable ReadTheDocs addon management
Heinrich Schuchardt [Tue, 16 Jul 2024 19:04:23 +0000 (21:04 +0200)]
doc: enable ReadTheDocs addon management

Up to now ReadTheDocs has been injecting code when building on their
platform. This includes for instance improvements for the search function.

To maintain the current output ReadTheDocs requires setting html_baseurl
and html_context in conf.py.

See: https://about.readthedocs.com/blog/2024/07/addons-by-default/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 months agoefi_loader: Fix typo in EFI_RT_VOLATILE_STORE description
Michal Simek [Tue, 16 Jul 2024 13:56:51 +0000 (15:56 +0200)]
efi_loader: Fix typo in EFI_RT_VOLATILE_STORE description

Fix typo in EFI_RT_VOLATILE_STORE description.

Fixes: c28d32f946f0 ("efi_loader: conditionally enable SetvariableRT")
Signed-off-by: Michal Simek <michal.simek@amd.com>
5 months agodoc: move out-of-tree building info to HTML
Heinrich Schuchardt [Sun, 14 Jul 2024 07:18:04 +0000 (09:18 +0200)]
doc: move out-of-tree building info to HTML

Move the information about out-of-tree building
from README to the generated HTML documentation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agoefi_loader: find distro device-path for media devices
Heinrich Schuchardt [Sat, 13 Jul 2024 11:30:29 +0000 (13:30 +0200)]
efi_loader: find distro device-path for media devices

The auto-generated load options for media device do not contain a partition
node. We cannot expect the simple file protocol here.

Get the partition device-path via the loaded image protocol.

Fixes: e91b68fd6b83 ("efi_loader: load distro dtb in bootmgr")
Reported-by: E Shattow <lucent@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tested-by: E Shattow <lucent@gmail.com>
5 months agodoc: add missing table of content links
Sam Povilus [Mon, 8 Jul 2024 16:48:12 +0000 (10:48 -0600)]
doc: add missing table of content links

add missing table of content links, make alphabetical

Signed-off-by: Sam Povilus <sam.povilus@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agodoc: Remove FIT documentation that is elsewhere
Sam Povilus [Mon, 8 Jul 2024 16:48:11 +0000 (10:48 -0600)]
doc: Remove FIT documentation that is elsewhere

Before 9d0750064e (doc: Move external FIT docs into the main body), the
FIT property data-size was not a mandatory property and still it is not
expected to be set alongside the data property.

Move the data-size property to the "Conditionally mandatory property"
section, where it actually belongs.

Signed-off-by: Sam Povilus <sam.povilus@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agoMerge patch series "bootstd: Add Android support"
Tom Rini [Thu, 18 Jul 2024 19:52:11 +0000 (13:52 -0600)]
Merge patch series "bootstd: Add Android support"

Mattijs Korpershoek <mkorpershoek@baylibre.com> says:

Android boot flow is a bit different than a regular Linux distro.
Android relies on multiple partitions in order to boot.

A typical boot flow would be:
1. Parse the Bootloader Control Block (BCB, misc partition)
2. If BCB requested bootonce-bootloader, start fastboot and wait.
3. If BCB requested recovery or normal android, run the following:
   a. Get slot (A/B) from BCB
   b. Run AVB (Android Verified Boot) on boot partitions
   c. Load boot and vendor_boot partitions
   d. Load device-tree, ramdisk and boot

The AOSP documentation has more details at [1], [2], [3]

This has been implemented via complex boot scripts such as [4].
However, these boot script are neither very maintainable nor generic.
Moreover, DISTRO_DEFAULTS is being deprecated [5].

Add a generic Android bootflow implementation for bootstd.

For this initial version, only boot image v4 is supported.

This has been tested on sandbox using:
$ ./test/py/test.py --bd sandbox --build -k test_ut

This has also been tested on the AM62X SK EVM using TI's Android SDK[6]
To test on TI board, the following (WIP) patch is needed as well:
https://gitlab.baylibre.com/baylibre/ti/ti-u-boot/-/commit/84cceb912bccd7cdd7f9dd69bca0e5d987a1fd04

[1] https://source.android.com/docs/core/architecture/bootloader
[2] https://source.android.com/docs/core/architecture/partitions
[3] https://source.android.com/docs/core/architecture/partitions/generic-boot
[4] https://source.denx.de/u-boot/u-boot/-/blob/master/include/configs/meson64_android.h
[5] https://lore.kernel.org/r/all/20230914165615.1058529-17-sjg@chromium.org/
[6] https://software-dl.ti.com/processor-sdk-android/esd/AM62X/09_02_00/docs/android/Overview.html

5 months agoMerge patch series "finish using .dtso for overlay source files"
Tom Rini [Thu, 18 Jul 2024 19:51:15 +0000 (13:51 -0600)]
Merge patch series "finish using .dtso for overlay source files"

Rasmus Villemoes <rasmus.villemoes@prevas.dk> says:

This is a followup to the patches that landed in 2024.01 and nearly
made sure that source files for producing .dtbo files use the .dtso
extension. In the same release, a few new .dts files snuck in, and
there was also some test code involving .dtbo -> .dtbo.S -> .dtbo.o I
didn't really know how to handle at the time. This should finish the
job, bring us in sync with linux (at least in this respect), and drop
the .dts -> .dtbo build rule.

5 months agobootstd: Add test for bootmeth_android
Mattijs Korpershoek [Wed, 10 Jul 2024 08:40:06 +0000 (10:40 +0200)]
bootstd: Add test for bootmeth_android

Add a unit test for testing the Android bootmethod.

This requires another mmc image (mmc7) to contain the following partitions:
- misc: contains the Bootloader Control Block (BCB)
- boot_a: contains a fake generic kernel image
- vendor_boot_a: contains a fake vendor_boot image

Also add BOOTMETH_ANDROID as a dependency on sandbox so that we can test
this with:

$ ./test/py/test.py --bd sandbox --build -k test_ut # build the mmc7.img
$ ./test/py/test.py --bd sandbox --build -k bootflow_android

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Guillaume La Roque <glaroque@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agobootstd: Add a bootmeth for Android
Mattijs Korpershoek [Wed, 10 Jul 2024 08:40:05 +0000 (10:40 +0200)]
bootstd: Add a bootmeth for Android

Android boot flow is a bit different than a regular Linux distro.
Android relies on multiple partitions in order to boot.

A typical boot flow would be:
1. Parse the Bootloader Control Block (BCB, misc partition)
2. If BCB requested bootonce-bootloader, start fastboot and wait.
3. If BCB requested recovery or normal android, run the following:
3.a. Get slot (A/B) from BCB
3.b. Run AVB (Android Verified Boot) on boot partitions
3.c. Load boot and vendor_boot partitions
3.d. Load device-tree, ramdisk and boot

The AOSP documentation has more details at [1], [2], [3]

This has been implemented via complex boot scripts such as [4].
However, these boot script are neither very maintainable nor generic.
Moreover, DISTRO_DEFAULTS is being deprecated [5].

Add a generic Android bootflow implementation for bootstd.
For this initial version, only boot image v4 is supported.

[1] https://source.android.com/docs/core/architecture/bootloader
[2] https://source.android.com/docs/core/architecture/partitions
[3] https://source.android.com/docs/core/architecture/partitions/generic-boot
[4] https://source.denx.de/u-boot/u-boot/-/blob/master/include/configs/meson64_android.h
[5] https://lore.kernel.org/r/all/20230914165615.1058529-17-sjg@chromium.org/

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Tested-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agoandroid: boot: Add set_abootimg_addr() and set_avendor_bootimg_addr()
Mattijs Korpershoek [Wed, 10 Jul 2024 08:40:04 +0000 (10:40 +0200)]
android: boot: Add set_abootimg_addr() and set_avendor_bootimg_addr()

The only way to configure the load addresses for both bootimg and
vendor_bootimg is by using the "abootimg" command.
If we want to use the C API, there is no equivalent.

Add set_abootimg_addr() and set_avendor_bootimg_addr() so that we can
specify the load address from C.

This can be useful for implementing an Android bootmethod.

Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Guillaume La Roque <glaroque@baylibre.com>
Tested-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agobootstd: Add bootflow_iter_check_mmc() helper
Mattijs Korpershoek [Wed, 10 Jul 2024 08:40:03 +0000 (10:40 +0200)]
bootstd: Add bootflow_iter_check_mmc() helper

Some bootflows might be able to only boot from MMC devices.

Add a helper function these bootflows can use.

Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Guillaume La Roque <glaroque@baylibre.com>
Tested-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agoboot: android: Provide vendor_bootimg_addr in boot_get_fdt()
Mattijs Korpershoek [Wed, 10 Jul 2024 08:40:02 +0000 (10:40 +0200)]
boot: android: Provide vendor_bootimg_addr in boot_get_fdt()

When calling android_image_get_dtb_by_index() using boot image v3+,
we should also pass the vendor_boot ramdisk address.

Use get_avendor_bootimg_addr() to do so.

Notes: on boot image v2, this is harmless since get_avendor_bootimg_addr()
       returns -1.
       for legacy implementations that don't have CMD_ABOOTIMG, add a weak
       implementation to avoid linking errors.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
Reviewed-by: Guillaume La Roque <glaroque@baylibre.com>
Tested-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
5 months agokbuild: Disallow DTB overlays to built from .dts named source files
Rasmus Villemoes [Wed, 10 Jul 2024 07:16:12 +0000 (09:16 +0200)]
kbuild: Disallow DTB overlays to built from .dts named source files

[equivalent to linux commit 81d362732bac]

As a follow up to the series allowing DTB overlays to built from .dtso
files. Now that all overlays have been renamed, remove the ability to
build from overlays from .dts files to prevent any files with the old
name from accidental being added.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5 months agotest/py: efi_capsule: rename device tree overlay source to .dtso
Rasmus Villemoes [Wed, 10 Jul 2024 07:16:11 +0000 (09:16 +0200)]
test/py: efi_capsule: rename device tree overlay source to .dtso

Distinguish more clearly between source files meant for producing .dtb
from those meant for producing .dtbo.

Note that in the linux tree, all device tree overlay sources have been
renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit
81d362732bac). So this is also a step towards staying closer to linux
with respect to both Kbuild and device tree sources, and eventually
eliminating all .dts -> .dtbo instances.

This also matches the documentation update done in commit 4fb7e570d6b.

Cc: Masahisa Kojima <kojima.masahisa@socionext.com>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5 months agotest: overlay: rename overlay source files to .dtso
Rasmus Villemoes [Wed, 10 Jul 2024 07:16:10 +0000 (09:16 +0200)]
test: overlay: rename overlay source files to .dtso

Distinguish more clearly between source files meant for producing .dtb
from those meant for producing .dtbo.

In this case, the files are really meant to be compiled to .dtbo ->
.dtbo.S -> .dtbo.o that get embedded in the image, which means that
the begin/end symbols generated by the makefile rule changes to
__dtbo_ rather than __dtb, so the consuming .c file needs updating,
but this should not result in any functional change.

Note that in the linux tree, all device tree overlay sources have been
renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit
81d362732bac). So this is also a step towards staying closer to linux
with respect to both Kbuild and device tree sources.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5 months agokbuild: Allow DTB overlays to built into .dtbo.S files
Rasmus Villemoes [Wed, 10 Jul 2024 07:16:09 +0000 (09:16 +0200)]
kbuild: Allow DTB overlays to built into .dtbo.S files

[linux commit 941214a512d8, modified for U-Boot by removing the
include of vmlinux.lds.h and replacing STRUCT_ALIGNMENT by 16.]

DTB files can be built into the kernel by converting them to assembly
files then assembling them into object files. We extend this here
for DTB overlays with the .dtso extensions.

We change the start and end delimiting tag prefix to make it clear that
this data came from overlay files.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
5 months agoarm64: dts: imx8mp: rename DHCOM SoM overlays to .dtso
Rasmus Villemoes [Wed, 10 Jul 2024 07:16:08 +0000 (09:16 +0200)]
arm64: dts: imx8mp: rename DHCOM SoM overlays to .dtso

Distinguish more clearly between source files meant for producing .dtb
from those meant for producing .dtbo. No functional change, as we
currently have rules for producing a foo.dtbo from either foo.dts or
foo.dtso.

Note that in the linux tree, all device tree overlay sources have been
renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit
81d362732bac). So this is also a step towards staying closer to linux
with respect to both Kbuild and device tree sources.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Marek Vasut <marex@denx.de>
5 months agoARM: dts: remove leftover Amlogic GX/G12 bindings headers
Neil Armstrong [Thu, 18 Jul 2024 08:28:37 +0000 (10:28 +0200)]
ARM: dts: remove leftover Amlogic GX/G12 bindings headers

Remove the leftover Amlogic GX/G12 bindings headers that
maked the v6.10 upstream DT fail to build.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
5 months agoMerge tag 'u-boot-rockchip-20240718' of https://source.denx.de/u-boot/custodians...
Tom Rini [Thu, 18 Jul 2024 13:49:14 +0000 (07:49 -0600)]
Merge tag 'u-boot-rockchip-20240718' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Add boards:
  rk3328: Radxa ROCK Pi E v3;
  rk3588s: FriendlyElec NanoPi R6C/S;
- Remove board: Theobroma Systems RK3368 Lion;
- Add rk3588 pcie support;
- Misc updates for board and config;

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

5 months agobloblist: fix bloblist convention check.
Levi Yun [Wed, 10 Jul 2024 13:53:20 +0000 (14:53 +0100)]
bloblist: fix bloblist convention check.

According to recently firmware handsoff spec [1]'s "Register usage at handoff
boundary", Transfer List's signature value was changed from 0x40_b10b
(3 bytes) to 4a0f_b10b (4 bytes).

As updating of TL's signature, register value of x1/r1 should be:

In aarch32's r1 value should be
    R1[23:0]: set to the TL signature (4a0f_b10b -> masked range value: 0f_b10b)
    R1[31:24]: version of the register convention ==  1

and

In aarch64's x1 value should be
    X1[31:0]: set to the TL signature (4a0f_b10b)
    X1[39:32]: version of the register convention ==  1
    X1[63:40]: MBZ
(See the [2] and [3]).

This patch fix problems:
   1. breaking X1 value with updated specification in aarch64
        - change of length of signature field.

   2. previous error value set in R1 in arm32.
        - length of signature should be 24, but it uses 32bit signature.

This patch is a breaking change. It works only TF-A is updated.

Link: https://github.com/FirmwareHandoff/firmware_handoff
Link: https://github.com/FirmwareHandoff/firmware_handoff/issues/32
Link: https://github.com/FirmwareHandoff/firmware_handoff/commit/5aa7aa1d3a1db75213e458d392b751f0707de027
Signed-off-by: Levi Yun <yeoreum.yun@arm.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agotest/py/requirements.txt: Bump zipp to current release
Tom Rini [Tue, 9 Jul 2024 23:07:09 +0000 (17:07 -0600)]
test/py/requirements.txt: Bump zipp to current release

A security issue exists with zipp before v3.19.1, and the current
release is now v3.19.2. While the change in versions numbers is large, a
manual inspection of the changelog shows that it's not as big as might
be implied.

Reported-by: GitHub dependabot
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agodriver: rng: Do not check ARM_SMCCC_TRNG_VERSION
Leo Yan [Tue, 9 Jul 2024 16:23:09 +0000 (17:23 +0100)]
driver: rng: Do not check ARM_SMCCC_TRNG_VERSION

As described in the document SMC Calling Convention (ARM DEN 0028 1.5 F),
section 7 "Arm Architecture Calls", the SMC call SMCCC_ARCH_FEATURES is
not expected to support the function ID ARM_SMCCC_TRNG_VERSION. Trusted
Firmware-A follows up the specification in its implementation.

This commit removes the invocation to avoid the failure - which is a
wrong calling in U-boot. The later code invokes ARM_SMCCC_TRNG_VERSION
for retrieving the TRNG version, except it can read back the version
number, it also can be used to detect whether the TRNG is supported or
not.

Signed-off-by: Leo Yan <leo.yan@arm.com>
Reviewed-by: Weizhao Ouyang <o451686892@gmail.com>
5 months agoti: omap: am3517evm: Move environment definition to env file
Adam Ford [Tue, 9 Jul 2024 02:38:57 +0000 (21:38 -0500)]
ti: omap: am3517evm: Move environment definition to env file

Instead of cluttering up a header file with a bunch of defines,
move the default environmental variables to a file called
am3517evm.env and reference it from the defconfig.  Also
remove dead comments.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 months agotimer: mtk: skip setting parent with dummy fixed-clock
Christian Marangi [Sat, 6 Jul 2024 16:13:02 +0000 (18:13 +0200)]
timer: mtk: skip setting parent with dummy fixed-clock

Skip setting parent with dummy fixed-clock. Upstream linux might declare
an additional clock for the mtk timer and that additional clock might
also be a fixed-clock defined in DT. Setting parent of a dummy fixed-clock
resulta in error hence mtk timer fails to probe.

Skip setting parent to permit correct probe of the mtk timer.

Fixes: d3c3606c5cc6 ("timer: MediaTek: add timer driver for MediaTek SoCs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoMerge patch series "Respin bootstd cros patch into a series of two"
Tom Rini [Tue, 16 Jul 2024 23:09:36 +0000 (17:09 -0600)]
Merge patch series "Respin bootstd cros patch into a series of two"

Vincent StehlĂ© <vincent.stehle@arm.com> says:

Hi,

This is a respin of this patch [1] after discussion [2]. Thanks to
Simon and Heinrich for their reviews.

To use the guidcmp() function, as suggested by Heinrich, we need to
make it available to bootmeth_cros.c and I think that the cleanest way
to do that is (arguably) to move the guid helper functions to efi.h
near the efi_guid_t definition; this is why the original patch has now
become a series of two patches.

The alternative would be to include efi_loader.h from bootmeth_cros.c
but I think this does not sound "right". If this is in fact the
preferred approach just let me know and I will respin.

There is no difference in the sandbox binaries before/after this
series on Arm and on PC, and all the tests I have run on the sandbox
are unchanged.

5 months agoverdin-am62: add DFU, USB and UUU fastboot support
Vitor Soares [Thu, 4 Jul 2024 15:49:32 +0000 (16:49 +0100)]
verdin-am62: add DFU, USB and UUU fastboot support

Enable USB host as well as USB gadget and DFU support for a53 and r5
configs. Also, enable UUU fastboot support to download files with
the UUU tool from a53.

Additionally, configure usb0 to peripheral mode and add extra
environment for DFU use.

Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
5 months agoconfigs: rockchip: imply OF_LIBFDT_OVERLAY for rk3308 and rk3328
FUKAUMI Naoki [Wed, 17 Jul 2024 04:47:26 +0000 (13:47 +0900)]
configs: rockchip: imply OF_LIBFDT_OVERLAY for rk3308 and rk3328

for rk3308, all defconfigs have CONFIG_OF_LIBFDT_OVERLAY=y, so enable it
by default.

for rk3328, any defconfig doesn't have it. but there is no strong reason
not to enable it. at least it's required for ROCK Pi E.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoconfigs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for rk3308, rk3328, and rk3399
FUKAUMI Naoki [Wed, 17 Jul 2024 04:47:25 +0000 (13:47 +0900)]
configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for rk3308, rk3328, and rk3399

- add support for compressed kernel for rk3308
- prepare support for fdtoverlay for rk3328

tested on ROCK Pi S 256MB, ROCK Pi E 2GB, and ROCK Pi 4A 4GB with
linux-next-20240613 defconfig kernel.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoconfigs: rockchip: reduce diff for rk3308, rk3328, rk3399, rk3568, and rk3588
FUKAUMI Naoki [Wed, 17 Jul 2024 04:47:24 +0000 (13:47 +0900)]
configs: rockchip: reduce diff for rk3308, rk3328, rk3399, rk3568, and rk3588

this is cosmetic change. no functional change is intended.

- remove redundant white spaces
- replace white spaces with tab
- align position of last letter/word
- sort lines in CFG_EXTRA_ENV_SETTINGS
- add comment after #endif

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agophy: rockchip: snps-pcie3: Fix clearing PHP_GRF_PCIESEL_CON bits
Sebastian Kropatsch [Sun, 14 Jul 2024 21:23:43 +0000 (23:23 +0200)]
phy: rockchip: snps-pcie3: Fix clearing PHP_GRF_PCIESEL_CON bits

The pcie1ln_sel bits for the RK3588 are getting set but not cleared due
to an incorrect write mask.
Use a newly introduced constant for the write mask to fix this.
Also introduce a GENMASK-based constant for PCIE30_PHY_MODE.

This fix is adapted from the upstream Linux commit by Sebastian Reichel:
55491a5fa163 ("phy: rockchip-snps-pcie3: fix clearing PHP_GRF_PCIESEL_CON bits")

Fixes: 50e54e80679b ("phy: rockchip: snps-pcie3: Add support for RK3588")
Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agophy: rockchip: snps-pcie3: Fix bifurcation for RK3588
Sebastian Kropatsch [Sun, 14 Jul 2024 21:23:42 +0000 (23:23 +0200)]
phy: rockchip: snps-pcie3: Fix bifurcation for RK3588

Misconfigured `PHP_GRF_PCIESEL` values are causing bifurcation issues,
for example on the FriendlyElec CM3588 NAS board which uses bifurcation
on both PCIe PCIe ports (all four lanes) to enable four M.2 NVMe
sockets. Without this fix, NVMe devices do not get recognized.

Correct the `PHP_GRF_PCIESEL` register configuration and simplify the
bifurcation logic, enabling proper PCIe bifurcation based on the
data-lanes property.

This fix is adapted from the upstream Linux commit by Michal Tomek:
f8020dfb311d ("phy: rockchip-snps-pcie3: fix bifurcation on rk3588")

Fixes: 50e54e80679b ("phy: rockchip: snps-pcie3: Add support for RK3588")
Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agophy: rockchip: snps-pcie3: Fix "rockchip" spelling
Sebastian Kropatsch [Sun, 14 Jul 2024 21:23:41 +0000 (23:23 +0200)]
phy: rockchip: snps-pcie3: Fix "rockchip" spelling

Several identifiers use "rochchip" instead of "rockchip".
Fix this by replacing every instance of "rochchip" with "rockchip".

Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agophy: rockchip: naneng-combphy: Fix "rockchip" spelling
Sebastian Kropatsch [Sun, 14 Jul 2024 21:23:40 +0000 (23:23 +0200)]
phy: rockchip: naneng-combphy: Fix "rockchip" spelling

Replace "rochchip" by "rockchip" in two instances.

Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoboard: rockchip: Add FriendlyElec NanoPi R6S
Sebastian Kropatsch [Thu, 11 Jul 2024 10:15:18 +0000 (12:15 +0200)]
board: rockchip: Add FriendlyElec NanoPi R6S

The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip RK3588s.
It comes with 4GB or 8GB of RAM, a microSD card slot, 32GB eMMC storage,
one RTL8211F 1GbE and two RTL8125 2.5GbE Ethernet ports, one USB 2.0
Type-A and one USB 3.0 Type-A port, a HDMI port, a 12-pin GPIO FPC
connector, a fan connector, IR receiver as well as some buttons and LEDs.

Add initial support for this board using the upstream devicetree sources.

Kernel commit:
f1b11f43b3e9 ("arm64: dts: rockchip: Add support for NanoPi R6S")

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
5 months agoboard: rockchip: Add FriendlyElec NanoPi R6C
Sebastian Kropatsch [Thu, 11 Jul 2024 10:15:17 +0000 (12:15 +0200)]
board: rockchip: Add FriendlyElec NanoPi R6C

The NanoPi R6C is a SBC by FriendlyElec based on the Rockchip RK3588s.
It comes with 4GB or 8GB of RAM, a microSD card slot, optional 32GB eMMC
storage, one M.2 M-Key connector, one RTL8211F 1GbE and one RTL8125
2.5GbE Ethernet port, one USB 2.0 Type-A and one USB 3.0 Type-A port, a
HDMI port, a 30-pin GPIO header as well as multiple buttons and LEDs.

Add initial support for this board using the upstream devicetree sources.

Tested in U-Boot proper:
- Booting from eMMC works
- 1GbE Ethernet works using the eth_eqos driver (tested by ping)
- 2.5GbE Ethernet works using the eth_rtl8169 driver (tested by ping),
  but the status LEDs on this specific port currently aren't working
- NVMe SSD in M.2 socket does get recognized (tested with `nvme scan`
  followed by `nvme details`)

Kernel commit:
d5f1d7437451 ("arm64: dts: rockchip: Add support for NanoPi R6C")

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
5 months agorockchip: tiger-rk3588: add PCIe support
Quentin Schulz [Thu, 4 Jul 2024 12:53:33 +0000 (14:53 +0200)]
rockchip: tiger-rk3588: add PCIe support

This enables PCIe support on Tiger as exposed on
Q7_PCIE[0123]_[RT]X_[PN] signals and more specifically on the `PCI
Express` connector on the Haikou devkit.

This was tested with a PCIe to NVMe adapter (e.g.
https://www.amazon.de/dp/B07RZZ3TJG).

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: jaguar-rk3588: add PCIe M.2 M-KEY NVMe support
Quentin Schulz [Thu, 4 Jul 2024 12:53:32 +0000 (14:53 +0200)]
rockchip: jaguar-rk3588: add PCIe M.2 M-KEY NVMe support

Jaguar has an M.2 M-KEY slot for NVMes, connected to the PCIe3 4-lane
PHY on RK3588.

CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y is technically not necessary since
it's required only for the M.2 E-KEY slot on the main PCB, but that is
used typically for WiFi+BT modules, or on the mezzanine connector but
the features exposed behind that connector aren't supported in U-Boot
(no DT for it right now). However, if the PHY driver is missing, we get
the following error message:
pcie_dw_rockchip pcie@fe170000: failed to get pcie phy (ret=-19)

and you would need to know which PCIe controller that is before deciding
to ignore it. While after enabling the PHY driver, we are greeted with:
pcie_dw_rockchip pcie@fe170000: PCIe-2 Link Fail
which is a bit more acceptable (to me).

The other option would be to disable the PCIe2 PHYs/controllers in the
DT, which I'm not too fond of.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: add PCIe3 support on rk3588-jaguar
Heiko Stuebner [Thu, 4 Jul 2024 12:53:31 +0000 (14:53 +0200)]
arm64: dts: rockchip: add PCIe3 support on rk3588-jaguar

The Jaguar SBC provides an M.2 slot connected to the pcie3 controller.
In contrast to a number of other boards the pcie-refclk is gpio-controlled,
so the necessary clock and is added to the list of pcie3 clocks.

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

(cherry picked from commit 76a89655ae740dddb57187b5b52071ed99187452)
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>