Compare commits

...
Sign in to create a new pull request.

73 commits

Author SHA1 Message Date
Peter Robinson
e9007fae5e 2026.10 RC3 2026-08-27 14:33:04 +01:00
Peter Robinson
d4df103e5c Add upstream patch for SWIG 4.5 builds 2026-08-13 14:56:06 +01:00
Peter Robinson
8f57e9bff6 2026.10 RC2 2026-08-12 14:21:44 +01:00
Peter Robinson
8b33a3c4fe 2026.10 RC1 2026-07-30 15:20:44 +01:00
Fedora Release Engineering
00625a8b40 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 08:05:04 +00:00
Peter Robinson
f3fed69d41 Upload 2026.07 2026-07-07 09:11:01 +01:00
Peter Robinson
9b96c029d8 Update to 2026.07 GA 2026-07-07 07:33:54 +01:00
Peter Robinson
edc90bc98a Add openssl version conditionals 2026-06-24 13:33:49 +01:00
Peter Robinson
0a5dac6b72 Build using openssl3 2026-06-23 11:09:09 +01:00
Peter Robinson
6cdb801508 2026.07 RC5 2026-06-23 10:59:52 +01:00
Dusty Mabe
40a137ae16
FFL: convert a few debug statements into info
This way on boot we'll get one of the three:

- Found DTB on disk
- Found DTB: Prior firmware
- Using DT from U-Boot

Since it's only one log statement per boot I don't think this will
add too much noise.
2026-06-19 14:20:29 -04:00
Peter Robinson
7131d07d86 Update brcmstb pcie patch 2026-06-03 12:31:56 +01:00
Peter Robinson
a1afa6b9d7 2026.07 RC3 2026-05-29 14:14:46 +01:00
Peter Robinson
71d471982e 2026.07 RC1 2026-05-03 09:27:45 +01:00
Peter Robinson
ae35a50b2f Rasberry Pi 4/5 fixes 2026-04-12 17:39:36 +01:00
Peter Robinson
3dacc0c2c7 2026.04 GA 2026-04-07 11:09:25 +01:00
Peter Robinson
85a93b85c7 Enable NVME booting on RPi5 2026-03-29 20:49:58 +01:00
Peter Robinson
28ef4157f4 2026.04 RC5 2026-03-24 17:37:52 +00:00
Peter Robinson
9f32546ebc Fixes for RPi5 2026-03-14 13:20:53 +00:00
Peter Robinson
e0289997ba 2026.04 RC4 2026-03-10 15:10:12 +00:00
Peter Robinson
131e791158 Enable nvme on rpi 2026-02-28 07:03:59 +00:00
Peter Robinson
af27a7ebf8 2026.04 RC3, bcm2712 PCIe support, efi part info proto 2026-02-27 19:42:51 +00:00
Peter Robinson
dc88389af8 add optee-os-firmware-armv8 BR 2026-02-19 15:08:53 +00:00
Peter Robinson
2846651361 Add initial bcm2712d0 identification 2026-02-17 15:16:26 +00:00
Peter Robinson
4f7be53727 Update to 2026.04 RC2
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2026-02-09 23:02:50 +00:00
Peter Robinson
bb3fd2de74 Updates for Raspberry Pi 2026-02-09 17:38:30 +00:00
Peter Robinson
f12491dc88 2026.04 RC1 2026-01-27 16:21:03 +00:00
Peter Robinson
4238dd5a89 Bump release 2026-01-20 06:27:30 +00:00
Javier Martinez Canillas
d7f2a6c29a
Add a uboot-images-x86_64 sub-package
U-Boot has QEMU configurations for different architectures, and existing
uboot-images-{aarch,riscv}64 sub-packages already ship binaries for them.

But there isn't one for x86_64, let's add a new uboot-images-x86_64 that
contain an image that can be used to test U-Boot on this arch using QEMU.
2026-01-19 11:25:24 +01:00
Fedora Release Engineering
3a3ec8a0bf Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 19:31:26 +00:00
Peter Robinson
fff441a730 Drop Jetson Nano for the momment, size too big 2026-01-07 05:30:06 +00:00
Peter Robinson
b2a3bbf32c 2026.01 GA 2026-01-07 00:24:41 +00:00
Peter Robinson
2424465fce 2026.01 RC5 2025-12-29 03:52:29 +00:00
Peter Robinson
ddba19de14 Upload rc4 source 2025-12-08 22:15:05 +00:00
Peter Robinson
39834a4639 2026.01 RC4 2025-12-08 22:08:45 +00:00
Peter Robinson
0274527899 Updates for RPi 2025-11-28 13:38:19 +00:00
Peter Robinson
797205ea12 2026.01 RC3 2025-11-24 19:48:29 +00:00
Peter Robinson
197c944380 Drop residual Rockchip firmware (saves ~150Mb) 2025-10-16 23:13:21 +01:00
Peter Robinson
193201a4f1 2025.10 GA 2025-10-13 23:13:58 +01:00
Peter Robinson
8db7be92d1 2025.10 RC5 2025-09-26 15:43:17 +01:00
Peter Robinson
196786c810 Update to 2025.10 RC4 2025-09-08 17:54:08 +01:00
Peter Robinson
e41dae833e Boot fixes for some Raspberry Pi variants 2025-09-07 17:08:24 +01:00
Peter Robinson
40bb73de87 Fix booting on some Allwinner devices 2025-08-27 17:10:21 +01:00
Peter Robinson
bef7a40cd4 drop generic, they need more work 2025-08-25 23:29:25 +01:00
Peter Robinson
94ea044fce 2025.10 RC3 2025-08-25 22:35:38 +01:00
Peter Robinson
4bd70e6d58 Fix and re-enable Jetson Nano 2025-08-19 20:30:03 +01:00
Peter Robinson
7400de8842 Upload source 2025-08-19 11:45:52 +01:00
Peter Robinson
a5ff060ca9 Rebase to 2025.10 RC2 2025-08-19 11:38:00 +01:00
Fedora Release Engineering
312b851135 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 19:41:29 +00:00
Peter Robinson
020411fa4f Update patch for rebase issue 2025-07-10 12:27:11 +01:00
Peter Robinson
d89d018d40 Update to 2025.07 GA 2025-07-10 10:37:26 +01:00
Peter Robinson
48c52b3b54 2025.07 RC5 2025-06-27 16:51:50 +01:00
Javier Martinez Canillas
2ebcee6ed0
Add EFI_PARTITION_INFO_PROTOCOL support
The UEFI 2.10 specification mentions that this protocol shall be installed
along with EFI_BLOCK_IO_PROTOCOL. It provides cached partition information
for MBR and GPT partition types.

Include the v3 of the patches posted to the u-boot mailing list:
https://patchwork.ozlabs.org/project/uboot/list/?series=461607
2025-06-26 14:40:14 +02:00
Peter Robinson
85df0ce1b3 Upstream DT fixes for Rockchip SoCs 2025-06-20 14:49:28 +01:00
Peter Robinson
660ecdc548 Upstream DT fixes for Rockchip SoCs 2025-06-20 14:49:04 +01:00
Peter Robinson
d0a36bf9ac 2025.07 RC4 2025-06-16 11:43:10 +01:00
Peter Robinson
510d8fcf30 Fix for RPi5 serial console 2025-04-20 21:00:17 +01:00
Peter Robinson
fb4c39b1e6 2025.04 GA 2025-04-08 14:18:38 +01:00
Peter Robinson
a2fea382f5 Update to 2025.04 RC5 2025-03-30 11:28:07 +01:00
Peter Robinson
9de9b912a1 Add back openssl-devel-engine which was dropped by accident from an experiment 2025-03-13 22:54:22 +00:00
Peter Robinson
3e02345729 2025.04 RC4 2025-03-13 22:37:16 +00:00
Peter Robinson
4aaac8b6b2 2025.04 RC3 2025-03-07 12:45:32 +00:00
David Abdurachmanov
df50b5d41b Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2025-02-20 14:39:54 +01:00
Peter Robinson
630e77de00 2025.05 RC2 2025-02-18 22:28:52 +00:00
Peter Robinson
f713a0fe6a 2025.05 RC1 2025-02-11 09:34:06 +00:00
Peter Robinson
8c6f3ce53a Add new fdt_add_pubkey tool 2025-01-28 06:22:57 +00:00
Fedora Release Engineering
3cc9ea7c96 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 13:33:58 +00:00
Peter Robinson
d3e7f7d440 2025.01 GA 2025-01-07 09:49:48 +00:00
Peter Robinson
eb2323f190 Rebuild for TF-A 2.12 2025-01-06 15:25:03 +00:00
Peter Robinson
f7a78315e4 Upload RC6 source 2025-01-02 10:08:31 +00:00
Peter Robinson
357edb9922 2025.01 RC6 2025-01-02 09:59:08 +00:00
Peter Robinson
139751f49c drop unused duplicate firmwares 2025-01-02 09:59:08 +00:00
Andrew Gunnerson
9fb9e1ac57
Install manpages for dumpimage, kwboot, and mkeficapsule
Signed-off-by: Andrew Gunnerson <accounts+fedora@chiller3.com>
2024-11-04 19:00:36 -05:00
24 changed files with 2451 additions and 10467 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,27 @@
From b8ea3cebde98866b7cbb4e8f9bb6dfdee529a549 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 27 Aug 2025 00:23:28 +0100
Subject: [PATCH] Allwinner: fix booting on a number of devices
Revert "sunxi: enable MMU_PGPROT proper page table protection"
This reverts commit 16cfccda4dbf0b53473b8212897f5c63bfbeb6e1.
---
arch/arm/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 40368abc297..b8be270e4d7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1207,7 +1207,6 @@ config ARCH_SUNXI
select DM_SPI_FLASH if SPI && MTD
select DM_KEYBOARD
select DM_SERIAL
- select MMU_PGPROT if ARM64
select OF_BOARD_SETUP
select OF_CONTROL
select PINCTRL
--
2.51.0

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,405 @@
From patchwork Mon Jul 6 17:21:47 2026
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Torsten Duwe <duwe@lst.de>
X-Patchwork-Id: 2265604
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=85.214.62.61; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de [85.214.62.61])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB431Qwzz1xqc
for <incoming@patchwork.ozlabs.org>; Tue, 07 Jul 2026 03:21:55 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 179C084942;
Mon, 6 Jul 2026 19:21:52 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=lst.de
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Received: by phobos.denx.de (Postfix, from userid 109)
id 82ADE8490A; Mon, 6 Jul 2026 19:21:51 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,
RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.2
Received: from verein.lst.de (verein.lst.de [213.95.11.211])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 9F24C846B4
for <u-boot@lists.denx.de>; Mon, 6 Jul 2026 19:21:49 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=lst.de
Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de
Received: by verein.lst.de (Postfix, from userid 2005)
id C934268B05; Mon, 6 Jul 2026 19:21:47 +0200 (CEST)
In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de>
References: <20260706172028.C148E68BEB@verein.lst.de>
Subject: [PATCH v2 1/4] core: Skip parent device nodes without a DT reference
when looking for dma-ranges
To: Neil Armstrong <neil.armstrong@linaro.org>,
Andrew Goodbody <andrew.goodbody@linaro.org>, Bin Meng <bmeng.cn@gmail.com>,
Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>, Matthias Brugger <mbrugger@suse.com>,
Peter Robinson <pbrobinson@gmail.com>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Heiko Schocher <hs@nabladev.com>, Svyatoslav Ryhel <clamor95@gmail.com>,
"Lucien.Jheng" <lucienzx159@gmail.com>, Rasmus Villemoes <ravi@prevas.dk>,
Martin Schwan <m.schwan@phytec.de>,
"Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com>,
Prashant Kamble <prashant.kamble223@gmail.com>,
Denis Mukhin <dmukhin@ford.com>, Sughosh Ganu <sughosh.ganu@arm.com>,
u-boot@lists.denx.de
Message-Id: <20260706172147.C934268B05@verein.lst.de>
Date: Mon, 6 Jul 2026 19:21:47 +0200 (CEST)
From: duwe@lst.de (Torsten Duwe)
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
From: Torsten Duwe <duwe@suse.de>
If a device node got created dynamically, there is no guarantee that the
parent node has an associated device tree node which could specify dma
constraints. Especially PCI(e) enumeration adds intermediate "bus nodes",
also dynamically.
Try harder to find the correct configuration by walking up the tree until
a DT association is found.
Suggested-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Torsten Duwe <duwe@suse.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
---
drivers/core/device.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/core/device.c b/drivers/core/device.c
index d365204ba11..b6d00cf4714 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -459,7 +459,19 @@ static int device_get_dma_constraints(struct udevice *dev)
u64 size = 0;
int ret;
- if (!CONFIG_IS_ENABLED(DM_DMA) || !parent || !dev_has_ofnode(parent))
+ if (!CONFIG_IS_ENABLED(DM_DMA) || !parent)
+ return 0;
+
+ /* Look for the first node in the parent chain */
+ while (parent) {
+ if (dev_has_ofnode(parent))
+ break;
+
+ parent = dev_get_parent(parent);
+ }
+
+ /* No parents have a node, bail out */
+ if (!parent)
return 0;
/*
From patchwork Mon Jul 6 17:21:50 2026
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Torsten Duwe <duwe@lst.de>
X-Patchwork-Id: 2265605
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de
[IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB481pfXz1xqc
for <incoming@patchwork.ozlabs.org>; Tue, 07 Jul 2026 03:22:00 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 9A59684994;
Mon, 6 Jul 2026 19:21:55 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=lst.de
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Received: by phobos.denx.de (Postfix, from userid 109)
id EB7D384979; Mon, 6 Jul 2026 19:21:53 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,
RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.2
Received: from verein.lst.de (verein.lst.de [213.95.11.211])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id EE61C846B4
for <u-boot@lists.denx.de>; Mon, 6 Jul 2026 19:21:51 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=lst.de
Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de
Received: by verein.lst.de (Postfix, from userid 2005)
id 464E868BEB; Mon, 6 Jul 2026 19:21:50 +0200 (CEST)
In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de>
References: <20260706172028.C148E68BEB@verein.lst.de>
Subject: [PATCH v2 2/4] test: Add a unit test in phys_to_bus for dynamically
created device nodes
To: Neil Armstrong <neil.armstrong@linaro.org>,
Andrew Goodbody <andrew.goodbody@linaro.org>, Bin Meng <bmeng.cn@gmail.com>,
Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>, Matthias Brugger <mbrugger@suse.com>,
Peter Robinson <pbrobinson@gmail.com>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Heiko Schocher <hs@nabladev.com>, Svyatoslav Ryhel <clamor95@gmail.com>,
"Lucien.Jheng" <lucienzx159@gmail.com>, Rasmus Villemoes <ravi@prevas.dk>,
Martin Schwan <m.schwan@phytec.de>,
"Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com>,
Prashant Kamble <prashant.kamble223@gmail.com>,
Denis Mukhin <dmukhin@ford.com>, Sughosh Ganu <sughosh.ganu@arm.com>,
u-boot@lists.denx.de
Message-Id: <20260706172150.464E868BEB@verein.lst.de>
Date: Mon, 6 Jul 2026 19:21:50 +0200 (CEST)
From: duwe@lst.de (Torsten Duwe)
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
From: Torsten Duwe <duwe@suse.de>
In order to test whether device_get_dma_constraints() is now able to skip
device nodes without a DT association, temporarily remove those on 2 newly-
created nodes.
Signed-off-by: Torsten Duwe <duwe@suse.de>
---
This test indeed makes a different whether the previous change is
applied or not, but *only* reliably for the non-flat-tree case (!?).
On the flat tree, it always fails after (reverse) applying it.
Either the previous patch is incomplete, or, more likely, the test
assumptions here are not all valid. Suggestions welcome (especially
how to create device nodes from a device tree without a reference to
their origin ;-)
---
arch/sandbox/dts/test.dts | 9 +++++++++
test/dm/phys2bus.c | 25 ++++++++++++++++++++++++-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 0887de4333b..1d92e85c739 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -656,6 +656,15 @@
subnode@0 {
compatible = "denx,u-boot-fdt-test";
};
+ bus@7 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "denx,u-boot-test-bus";
+
+ subnode@8 {
+ compatible = "denx,u-boot-fdt-test";
+ };
+ };
};
mmio-bus@1 {
diff --git a/test/dm/phys2bus.c b/test/dm/phys2bus.c
index 67f33904943..858ed5410e2 100644
--- a/test/dm/phys2bus.c
+++ b/test/dm/phys2bus.c
@@ -15,7 +15,8 @@
static int dm_test_phys_to_bus(struct unit_test_state *uts)
{
- struct udevice *dev;
+ struct udevice *dev, *pdev;
+ ofnode psave, nsave;
ofnode node;
node = ofnode_path("/mmio-bus@0");
@@ -31,6 +32,29 @@ static int dm_test_phys_to_bus(struct unit_test_state *uts)
ut_asserteq_addr((void*)0x1003ffffULL, (void*)dev_phys_to_bus(dev, 0x3ffff));
ut_asserteq_addr((void*)0x3ffffULL, (void*)(ulong)dev_bus_to_phys(dev, 0x1003ffff));
+#if CONFIG_IS_ENABLED(OF_REAL)
+ /* dma-ranges are on the grandparent bus node,
+ * OF nodes neither here nor at parent
+ */
+ node = ofnode_path("/mmio-bus@0/bus@7");
+ ut_assert(ofnode_valid(node));
+ ut_assertok(uclass_get_device_by_ofnode(UCLASS_TEST_BUS, node, &pdev));
+
+ /* pretend the devices were discovered dynamically and have no OF node */
+ psave = pdev->node_;
+ pdev->node_.np = NULL;
+ node = ofnode_path("/mmio-bus@0/bus@7/subnode@8");
+ ut_assert(ofnode_valid(node));
+ nsave = dev->node_;
+ dev->node_.np = NULL;
+ ut_assertok(uclass_get_device_by_ofnode(UCLASS_TEST_FDT, node, &dev));
+
+ ut_asserteq_addr((void *)0x1003ffffULL, (void *)dev_phys_to_bus(dev, 0x3ffff));
+ ut_asserteq_addr((void *)0x3ffffULL, (void *)(ulong)dev_bus_to_phys(dev, 0x1003ffff));
+
+ pdev->node_ = psave;
+ dev->node_ = nsave;
+#endif
return 0;
}
DM_TEST(dm_test_phys_to_bus, UTF_SCAN_PDATA | UTF_SCAN_FDT);
From patchwork Mon Jul 6 17:21:54 2026
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Torsten Duwe <duwe@lst.de>
X-Patchwork-Id: 2265607
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de
[IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4gvB4R378Lz1xqc
for <incoming@patchwork.ozlabs.org>; Tue, 07 Jul 2026 03:22:15 +1000 (AEST)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 3FDAE8490A;
Mon, 6 Jul 2026 19:21:59 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=lst.de
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Received: by phobos.denx.de (Postfix, from userid 109)
id 17F418490A; Mon, 6 Jul 2026 19:21:58 +0200 (CEST)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,
RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.2
Received: from verein.lst.de (verein.lst.de [213.95.11.211])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 1D593849A4
for <u-boot@lists.denx.de>; Mon, 6 Jul 2026 19:21:56 +0200 (CEST)
Authentication-Results: phobos.denx.de;
dmarc=fail (p=none dis=none) header.from=lst.de
Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=duwe@lst.de
Received: by verein.lst.de (Postfix, from userid 2005)
id B506B68CFE; Mon, 6 Jul 2026 19:21:54 +0200 (CEST)
In-Reply-To: <20260706172028.C148E68BEB@verein.lst.de>
References: <20260706172028.C148E68BEB@verein.lst.de>
Subject: [PATCH v2 4/4] configs: enable NVMe
To: Neil Armstrong <neil.armstrong@linaro.org>,
Andrew Goodbody <andrew.goodbody@linaro.org>, Bin Meng <bmeng.cn@gmail.com>,
Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>, Matthias Brugger <mbrugger@suse.com>,
Peter Robinson <pbrobinson@gmail.com>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Marek Vasut <marek.vasut+renesas@mailbox.org>,
Heiko Schocher <hs@nabladev.com>, Svyatoslav Ryhel <clamor95@gmail.com>,
"Lucien.Jheng" <lucienzx159@gmail.com>, Rasmus Villemoes <ravi@prevas.dk>,
Martin Schwan <m.schwan@phytec.de>,
"Markus Schneider-Pargmann (TI.com)" <msp@baylibre.com>,
Prashant Kamble <prashant.kamble223@gmail.com>,
Denis Mukhin <dmukhin@ford.com>, Sughosh Ganu <sughosh.ganu@arm.com>,
u-boot@lists.denx.de
Message-Id: <20260706172154.B506B68CFE@verein.lst.de>
Date: Mon, 6 Jul 2026 19:21:54 +0200 (CEST)
From: duwe@lst.de (Torsten Duwe)
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
From: Torsten Duwe <duwe@suse.de>
Enable NVMe in the Raspberry Pi 64-Bit default config and scan for devices.
Signed-off-by: Torsten Duwe <duwe@suse.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
---
configs/rpi_arm64_defconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig
index cdcf05ea6db..fb0fdce1d7f 100644
--- a/configs/rpi_arm64_defconfig
+++ b/configs/rpi_arm64_defconfig
@@ -16,7 +16,7 @@ CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_FDT_SIMPLEFB=y
CONFIG_USE_PREBOOT=y
-CONFIG_PREBOOT="pci enum; usb start;"
+CONFIG_PREBOOT="pci enum; usb start; nvme scan;"
CONFIG_SYS_PBSIZE=1049
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
@@ -44,6 +44,7 @@ CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_BCM2835=y
CONFIG_MMC_SDHCI_BCMSTB=y
CONFIG_BCMGENET=y
+CONFIG_NVME_PCI=y
CONFIG_PCI_BRCMSTB=y
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_GENERIC is not set

View file

@ -0,0 +1,50 @@
From 4ee5ba36570d94ce27e4023f15b8b3a6b8b9daf9 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Mon, 13 Oct 2025 21:41:13 +0100
Subject: [PATCH] config: JetsonTX2: Fix upstream device tree naming
The upstream naming for the Jetson TX2 is p2771-0000 so fix
the device tree name so the firmware will find the right
name on disk.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/Makefile | 2 +-
.../{tegra186-p2771-0000-500.dts => tegra186-p2771-0000.dts} | 0
configs/p2771-0000-500_defconfig | 2 +-
3 files changed, 2 insertions(+), 2 deletions(-)
rename arch/arm/dts/{tegra186-p2771-0000-500.dts => tegra186-p2771-0000.dts} (100%)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7c8cf3a5a1d..86a7b4fda35 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -134,7 +134,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
tegra124-venice2.dtb \
tegra124-xiaomi-mocha.dtb \
tegra186-p2771-0000-000.dtb \
- tegra186-p2771-0000-500.dtb \
+ tegra186-p2771-0000.dtb \
tegra210-p2371-0000.dtb \
tegra210-p2371-2180.dtb \
tegra210-p2571.dtb \
diff --git a/arch/arm/dts/tegra186-p2771-0000-500.dts b/arch/arm/dts/tegra186-p2771-0000.dts
similarity index 100%
rename from arch/arm/dts/tegra186-p2771-0000-500.dts
rename to arch/arm/dts/tegra186-p2771-0000.dts
diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig
index 42043277e2d..e1e5c47ddfa 100644
--- a/configs/p2771-0000-500_defconfig
+++ b/configs/p2771-0000-500_defconfig
@@ -7,7 +7,7 @@ CONFIG_TEXT_BASE=0x80080000
CONFIG_NR_DRAM_BANKS=1026
CONFIG_ENV_SIZE=0x2000
CONFIG_ENV_OFFSET=0xFFFFE000
-CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-500"
+CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000"
CONFIG_SYS_BOOTM_LEN=0x800000
CONFIG_SYS_LOAD_ADDR=0x80080000
CONFIG_TEGRA186=y
--
2.51.0

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,717 @@
From patchwork Wed Feb 26 18:44:44 2025
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Sebastian Reichel <sebastian.reichel@collabora.com>
X-Patchwork-Id: 2052544
X-Patchwork-Delegate: marek.vasut@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.a=rsa-sha256 header.s=mail header.b=IthL1Z+m;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de
[IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33M03Hhjz1yCp
for <incoming@patchwork.ozlabs.org>; Thu, 27 Feb 2025 05:45:32 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id BFF7680FF0;
Wed, 26 Feb 2025 19:45:16 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.b="IthL1Z+m";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 7614F810F9; Wed, 26 Feb 2025 19:45:13 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2
Received: from bali.collaboradmins.com (bali.collaboradmins.com
[IPv6:2a01:4f8:201:9162::2])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 2173180FDE
for <u-boot@lists.denx.de>; Wed, 26 Feb 2025 19:45:08 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sebastian.reichel@collabora.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;
s=mail; t=1740595507;
bh=Fnp6a8opSCXiH5NJdu5uivbBBZF3pe1CXyluh8+n8/c=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=IthL1Z+mDeIRy9MWEa0lGyJWuHk/Pu+yUpLly7RG6NIpC0lCgla3ssiy2x+8/G+bz
DWjrKUMxgWtqfjfffRiKEJZ6Z2sAXJ1ePvDmMtbGoolWSrzsV2+cWh0byYrEBuVBe9
Vp0ye7gJ4Wt610s4QHa4xoYcm7h9KGmE3IEjb+XYFv1HMJIOoACl04BwkLctza1KBr
XlIqC+snvRP/yQxa2+6RYGXgQD5JnJxCM1orXVIJxyyJxTzb3XgNir60Gb4HI9724H
LDZy0Hq7NQ1zF0h1yVUOklDotw17isbNoI4K3JCExR+r7GsdESsGY6cwAbZY71iWlf
OsSSrV6TZtAMg==
Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de
[91.249.76.32])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits))
(No client certificate requested) (Authenticated sender: sre)
by bali.collaboradmins.com (Postfix) with ESMTPSA id A18CC17E0881;
Wed, 26 Feb 2025 19:45:07 +0100 (CET)
Received: by jupiter.universe (Postfix, from userid 1000)
id 32E35480034; Wed, 26 Feb 2025 19:45:07 +0100 (CET)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Marek Vasut <marex@denx.de>, u-boot@lists.denx.de,
Jonas Karlman <jonas@kwiboo.se>, Soeren Moch <smoch@web.de>
Cc: Tim Harvey <tharvey@gateworks.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Anand Moon <linux.amoon@gmail.com>, Maxim Kiselev <bigunclemax@gmail.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH v2 1/4] usb: tcpm: improve handling of some power-supplies
Date: Wed, 26 Feb 2025 19:44:44 +0100
Message-ID: <20250226184506.64114-2-sebastian.reichel@collabora.com>
X-Mailer: git-send-email 2.47.2
In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com>
References: <20250226184506.64114-1-sebastian.reichel@collabora.com>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
When the Rock 5B is booted with the current TCPM with its power supplied
by a "Cambrionix PDSync-C4" port it reaches the power-supply ready state.
Once that has happened the hub starts sending GetSinkCap messages, but
U-Boot already stopped processing PD messages. After retrying a bunch of
times the hub instead sends soft resets. Since U-Boot will also not
react to them, the USB hub will follow-up with a hard reset and that
cuts off the supply voltage.
Since the state machine is already prepared to handle GetSinkCap
messages, try to avoid this by handling incoming messages for another
50ms after reaching the ready state.
Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
drivers/usb/tcpm/tcpm.c | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c
index 0aee57cb2f4a..b754b4dcd0b5 100644
--- a/drivers/usb/tcpm/tcpm.c
+++ b/drivers/usb/tcpm/tcpm.c
@@ -2229,6 +2229,17 @@ static int tcpm_port_init(struct udevice *dev)
return 0;
}
+static inline void tcpm_poll_one_event(struct udevice *dev)
+{
+ const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev);
+ struct tcpm_port *port = dev_get_uclass_plat(dev);
+
+ drvops->poll_event(dev);
+ port->poll_event_cnt++;
+ udelay(500);
+ tcpm_check_and_run_delayed_work(dev);
+}
+
static void tcpm_poll_event(struct udevice *dev)
{
const struct dm_tcpm_ops *drvops = dev_get_driver_ops(dev);
@@ -2242,15 +2253,25 @@ static void tcpm_poll_event(struct udevice *dev)
(port->state == SNK_READY || port->state == SRC_READY))
break;
- drvops->poll_event(dev);
- port->poll_event_cnt++;
- udelay(500);
- tcpm_check_and_run_delayed_work(dev);
+ tcpm_poll_one_event(dev);
}
- if (port->state != SNK_READY && port->state != SRC_READY)
+ /*
+ * Some power-supplies send GetSinkCap shortly after they are ready.
+ * If they do not receive a response after a few retries they will issue
+ * a soft-reset followed by a hard reset, which kills the board power.
+ * Let's poll for 50ms after reaching the ready state to check if the
+ * power-supply wants something from us.
+ */
+ if (port->state == SNK_READY) {
+ port->poll_event_cnt = 0;
+
+ while (port->poll_event_cnt < 100)
+ tcpm_poll_one_event(dev);
+ } else {
dev_warn(dev, "TCPM: exit in state %s\n",
tcpm_states[port->state]);
+ }
/*
* At this time, call the callback function of the respective pd chip
From patchwork Wed Feb 26 18:44:45 2025
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Sebastian Reichel <sebastian.reichel@collabora.com>
X-Patchwork-Id: 2052546
X-Patchwork-Delegate: marek.vasut@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.a=rsa-sha256 header.s=mail header.b=hgX6o5vZ;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de
[IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33MJ5sFGz1yCp
for <incoming@patchwork.ozlabs.org>; Thu, 27 Feb 2025 05:45:48 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 69A29811C5;
Wed, 26 Feb 2025 19:45:17 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.b="hgX6o5vZ";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 832B180FB9; Wed, 26 Feb 2025 19:45:14 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2
Received: from bali.collaboradmins.com (bali.collaboradmins.com
[148.251.105.195])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 2178380FF0
for <u-boot@lists.denx.de>; Wed, 26 Feb 2025 19:45:08 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sebastian.reichel@collabora.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;
s=mail; t=1740595507;
bh=H/gQCZCWVmLNRIaBLvWsE35SaDMWvta2+rTkymkHQJE=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=hgX6o5vZwM72CR2hgo76tgo2eE00qHM7oNja381ACl8gIUUVioy8RTeqXtum89tBf
aIwKm/oNQNvGxy92pX5/1Jg/MwYZKS8jDukz6ZgsLKu22rJXf58FFoV095AcEkUMB2
lrO4KJgFW/x1FK8GmSVSXXH+iUYJLkzsfZKgHKoQYHZcVXJRgFjHR5ytGKsA/fq4el
7Wrx3lmLNjL7fYlDF5AyY+Wl6hqzjDq58nFedXHv8TEHx6fzfB0IBzOL/F8bGqVcyy
lal7bjJvMPoA9zfgIC77R1neWktg5FSro75YciSRSj9lmMNCmESnSPCgsZ4wBW0V6f
ppD77gOtjDfLQ==
Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de
[91.249.76.32])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits))
(No client certificate requested) (Authenticated sender: sre)
by bali.collaboradmins.com (Postfix) with ESMTPSA id 9725D17E087F;
Wed, 26 Feb 2025 19:45:07 +0100 (CET)
Received: by jupiter.universe (Postfix, from userid 1000)
id 34511480037; Wed, 26 Feb 2025 19:45:07 +0100 (CET)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Marek Vasut <marex@denx.de>, u-boot@lists.denx.de,
Jonas Karlman <jonas@kwiboo.se>, Soeren Moch <smoch@web.de>
Cc: Tim Harvey <tharvey@gateworks.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Anand Moon <linux.amoon@gmail.com>, Maxim Kiselev <bigunclemax@gmail.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH v2 2/4] usb: tcpm: avoid resets for missing source capability
messages
Date: Wed, 26 Feb 2025 19:44:45 +0100
Message-ID: <20250226184506.64114-3-sebastian.reichel@collabora.com>
X-Mailer: git-send-email 2.47.2
In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com>
References: <20250226184506.64114-1-sebastian.reichel@collabora.com>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
The current TCPM code implements source capability message handling
according to the USB-PD specification. Unfortunately some USB PD
sources do not properly follow the specification and do not send
source capability messages after a soft reset when they already
negotiated a specific contract before. The currently implemented way
(and what is described in the specificiation) to resolve this problem
is triggering a hard reset.
But a hard reset is fatal on batteryless platforms powered via USB-C PD,
since that removes VBUS for some time. Since this is triggered at boot
time, the system may get stuck in a boot loop.
For example I noticed the following behaviour on a Radxa Rock 5B
combined with an affected power-supply:
1. The system is booted up with current code
2. A reboot is requested
3. U-Boot TCPM / fusb302 driver sends soft reset and waits for the
source capability message
4. No new source capability message is send by the power-supply
after the soft reset
5. U-Boot sends a hard reset
6. The board resets, but the fusb302 registers are not reset. This
is because of a hardware glitch. The serial pins are high when
no data is exchanged. Apparently the RK3588 has protection diodes,
which leak some voltage into the power-domain. The Rock 5B serial
pins and the fusb302 are using the same 3.3V power domain and the
leaked voltage is enough to keep the fusb302 registers alive.
7. After the hard reset the power-supply sends another source capability
message, which is auto-acked by fusb302 (because the register state
is kept) even though the U-Boot driver has not yet probed. Once the
U-Boot driver probes it sends another soft reset and waits for a new
source capability message, which never arrives.
Fortunately the affected power-supplies (I have two setups showing this
behaviour) support sending a source capability message when explicitly
being asked. Thus an easy workaround to handle this is deviating from
the USB-PD specification and sending a Get_Source_Cap message and
waiting some time longer before doing the hard reset.
Note, that I recently added the same workaround to the Linux kernel
with a slightly different rationale (since it needs to take over from
U-Boot).
Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
drivers/usb/tcpm/tcpm-internal.h | 1 +
drivers/usb/tcpm/tcpm.c | 32 +++++++++++++++++++++++++++++---
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/tcpm/tcpm-internal.h b/drivers/usb/tcpm/tcpm-internal.h
index 561442090027..4861f4d13866 100644
--- a/drivers/usb/tcpm/tcpm-internal.h
+++ b/drivers/usb/tcpm/tcpm-internal.h
@@ -30,6 +30,7 @@
S(SNK_DISCOVERY_DEBOUNCE), \
S(SNK_DISCOVERY_DEBOUNCE_DONE), \
S(SNK_WAIT_CAPABILITIES), \
+ S(SNK_WAIT_CAPABILITIES_TIMEOUT), \
S(SNK_NEGOTIATE_CAPABILITIES), \
S(SNK_TRANSITION_SINK), \
S(SNK_TRANSITION_SINK_VBUS), \
diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c
index b754b4dcd0b5..786d92fa4c6f 100644
--- a/drivers/usb/tcpm/tcpm.c
+++ b/drivers/usb/tcpm/tcpm.c
@@ -1424,7 +1424,8 @@ static inline enum tcpm_state hard_reset_state(struct tcpm_port *port)
return ERROR_RECOVERY;
if (port->pwr_role == TYPEC_SOURCE)
return SRC_UNATTACHED;
- if (port->state == SNK_WAIT_CAPABILITIES)
+ if (port->state == SNK_WAIT_CAPABILITIES ||
+ port->state == SNK_WAIT_CAPABILITIES_TIMEOUT)
return SNK_READY;
return SNK_UNATTACHED;
}
@@ -1650,10 +1651,35 @@ static void run_state_machine(struct udevice *dev)
tcpm_set_state(dev, SOFT_RESET_SEND,
PD_T_SINK_WAIT_CAP);
} else {
- tcpm_set_state(dev, hard_reset_state(port),
- PD_T_SINK_WAIT_CAP);
+ if (!port->self_powered)
+ tcpm_set_state(dev, SNK_WAIT_CAPABILITIES_TIMEOUT,
+ PD_T_SINK_WAIT_CAP);
+ else
+ tcpm_set_state(dev, hard_reset_state(port),
+ PD_T_SINK_WAIT_CAP);
}
break;
+ case SNK_WAIT_CAPABILITIES_TIMEOUT:
+ /*
+ * There are some USB PD sources in the field, which do not
+ * properly implement the specification and fail to start
+ * sending Source Capability messages after a soft reset. The
+ * specification suggests to do a hard reset when no Source
+ * capability message is received within PD_T_SINK_WAIT_CAP,
+ * but that might effectively kil the machine's power source.
+ *
+ * This slightly diverges from the specification and tries to
+ * recover from this by explicitly asking for the capabilities
+ * using the Get_Source_Cap control message before falling back
+ * to a hard reset. The control message should also be supported
+ * and handled by all USB PD source and dual role devices
+ * according to the specification.
+ */
+ if (tcpm_pd_send_control(dev, PD_CTRL_GET_SOURCE_CAP))
+ tcpm_set_state_cond(dev, hard_reset_state(port), 0);
+ else
+ tcpm_set_state(dev, hard_reset_state(port), PD_T_SINK_WAIT_CAP);
+ break;
case SNK_NEGOTIATE_CAPABILITIES:
port->pd_capable = true;
port->hard_reset_count = 0;
From patchwork Wed Feb 26 18:44:46 2025
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Sebastian Reichel <sebastian.reichel@collabora.com>
X-Patchwork-Id: 2052545
X-Patchwork-Delegate: marek.vasut@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.a=rsa-sha256 header.s=mail header.b=BxTv7Lfo;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=85.214.62.61; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de [85.214.62.61])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33M971h7z1yCp
for <incoming@patchwork.ozlabs.org>; Thu, 27 Feb 2025 05:45:41 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id 1B09C8118B;
Wed, 26 Feb 2025 19:45:17 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.b="BxTv7Lfo";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 4399E810F9; Wed, 26 Feb 2025 19:45:14 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2
Received: from bali.collaboradmins.com (bali.collaboradmins.com
[IPv6:2a01:4f8:201:9162::2])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 2163F80FB9
for <u-boot@lists.denx.de>; Wed, 26 Feb 2025 19:45:08 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sebastian.reichel@collabora.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;
s=mail; t=1740595507;
bh=7OaDpd2idE5ETWAiOZte0kuOU6ZYitEVWkDgDmqaQU8=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=BxTv7LfoAae43YSXPquVPmmwStgQirXCxaSBD0fo554R5O/si/Iif5L+zXXJocATJ
z7+I7ZKbknkTeVyzoRDCXvXIVz2bFdTRWQN4Z2iwJbVI1covAv/Gn4wIE2Q6hbNKbU
qV5AKg7gvrKkbztbo7N9bHNjkrlAbd8B4Ew3SR8FM46DMAOwNzVsoX3rLMcPtlWzHj
4OBKCx22H/4ASIWjMbYoDE09DyQ+CPOf8JcX8OPwFcH9j6vW6cEWvyjiAyDj6LnwOq
KD+ZYVIkWhkIzAkE2NHB2IpA4xlxW8i18BJzNBD8N1eBx/HCgb0camb4KanY1Hta/d
4ipLyuFaCkMog==
Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de
[91.249.76.32])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest
SHA256)
(No client certificate requested) (Authenticated sender: sre)
by bali.collaboradmins.com (Postfix) with ESMTPSA id 816AA17E0861;
Wed, 26 Feb 2025 19:45:07 +0100 (CET)
Received: by jupiter.universe (Postfix, from userid 1000)
id 361F2480038; Wed, 26 Feb 2025 19:45:07 +0100 (CET)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Marek Vasut <marex@denx.de>, u-boot@lists.denx.de,
Jonas Karlman <jonas@kwiboo.se>, Soeren Moch <smoch@web.de>
Cc: Tim Harvey <tharvey@gateworks.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Anand Moon <linux.amoon@gmail.com>, Maxim Kiselev <bigunclemax@gmail.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH v2 3/4] usb: tcpm: print error on hard reset
Date: Wed, 26 Feb 2025 19:44:46 +0100
Message-ID: <20250226184506.64114-4-sebastian.reichel@collabora.com>
X-Mailer: git-send-email 2.47.2
In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com>
References: <20250226184506.64114-1-sebastian.reichel@collabora.com>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
A USB-PD hard reset involves removing the voltage from VBUS for some
time. So basically it has the same effect as removing the USB-C plug
for a short moment. If the machine is powered from the USB-C port and
does not have a fallback supply (e.g. a battery), this will result in
a full machine reset due to power loss.
Ideally we want to avoid triggering a hard reset on these boards. A
non-working USB-C port is probably better than unplanned reboots. But
boards with a backup supply should do the hard reset to get everything
working again.
In theory it would be enough to check the self_powered property, but
it seems the property might not be configured consistently enough in
system firmwares.
USB-PD hard resets should happen rarely in general, so let's at least
print an error message before the potential board reset happens. This
is also useful, since it immediately gives away which device triggered
the hard reset.
Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
drivers/usb/tcpm/tcpm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c
index 786d92fa4c6f..909fe2ef4fcb 100644
--- a/drivers/usb/tcpm/tcpm.c
+++ b/drivers/usb/tcpm/tcpm.c
@@ -1711,6 +1711,8 @@ static void run_state_machine(struct udevice *dev)
/* Hard_Reset states */
case HARD_RESET_SEND:
+ if (!port->self_powered && port->port_type == TYPEC_PORT_SNK)
+ dev_err(dev, "Initiating hard-reset, which might result in machine power-loss.\n");
tcpm_pd_transmit(dev, TCPC_TX_HARD_RESET, NULL);
tcpm_set_state(dev, HARD_RESET_START, 0);
port->wait_dr_swap_message = false;
From patchwork Wed Feb 26 18:44:47 2025
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Sebastian Reichel <sebastian.reichel@collabora.com>
X-Patchwork-Id: 2052542
X-Patchwork-Delegate: marek.vasut@gmail.com
Return-Path: <u-boot-bounces@lists.denx.de>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.a=rsa-sha256 header.s=mail header.b=K4mNmlOy;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de
(client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;
envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)
Received: from phobos.denx.de (phobos.denx.de
[IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1))
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4Z33Lk40FPz1yCp
for <incoming@patchwork.ozlabs.org>; Thu, 27 Feb 2025 05:45:18 +1100 (AEDT)
Received: from h2850616.stratoserver.net (localhost [IPv6:::1])
by phobos.denx.de (Postfix) with ESMTP id DAFC780FF2;
Wed, 26 Feb 2025 19:45:12 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de
Authentication-Results: phobos.denx.de;
dkim=pass (2048-bit key;
unprotected) header.d=collabora.com header.i=@collabora.com
header.b="K4mNmlOy";
dkim-atps=neutral
Received: by phobos.denx.de (Postfix, from userid 109)
id 56A22810F9; Wed, 26 Feb 2025 19:45:11 +0100 (CET)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de
X-Spam-Level:
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2
Received: from bali.collaboradmins.com (bali.collaboradmins.com
[IPv6:2a01:4f8:201:9162::2])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(No client certificate requested)
by phobos.denx.de (Postfix) with ESMTPS id 217E080FF2
for <u-boot@lists.denx.de>; Wed, 26 Feb 2025 19:45:08 +0100 (CET)
Authentication-Results: phobos.denx.de;
dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: phobos.denx.de;
spf=pass smtp.mailfrom=sebastian.reichel@collabora.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;
s=mail; t=1740595507;
bh=FeXZr6pfjIqGXvnsLHDigD702EmgVNH91IWVsD16udQ=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=K4mNmlOycXzLuJnNeDxyXLVCeZWNr//ycRqDt3ld9634ThDvJ0+y49X3z2nYW+fei
HCqH2AoFiXj7khjiFpwCA4xOlYaTrF9yb0M9ApRxJ8vGuslNIK2k9osj8IJMoWmY8S
fEez4H6Wso4VamCnXKCze2G5np5mhola5QxSnIJ2CXdFP9TM1x54P+XyeJMX6IZK0X
lpZ0R8mACHGgXnkBASRMbo0CnLfSVrUgA83A0FHT7UgxfW8399wHol/FBakg5WS8nt
47154TDW4ikoGF4dHBeD0KemJSR7I4F+nnUVQfgg8sXZKVm4yilBT+yx3WWBVCjQDl
3igqfexnaUKnA==
Received: from jupiter.universe (dyndsl-091-249-076-032.ewe-ip-backbone.de
[91.249.76.32])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest
SHA256)
(No client certificate requested) (Authenticated sender: sre)
by bali.collaboradmins.com (Postfix) with ESMTPSA id 7FBB317E065A;
Wed, 26 Feb 2025 19:45:07 +0100 (CET)
Received: by jupiter.universe (Postfix, from userid 1000)
id 37B6A480039; Wed, 26 Feb 2025 19:45:07 +0100 (CET)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Marek Vasut <marex@denx.de>, u-boot@lists.denx.de,
Jonas Karlman <jonas@kwiboo.se>, Soeren Moch <smoch@web.de>
Cc: Tim Harvey <tharvey@gateworks.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Anand Moon <linux.amoon@gmail.com>, Maxim Kiselev <bigunclemax@gmail.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCH v2 4/4] usb: tcpm: improve data role mismatch error recovery
Date: Wed, 26 Feb 2025 19:44:47 +0100
Message-ID: <20250226184506.64114-5-sebastian.reichel@collabora.com>
X-Mailer: git-send-email 2.47.2
In-Reply-To: <20250226184506.64114-1-sebastian.reichel@collabora.com>
References: <20250226184506.64114-1-sebastian.reichel@collabora.com>
MIME-Version: 1.0
X-BeenThere: u-boot@lists.denx.de
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.denx.de>
List-Unsubscribe: <https://lists.denx.de/options/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>
List-Archive: <https://lists.denx.de/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.denx.de>
List-Help: <mailto:u-boot-request@lists.denx.de?subject=help>
List-Subscribe: <https://lists.denx.de/listinfo/u-boot>,
<mailto:u-boot-request@lists.denx.de?subject=subscribe>
Errors-To: u-boot-bounces@lists.denx.de
Sender: "U-Boot" <u-boot-bounces@lists.denx.de>
X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de
X-Virus-Status: Clean
On Radxa ROCK 5B I managed to get U-Boot into an endless loop of
printing
fusb302 usb-typec@22: TCPM: data role mismatch, initiating error recovery
messages by changing the data role in Linux and then rebooting the
system. This is happening because the external device (A cheap USB-C hub
powered through a USB-C PD power-supply) kept its state and the error
recovery path for non self-powered devices is not enough to change it.
Avoid this by swapping our own data role when the error recovery stage
is reached for a port, which is not self-powered. Right now data support
is limited anyways and once proper support is added we can use the data
role swap request to get the desired data direction after the initial
negotiation completed.
Fixes: 1db4c0ac77e3 ("usb: tcpm: add core framework")
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
drivers/usb/tcpm/tcpm.c | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/tcpm/tcpm.c b/drivers/usb/tcpm/tcpm.c
index 909fe2ef4fcb..12d66d470f9a 100644
--- a/drivers/usb/tcpm/tcpm.c
+++ b/drivers/usb/tcpm/tcpm.c
@@ -833,6 +833,28 @@ static void tcpm_pd_ctrl_request(struct udevice *dev,
}
}
+static void tcpm_recover_data_role_mismatch(struct udevice *dev)
+{
+ struct tcpm_port *port = dev_get_uclass_plat(dev);
+
+ dev_err(dev, "TCPM: data role mismatch, initiating error recovery\n");
+ if (port->self_powered) {
+ tcpm_set_state(dev, ERROR_RECOVERY, 0);
+ return;
+ }
+
+ /*
+ * The error recovery will not help for devices, which are not
+ * self-powered because the error recovery avoids killing the board
+ * power. Since this can happen early on sending
+ * a DR_SWAP request is not sensible. Instead let's change our own
+ * data role. It can be swapped back once USB-PD reached the ready
+ * state.
+ */
+ tcpm_set_roles(dev, true, port->pwr_role,
+ port->data_role == TYPEC_HOST ? TYPEC_DEVICE : TYPEC_HOST);
+}
+
static void tcpm_pd_rx_handler(struct udevice *dev,
const struct pd_message *msg)
{
@@ -867,9 +889,11 @@ static void tcpm_pd_rx_handler(struct udevice *dev,
remote_is_host = !!(le16_to_cpu(msg->header) & PD_HEADER_DATA_ROLE);
local_is_host = port->data_role == TYPEC_HOST;
if (remote_is_host == local_is_host) {
- dev_err(dev, "TCPM: data role mismatch, initiating error recovery\n");
- tcpm_set_state(dev, ERROR_RECOVERY, 0);
- } else {
+ tcpm_recover_data_role_mismatch(dev);
+ local_is_host = port->data_role == TYPEC_HOST;
+ }
+
+ if (remote_is_host != local_is_host) {
if (cnt)
tcpm_pd_data_request(dev, msg);
else

View file

@ -1,6 +1,7 @@
a64-olinuxino
a64-olinuxino-emmc
amarula_a64_relic
anbernic_rg35xx_h700
apple_m1
bananapi_m2_plus_h5
bananapi_m64
@ -44,6 +45,7 @@ nanopi_neo_plus2
nanopi_r1s_h5
nanopi-r2c-plus-rk3328
nanopi-r2c-rk3328
nanopi-r2s-plus-rk3328
nanopi-r2s-rk3328
nanopi-r4s-rk3399
oceanic_5205_5inmfd
@ -65,7 +67,6 @@ orangepi_zero_plus2
p212
p2371-2180
p2771-0000-500
p3450-0000
pine64-lts
pine64_plus
pinebook
@ -78,7 +79,10 @@ poplar
puma-rk3399
qcm6490
qcom
qcom_qcs8300
qcom_qcs9100
qemu_arm64
qemu_arm64_lwip
roc-cc-rk3328
rock-4c-plus-rk3399
rock-4se-rk3399
@ -100,4 +104,3 @@ transpeed-8k618-t
turris_mox
vexpress_aemv8a_juno
x96_mate
xilinx_zynqmp_virt

View file

@ -1,10 +1,14 @@
From 02513d9ecc38d11ffc051ed59529e11f82164785 Mon Sep 17 00:00:00 2001
From d9e3a49bc2a29922da5bddd95772279f6edba802 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Fri, 18 Aug 2023 13:28:05 +0100
Subject: [PATCH] disable VBE by default
Fedora doesn't support the VBE boot method, disable it
to reduce size and remove a possible boot attack vector.
The VBE protocol needs explicit device support and as
such isn't particularly useful by itself without that,
it also adds size and the potential of an attack vector
so devices that wish to use this protocol should
explicitly opt in to it like all other large features
in U-Boot.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
@ -12,10 +16,10 @@ Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
1 file changed, 1 deletion(-)
diff --git a/boot/Kconfig b/boot/Kconfig
index e8fb03b8016..467b09e2350 100644
index 30eb5b328d7..e8c3fbcb11d 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -526,7 +526,6 @@ config BOOTMETH_EFILOADER
@@ -635,7 +635,6 @@ config BOOTMETH_QFW
config BOOTMETH_VBE
bool "Bootdev support for Verified Boot for Embedded"
depends on FIT
@ -24,5 +28,5 @@ index e8fb03b8016..467b09e2350 100644
select EVENT
help
--
2.41.0
2.49.0

25
p3450-fix-board.patch Normal file
View file

@ -0,0 +1,25 @@
From c9b65320d64a60cde74c4c1f9cb4a05198a456c2 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 10 Sep 2025 13:27:52 +0100
Subject: [PATCH] further size reductions
---
configs/p3450-0000_defconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configs/p3450-0000_defconfig b/configs/p3450-0000_defconfig
index 2ebcf8b83fc..a5e717a02ed 100644
--- a/configs/p3450-0000_defconfig
+++ b/configs/p3450-0000_defconfig
@@ -27,6 +27,8 @@ CONFIG_CONSOLE_MUX=y
CONFIG_SYS_STDIO_DEREGISTER=y
CONFIG_SYS_PROMPT="Tegra210 (P3450-0000) # "
# CONFIG_BOOTM_PLAN9 is not set
+# CONFIG_SYS_DTC_PAD_BYTES is not set
+# CONFIG_LEGACY_IMAGE_FORMAT is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
# CONFIG_CMD_ELF is not set
--
2.51.0

View file

@ -0,0 +1,32 @@
From 72fd4fdb54721a31d2b4e9f95fdd3b3e398bb2c0 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sun, 12 Apr 2026 01:14:12 +0100
Subject: [PATCH] board/raspberrypi: Add quirk for RPi5 2Gb rev 1.0
All 2Gb Raspberry Pi 5s use the BCM2712D0 silicon, but
the early boards were still rev 1.0 so we need a quirk
to ensure the correct device tree is used.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
board/raspberrypi/rpi/rpi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index b0a1484c0fa..ff9cab6521b 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -371,6 +371,10 @@ static void set_fdtfile(void)
const char *fdtfile;
int rev = revision & 0x0f;
+ /* 2GB Pi 5B board rev 1.0 always has BCM2712D0 silicon */
+ if (revision == 0xb04170)
+ rev = 1;
+
if (env_get("fdtfile"))
return;
--
2.53.0

4
riscv64-boards Normal file
View file

@ -0,0 +1,4 @@
qemu-riscv64_spl
sifive_unleashed
sifive_unmatched
starfive_visionfive2

File diff suppressed because it is too large Load diff

View file

@ -1,189 +0,0 @@
From 45d8808e95ddf0702ed78acde7678291ae52abdb Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Fri, 11 Oct 2024 17:14:26 +0100
Subject: [PATCH] configs: rockchip: Modernise Geekbox config
Modernise and move the Geekbox config to use SPL/TPL with
upstream TF-A, enable MMC/USB/Eth to make the device more
useful and work like other Rockchip devices. Update the
readme to reflect the changes to the build process.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/rk3368-geekbox-u-boot.dtsi | 10 ++++
board/geekbuying/geekbox/README | 40 +++++++++++++-
configs/geekbox_defconfig | 71 ++++++++++++++++++++++++-
3 files changed, 118 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/rk3368-geekbox-u-boot.dtsi b/arch/arm/dts/rk3368-geekbox-u-boot.dtsi
index cfc8b9340a8..55d007f7ab8 100644
--- a/arch/arm/dts/rk3368-geekbox-u-boot.dtsi
+++ b/arch/arm/dts/rk3368-geekbox-u-boot.dtsi
@@ -26,6 +26,16 @@
bootph-all;
};
+&dmc {
+ bootph-all;
+
+ rockchip,memory-schedule = <DMC_MSCH_CBDR>;
+ rockchip,ddr-frequency = <800000000>;
+ rockchip,ddr-speed-bin = <DDR3_1600K>;
+
+ status = "okay";
+};
+
&grf {
bootph-all;
};
diff --git a/board/geekbuying/geekbox/README b/board/geekbuying/geekbox/README
index de980f2f233..bd4d8cdd084 100644
--- a/board/geekbuying/geekbox/README
+++ b/board/geekbuying/geekbox/README
@@ -1 +1,39 @@
-see board/rockchip/sheep_rk3368/README
+Here is the step-by-step to boot to U-Boot on the Geekbox
+
+Get the Source and build ATF
+============================
+
+ > git clone https://github.com/TrustedFirmware-A/trusted-firmware-a.git
+ > cd arm-trusted-firmware
+ > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3368 bl31
+
+Configure U-Boot
+================
+
+ > cd ../u-boot
+ > export BL31=../arm-trusted-firmware/build/rk3368/release/bl31.bin
+ > make geekbox_defconfig
+
+Build the full U-Boot/ATF firmware stack
+========================================
+
+ > make CROSS_COMPILE=aarch64-unknown-elf-
+
+Flash the image
+===============
+
+Copy the SPL to offset 32k and the FIT image containing the payloads
+(U-Boot proper, ATF, devicetree) to offset 256k card.
+
+eMMC
+----
+
+rkdeveloptool allows to flash the on-board eMMC via the USB OTG interface with
+help of the Rockchip loader binary.
+
+ > git clone https://github.com/rockchip-linux/rkdeveloptool
+ > cd rkdeveloptool
+ > autoreconf -i && && ./configure && make
+ > git clone https://github.com/rockchip-linux/rkbin.git
+ > ./rkdeveloptool db rkbin/rk33/rk3368_loader_v2.00.256.bin
+ > ./rkdeveloptool wl 64 ../u-boot-rockchip.bin
diff --git a/configs/geekbox_defconfig b/configs/geekbox_defconfig
index 8f4be79831a..1b116fa8602 100644
--- a/configs/geekbox_defconfig
+++ b/configs/geekbox_defconfig
@@ -3,29 +3,96 @@ CONFIG_SKIP_LOWLEVEL_INIT=y
CONFIG_COUNTER_FREQUENCY=24000000
CONFIG_ARCH_ROCKCHIP=y
CONFIG_TEXT_BASE=0x00200000
-CONFIG_SYS_MALLOC_F_LEN=0x1000
CONFIG_NR_DRAM_BANKS=1
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
CONFIG_DEFAULT_DEVICE_TREE="rk3368-geekbox"
+CONFIG_SPL_TEXT_BASE=0x00000000
CONFIG_ROCKCHIP_RK3368=y
+CONFIG_TPL_LIBCOMMON_SUPPORT=y
+CONFIG_TPL_LIBGENERIC_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC=y
+CONFIG_SPL_STACK=0x188000
+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_BSS_START_ADDR=0x400000
+CONFIG_SPL_BSS_MAX_SIZE=0x20000
+CONFIG_SPL_STACK_R=y
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
+CONFIG_SPL=y
CONFIG_TARGET_GEEKBOX=y
CONFIG_DEBUG_UART_BASE=0xFF690000
CONFIG_DEBUG_UART_CLOCK=24000000
CONFIG_SYS_LOAD_ADDR=0x800800
CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_SPL_LOAD_FIT=y
CONFIG_DEFAULT_FDT_FILE="rockchip/rk3368-geekbox.dtb"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
+CONFIG_SPL_MAX_SIZE=0x40000
+CONFIG_SPL_PAD_TO=0x7f8000
+CONFIG_SPL_BOOTROM_SUPPORT=y
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
+CONFIG_SPL_ATF=y
+CONFIG_TPL=y
+CONFIG_TPL_SYS_MALLOC_SIMPLE=y
+CONFIG_TPL_DRIVERS_MISC=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_USB=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_TPL_OF_CONTROL=y
+CONFIG_OF_LIVE=y
+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent"
+CONFIG_TPL_OF_PLATDATA=y
+CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_TPL_DM=y
CONFIG_REGMAP=y
+CONFIG_SPL_REGMAP=y
+CONFIG_TPL_REGMAP=y
CONFIG_SYSCON=y
-CONFIG_BOUNCE_BUFFER=y
+CONFIG_SPL_SYSCON=y
+CONFIG_TPL_SYSCON=y
CONFIG_CLK=y
+CONFIG_SPL_CLK=y
+CONFIG_TPL_CLK=y
+CONFIG_ROCKCHIP_GPIO=y
+CONFIG_SYS_I2C_ROCKCHIP=y
+CONFIG_MMC_DW=y
+CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_PINCTRL=y
+CONFIG_PHY_REALTEK=y
+CONFIG_DM_ETH_PHY=y
+CONFIG_ETH_DESIGNWARE=y
+CONFIG_RGMII=y
+CONFIG_GMAC_ROCKCHIP=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_RK8XX=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_REGULATOR_RK8XX=y
CONFIG_RAM=y
+CONFIG_SPL_RAM=y
+CONFIG_TPL_RAM=y
CONFIG_DEBUG_UART_SHIFT=2
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_SYS_NS16550_MEM32=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
CONFIG_SYSRESET=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_GENERIC=y
+CONFIG_USB_DWC2=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DWC2_OTG=y
+CONFIG_SPL_TINY_MEMSET=y
+CONFIG_LZO=y
CONFIG_ERRNO_STR=y
--
2.47.0

View file

@ -0,0 +1,39 @@
From aef38432fbc93621b434836b95b10c28aa880e84 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 9 Dec 2025 20:51:06 +0000
Subject: [PATCH 1/2] rockchip: rk3568-nanopi-r5: Drop duplicated/extra sdhci
The pinctrl settings are now upstream, with the upstream
voltage supplies, and the HS200 mode is confirmed to work
fine but the HS400 mode had reported issues so let's just
consume what the upstream DT has now as it's all known good.
Reported-by: Dusty Mabe <dusty@dustymabe.com>
Tested-by: Dusty Mabe <dusty@dustymabe.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
index 64c43374c04..7e24be1a5e7 100644
--- a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
+++ b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
@@ -12,14 +12,6 @@
/delete-property/ vpcie3v3-supply;
};
-&sdhci {
- cap-mmc-highspeed;
- mmc-hs200-1_8v;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
- pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
-};
-
&vcc5v0_usb_host {
/delete-property/ regulator-always-on;
/delete-property/ regulator-boot-on;
--
2.52.0

View file

@ -0,0 +1,33 @@
From 29efc0396809384cf37bfcfb01c62e63216fa998 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 9 Dec 2025 21:13:46 +0000
Subject: [PATCH 2/2] rockchip: rk356x: Stop overriding sdhci/mmc aliases
Upstream device tree has rules where the aliases are board
specific settings, no SoC settings. Looking at upstream
rk356x boards there's a lot of variation in the setting of
mmc0/mmc1 based on the device so we should not be overriding
this here and now we sync to upstream we should just consume
those settings, to do otherwise confuses users.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
arch/arm/dts/rk356x-u-boot.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/dts/rk356x-u-boot.dtsi b/arch/arm/dts/rk356x-u-boot.dtsi
index 738b9673d35..f25c7970208 100644
--- a/arch/arm/dts/rk356x-u-boot.dtsi
+++ b/arch/arm/dts/rk356x-u-boot.dtsi
@@ -7,8 +7,6 @@
/ {
aliases {
- mmc0 = &sdhci;
- mmc1 = &sdmmc0;
spi4 = &sfc;
};
--
2.52.0

View file

@ -1,40 +0,0 @@
From c449955f6aece3148ccf67890df1083fb3a41884 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Fri, 11 Oct 2024 12:04:10 +0100
Subject: [PATCH] board: rpi: Pass CMA through from firmware DT
For a lot of usecases, such as display, camera, media
the Raspberry Pi needs a lot more CMA than distros
configure as default so we should pass this parameter
through so things work as expected. Fix a spelling
mistake while we're at it.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
board/raspberrypi/rpi/rpi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index ab5ea85cf9f..dd5a318d239 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -540,12 +540,15 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt)
if (fdt == fw_fdt)
return;
- /* The firmware provides a more precie model; so copy that */
+ /* The firmware provides a more precise model; so copy that */
copy_property(fdt, fw_fdt, "/", "model");
/* memory reserve as suggested by the firmware */
copy_property(fdt, fw_fdt, "/", "memreserve");
+ /* copy the CMA memory setting from the firmware DT to linux */
+ copy_property(fdt, fw_fdt, "/reserved-memory/linux,cma", "size");
+
/* Adjust dma-ranges for the SD card and PCI bus as they can depend on
* the SoC revision
*/
--
2.47.0

View file

@ -0,0 +1,256 @@
From patchwork Tue Aug 4 13:39:15 2026
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Gregor Herburger <gregor.herburger@linutronix.de>
X-Patchwork-Id: 2280865
X-Patchwork-Delegate: pbrobinson@gmail.com
Return-Path: <u-boot-bounces@lists.u-boot-project.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=lists.u-boot-project.org
header.i=@lists.u-boot-project.org header.a=rsa-sha256 header.s=default
header.b=DFFhfbAr;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.u-boot-project.org
(client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;
envelope-from=u-boot-bounces@lists.u-boot-project.org;
receiver=patchwork.ozlabs.org)
Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4hDvm8025rz1xqD
for <incoming@patchwork.ozlabs.org>; Tue, 04 Aug 2026 23:39:35 +1000 (AEST)
Received: from localhost (localhost [127.0.0.1])
by smtp3.osuosl.org (Postfix) with ESMTP id 2536960600;
Tue, 4 Aug 2026 13:39:34 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp3.osuosl.org ([127.0.0.1])
by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id T9Kb3BtsvOX4; Tue, 4 Aug 2026 13:39:33 +0000 (UTC)
X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142;
helo=lists1.osuosl.org;
envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver=<UNKNOWN>
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 4350560615
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=lists.u-boot-project.org ; s=default; t=1785850773;
bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=;
h=From:Date:Subject:To:Cc:List-Id:List-Unsubscribe:List-Archive:
List-Post:List-Help:List-Subscribe:From;
b=DFFhfbArDuHrxJEuZryw3QEVVVcavwAril7tcxulQVs6jkVOCAjh7GEuhkq8EyLIq
suopR14b5dkKpVbbSr23u2v9jRgpynJQ5WBq6kIJSqjmZt58tZeMbaX76PRHjOs8+s
QHatP0Vxf1ny0BOpVlZLZ/LlAsQhypNhW6/qjH0X9OLeNq0IFjSZ5faD3z463b62m0
yMuPrAXa/kuPPInxGG6HsCPkRzFH3x9hM15r7ipSbXODTRXaVBSVScp03eAeo6zw/d
nll/wcjCEe/78XX5o1Tsug951g7H8meDRnGQHJZtvbEmHdDB1wkTXYdFI2EGwnDxsz
W3dcHoUveJgqQ==
Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])
by smtp3.osuosl.org (Postfix) with ESMTP id 4350560615;
Tue, 4 Aug 2026 13:39:33 +0000 (UTC)
X-Original-To: u-boot@lists.u-boot-project.org
Delivered-To: u-boot@lists.u-boot-project.org
Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])
by lists1.osuosl.org (Postfix) with ESMTP id 3009E2BF
for <u-boot@lists.u-boot-project.org>; Tue, 4 Aug 2026 13:39:31 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by smtp1.osuosl.org (Postfix) with ESMTP id 222DC8086C
for <u-boot@lists.u-boot-project.org>; Tue, 4 Aug 2026 13:39:31 +0000 (UTC)
X-Virus-Scanned: amavis at osuosl.org
Received: from smtp1.osuosl.org ([127.0.0.1])
by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id W5OoNRat257d for <u-boot@lists.u-boot-project.org>;
Tue, 4 Aug 2026 13:39:30 +0000 (UTC)
X-Greylist: delayed 94239 seconds by postgrey-1.37 at util1.osuosl.org;
Tue, 04 Aug 2026 13:39:29 UTC
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1B0B580827
DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1B0B580827
Received-SPF: Pass (mailfrom) identity=mailfrom;
client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de;
envelope-from=gregor.herburger@linutronix.de; receiver=<UNKNOWN>
Received: from galois.linutronix.de (Galois.linutronix.de
[IPv6:2a0a:51c0:0:12e:550::1])
by smtp1.osuosl.org (Postfix) with ESMTPS id 1B0B580827
for <u-boot@lists.u-boot-project.org>; Tue, 4 Aug 2026 13:39:29 +0000 (UTC)
From: Gregor Herburger <gregor.herburger@linutronix.de>
Date: Tue, 04 Aug 2026 15:39:15 +0200
Subject: [PATCH v3] rpi: copy /chosen/bootloader partition and set
boot_partition
MIME-Version: 1.0
Message-Id: <20260804-tryboot2-v3-1-b0bc282a923b@linutronix.de>
X-B4-Tracking: v=1; b=H4sIAILrcWoC/22OywrCMBBFf0WyNpKHbYor/0O6SNOJjWgiSRpaS
v/dpCKCyKwO3HvmLiiANxDQabcgD8kE42wGvt8hNUh7BWz6zIgRVpOGcBz93DkXGW5UxRjlooZ
Kohx/etBm2lSX9s1h7G6gYumXhPbugePgQX6VgjQfJU4U5+OSHiVIpQU9340do3fWTIceimIwI
To/b3MTK6/+LEssezhRRFDNAGj142nXdX0BG/Mh6/kAAAA=
X-Change-ID: 20260803-tryboot2-8c5221376e5a
To: u-boot@lists.u-boot-project.org
Cc: Matthias Brugger <mbrugger@suse.com>,
Peter Robinson <pbrobinson@gmail.com>, Tom Rini <trini@konsulko.com>,
=?utf-8?q?Filip_Kokosi=C5=84ski?= <filip.kokosinski@gmail.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Gregor Herburger <gregor.herburger@linutronix.de>
X-Developer-Signature: v=1; a=ed25519-sha256; t=1785850764; l=3191;
i=gregor.herburger@linutronix.de; s=20260226; h=from:subject:message-id;
bh=4mVT/kFDHBnjUUlqljWBZ+t7aLa+t+gE+t/hUJ4uc5g=;
b=TBKoGScdkXGUfpGLvpVtYHkg4LDoOR/8M/do2dqU2QlR+9Z9YFNN6x88pDC7UIDeXrJS+Hpeg
e3YsfK6fOcoBgXOuzz3Aabmmn9//OQN7WG6Vz15rSxX0uVZ96TFcvf5
X-Developer-Key: i=gregor.herburger@linutronix.de; a=ed25519;
pk=u72Lv7+/lS5CC1hmSrb17lv/6CK7HBh4Lvz77PHA5LM=
X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linutronix.de; s=2020; t=1785850765;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=;
b=plU5oAFojHvTlDhOGINsdXnnc0AnS9OY0C4LB9dSy9uyrPKBBpLWGWj3xmNoX87lLZlhO9
z0H+R5gqw5NfxbTVYFHqZnW+pW4xJQFW9fMYSU8/k2RRg9JEqP+NrZ8Y720ujlycxn05vP
sF7cD+TEsxvyBhnbRyq82obvpdQIYj0D6T3UkHyz0U4G+5k8dVhhv/mqGaSfY8xW4cCl5G
gIE2QIsuzB4g4pQoW70DrLd7cyqqDM0iDrrXFZL2a7DlnYgbe1ULVXMl05UMMQGfBkHmog
pt8e+zvO4AVA3G8CKcUQhhWOZm7uycUpdrNuyPKg9K7JB6MEd9dHbucVa+v8Yg==
X-Mailman-Original-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed;
d=linutronix.de; s=2020e; t=1785850765;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=Tj3LONeiWXn0Cn5KPSYhoff9avwde4nWUGEguAWdLbE=;
b=NAMrZHs0ETYIMiwBHLvCoR3NOcg/kwkAxVRq6Q/pdhfkQJjxtHU3mZFV520QjbE1yeix0S
nJyAqHgyKVlRiZCw==
X-Mailman-Original-Authentication-Results: smtp1.osuosl.org;
dmarc=pass (p=none dis=none)
header.from=linutronix.de
X-Mailman-Original-Authentication-Results: smtp1.osuosl.org;
dkim=pass (2048-bit key, unprotected) header.d=linutronix.de
header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=plU5oAFo;
dkim=pass header.d=linutronix.de header.i=@linutronix.de
header.a=ed25519-sha256 header.s=2020e header.b=NAMrZHs0
X-BeenThere: u-boot@lists.u-boot-project.org
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: U-Boot discussion <u-boot.lists.u-boot-project.org>
List-Unsubscribe: <https://lists.u-boot-project.org/mailman/options/u-boot>,
<mailto:u-boot-request@lists.u-boot-project.org?subject=unsubscribe>
List-Archive: <http://lists.u-boot-project.org/pipermail/u-boot/>
List-Post: <mailto:u-boot@lists.u-boot-project.org>
List-Help: <mailto:u-boot-request@lists.u-boot-project.org?subject=help>
List-Subscribe: <https://lists.u-boot-project.org/mailman/listinfo/u-boot>,
<mailto:u-boot-request@lists.u-boot-project.org?subject=subscribe>
Errors-To: u-boot-bounces@lists.u-boot-project.org
Sender: "U-Boot" <u-boot-bounces@lists.u-boot-project.org>
The Raspberry Pi has the "tryboot" feature where it can boot from a
different partition enabling failsafe A/B updates. After boot the
firmware sets 'partition' property in /chosen/bootloader.
Copy the /chosen/bootloader node to the device tree.
Set the env variable boot_partition accordingly to allow boards to
create a bootcmd based on the boot partition.
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
---
Changes in v3:
- Copy the complete '/chosen/bootloader' node instead of only the
partition property
- Link to v2: https://patch.msgid.link/20260803-tryboot2-v2-1-30c071f2ee15@linutronix.de
Changes in v2:
- update Reviewed-by tag
---
board/raspberrypi/rpi/rpi.c | 51 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
---
base-commit: baa64b2f892890f00a377eac4a3e685472bb56b5
change-id: 20260803-tryboot2-8c5221376e5a
Best regards,
--
Gregor Herburger <gregor.herburger@linutronix.de>
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 1da5df92351c..ba8a2c1ba4cf 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -480,6 +480,20 @@ static void set_serial_number(void)
env_set("serial#", serial_string);
}
+static void set_boot_partition_fdt(void)
+{
+ void *fdtp = (void *)gd->fdt_blob;
+ u32 partition;
+
+ partition = fdt_getprop_u32_default(fdtp, "/chosen/bootloader", "partition", 1);
+ if (!partition) {
+ printf("Failed to the get partition property.\n");
+ return;
+ }
+
+ env_set_ulong("boot_partition", partition);
+}
+
int misc_init_r(void)
{
set_fdt_addr();
@@ -489,6 +503,7 @@ int misc_init_r(void)
set_board_info();
#endif
set_serial_number();
+ set_boot_partition_fdt();
return 0;
}
@@ -579,6 +594,39 @@ int board_fdt_blob_setup(void **fdtp)
return 0;
}
+int copy_node_all_properties(void *dst, void *src, const char *path, const char *node)
+{
+ int src_parent, dst_parent;
+ int src_node, dst_node;
+ int prop;
+ int len;
+
+ src_parent = fdt_path_offset(src, path);
+ dst_parent = fdt_path_offset(dst, path);
+ if (src_parent < 0 || dst_parent < 0)
+ return -1;
+
+ src_node = fdt_subnode_offset(src, src_parent, node);
+ if (src_node < 0)
+ return -1;
+
+ dst_node = fdt_find_or_add_subnode(dst, dst_parent, node);
+ if (dst_node < 0)
+ return -1;
+
+ fdt_for_each_property_offset(prop, src, src_node) {
+ const char *name;
+ const void *value = fdt_getprop_by_offset(src, prop, &name, &len);
+
+ if (!value || !name)
+ continue;
+
+ fdt_setprop(dst, dst_node, name, value, len);
+ }
+
+ return 0;
+}
+
int copy_property(void *dst, void *src, char *path, char *property)
{
int dst_offset, src_offset;
@@ -641,6 +689,9 @@ void update_fdt_from_fw(void *fdt, void *fw_fdt)
/* copy uart clk as provided by the firmware */
copy_property(fdt, fw_fdt, "/clocks/clk-uart", "clock-frequency");
+
+ /* Copy the bootloader node */
+ copy_node_all_properties(fdt, fw_fdt, "/chosen", "bootloader");
}
int ft_board_setup(void *blob, struct bd_info *bd)

View file

@ -1 +1 @@
SHA512 (u-boot-2024.10.tar.bz2) = ef817c9b5ae8dc6cd9e3f57811e90acc6a4d4394f0356aa5923e3e3c8559168f977bd5bf82824cd3650aa8e5e3c3d1b00e20818d21368151748682f1fc51152c
SHA512 (u-boot-v2026.10-rc3.tar.bz2) = e993f5d78a1ac0eb11f00e3730ff23eb880e206036f78c3eb74852b846a23d59111b4b07f4ced2c88c61a8c1627036c3cc32717c0efcf819376c5cd0a34183d2

View file

@ -1,42 +1,56 @@
#global candidate rc0
%global candidate rc3
%if 0%{?rhel}
%bcond_with toolsonly
%else
%bcond_without toolsonly
%endif
# Set it to "opensbi" (stable) or "opensbi-unstable" (unstable, git)
%global opensbi opensbi
Name: uboot-tools
Version: 2024.10
Release: 1%{?candidate:.%{candidate}}%{?dist}
Version: 2026.10
Release: 0.3%{?candidate:.%{candidate}}%{?dist}
Epoch: 1
Summary: U-Boot utilities
# Automatically converted from old format: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ - review is highly recommended.
License: GPL-2.0-or-later AND LicenseRef-Callaway-BSD AND LGPL-2.1-or-later AND LGPL-2.0-or-later
URL: http://www.denx.de/wiki/U-Boot
URL: https://u-boot-project.org/
ExcludeArch: s390x
Source0: https://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2
Source0: https://git.u-boot-project.org/u-boot/u-boot/-/archive/v%{version}%{?candidate:-%{candidate}}/u-boot-v%{version}%{?candidate:-%{candidate}}.tar.bz2
Source1: aarch64-boards
Source2: riscv64-boards
Source3: x86_64-boards
# This is now legacy, most devices use bootflow, we keep this for the laggards
Patch1: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
# Identify VFAT partitions as ESP, allows EFI setvar on our images
Patch2: uefi-Add-all-options-for-EFI-System-Partitions.patch
# New function to find fdt for loading from disk
Patch3: uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch
# Fedora patches to enable/disable features
Patch4: disable-VBE-by-default.patch
Patch5: enable-bootmenu-by-default.patch
# Should be upstream but it's taking time
#Patch6: Add-video-damage-tracking.patch
Patch1: disable-VBE-by-default.patch
Patch2: enable-bootmenu-by-default.patch
# This is now legacy, most devices use bootflow, we keep this for the laggards
Patch3: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch
# Identify VFAT partitions as ESP, allows EFI setvar on our images
Patch4: uefi-Add-all-options-for-EFI-System-Partitions.patch
# New function to find fdt for loading from disk
Patch5: uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch
# Enable UEFI SetVariable for devices without backed storage
Patch6: uefi-enable-SetVariableRT-with-volotile-storage.patch
# Enable UEFI HTTPS boot for all Fedora firmware
Patch7: uefi-enable-https-boot-by-default.patch
# Device improvments
# USB-PD improvements
Patch10: USB-PD-TCPM-improvements.patch
# Rockchips improvements
Patch10: rockchip-Enable-preboot-start-for-pci-usb.patch
Patch11: FUSB302-USB-C-controller-support.patch
Patch12: rockchip-Modernise-Geekbox-config.patch
# QCom
Patch15: Qualcomm-add-support-for-SC7280-and-the-RB3-Gen-2.patch
Patch11: rockchip-Enable-preboot-start-for-pci-usb.patch
Patch13: rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch
# Jetson fixes
Patch14: p3450-fix-board.patch
Patch15: JetsonTX2-Fix-upstream-device-tree-naming.patch
# Fix AllWinner
Patch16: Allwinner-fix-booting-on-a-number-of-devices.patch
# RPi
Patch20: rpi-Pass-CMA-through-from-firmware-DT.patch
Patch20: Fix-NVMe-not-only-on-Raspberry-Pi-5.patch
Patch21: raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch
Patch22: rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch
BuildRequires: bc
BuildRequires: bison
@ -47,8 +61,13 @@ BuildRequires: gnutls-devel
BuildRequires: libuuid-devel
BuildRequires: make
BuildRequires: ncurses-devel
%if 0%{?fedora} > 44
BuildRequires: openssl3-devel
BuildRequires: openssl3-devel-engine
%else
BuildRequires: openssl-devel
BuildRequires: openssl-devel-engine
%endif
BuildRequires: perl-interpreter
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@ -58,10 +77,14 @@ BuildRequires: swig
%if %{with toolsonly}
%ifarch aarch64
BuildRequires: arm-trusted-firmware-armv8
BuildRequires: optee-os-firmware-armv8
BuildRequires: crust-firmware
BuildRequires: python3-pyelftools
BuildRequires: xxd
%endif
%ifarch riscv64
BuildRequires: %{opensbi}
%endif
%endif
Requires: dtc
@ -78,12 +101,30 @@ BuildArch: noarch
%description -n uboot-images-armv8
U-Boot firmware binaries for aarch64 boards
%endif
%ifarch riscv64
%package -n uboot-images-riscv64
Summary: U-Boot firmware images for riscv64 boards
BuildArch: noarch
%description -n uboot-images-riscv64
U-Boot firmware binaries for riscv64 boards
%endif
%ifarch x86_64
%package -n uboot-images-x86_64
Summary: U-Boot firmware images for x86_64 boards
BuildArch: noarch
%description -n uboot-images-x86_64
U-Boot firmware binaries for x86_64 boards
%endif
%endif
%prep
%autosetup -p1 -n u-boot-%{version}%{?candidate:-%{candidate}}
%autosetup -p1 -n u-boot-v%{version}%{?candidate:-%{candidate}}
cp %SOURCE1 .
cp %SOURCE1 %SOURCE2 %SOURCE3 .
%build
mkdir builds
@ -92,7 +133,12 @@ mkdir builds
%make_build HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" tools-all O=builds/
%if %{with toolsonly}
%ifarch aarch64
# OpenSBI firmware is distributed in U-Boot SPL images
%ifarch riscv64
export OPENSBI=%{_datadir}/%{opensbi}/generic/firmware/fw_dynamic.bin
%endif
%ifarch aarch64 riscv64 x86_64
for board in $(cat %{_arch}-boards)
do
echo "Building board: $board"
@ -117,12 +163,12 @@ do
cp /usr/share/arm-trusted-firmware/sun50i_h6/bl31.bin builds/$(echo $board)/atf-bl31
cp /usr/share/crust-firmware/h6/scp.bin builds/$(echo $board)/
fi
sun50i_h616=(orangepi_zero2 orangepi_zero2w orangepi_zero3 transpeed-8k618-t x96_mate)
sun50i_h616=(anbernic_rg35xx_h700 orangepi_zero2 orangepi_zero2w orangepi_zero3 transpeed-8k618-t x96_mate)
if [[ " ${sun50i_h616[*]} " == *" $board "* ]]; then
echo "Board: $board using sun50i_h616"
cp /usr/share/arm-trusted-firmware/sun50i_h616/bl31.bin builds/$(echo $board)/atf-bl31
fi
rk3328=(evb-rk3328 nanopi-r2c-plus-rk3328 nanopi-r2c-rk3328 nanopi-r2s-rk3328 orangepi-r1-plus-lts-rk3328 orangepi-r1-plus-rk3328 roc-cc-rk3328 rock64-rk3328 rock-pi-e-rk3328 rock-pi-e-v3-rk3328)
rk3328=(evb-rk3328 generic-rk3328 nanopi-r2c-plus-rk3328 nanopi-r2c-rk3328 nanopi-r2s-rk3328 nanopi-r2s-plus-rk3328 orangepi-r1-plus-lts-rk3328 orangepi-r1-plus-rk3328 roc-cc-rk3328 rock64-rk3328 rock-pi-e-rk3328 rock-pi-e-v3-rk3328)
if [[ " ${rk3328[*]} " == *" $board "* ]]; then
echo "Board: $board using rk3328"
cp /usr/share/arm-trusted-firmware/rk3328/bl31.elf builds/$(echo $board)/atf-bl31
@ -132,12 +178,17 @@ do
echo "Board: $board using rk3368"
cp /usr/share/arm-trusted-firmware/rk3368/bl31.elf builds/$(echo $board)/atf-bl31
fi
rk3399=(eaidk-610-rk3399 evb-rk3399 ficus-rk3399 firefly-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399)
rk3399=(eaidk-610-rk3399 evb-rk3399 ficus-rk3399 firefly-rk3399 generic-rk3399 khadas-edge-captain-rk3399 khadas-edge-rk3399 khadas-edge-v-rk3399 leez-rk3399 nanopc-t4-rk3399 nanopi-m4-2gb-rk3399 nanopi-m4b-rk3399 nanopi-m4-rk3399 nanopi-neo4-rk3399 nanopi-r4s-rk3399 orangepi-rk3399 pinebook-pro-rk3399 pinephone-pro-rk3399 puma-rk3399 rock-4c-plus-rk3399 rock-4se-rk3399 rock960-rk3399 rock-pi-4c-rk3399 rock-pi-4-rk3399 rock-pi-n10-rk3399pro rockpro64-rk3399 roc-pc-mezzanine-rk3399 roc-pc-rk3399)
if [[ " ${rk3399[*]} " == *" $board "* ]]; then
echo "Board: $board using rk3399"
cp /usr/share/arm-trusted-firmware/rk3399/* builds/$(echo $board)/
cp builds/$(echo $board)/bl31.elf builds/$(echo $board)/atf-bl31
fi
zynqmp=(xilinx_zynqmp_kria xilinx_zynqmp_virt)
if [[ " ${zynqmp[*]} " == *" $board "* ]]; then
echo "Board: $board using zynqmp"
cp /usr/share/arm-trusted-firmware/zynqmp/bl31.bin builds/$(echo $board)/atf-bl31
fi
# End ATF
make $(echo $board)_defconfig O=builds/$(echo $board)/
@ -157,7 +208,18 @@ mkdir -p %{buildroot}%{_datadir}/uboot/
%ifarch aarch64
for board in $(ls builds)
do
for file in u-boot.bin u-boot.img u-boot-dtb.img u-boot.itb u-boot-sunxi-with-spl.bin u-boot-rockchip-spi.bin u-boot-rockchip.bin idbloader.img idbloader-spi.img spl/boot.bin
for file in u-boot.bin u-boot.img u-boot-dtb.img u-boot-sunxi-with-spl.bin u-boot-rockchip-spi.bin u-boot-rockchip.bin
do
if [ -f builds/$(echo $board)/$(echo $file) ]; then
install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file)
fi
done
done
# Just for xilinx_zynqmp
for board in "xilinx_zynqmp_kria xilinx_zynqmp_virt"
do
for file in u-boot.itb spl/boot.bin
do
if [ -f builds/$(echo $board)/$(echo $file) ]; then
install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file)
@ -167,6 +229,31 @@ done
# For Apple M-series we also need the nodtb variant
install -pD -m 0644 builds/apple_m1/u-boot-nodtb.bin %{buildroot}%{_datadir}/uboot/apple_m1/u-boot-nodtb.bin
%endif
%ifarch riscv64
for board in $(ls builds)
do
for file in u-boot.itb spl/u-boot-spl.bin spl/u-boot-spl.bin.normal.out
do
if [ -f builds/$(echo $board)/$(echo $file) ]; then
install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file)
fi
done
done
%endif
%ifarch x86_64
for board in $(ls builds)
do
for file in u-boot.rom
do
if [ -f builds/$(echo $board)/$(echo $file) ]; then
install -pD -m 0644 builds/$(echo $board)/$(echo $file) %{buildroot}%{_datadir}/uboot/$(echo $board)/$(echo $file)
fi
done
done
%endif
# Bit of a hack to remove binaries we don't use as they're large
for board in $(ls builds)
@ -174,21 +261,21 @@ do
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.dtb
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-sunxi-with-spl.bin ]; then
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.*
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/sunxi-spl.bin
fi
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/idbloader.img ]; then
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot.bin
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.img
if [ -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot-rockchip.bin ]; then
rm -f %{buildroot}%{_datadir}/uboot/$(echo $board)/u-boot{,-dtb}.*
fi
done
%endif
%endif
for tool in dumpimage env/fw_printenv fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder
for tool in dumpimage env/fw_printenv fdt_add_pubkey fit_check_sign fit_info gdb/gdbcont gdb/gdbsend gen_eth_addr gen_ethaddr_crc ifwitool img2srec kwboot mkeficapsule mkenvimage mkimage mksunxiboot ncb proftool sunxi-spl-image-builder
do
install -p -m 0755 builds/tools/$tool %{buildroot}%{_bindir}
done
install -p -m 0644 doc/mkimage.1 %{buildroot}%{_mandir}/man1
for tool in dumpimage kwboot mkeficapsule mkimage
do
install -p -m 0644 doc/$tool.1 %{buildroot}%{_mandir}/man1
done
install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir}
( cd %{buildroot}%{_bindir}; ln -sf fw_printenv fw_setenv )
@ -198,6 +285,9 @@ install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir}
%doc README doc/develop/distro.rst doc/README.gpt
%doc doc/develop/uefi doc/usage doc/arch/arm64.rst
%{_bindir}/*
%{_mandir}/man1/dumpimage.1*
%{_mandir}/man1/kwboot.1*
%{_mandir}/man1/mkeficapsule.1*
%{_mandir}/man1/mkimage.1*
%if %{with toolsonly}
@ -207,9 +297,201 @@ install -p -m 0755 builds/tools/env/fw_printenv %{buildroot}%{_bindir}
%dir %{_datadir}/uboot/
%{_datadir}/uboot/*
%endif
%ifarch riscv64
%files -n uboot-images-riscv64
%license Licenses/*
%dir %{_datadir}/uboot/
%{_datadir}/uboot/*
%endif
%ifarch x86_64
%files -n uboot-images-x86_64
%license Licenses/*
%dir %{_datadir}/uboot/
%{_datadir}/uboot/*
%endif
%endif
%changelog
* Thu Aug 27 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.10-0.3.rc3
- Update to 2026.10 RC3
* Wed Aug 12 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.10-0.2.rc2
- Update to 2026.10 RC2
* Thu Jul 30 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.10-0.1.rc1
- Update to 2026.10 RC1
- Update source URL
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:2026.07-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Tue Jul 07 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.07-1
- Update to 2026.07 GA
* Tue Jun 23 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.07-0.4.rc5
- Update to 2026.07 RC5
* Mon Jun 08 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.07-0.3.rc4
- Update to 2026.07 RC4
* Fri May 29 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.07-0.2.rc3
- Update to 2026.07 RC3
- Update U-Boot Project URL
- Update RPi PCIe patches
- Various RPi fixes
* Fri May 01 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.07-0.1.rc1
- Update to 2026.07 RC1
* Sat Apr 11 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-2
- Fix PCIe/USB on Raspberry Pi 4 (rhbz#2448365)
- Fix detection of some revisions of RPi5
* Tue Apr 07 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-1
- Update to 2026.04 GA
* Sun Mar 29 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.9.rc5
- Enable NVME booting on RPi5
* Tue Mar 24 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.8.rc5
- Update to 2026.04 RC5
* Sat Mar 14 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.7.rc4
- Raspberry Pi fixes
* Tue Mar 10 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.6.rc4
- Update to 2026.04 RC4
* Fri Feb 27 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.5.rc3
- Update to 2026.04 RC3
* Tue Feb 17 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.4.rc2
- Add initial bcm2712d0 identification
* Mon Feb 09 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.3.rc2
- Update to 2026.04 RC2
* Tue Jan 27 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.04-0.2.rc1
- Update to 2026.04 RC1
* Mon Jan 19 2026 Javier Martinez Canillas <javierm@redhat.com> - 1:2026.01-3
- Add a uboot-images-x86_64 subpackage
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1:2026.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Tue Jan 06 2026 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.01-1
- Update to 2026.01 GA
* Mon Dec 29 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.01-0.4.rc5
- Update to 2026.01 RC5
* Mon Dec 08 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.01-0.3.rc4
- Update to 2026.01 RC4
* Fri Nov 28 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.01-0.2.rc3
- Updates for RPi
* Mon Nov 24 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2026.01-0.1.rc3
- Update to 2026.01 RC3
* Thu Oct 16 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-2
- Drop residual Rockchip firmware (saves ~150Mb)
* Mon Oct 13 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-1
- Update to 2025.10 GA (rhbz#2401964)
- Fix booting when using FW device-tree (rhbz#2402498)
- Fix for some variants of Raspberry Pi
- Fixes for Jetson device booting
* Fri Sep 26 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-0.7.rc5
- Update to 2025.10 RC5
* Mon Sep 08 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-0.6.rc4
- Update to 2025.10 RC4
* Sun Sep 07 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-0.5.rc3
- Boot fixes for some Raspberry Pi variants
* Wed Aug 27 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-0.4.rc3
- Fix booting on some Allwinner devices
* Mon Aug 25 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-0.3.rc3
- Update to 2025.10 RC3
* Tue Aug 19 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-0.2.rc2
- Fix and re-enable Jetson Nano
* Mon Aug 18 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.10-0.1.rc2
- Update to 2025.10 RC2
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:2025.07-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jul 10 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.07-2
- Update patch for rebase issue
* Wed Jul 09 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.07-1
- Update to 2025.07 GA
* Fri Jun 27 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.07-0.5.rc5
- Update to 2025.07 RC5
- Enable LWIP stack by default
- Enable HTTP(s) boot support
* Thu Jun 26 2025 Javier Martinez Canillas <javierm@redhat.com> - 1:2025.07-0.4.rc4
- Add EFI_PARTITION_INFO_PROTOCOL support
* Sun Jun 15 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.07-0.3.rc4
- Update to 2025.07 RC4
* Tue May 13 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.07-0.2.rc2
- Update to 2025.07 RC2
* Thu May 01 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.07-0.1.rc1
- Update to 2025.07 RC1
* Sun Apr 20 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.04-2
- Fix for RPi5 serial console
* Tue Apr 08 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.04-1
- Update to 2025.04 GA
* Tue Mar 25 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.04-0.7.rc5
- Update to 2025.04 RC5
* Wed Mar 12 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.04-0.6.rc4
- Update to 2025.04 RC4
* Wed Feb 26 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.04-0.5.rc3
- Update to 2025.04 RC3
* Tue Feb 18 2025 David Abdurachmanov <davidlt@rivosinc.com> - 1:2025.04-0.4.rc2
- Add support for riscv64
* Tue Feb 11 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.04-0.3.rc2
- Update to 2025.05 RC2
* Tue Feb 11 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.04-0.2.rc1
- Update to 2025.05 RC1
* Tue Jan 28 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.01-3
- Add new fdt_add_pubkey tool
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1:2025.01-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Tue Jan 07 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.01-1
- Update to 2025.01 GA
* Mon Jan 06 2025 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.01-0.2.rc6
- Rebuild for TF-A 2.12
* Tue Dec 31 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2025.01-0.1.rc6
- Update to 2025.01 RC6
* Fri Oct 11 2024 Peter Robinson <pbrobinson@fedoraproject.org> - 1:2024.10-1
- Update to 2024.10 GA
- Fix passing RPi firmware CMA setting to kernel DT

View file

@ -0,0 +1,33 @@
From fd736dd720b29fa69a4bb87492f3f94dc6076996 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 25 Mar 2025 17:13:44 +0000
Subject: [PATCH] efi: enable SetVariableRT with volotile storage
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
lib/efi_loader/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index d4f6b56afaa..3e522131b01 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -108,6 +108,7 @@ choice
config EFI_VARIABLE_FILE_STORE
bool "Store non-volatile UEFI variables as file"
depends on FAT_WRITE
+ default y
help
Select this option if you want non-volatile UEFI variables to be
stored as file /ubootefi.var on the EFI system partition.
@@ -115,6 +116,7 @@ config EFI_VARIABLE_FILE_STORE
config EFI_RT_VOLATILE_STORE
bool "Allow variable runtime services in volatile storage (e.g RAM)"
depends on EFI_VARIABLE_FILE_STORE
+ default y
help
When EFI variables are stored on file we don't allow SetVariableRT,
since the OS doesn't know how to write that file. At the same time
--
2.49.0

View file

@ -0,0 +1,82 @@
From 7eabab2fda12b7a4417e5c7f29a507dfa9e7fffd Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Sun, 3 May 2026 09:24:34 +0100
Subject: [PATCH] enable https boot by default
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
cmd/Kconfig | 1 +
lib/efi_loader/Kconfig | 1 +
lib/mbedtls/Kconfig | 3 ++-
net/Kconfig | 3 ++-
4 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index c71c6824a19..8ff14adffe1 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -2289,6 +2289,7 @@ config CMD_WGET
config WGET_HTTPS
bool "wget https"
+ default y
depends on CMD_WGET
depends on PROT_TCP_LWIP
depends on MBEDTLS_LIB
diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig
index 4cb13ae7c8a..20733429962 100644
--- a/lib/efi_loader/Kconfig
+++ b/lib/efi_loader/Kconfig
@@ -609,6 +609,7 @@ config EFI_BOOTMGR
config EFI_HTTP_BOOT
bool "EFI HTTP Boot support"
+ default y
depends on NET
depends on CMDLINE
select CMD_NET
diff --git a/lib/mbedtls/Kconfig b/lib/mbedtls/Kconfig
index 789721ee6cd..7a241c2bc26 100644
--- a/lib/mbedtls/Kconfig
+++ b/lib/mbedtls/Kconfig
@@ -2,7 +2,7 @@
choice
prompt "Crypto libraries (U-Boot Proper)"
- default LEGACY_HASHING_AND_CRYPTO
+ default MBEDTLS_LIB
help
Select crypto libraries.
LEGACY_HASHING_AND_CRYPTO for legacy crypto libraries,
@@ -15,6 +15,7 @@ config LEGACY_HASHING_AND_CRYPTO
config MBEDTLS_LIB
bool "MbedTLS libraries"
+ default y
select MBEDTLS_LIB_X509
endchoice
diff --git a/net/Kconfig b/net/Kconfig
index e712a0dd2ac..3158d37dff7 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -16,7 +16,7 @@ if NET
choice
prompt "Networking stack"
- default NET_LEGACY
+ default NET_LWIP
config NET_LEGACY
bool "Legacy U-Boot networking stack"
@@ -27,6 +27,7 @@ config NET_LEGACY
config NET_LWIP
bool "Use lwIP for networking stack"
+ default y
select NETDEVICES
help
Include networking support based on the lwIP (lightweight IP)
--
2.54.0

View file

@ -1,6 +1,6 @@
From 8abb44f89aefd25cda27c54c08b68b3a60bea7c3 Mon Sep 17 00:00:00 2001
From 56a985cec8592a8de88e7f254df82f5d444a5ecc Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Thu, 21 Mar 2024 13:43:24 +0000
Date: Thu, 28 May 2026 22:08:07 +0100
Subject: [PATCH] initial find_fdt_location for finding the DT on disk
The old distro boot looked for a DT on the first boot partition
@ -16,29 +16,16 @@ so that devices will continue to work as they did previously.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
cmd/bootefi.c | 1 +
cmd/bootmenu.c | 5 ++
include/efi_loader.h | 2 +
lib/efi_loader/efi_helper.c | 105 +++++++++++++++++++++++++++++++++++-
4 files changed, 112 insertions(+), 1 deletion(-)
lib/efi_loader/efi_helper.c | 106 +++++++++++++++++++++++++++++++++++-
3 files changed, 112 insertions(+), 1 deletion(-)
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 9cf9027bf40..8b6194a8702 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -144,6 +144,7 @@ static int do_bootefi(struct cmd_tbl *cmdtp, int flag, int argc,
if (argc > 2) {
uintptr_t fdt_addr;
+ /* Do we need to run find_fdt_location here?*/
fdt_addr = hextoul(argv[2], NULL);
fdt = map_sysmem(fdt_addr, 0);
} else {
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index 78184fccab2..48368c8d42e 100644
index 528afd221d0..a10ea35a687 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -448,6 +448,11 @@ static void handle_uefi_bootnext(void)
@@ -502,6 +502,11 @@ static void handle_uefi_bootnext(void)
u16 bootnext;
efi_status_t ret;
efi_uintn_t size;
@ -51,10 +38,10 @@ index 78184fccab2..48368c8d42e 100644
/* Initialize EFI drivers */
ret = efi_init_obj_list();
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 7daca0afba2..a969378ff2f 100644
index 3a4d502631c..b11f8a2cb42 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -524,6 +524,8 @@ struct efi_register_notify_event {
@@ -574,6 +574,8 @@ struct efi_register_notify_event {
struct list_head handles;
};
@ -64,20 +51,20 @@ index 7daca0afba2..a969378ff2f 100644
int efi_init_early(void);
/* Initialize efi execution environment */
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
index 5dd9cc876e4..a33ec39ff74 100644
index 44b806aadc4..61e982091b9 100644
--- a/lib/efi_loader/efi_helper.c
+++ b/lib/efi_loader/efi_helper.c
@@ -12,6 +12,7 @@
@@ -15,6 +15,7 @@
#include <mapmem.h>
#include <dm.h>
#include <fs.h>
+#include <part.h>
#include <efi.h>
#include <efi_api.h>
#include <efi_load_initrd.h>
#include <efi_loader.h>
@@ -24,6 +25,99 @@
const efi_guid_t efi_lf2_initrd_guid = EFI_INITRD_MEDIA_GUID;
#endif
@@ -98,6 +99,99 @@ int efi_get_pxe_arch(void)
return -EINVAL;
}
+/* We need to pass a blk device in and return a location, or a loaded DT */
+char *find_fdt_location(void)
@ -175,14 +162,15 @@ index 5dd9cc876e4..a33ec39ff74 100644
/**
* efi_create_current_boot_var() - Return Boot#### name were #### is replaced by
* the value of BootCurrent
@@ -432,11 +526,20 @@ efi_status_t efi_install_fdt(void *fdt)
/* Look for device tree that is already installed */
if (efi_get_configuration_table(&efi_guid_fdt))
return EFI_SUCCESS;
@@ -558,11 +652,21 @@ efi_status_t efi_install_fdt(void *fdt)
const char *fdt_opt;
uintptr_t fdt_addr;
+ /* Check if there is device tree loaded from disk */
+ fdt_opt = find_fdt_location();
+ if (fdt_opt)
+ log_debug("Found DTB on disk\n");
+ log_info("Found DTB on disk\n");
+
/* Check if there is a hardware device tree */
- fdt_opt = env_get("fdt_addr");
+ if (!fdt_opt) {
@ -193,10 +181,10 @@ index 5dd9cc876e4..a33ec39ff74 100644
/* Use our own device tree as fallback */
if (!fdt_opt) {
fdt_opt = env_get("fdtcontroladdr");
+ log_debug("Using DT from U-Boot\n");
+ log_info("Using DT from U-Boot\n");
if (!fdt_opt) {
log_err("ERROR: need device tree\n");
log_err("need device tree\n");
return EFI_NOT_FOUND;
--
2.44.0
2.54.0

1
x86_64-boards Normal file
View file

@ -0,0 +1 @@
qemu-x86_64