platform/kernel/u-boot.git
10 months agodoc: describe QEMU virtio block device
Heinrich Schuchardt [Sun, 30 Jul 2023 17:39:00 +0000 (19:39 +0200)]
doc: describe QEMU virtio block device

Enhance the description of QEMU block devices

* Describe how to attach a virtio-blk device.
* Sort the command lines for MMC to match the other devices.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agodoc: move README.falcon to HTML
Heinrich Schuchardt [Fri, 28 Jul 2023 20:37:40 +0000 (22:37 +0200)]
doc: move README.falcon to HTML

Move the Falcon mode documentation to HTML.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
10 months agodoc: board: ti: Add SPDX License to svg images
Nishanth Menon [Fri, 28 Jul 2023 20:05:07 +0000 (15:05 -0500)]
doc: board: ti: Add SPDX License to svg images

Add Licensing to svg images to clarify the terms.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
10 months agodoc: U-Boot boot phases
Heinrich Schuchardt [Fri, 28 Jul 2023 16:44:34 +0000 (18:44 +0200)]
doc: U-Boot boot phases

Add more detail to the description of U-Boot boot phases:

* describe which steps are optional
* mentions alternative boot flows

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
10 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 2 Aug 2023 16:13:16 +0000 (12:13 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

+ Fix compilation error for CI when enabling RTL8169 driver
+ Fix compilation error for pci_mmc.c by adding acpi_table header file
+ Support video console and usb keyboard on RISC-V QEMU virt machine
+ Support StarFive JH7110 PCIe driver
+ Enable PCI on Unmatched board

10 months agoriscv: qemu: Enable usb keyboard as an input device
Bin Meng [Sun, 23 Jul 2023 04:40:41 +0000 (12:40 +0800)]
riscv: qemu: Enable usb keyboard as an input device

This brings PCI xHCI support to QEMU RISC-V and uses a usb keyboard
as one of the input devices.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agoriscv: qemu: Remove out-of-date "riscv, kernel-start" handling
Bin Meng [Sun, 23 Jul 2023 04:40:40 +0000 (12:40 +0800)]
riscv: qemu: Remove out-of-date "riscv, kernel-start" handling

Commit 66ffe57 ("riscv: qemu: detect and boot the kernel passed by QEMU")
added some logic to handle "riscv,kernel-start" in DT and stored the
address to an environment variable kernel_start.

However this "riscv,kernel-start" has never been an upstream DT binding.
The upstream QEMU never generates such a DT either. Presumably U-Boot
development was based on a downstream QEMU fork.

Now we drop all codes in commit 66ffe57, except that BOARD_LATE_INIT
is kept for later use.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agoriscv: qemu: Enable PRE_CONSOLE_BUFFER
Bin Meng [Sun, 23 Jul 2023 04:40:38 +0000 (12:40 +0800)]
riscv: qemu: Enable PRE_CONSOLE_BUFFER

By default the video console only outputs messages after it's ready.
Messages before that won't show on the video console, but U-Boot has
an option to buffer the console messages before it's ready.

Enable this support, and carefully select an address for the buffer.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agoconsole: Print out complete stdio device list
Bin Meng [Sun, 23 Jul 2023 04:40:37 +0000 (12:40 +0800)]
console: Print out complete stdio device list

At present if both CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are on,
during boot, the printed out stdio devices are incomplete, e.g.:
with "stdout=serial,vidconsole", only "vidconsole" is printed.

For such case, we can print out the stdio device name from the
environment variables.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
10 months agoconsole: Refactor stdio_print_current_devices() a little bit
Bin Meng [Sun, 23 Jul 2023 04:40:36 +0000 (12:40 +0800)]
console: Refactor stdio_print_current_devices() a little bit

In preparation to future changes, refactor this routine a little bit.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
10 months agoconsole: Make stdio_print_current_devices() static
Bin Meng [Sun, 23 Jul 2023 04:40:35 +0000 (12:40 +0800)]
console: Make stdio_print_current_devices() static

As it is only called in common/console.c

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agoconsole: kconfig: Drop the redundant VIDEO dependency
Bin Meng [Sun, 23 Jul 2023 04:40:34 +0000 (12:40 +0800)]
console: kconfig: Drop the redundant VIDEO dependency

The VIDEO dependency is described twice in CONSOLE_MUX.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agoriscv: qemu: Enable Bochs video support
Bin Meng [Sun, 23 Jul 2023 04:40:33 +0000 (12:40 +0800)]
riscv: qemu: Enable Bochs video support

Enable video console using the emulated Bochs VGA card.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agoacpi: Add missing RISC-V acpi_table header
Heinrich Schuchardt [Wed, 26 Jul 2023 06:05:13 +0000 (08:05 +0200)]
acpi: Add missing RISC-V acpi_table header

The pci_mmc.c driver can generate ACPI info and therefore includes
asm/acpi_table.h. This file does not exist for the RISC-V architecture
and thus code compilation fails when using this driver on RISC-V

Create an empty include file.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Rick Chen <rick@andestech.com>
10 months agoriscv: sifive: initialize PCI on Unmatched
Heinrich Schuchardt [Tue, 25 Jul 2023 10:41:30 +0000 (12:41 +0200)]
riscv: sifive: initialize PCI on Unmatched

The Unmatched board is typically booted from NVMe which requires PCI.
When dropping to a console PCI is not initialized yet. 'pci enum' has to be
called.

Change the configuration to call  pci_init() in board_init_r().

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Rick Chen <rick@andestech.com>
10 months agoconfigs: starfive-jh7110: Add CONFIG_RTL8169
Minda Chen [Thu, 20 Jul 2023 11:37:29 +0000 (19:37 +0800)]
configs: starfive-jh7110: Add CONFIG_RTL8169

Add PCIe device rtl8169 net adapter driver support.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agonet: rtl8169: Add one device ID 0x8161
Minda Chen [Thu, 20 Jul 2023 11:37:28 +0000 (19:37 +0800)]
net: rtl8169: Add one device ID 0x8161

Add rtl8169 NIC device ID and reorder the device ID.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agonet: rtl8169: Fix DMA minimal aligned compile warning in RISC-V
Minda Chen [Thu, 20 Jul 2023 11:37:27 +0000 (19:37 +0800)]
net: rtl8169: Fix DMA minimal aligned compile warning in RISC-V

For RISC-V architeture, hardware maintain the dcache coherency.
Software do not flush the cache. So even cache-line size larger
than descriptor size, driver can work.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agonet: rtl8169: Fix compile warning in rtl8169
Minda Chen [Thu, 20 Jul 2023 11:37:26 +0000 (19:37 +0800)]
net: rtl8169: Fix compile warning in rtl8169

While compiling rtl8169.c, There are many "make pointer from
integer without a cast" compile warnings. fix them with
adding cast.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agoriscv: dts: starfive: Enable PCIe host controller
Mason Huo [Tue, 25 Jul 2023 09:46:50 +0000 (17:46 +0800)]
riscv: dts: starfive: Enable PCIe host controller

Enable and add pinctrl configuration for PCIe host controller.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agoconfigs: starfive-jh7110: Add support for PCIe host driver
Mason Huo [Tue, 25 Jul 2023 09:46:49 +0000 (17:46 +0800)]
configs: starfive-jh7110: Add support for PCIe host driver

Add PCIe host driver and nvme driver in configure file.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agostarfive: pci: Add StarFive JH7110 pcie driver
Mason Huo [Tue, 25 Jul 2023 09:46:48 +0000 (17:46 +0800)]
starfive: pci: Add StarFive JH7110 pcie driver

Add pcie driver for StarFive JH7110, Also add PLDA
PCIe controller common driver functions.

Several devices are tested:
a) M.2 NVMe SSD
b) Realtek 8169 Ethernet adapter.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agoi2c: designware: Add Kconfig for designware_i2c_pci.c
Minda Chen [Tue, 25 Jul 2023 09:46:47 +0000 (17:46 +0800)]
i2c: designware: Add Kconfig for designware_i2c_pci.c

As the Designware_i2c_pci.c uses ACPI APIs, If some SoCs (StarFive
JH7110) contain Designware i2c and PCI but do not use ACPI,
This file cannot be compiled. So add a new Kconfig for
designware_i2c_pci.c, which depends on ACPIGEN

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
10 months agoMerge tag 'x86-pull-20230801' of https://source.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Tue, 1 Aug 2023 15:57:55 +0000 (11:57 -0400)]
Merge tag 'x86-pull-20230801' of https://source.denx.de/u-boot/custodians/u-boot-x86

- MTRR fixes for x86 boards
- Add a little more info to 'cbsysinfo' command

10 months agoMerge tag 'video-20230801' of https://source.denx.de/u-boot/custodians/u-boot-video
Tom Rini [Tue, 1 Aug 2023 14:17:49 +0000 (10:17 -0400)]
Merge tag 'video-20230801' of https://source.denx.de/u-boot/custodians/u-boot-video

 - dm video cosmetic style fix
 - bochs: remove the x86 limitation
 - correct kconfig text for PCI default FB size
 - kconfig: drop the superfluous PCI dependency
 - set up default FB size for Bochs

10 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 1 Aug 2023 14:17:23 +0000 (10:17 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- i2c-gpio: Correctly handle new {sda, scl}-gpios bindings (Chris)
- mvebu: x240: Use i2c-gpio instead of built in controller (Chris)

10 months agodrivers: video: tidss: tidss_drv: Use kconfig VIDEO_REMOVE to remove video
Nikhil M Jain [Thu, 27 Jul 2023 06:31:26 +0000 (12:01 +0530)]
drivers: video: tidss: tidss_drv: Use kconfig VIDEO_REMOVE to remove video

Perform removal of DSS if kconfigs VIDEO_REMOVE or SPL_VIDEO_REMOVE is
set by user. Otherwise if above Kconfigs are not selected, it is assumed
that user wants splash screen to be displayed until linux kernel boots
up. In such scenario, leave the power domain of DSS as "on" so that
splash screen stays intact until kernel boots up.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
10 months agodrivers: video: tidss: tidss_drv: Change remove method
Nikhil M Jain [Thu, 27 Jul 2023 06:31:25 +0000 (12:01 +0530)]
drivers: video: tidss: tidss_drv: Change remove method

Change remove method of DSS video driver to disable video port instead
of performing a soft reset, as soft reset takes longer duration. Video
port is disabled by setting enable bit of video port to 0.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Devarsh Thakkar <devarsht@ti.com>
10 months agovideo: bochs: Set the frame buffer size per configuration
Bin Meng [Sun, 23 Jul 2023 04:40:32 +0000 (12:40 +0800)]
video: bochs: Set the frame buffer size per configuration

At present the uclass stored frame buffer size is set to a hard
coded value, but we can calculate the correct value based on what
is configured.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agovideo: kconfig: Set default FB size for Bochs
Bin Meng [Sun, 23 Jul 2023 04:40:31 +0000 (12:40 +0800)]
video: kconfig: Set default FB size for Bochs

Set up a default frame buffer size of 8MiB for Bochs for non-x86
architecturs as PCI is normally not enumerated before relocation
on these architectures.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agovideo: kconfig: Drop the superfluous dependency
Bin Meng [Sun, 23 Jul 2023 04:40:30 +0000 (12:40 +0800)]
video: kconfig: Drop the superfluous dependency

PCI is always selected by X86 architecture hence "X86 && PCI" does
not make it better.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agovideo: kconfig: Fix wrong text for the PCI default FB size
Bin Meng [Sun, 23 Jul 2023 04:40:29 +0000 (12:40 +0800)]
video: kconfig: Fix wrong text for the PCI default FB size

There is an example in the VIDEO_PCI_DEFAULT_FB_SIZE help text to
tell people how to calculate its value but the resolution given
does not match the value. Fix it.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agovideo: bochs: Remove the x86 dependency
Bin Meng [Sun, 23 Jul 2023 04:40:28 +0000 (12:40 +0800)]
video: bochs: Remove the x86 dependency

Now that the driver is legacy free, remove the x86 dependency so
that it can be used on non-x86 architectures.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agovideo: bochs: Avoid using IO instructions to access VGA IO port
Bin Meng [Sun, 23 Jul 2023 04:40:27 +0000 (12:40 +0800)]
video: bochs: Avoid using IO instructions to access VGA IO port

At present the driver uses IO instructions to access the legacy
VGA IO ports, which unfortunately limits the driver to work only
on x86. It turns out the IO instruction is not necessary as Bochs
VGA card remaps the legacy VGA IO ports (0x3c0 -> 0x3df) to its
memory mapped register space from offset 0x400.

Update the driver to use MMIO access for VGA IO port.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agovideo: bochs: Drop the useless argument of bochs_vga_write()
Bin Meng [Sun, 23 Jul 2023 04:40:26 +0000 (12:40 +0800)]
video: bochs: Drop the useless argument of bochs_vga_write()

bochs_vga_write() takes 'index' as one argument, but never uses it.

While we are here, use macros instead of magic numbers for the
VGA IO port register name and value.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agovideo: bochs: Drop inclusion of <asm/mtrr.h>
Bin Meng [Sun, 23 Jul 2023 04:40:25 +0000 (12:40 +0800)]
video: bochs: Drop inclusion of <asm/mtrr.h>

The driver does not call any MTRR APIs.

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agodm: video: Cosmetic style fix
Bin Meng [Sun, 23 Jul 2023 04:40:24 +0000 (12:40 +0800)]
dm: video: Cosmetic style fix

Some coding convention fixes for video_post_bind().

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # qemu-x86_64
10 months agox86: Add a little more info to cbsysinfo
Simon Glass [Tue, 25 Jul 2023 21:37:06 +0000 (15:37 -0600)]
x86: Add a little more info to cbsysinfo

Show the number of records in the table and the total table size in
bytes.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
10 months agox86: Return mtrr_add_request() to its old purpose
Simon Glass [Mon, 31 Jul 2023 06:01:08 +0000 (14:01 +0800)]
x86: Return mtrr_add_request() to its old purpose

This function used to be for adding a list of requests to be actioned on
relocation. Revert it back to this purpose, to avoid problems with boards
which need control of their MTRRs (i.e. those which don't use FSP).

The mtrr_set_next_var() function is available when the next free
variable-MTRR must be set, so this can be used instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Fixes: 3bcd6cf89ef ("x86: mtrr: Skip MSRs that were already programmed..")
Fixes: 596bd0589ad ("x86: mtrr: Do not clear the unused ones..")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
10 months agovideo: vesa: Use mtrr_set_next_var() for graphics memory
Bin Meng [Mon, 31 Jul 2023 06:01:07 +0000 (14:01 +0800)]
video: vesa: Use mtrr_set_next_var() for graphics memory

At present this uses mtrr_add_request() & mtrr_commit() combination
to program the MTRR for graphics memory. This usage has two major
issues as below:

- mtrr_commit() will re-initialize all MTRR registers from index 0,
  using the settings previously added by mtrr_add_request() and saved
  in gd->arch.mtrr_req[], which won't cause any issue but is unnecessary
- The way such combination works is based on the assumption that U-Boot
  has full control with MTRR programming (e.g.: U-Boot without any blob
  that does all low-level initialization on its own, or using FSP2 which
  does not touch MTRR), but this is not the case with FSP. FSP programs
  some MTRRs during its execution but U-Boot does not have the settings
  saved in gd->arch.mtrr_req[] and when doing mtrr_commit() it will
  corrupt what was already programmed previously.

Correct this to use mtrr_set_next_var() instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agovideo: ivybridge: Use mtrr_set_next_var() for graphics memory
Bin Meng [Mon, 31 Jul 2023 06:01:06 +0000 (14:01 +0800)]
video: ivybridge: Use mtrr_set_next_var() for graphics memory

At present this uses mtrr_add_request() & mtrr_commit() combination
to program the MTRR for graphics memory. This usage has two major
issues as below:

- mtrr_commit() will re-initialize all MTRR registers from index 0,
  using the settings previously added by mtrr_add_request() and saved
  in gd->arch.mtrr_req[], which won't cause any issue but is unnecessary
- The way such combination works is based on the assumption that U-Boot
  has full control with MTRR programming (e.g.: U-Boot without any blob
  that does all low-level initialization on its own, or using FSP2 which
  does not touch MTRR), but this is not the case with FSP. FSP programs
  some MTRRs during its execution but U-Boot does not have the settings
  saved in gd->arch.mtrr_req[] and when doing mtrr_commit() it will
  corrupt what was already programmed previously.

Correct this to use mtrr_set_next_var() instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agovideo: broadwell: Use mtrr_set_next_var() for graphics memory
Bin Meng [Mon, 31 Jul 2023 06:01:05 +0000 (14:01 +0800)]
video: broadwell: Use mtrr_set_next_var() for graphics memory

At present this uses mtrr_add_request() & mtrr_commit() combination
to program the MTRR for graphics memory. This usage has two major
issues as below:

- mtrr_commit() will re-initialize all MTRR registers from index 0,
  using the settings previously added by mtrr_add_request() and saved
  in gd->arch.mtrr_req[], which won't cause any issue but is unnecessary
- The way such combination works is based on the assumption that U-Boot
  has full control with MTRR programming (e.g.: U-Boot without any blob
  that does all low-level initialization on its own, or using FSP2 which
  does not touch MTRR), but this is not the case with FSP. FSP programs
  some MTRRs during its execution but U-Boot does not have the settings
  saved in gd->arch.mtrr_req[] and when doing mtrr_commit() it will
  corrupt what was already programmed previously.

Correct this to use mtrr_set_next_var() instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agox86: fsp: Use mtrr_set_next_var() for graphics memory
Bin Meng [Mon, 31 Jul 2023 06:01:04 +0000 (14:01 +0800)]
x86: fsp: Use mtrr_set_next_var() for graphics memory

At present this uses mtrr_add_request() & mtrr_commit() combination
to program the MTRR for graphics memory. This usage has two major
issues as below:

- mtrr_commit() will re-initialize all MTRR registers from index 0,
  using the settings previously added by mtrr_add_request() and saved
  in gd->arch.mtrr_req[], which won't cause any issue but is unnecessary
- The way such combination works is based on the assumption that U-Boot
  has full control with MTRR programming (e.g.: U-Boot without any blob
  that does all low-level initialization on its own, or using FSP2 which
  does not touch MTRR), but this is not the case with FSP. FSP programs
  some MTRRs during its execution but U-Boot does not have the settings
  saved in gd->arch.mtrr_req[] and when doing mtrr_commit() it will
  corrupt what was already programmed previously.

Correct this to use mtrr_set_next_var() instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
10 months agox86: Change testing logic of mtrr commit
Bin Meng [Mon, 31 Jul 2023 13:56:02 +0000 (07:56 -0600)]
x86: Change testing logic of mtrr commit

On Coral U-Boot SPL programs some MTRRs and FSPv2 in U-Boot proper
needs to program MTRRs too. With current testing logic of mtrr
commit in init_cache_f_r(), the mtrr commit is skipped which won't
work as the queued mtrr requests include setup for DRAM regions.

Change the logic to allow such configuration.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tweak to put back CONFIG_FSP_VERSION2 at top:
Signed-off-by: Simon Glass <sjg@chromium.org>
10 months agoMerge tag 'u-boot-rockchip-20230731' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 31 Jul 2023 15:31:26 +0000 (11:31 -0400)]
Merge tag 'u-boot-rockchip-20230731' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

- Update dwc3 generic driver and update support for rk3568/rk3328;
- Add boards:
        rk3566: Pine64 Quartz64-A/B, SOQuartz on Model A/Blade/CM4-IO
        rk3568: Radxa E25 Carrier Board
        rk3588: Radxa ROCK5A
- Fixes and updates for chromebook veryon/jerry/speedy;
- SPI support fixes for rk3399/rk3568/rk3588;
- rk3588 usbdp phy support;
- dts and config updates for different boards;

10 months agoboard: rockchip: Add Radxa E25 Carrier Board
Jonas Karlman [Sun, 30 Jul 2023 12:30:26 +0000 (12:30 +0000)]
board: rockchip: Add Radxa E25 Carrier Board

Radxa E25 is a network application carrier board for the Radxa CM3I SoM
with a RK3568 SoC. It features dual 2.5G ethernet, mini PCIe, M.2 B Key,
USB3, eMMC, SD, nano SIM card slot and a 26-pin GPIO header.

Features tested on a Radxa E25 v1.4:
- SD-card boot
- eMMC boot
- USB host
- PCIe/Ethernet adapters is detected
- SATA

Device tree is imported from linux next-20230728.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: FUKAUMI Naoki <naoki@radxa.com>
10 months agoconfigs: rockchip: Enable USB2PHY for RK3328 boards
Jagan Teki [Tue, 6 Jun 2023 17:09:18 +0000 (22:39 +0530)]
configs: rockchip: Enable USB2PHY for RK3328 boards

Enable USB2PHY for all RK3328 boards.

=> usb start
starting USB...
Bus usb@ff5c0000: USB EHCI 1.00
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff600000: generic_phy_get_bulk : no phys property
Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@ff580000: USB DWC2
scanning bus usb@ff5c0000 for devices... 2 USB Device(s) found
scanning bus usb@ff5d0000 for devices... 1 USB Device(s) found
scanning bus usb@ff600000 for devices... 2 USB Device(s) found
scanning bus usb@ff580000 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 2 Storage Device(s) found
=> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller
  |
  +-2  Mass Storage (480 Mb/s, 500mA)
       TS-RDF5A Transcend 000000000009

  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller
  |
  +-2  Mass Storage (5 Gb/s, 224mA)
       SanDisk Dual Drive 040130e3ee554b7078843f4eb331646

  1  Hub (480 Mb/s, 0mA)
  |   U-Boot Root Hub
  |
  +-2  Human Interface (12 Mb/s, 98mA)
       Logitech USB Receiver

=> dm tree -s
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 syscon        1  [ + ]   syscon                |-- syscon@ff450000
 phy           0  [ + ]   rockchip_usb2phy      |   `-- usb2phy@100
 clk           2  [ + ]   rockchip_usb2phy_clo  |       |-- usb480m_phy
 phy           1  [ + ]   rockchip_usb2phy_por  |       |-- otg-port
 phy           2  [ + ]   rockchip_usb2phy_por  |       `-- host-port
 sysinfo       0  [ + ]   sysinfo_smbios        |-- smbios
 usb           3  [ + ]   dwc2_usb              |-- usb@ff580000
 usb_hub       3  [ + ]   usb_hub               |   `-- usb_hub
 usb_dev_ge    0  [ + ]   usb_dev_generic_drv   |       `-- generic_bus_3_dev_2
 usb           0  [ + ]   ehci_generic          |-- usb@ff5c0000
 usb_hub       0  [ + ]   usb_hub               |   `-- usb_hub
 usb_mass_s    0  [ + ]   usb_mass_storage      |       `-- usb_mass_storage
 blk           2  [ + ]   usb_storage_blk       |           |-- usb_mass_storage.lun0
 partition     4  [ + ]   blk_partition         |           |   |-- usb_mass_storage.lun0:1
 partition     5  [ + ]   blk_partition         |           |   `-- usb_mass_storage.lun0:2
 bootdev       3  [   ]   usb_bootdev           |           `-- usb_mass_storage.lun0.bootdev
 usb           1  [ + ]   ohci_generic          `-- usb@ff5d0000
 usb_hub       1  [ + ]   usb_hub                   `-- usb_hub

Cc: Tianling Shen <cnsztl@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Cc: Loic Devulder <ldevulder@suse.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Banglang Huang <banglang.huang@foxmail.com>
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoclk: rockchip: rk3328: Handle usb480m phy clock
Jagan Teki [Tue, 6 Jun 2023 17:09:17 +0000 (22:39 +0530)]
clk: rockchip: rk3328: Handle usb480m phy clock

Handle USB480M clock ID in set_rate() and set_parent()
to allow the dt assigned-clocks and assigned-clock-parents
work on rk3328.dtsi

Cc: Lukasz Majewski <lukma@denx.de>
Cc: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agophy: rockchip-inno-usb2: Add USB2 PHY for RK3328
Jagan Teki [Tue, 6 Jun 2023 17:09:16 +0000 (22:39 +0530)]
phy: rockchip-inno-usb2: Add USB2 PHY for RK3328

USB2.0 Host and OTG controllers in RK3328 are using USB2PHY.

Add support for it.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Xavier Drudis Ferran <xdrudis@tinet.cat>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoconfigs: Enable DWC3 USB 3.0 on RK3328 boards
Jagan Teki [Tue, 6 Jun 2023 17:09:15 +0000 (22:39 +0530)]
configs: Enable DWC3 USB 3.0 on RK3328 boards

Enable USB 3.0 in all RK3328 boards.

=> usb start
starting USB...
Bus usb@ff5c0000: ehci_generic usb@ff5c0000: Failed to get clocks (ret=-19)
Port not available.
Bus usb@ff5d0000: USB OHCI 1.0
Bus usb@ff600000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
Bus usb@ff580000: 1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
=> usb tree
USB device tree:
  1  Hub (12 Mb/s, 0mA)
      U-Boot Root Hub

  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller
  |
  +-2  Mass Storage (5 Gb/s, 224mA)
       SanDisk Dual Drive 040130e3ee554b7078843f4eb331646

  1  Hub (480 Mb/s, 0mA)
      U-Boot Root Hub

Cc: Tianling Shen <cnsztl@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Cc: Loic Devulder <ldevulder@suse.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Banglang Huang <banglang.huang@foxmail.com>
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agousb: dwc3-generic: Restrict single ctrl node for RK3328
Jagan Teki [Tue, 6 Jun 2023 17:09:14 +0000 (22:39 +0530)]
usb: dwc3-generic: Restrict single ctrl node for RK3328

Like Rockchip RK3568, the RK3328 also have single node to
represent the glue and ctrl for USB 3.0.

So, use the driver data to use single ctrl for RK3328 DWC3.

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoconfigs: Drop unused XHCI_DWC3 for RK3328 boards
Jagan Teki [Tue, 6 Jun 2023 17:09:13 +0000 (22:39 +0530)]
configs: Drop unused XHCI_DWC3 for RK3328 boards

Driver support for rk3328 is not supported so drop this
unused XHCI_DWC3.

Cc: Tianling Shen <cnsztl@gmail.com>
Cc: David Bauer <mail@david-bauer.net>
Cc: Loic Devulder <ldevulder@suse.com>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Banglang Huang <banglang.huang@foxmail.com>
Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoarm64: dts: rockchip: Drop unused rk3328-xhci node
Jagan Teki [Tue, 6 Jun 2023 17:09:12 +0000 (22:39 +0530)]
arm64: dts: rockchip: Drop unused rk3328-xhci node

rk3328-xhci has been added due to the fact that the upstream
dwc3 is unsupported. Moreover, the driver for rk3328-xhci is
not added to the code tree.

By considering these facts and unsupported rk3328-xhci this
patch is dropping all related code from DT. However, the DWC3
is fixed now in dwc3-generic and RK3328 USB 3.0 is functional
in upcoming patches.

Let's drop it.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agopower: regulator: rk8xx: Add 500us delay after LDO regulator is enabled
Jonas Karlman [Sun, 2 Jul 2023 12:41:15 +0000 (12:41 +0000)]
power: regulator: rk8xx: Add 500us delay after LDO regulator is enabled

A quick power cycle of a LDO regulator during dw-mmc signal voltage
change has shown that SD-card does not always get recognized.

Linux driver use an enable_time of 400us for LDO regulators. Apply a
500us delay when a LDO regulator is enabled to fix possible issues.

Fixes: 94afc1cb466a ("power: regulator: rk8xx: update the driver for rk808 and rk818")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: elaine.zhang<elaine.zhang@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoarm: mvebu: x240: Use i2c-gpio instead of built in controller
Chris Packham [Tue, 25 Jul 2023 23:13:09 +0000 (11:13 +1200)]
arm: mvebu: x240: Use i2c-gpio instead of built in controller

There is an Errata with the built-in I2C controller where various I2C
hardware errors cause a complete lockup of the CPU (which eventually
results in an watchdog reset).

Put the I2C MPP pins into GPIO mode and use the i2c-gpio driver instead.
This uses a bit-banged implementation of an I2C controller and avoids
triggering the Errata.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
10 months agoi2c: i2c-gpio: Correctly handle new {sda, scl}-gpios bindings
Chris Packham [Tue, 25 Jul 2023 23:13:08 +0000 (11:13 +1200)]
i2c: i2c-gpio: Correctly handle new {sda, scl}-gpios bindings

gpio_request_list_by_name() returns the number of gpios requested.
Notably it swallows the underlying -ENOENT when the "gpios" property
does not exist.

Update the i2c-gpio driver to check for ret == 0 before trying the new
sda-gpios/scl-gpios properties.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
10 months agoboard: rockchip: add Radxa ROCK5A Rk3588 board
Eugen Hristev [Tue, 4 Jul 2023 19:05:12 +0000 (22:05 +0300)]
board: rockchip: add Radxa ROCK5A Rk3588 board

ROCK 5A is a Rockchip RK3588S based SBC (Single Board Computer) by Radxa.

There are tree variants depending on the DRAM size : 4G, 8G and 16G.

Specifications:

     Rockchip Rk3588S SoC
     4x ARM Cortex-A76, 4x ARM Cortex-A55
     4/8/16GB memory LPDDR4x
     Mali G610MC4 GPU
     MIPI CSI 2 multiple lanes connector
     4-lane MIPI DSI connector
     Audio – 3.5mm earphone jack
     eMMC module connector
     uSD slot (up to 128GB)
     2x USB 2.0, 2x USB 3.0
     2x micro HDMI 2.1 ports, one up to 8Kp60, the other up to 4Kp60
     Gigabit Ethernet RJ45 with optional PoE support
     40-pin IO header including UART, SPI, I2C and 5V DC power in
     USB PD over USB Type-C
     Size: 85mm x 56mm (Raspberry Pi 4 form factor)

Kernel commits:
d1824cf95799 ("arm64: dts: rockchip: Add rock-5a board")
991f136c9f8d ("arm64: dts: rockchip: Update sdhci alias for rock-5a")
304c8a759953 ("arm64: dts: rockchip: Remove empty line from rock-5a")
cda0c2ea65a0 ("arm64: dts: rockchip: Fix RX delay for ethernet phy on rk3588s-rock5a")

Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoARM: dts: rockchip: rk3588: Move bootph-all props to common file
Eugen Hristev [Tue, 4 Jul 2023 19:05:11 +0000 (22:05 +0300)]
ARM: dts: rockchip: rk3588: Move bootph-all props to common file

Move bootph-all prop to common SoC dt file, because they are typically used
by multiple boards.
Unreferenced nodes are removed from the SPL device tree during a
normal build.

Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3568-rock-3a: Fix pcie2x1 and pcie3x2 pinctrl override
Jonas Karlman [Mon, 31 Jul 2023 04:28:34 +0000 (04:28 +0000)]
rockchip: rk3568-rock-3a: Fix pcie2x1 and pcie3x2 pinctrl override

The pcie pinctrl override added in the commit a76aa6ffa6cd ("rockchip:
rk3568-rock-3a: Enable PCIe and NVMe support") is causing a pinmux issue
on linux when using a EFI boot flow.

The pcie reset-gpios must however be configured with gpio function, or
the device will freeze running pci enum and nothing is connected.

Adjust the pinctrl override in u-boot.dtsi to fix this issue. PCIe/NVMe
continues to work in both U-Boot and linux after this change.

Also revert disable of sdmmc2 and uart1 to fix use of wifi in linux when
using a EFI boot flow.

Fixes: a76aa6ffa6cd ("rockchip: rk3568-rock-3a: Enable PCIe and NVMe support")
Fixes: 073d911ae64a ("rockchip: rk3568-rock-3a: Sync device tree from linux")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
10 months agorockchip: rk3588-rock-5b: Fix SPI Flash alias
Jonas Karlman [Fri, 28 Jul 2023 12:05:41 +0000 (12:05 +0000)]
rockchip: rk3588-rock-5b: Fix SPI Flash alias

The commit fd6e425be243 ("rockchip: rk3588-rock-5b: Enable boot from SPI
NOR flash") enabled SPI flash support by adding a spi0 alias.

Correct this by adding spi0-spi5 aliases in rk3588s-u-boot.dtsi and
SF_DEFAULT_BUS=5 and SPL_DM_SEQ_ALIAS=y in defconfig. Also enabled
support for parsing and auto discovery of parameters, SFDP.

Fixes: fd6e425be243 ("rockchip: rk3588-rock-5b: Enable boot from SPI NOR flash")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3568-rock-3a: Fix SPI Flash alias
Jonas Karlman [Fri, 28 Jul 2023 12:05:40 +0000 (12:05 +0000)]
rockchip: rk3568-rock-3a: Fix SPI Flash alias

The commit 64f79f88a751 ("rockchip: rk3568-rock-3a: Enable boot from SPI
NOR flash") enabled SPI flash support by overriding the spi0 alias.

Correct this by adding a new spi4 alias in rk356x-u-boot.dtsi and
SF_DEFAULT_BUS=4 and SPL_DM_SEQ_ALIAS=y in defconfig. Also enabled
support for parsing and auto discovery of parameters, SFDP.

Fixes: 64f79f88a751 ("rockchip: rk3568-rock-3a: Enable boot from SPI NOR flash")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agodoc: rockchip: Update SPI flashing instruction
Jonas Karlman [Fri, 28 Jul 2023 11:38:40 +0000 (11:38 +0000)]
doc: rockchip: Update SPI flashing instruction

Update documentation on how to write a bootable u-boot-rockchip-spi.bin
image into SPI flash. This removes the reference to a hardcoded and now
obsolete 0x60000 payload offset.

Also remove an obsolete reference to pad_cat.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <foss+u-boot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3399-roc-pc: Fix SPL max size and SPI flash payload offset
Jonas Karlman [Fri, 28 Jul 2023 11:38:38 +0000 (11:38 +0000)]
rockchip: rk3399-roc-pc: Fix SPL max size and SPI flash payload offset

TPL max size is limited to 184 KB, SPL is loaded to 0x0 and TF-A is
loaded to 0x40000, this limit SPL max size to 256 KB. With BootRom only
reading first 2 KB per 4 KB page of SPI flash, 880 KB may be needed for
TPL+SPL in a worst-case scenario. (184 KB + 256 KB) x 2 = 880 KB

Use 0xE0000 (896 KB) as the payload offset in SPI flash, this allows
for a payload of 3168 KB before env offset start to overlap.

Also add CONFIG_ROCKCHIP_SPI_IMAGE=y to build a bootable SPI flash
image, u-boot-rockchip-spi.bin.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <foss+u-boot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3399-pinephone-pro: Fix SPL max size and SPI flash payload offset
Jonas Karlman [Fri, 28 Jul 2023 11:38:37 +0000 (11:38 +0000)]
rockchip: rk3399-pinephone-pro: Fix SPL max size and SPI flash payload offset

TPL max size is limited to 184 KB, SPL is loaded to 0x0 and TF-A is
loaded to 0x40000, this limit SPL max size to 256 KB. With BootRom only
reading first 2 KB per 4 KB page of SPI flash, 880 KB may be needed for
TPL+SPL in a worst-case scenario. (184 KB + 256 KB) x 2 = 880 KB

Use 0xE0000 (896 KB) as the payload offset in SPI flash, this allows
for a payload of 3168 KB before env offset start to overlap.

Also add CONFIG_ROCKCHIP_SPI_IMAGE=y to build a bootable SPI flash
image, u-boot-rockchip-spi.bin.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <foss+u-boot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3399-pinebook-pro: Fix SPL max size and SPI flash payload offset
Jonas Karlman [Fri, 28 Jul 2023 11:38:35 +0000 (11:38 +0000)]
rockchip: rk3399-pinebook-pro: Fix SPL max size and SPI flash payload offset

TPL max size is limited to 184 KB, SPL is loaded to 0x0 and TF-A is
loaded to 0x40000, this limit SPL max size to 256 KB. With BootRom only
reading first 2 KB per 4 KB page of SPI flash, 880 KB may be needed for
TPL+SPL in a worst-case scenario. (184 KB + 256 KB) x 2 = 880 KB

Use 0xE0000 (896 KB) as the payload offset in SPI flash, this allows
for a payload of 3168 KB before env offset start to overlap.

Also add CONFIG_ROCKCHIP_SPI_IMAGE=y to build a bootable SPI flash
image, u-boot-rockchip-spi.bin.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <foss+u-boot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3399-rockpro64: Fix SPL max size and SPI flash payload offset
Jonas Karlman [Fri, 28 Jul 2023 11:38:34 +0000 (11:38 +0000)]
rockchip: rk3399-rockpro64: Fix SPL max size and SPI flash payload offset

TPL max size is limited to 184 KB, SPL is loaded to 0x0 and TF-A is
loaded to 0x40000, this limit SPL max size to 256 KB. With BootRom only
reading first 2 KB per 4 KB page of SPI flash, 880 KB may be needed for
TPL+SPL in a worst-case scenario. (184 KB + 256 KB) x 2 = 880 KB

Use 0xE0000 (896 KB) as the payload offset in SPI flash, this allows
for a payload of 3168 KB before env offset start to overlap.

Also remove CONFIG_LTO=y now that there is sufficient space for SPL in
SPI flash, and to fix a build issue reported by Peter Robinson.

Fixes: 5713135ecc75 ("rockchip: rockpro64: Build u-boot-rockchip-spi.bin")
Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <foss+u-boot@0leil.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk356x-u-boot: Use relaxed u-boot,spl-boot-order
Jonas Karlman [Fri, 28 Jul 2023 11:53:08 +0000 (11:53 +0000)]
rockchip: rk356x-u-boot: Use relaxed u-boot,spl-boot-order

BootRom will try to load TPL+SPL from media in the following order:
- SPI NOR Flash
- SPI NAND Flash
- NAND Flash
- eMMC
- SDMMC

SPL will try to load FIT from media in the order defined in the device
tree u-boot,spl-boot-order property.

Change the default order to load FIT from to:
- same media as TPL+SPL
- SDMMC
- eMMC

Boards with strict load order requirements should override the
u-boot,spl-boot-order property in the board specific u-boot.dtsi.

Fixes: 42f67fb51cb4 ("rockchip: rk3568: Fix boot device detection")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk356x-u-boot: Add bootph-all to common pinctrl nodes
Jonas Karlman [Fri, 28 Jul 2023 11:53:07 +0000 (11:53 +0000)]
rockchip: rk356x-u-boot: Add bootph-all to common pinctrl nodes

Add bootph-all prop to common pinctrl nodes for eMMC, FSPI, SD-card and
UART2 that are typically used by multiple boards. Unreferenced nodes are
removed from the SPL device tree during a normal build.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3566-radxa-cm3-io: Sync dts from linux v6.4
Jonas Karlman [Fri, 28 Jul 2023 11:53:06 +0000 (11:53 +0000)]
rockchip: rk3566-radxa-cm3-io: Sync dts from linux v6.4

Sync rk3566-radxa-cm3-io.dts from linux v6.4.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk356x: Sync dtsi from linux v6.4
Jonas Karlman [Fri, 28 Jul 2023 11:53:05 +0000 (11:53 +0000)]
rockchip: rk356x: Sync dtsi from linux v6.4

Sync rk356x.dtsi from linux v6.4.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoboard: rockchip: Add Pine64 SOQuartz on CM4-IO
Jonas Karlman [Sun, 30 Jul 2023 12:26:48 +0000 (12:26 +0000)]
board: rockchip: Add Pine64 SOQuartz on CM4-IO

The Pine64 SOQuartz compute module is mostly pin-compatible with the RPi
CM4 form factor. Therefore, it can slot into the official Raspberry Pi
CM4 IO carrier board. Add this configuration to U-Boot.

Features tested with a SOQuartz 4GB v1.1 2022-07-11:
- SD-card boot
- eMMC boot
- USB host

Device tree is imported from linux v6.4.

Co-developed-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoboard: rockchip: Add Pine64 SOQuartz on Blade
Jonas Karlman [Sun, 30 Jul 2023 12:26:47 +0000 (12:26 +0000)]
board: rockchip: Add Pine64 SOQuartz on Blade

The Pine64 SOQuartz Blade board is a carrier board for the SOQuartz
CM4-compatible compute module. It features PoE, an M.2 slot, an SD card
slot, HDMI, USB, serial and ethernet.

Features tested with a SOQuartz 4GB v1.1 2022-07-11:
- SD-card boot
- eMMC boot
- PCIe/NVMe
- USB host

Device tree is imported from linux v6.4.

Co-developed-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoboard: rockchip: Add Pine64 SOQuartz on Model A
Jonas Karlman [Sun, 30 Jul 2023 12:26:45 +0000 (12:26 +0000)]
board: rockchip: Add Pine64 SOQuartz on Model A

The Pine64 SOQuartz Model A board is a carrier board for the SOQuartz
CM4-compatible compute module. It exposes PCIe, ethernet, USB, HDMI,
CSI, DSI, eDP and a 40 pin GPIO header, and is powered by 12V DC.

Features tested with a SOQuartz 4GB v1.1 2022-07-11:
- SD-card boot
- eMMC boot
- PCIe/NVMe/AHCI
- USB host

Device tree is imported from linux v6.4.

Co-developed-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoboard: rockchip: Add Pine64 Quartz64-B Board
Jonas Karlman [Sun, 30 Jul 2023 12:26:44 +0000 (12:26 +0000)]
board: rockchip: Add Pine64 Quartz64-B Board

The Pine64 Quartz64 Model B is a credit-card sized single-board
computer based on the Rockchip RK3566 SoC. The board features an M.2
PCIe slot, USB3, USB2, eMMC, SD, ethernet, HDMI, analog audio out, a
40 pin GPIO header and a DSI and CSI port, as well as on-board Wi-Fi.

Features tested on a Quartz64-B 4GB v1.4 2022-06-06:
- SD-card boot
- eMMC boot
- SPI Flash boot
- PCIe/NVMe
- USB host

Device tree is imported from linux v6.4.

Co-developed-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoboard: rockchip: Add Pine64 Quartz64-A Board
Jonas Karlman [Sun, 30 Jul 2023 12:26:42 +0000 (12:26 +0000)]
board: rockchip: Add Pine64 Quartz64-A Board

The Pine64 Quartz64 Model A is a single-board computer based on the
Rockchip RK3566 SoC. The board features USB3, SATA, PCIe, HDMI, USB2.0,
CSI, DSI, eDP, eMMC, SD, and an e-paper parallel port, as well as a
20 pin GPIO header.

Features tested on a Quartz64-A 8GB v2.0 2021-04-27:
- SD-card boot
- eMMC boot
- PCIe/NVMe/AHCI
- USB host

Device tree is imported from linux v6.4.

Co-developed-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3568: Use dwc3-generic driver
Jonas Karlman [Sun, 30 Jul 2023 22:59:59 +0000 (22:59 +0000)]
rockchip: rk3568: Use dwc3-generic driver

Change RK3568 devices to use the newer dwc3-generic driver instead of
the old xhci-dwc3 driver for USB 3.0 support.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agousb: dwc3-generic: Add rk3568 support
Jonas Karlman [Sun, 30 Jul 2023 22:59:57 +0000 (22:59 +0000)]
usb: dwc3-generic: Add rk3568 support

RK3568 share glue and ctrl in a single node. Use glue_get_ctrl_dev to
return the glue node as the ctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Marek Vasut <marex@denx.de>
10 months agousb: dwc3-generic: Relax unsupported dr_mode check
Jonas Karlman [Sun, 30 Jul 2023 22:59:56 +0000 (22:59 +0000)]
usb: dwc3-generic: Relax unsupported dr_mode check

When dr_mode is peripheral or otg and U-Boot has not been built with
DM_USB_GADGET support, booting such device may end up with:

  dwc3_glue_bind_common: subnode name: usb@fcc00000
  Error binding driver 'dwc3-generic-wrapper': -6
  Some drivers failed to bind
  initcall sequence 00000000effbca08 failed at call 0000000000a217c8 (err=-6)
  ### ERROR ### Please RESET the board ###

Instead fail gracfully with ENODEV to allow board continue booting.

  dwc3_glue_bind_common: subnode name: usb@fcc00000
  dwc3_glue_bind_common: unsupported dr_mode 3

Also use CONFIG_IS_ENABLED(USB_HOST) and change switch to if statements
to improve readability of the code.

Fixes: 446e3a205b87 ("dwc3-generic: Handle the PHYs, the clocks and the reset lines")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Marek Vasut <marex@denx.de>
10 months agousb: dwc3-generic: Return early when there is no child node
Jonas Karlman [Sun, 30 Jul 2023 22:59:55 +0000 (22:59 +0000)]
usb: dwc3-generic: Return early when there is no child node

The current error check for device_find_first_child is not working as
expected, the documentation for device_find_first_child mention:

  @devp: Returns first child device, or NULL if none
  Return: 0

Change to return early when there is no child node to avoid any possible
null pointer dereference.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoRevert "arm: dts: rockchip: radxa-cm3-io, rock-3a: enable regulators for usb"
Jonas Karlman [Sun, 30 Jul 2023 22:59:54 +0000 (22:59 +0000)]
Revert "arm: dts: rockchip: radxa-cm3-io, rock-3a: enable regulators for usb"

Remove regulator-boot-on prop from regulators now that the phy core has
support for phy-supply after the commit c57e0dcd9384 ("phy: add support
for phy-supply").

This reverts commit 7911f409ff20dce5995cc1b703a6e30c94022f6b.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: chromebook_speedy: Enable sound
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:41 +0000 (22:16 +0300)]
rockchip: chromebook_speedy: Enable sound

Commit ec107f04b619 ("rockchip: chromebook_minnie: Enable sound") and
commit 2d0c01b8f0ad ("sound: rockchip: Add sound support for jerry")
enable audio support for chromebook_minnie and chromebook_jerry. Enable
it for chromebook_speedy as well, but put the non-upstream sound node
in the board -u-boot.dtsi instead.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: chromebook_jerry: Re-enable MAX98090 codec driver
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:40 +0000 (22:16 +0300)]
rockchip: chromebook_jerry: Re-enable MAX98090 codec driver

Sound support for chromebook_jerry needs the MAX98090 codec driver. This
was enabled in commit 2d0c01b8f0ad ("sound: rockchip: Add sound support
for jerry"), but apparently lost in commit 7ae2729401bb ("configs:
Resync with savedefconfig"). Enable it again.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook_jerry
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: veyron: Use TrueType fonts
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:39 +0000 (22:16 +0300)]
rockchip: veyron: Use TrueType fonts

Commit 815ed79d8338 ("video: rockchip: Use TrueType fonts with jerry")
enables makes chromebook_jerry use TrueType fonts. Make other veyron
boards switch to it as well.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: veyron: Add serial, logging, silent console support
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:38 +0000 (22:16 +0300)]
rockchip: veyron: Add serial, logging, silent console support

Commit eba768c54587 ("rockchip: jerry: Add serial support") enables
ROCKCHIP_SERIAL for chromebook_jerry to make the serial console work
correctly. Enable it also for other veyron boards.

Also enable logging and disable scrolling multiple lines at once as in
chromebook_jerry, and enable silent console as chromebook_minnie does.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: veyron: Unify u-boot.dtsi bootph-all fragments
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:37 +0000 (22:16 +0300)]
rockchip: veyron: Unify u-boot.dtsi bootph-all fragments

The rk3288-veyron-speedy-u-boot.dtsi file duplicates the bootphase dts
fragments from rk3288-veyron-u-boot.dtsi even though it #inclues that.
Deduplicate these into the latter file, which should also make the eMMC
available to the other veyron boards' SPL.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: veyron: Enable building SPI ROM images
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:36 +0000 (22:16 +0300)]
rockchip: veyron: Enable building SPI ROM images

Commit 9b312e26fc77 ("rockchip: Enable building a SPI ROM image on
jerry") produces a u-boot.rom file for chromebook_jerry, intended to be
written to SPI flash. Build this file for other veyron boards as well,
especially because they are already configured only to boot from SPI.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: veyron: Enable RESET driver
Alper Nebi Yasak [Fri, 7 Jul 2023 19:16:35 +0000 (22:16 +0300)]
rockchip: veyron: Enable RESET driver

Commit 70e351bdfeee ("rockchip: jerry: Enable RESET driver") enables
DM_RESET for chromebook_jerry to fix its display as required by changes
to the Rockchip video drivers. Enable it for other veyron boards as
well.

Fixes: cd529f7ad62 ("rockchip: video: edp: Add missing reset support")
Fixes: 9749d2ea29e ("rockchip: video: vop: Add reset support")
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook_jerry
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoconfigs: rockchip: drop useless DEBUG_UART_SKIP_INIT
Pegorer Massimo [Sun, 16 Jul 2023 16:53:58 +0000 (16:53 +0000)]
configs: rockchip: drop useless DEBUG_UART_SKIP_INIT

DEBUG_UART_SKIP_INIT feature is implemented only by s5p (DEBUG_UART_S5P)
and pl01x (DEBUG_UART_PL010 or DEBUG_UART_PL011) serial drivers, but all
ARCH_ROCKCHIP configs rely on default DEBUG_UART_NS16550. The ns16550
serial driver does not depends on DEBUG_UART_SKIP_INIT, so drop it from
rockchip configs.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3308: fix same-as-spl boot order
Pegorer Massimo [Sat, 15 Jul 2023 10:19:46 +0000 (10:19 +0000)]
rockchip: rk3308: fix same-as-spl boot order

Boot devices defined in rk3308.c and in rk3308.dtsi do not match, causing
'same-as-spl' feature not to work. Update DTS definitions, aligning to
Linux kernel DTS and to other Rockchip DTS files, i.e. from dwmmc to mmc.

Add rk3308-rock-pi-s.dtb in dtb-y targets for CONFIG_ROCKCHIP_RK3308.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3308: add support for sdmmc boot
Pegorer Massimo [Sat, 15 Jul 2023 10:19:40 +0000 (10:19 +0000)]
rockchip: rk3308: add support for sdmmc boot

Some ROCK Pi S SKU/models are not equipped with SD-NAND (eMMC),
therefore SPL needs access to sdmmc: add it to rk3308-u-boot.dtsi
with bootph-all property.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3308: no DEBUG_UART_BOARD_INIT for ROCK Pi S
Pegorer Massimo [Sat, 15 Jul 2023 10:19:34 +0000 (10:19 +0000)]
rockchip: rk3308: no DEBUG_UART_BOARD_INIT for ROCK Pi S

Call to board_debug_uart_init() is useless, as mainline U-Boot can
not build TPL for rk3308, and proprietary ddr.bin to be used as TPL
is responsible to init debug uart. Moreover current implementation
of board_debug_uart_init() is not compatible with ROCK Pi S, as it
sets pins for UART2 channel 1 breaking access to sdmmc due to pinmux
conflict. Debug uart for ROCK Pi S is UART0.

Thus, avoid ROCKCHIP_RK3308 to select DEBUG_UART_BOARD_INIT and allow
to deselct it in rock-pi-s-rk3308_defconfig. The DEBUG_UART_BOARD_INIT
is already implied by ARCH_ROCKCHIP, therefore other boards based on
rk3308 chip are not affected by change.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agorockchip: rk3308: fix board_debug_uart_init
Pegorer Massimo [Sat, 15 Jul 2023 10:19:28 +0000 (10:19 +0000)]
rockchip: rk3308: fix board_debug_uart_init

Definition of function board_debug_uart_init() must be under
CONFIG_DEBUG_UART_BOARD_INIT and not under CONFIG_DEBUG_UART,
as it was: see debug_uart.h. In this way the debug uart can
be used but its board-specific initialization skipped by
configuration, if useless.

Signed-off-by: Massimo Pegorer <massimo.pegorer@vimar.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
10 months agoMerge tag 'spl-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 30 Jul 2023 21:14:22 +0000 (17:14 -0400)]
Merge tag 'spl-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for spl-2023-10-rc2

SPL:

* use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME when booting from NVMe
* initialize PCI before booting

10 months agospl: initialize PCI before booting
Heinrich Schuchardt [Mon, 24 Jul 2023 20:18:41 +0000 (22:18 +0200)]
spl: initialize PCI before booting

MMC, SATA, and USB may be using PCI based controllers.
Initialize the PCI sub-system before trying to boot.

Remove the initialization for NVMe that is now redundant.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
10 months agospl: CONFIG_SPL_PCI_PNP should depend on CONFIG_SPL_PCI
Heinrich Schuchardt [Mon, 24 Jul 2023 19:27:26 +0000 (21:27 +0200)]
spl: CONFIG_SPL_PCI_PNP should depend on CONFIG_SPL_PCI

CONFIG_SPL_PCI_PNP=y without CONFIG_SPL_PCI=y makes no sense.

Fixes: 32f5e9e5c1a7 ("nvme: pci: Enable for SPL")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
10 months agospl: blk: partition numbers are hexadecimal
Heinrich Schuchardt [Sat, 22 Jul 2023 10:45:44 +0000 (12:45 +0200)]
spl: blk: partition numbers are hexadecimal

Loading u-boot.itb from device 0x00, partition 0x0f fails with:

    Trying to boot from NVME

    Device 0: Vendor: 0x4x Rev: 8.0.50   Prod: nvme-1
                Type: Hard Disk
                Capacity: 3814.6 MB = 3.7 GB (7812500 x 512)
    ** Invalid partition 21 **
    Couldn't find partition nvme 0:15

Like the command line interface fs_det_blk_dev() expects that the device
number and the partition number are hexadecimal.

Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
10 months agopart: check CONFIG_IS_ENABLED(ENV_SUPPORT)
Heinrich Schuchardt [Fri, 21 Jul 2023 15:37:37 +0000 (17:37 +0200)]
part: check CONFIG_IS_ENABLED(ENV_SUPPORT)

In SPL environment variables may not be enabled.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
10 months agospl: blk: use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
Heinrich Schuchardt [Fri, 21 Jul 2023 12:09:43 +0000 (14:09 +0200)]
spl: blk: use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME

We should target to unify the code for different block devices in SPL to
reduce code size.

MMC, USB, SATA, and Semihosting use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME to
indicate the filename to load.

NVMe uses CONFIG_SPL_PAYLOAD in spl_blk_load_image().

CONFIG_SPL_PAYLOAD is meant to define which binary to integrate into
u-boot-with-spl.bin. See commit
7550dbe38b3f ("spl: Add option SPL_PAYLOAD").

Change spl_blk_load_image() to use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME.

Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
10 months agoMerge tag 'efi-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 28 Jul 2023 16:48:00 +0000 (12:48 -0400)]
Merge tag 'efi-2023-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2023-10-rc2

Documentation:

* Update the documentation for TI K3 boards (use SVG images)
* Update doc/sphinx/requirements.txt
* Describe QEMU emulation of block devices

UEFI

* Fix device paths for special block devices

10 months agoMerge branch '2023-07-27-TI-K2-K3-updates'
Tom Rini [Fri, 28 Jul 2023 14:25:50 +0000 (10:25 -0400)]
Merge branch '2023-07-27-TI-K2-K3-updates'

- Resync some of the K3 DTS files with the kernel, and pull in some
  required related updates to keep drivers in sync with the dts files
  now.  Bring in some incremental fixes on top of one of the series I
  applied recently as well as updating the iot2050 platform.  Also do a
  few small updates to the K2 platforms.