diff --git a/10-devicetree.install b/10-devicetree.install deleted file mode 100755 index 752e5d0..0000000 --- a/10-devicetree.install +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# set -x - -if [[ "$(uname -m)" == arm* || "$(uname -m)" == aarch64 ]] -then -COMMAND="$1" -KERNEL_VERSION="$2" -#BOOT_DIR_ABS="$3" -#KERNEL_IMAGE="$4" - -# Setup a /boot/dtb -> /boot/dtb-$newest_kernel_version symlink so that -# u-boot can find the correct dtb to load. -# -# If invoked to 'add' a new kernel, find the newest based on `sort`ing -# the kernel versions dtb. If 'remove', then follow basically the same -# procedure but exclude the version currently being removed. -# -# The theory of operation here is that, while newer kernels may add new -# dtb nodes and fields, as upstreaming hw support for some particular -# device progresses, it should never make backward incompatible changes. -# So it should always be safe to use a newer dtb with an older kernel. - - list_dtb_versions() { - excluded_version="$1" - for dtbdir in /boot/dtb-*; do - dtbver=${dtbdir#*-} - if [ "$dtbver" != "$excluded_version" ]; then - echo $dtbver - fi - done - } - - setup_dtb_link() { - ver=`list_dtb_versions $1 | sort -r --sort=version | head -1` - if [ -h /boot/dtb ]; then - rm -f /boot/dtb - fi - ln -s dtb-$ver /boot/dtb - } - - ret=0 - case "$COMMAND" in - add) - # If we're adding a kernel we want that version - if [ -h /boot/dtb ]; then - rm -f /boot/dtb - fi - ln -s dtb-$KERNEL_VERSION /boot/dtb - ret=$? - ;; - remove) - setup_dtb_link $KERNEL_VERSION - ret=$? - ;; - esac - exit $ret -else - # Just exit on non ARM - exit 0 -fi diff --git a/Allwinner-fix-booting-on-a-number-of-devices.patch b/Allwinner-fix-booting-on-a-number-of-devices.patch new file mode 100644 index 0000000..2b08e13 --- /dev/null +++ b/Allwinner-fix-booting-on-a-number-of-devices.patch @@ -0,0 +1,27 @@ +From b8ea3cebde98866b7cbb4e8f9bb6dfdee529a549 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 + diff --git a/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch b/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch new file mode 100644 index 0000000..a52ce84 --- /dev/null +++ b/Fix-NVMe-not-only-on-Raspberry-Pi-5.patch @@ -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 +X-Patchwork-Id: 2265604 +Return-Path: +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 ; 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 ; 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 , + Andrew Goodbody , Bin Meng , + Simon Glass +Cc: Tom Rini , Matthias Brugger , + Peter Robinson , + Mattijs Korpershoek , + Marek Vasut , + Heiko Schocher , Svyatoslav Ryhel , + "Lucien.Jheng" , Rasmus Villemoes , + Martin Schwan , + "Markus Schneider-Pargmann (TI.com)" , + Prashant Kamble , + Denis Mukhin , Sughosh Ganu , + 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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de +X-Virus-Status: Clean + +From: Torsten Duwe + +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 +Signed-off-by: Torsten Duwe +Reviewed-by: Peter Robinson +Tested-by: Peter Robinson +--- + 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 +X-Patchwork-Id: 2265605 +Return-Path: +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 ; 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 ; 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 , + Andrew Goodbody , Bin Meng , + Simon Glass +Cc: Tom Rini , Matthias Brugger , + Peter Robinson , + Mattijs Korpershoek , + Marek Vasut , + Heiko Schocher , Svyatoslav Ryhel , + "Lucien.Jheng" , Rasmus Villemoes , + Martin Schwan , + "Markus Schneider-Pargmann (TI.com)" , + Prashant Kamble , + Denis Mukhin , Sughosh Ganu , + 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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de +X-Virus-Status: Clean + +From: Torsten Duwe + +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 +--- + +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 +X-Patchwork-Id: 2265607 +Return-Path: +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 ; 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 ; 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 , + Andrew Goodbody , Bin Meng , + Simon Glass +Cc: Tom Rini , Matthias Brugger , + Peter Robinson , + Mattijs Korpershoek , + Marek Vasut , + Heiko Schocher , Svyatoslav Ryhel , + "Lucien.Jheng" , Rasmus Villemoes , + Martin Schwan , + "Markus Schneider-Pargmann (TI.com)" , + Prashant Kamble , + Denis Mukhin , Sughosh Ganu , + 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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de +X-Virus-Status: Clean + +From: Torsten Duwe + +Enable NVMe in the Raspberry Pi 64-Bit default config and scan for devices. + +Signed-off-by: Torsten Duwe +Reviewed-by: Peter Robinson +Tested-by: Peter Robinson +--- + 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 diff --git a/JetsonTX2-Fix-upstream-device-tree-naming.patch b/JetsonTX2-Fix-upstream-device-tree-naming.patch new file mode 100644 index 0000000..14242ce --- /dev/null +++ b/JetsonTX2-Fix-upstream-device-tree-naming.patch @@ -0,0 +1,50 @@ +From 4ee5ba36570d94ce27e4023f15b8b3a6b8b9daf9 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 +--- + 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 + diff --git a/USB-PD-TCPM-improvements.patch b/USB-PD-TCPM-improvements.patch new file mode 100644 index 0000000..f84e6f3 --- /dev/null +++ b/USB-PD-TCPM-improvements.patch @@ -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 +X-Patchwork-Id: 2052544 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +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 ; 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 ; 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 +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +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 +--- + 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 +X-Patchwork-Id: 2052546 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +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 ; 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 ; 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 +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +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 +--- + 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 +X-Patchwork-Id: 2052545 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +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 ; 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 ; 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 +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +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 +--- + 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 +X-Patchwork-Id: 2052542 +X-Patchwork-Delegate: marek.vasut@gmail.com +Return-Path: +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 ; 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 ; 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 +To: Marek Vasut , u-boot@lists.denx.de, + Jonas Karlman , Soeren Moch +Cc: Tim Harvey , + Philipp Tomsich , + Anand Moon , Maxim Kiselev , + Sebastian Reichel +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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.denx.de +Sender: "U-Boot" +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 +--- + 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 diff --git a/aarch64-boards b/aarch64-boards index 5e876fe..366d0c8 100644 --- a/aarch64-boards +++ b/aarch64-boards @@ -1,41 +1,106 @@ a64-olinuxino -avnet_ultra96_rev1 +a64-olinuxino-emmc +amarula_a64_relic +anbernic_rg35xx_h700 +apple_m1 +bananapi_m2_plus_h5 bananapi_m64 +beelink_gs1 dragonboard410c dragonboard820c -espresso7420 +eaidk-610-rk3399 +emlid_neutis_n5_devboard +evb-px5 evb-rk3328 evb-rk3399 ficus-rk3399 firefly-rk3399 geekbox hikey +hmibsc +khadas-edge-captain-rk3399 +khadas-edge-rk3399 +khadas-edge-v-rk3399 khadas-vim -libretech-cc +khadas-vim2 +khadas-vim3 +khadas-vim3l +leez-rk3399 +libretech-ac libretech_all_h3_cc_h5 +libretech_all_h3_it_h5 +libretech_all_h5_cc_h5 +libretech-cc mvebu_espressobin-88f3720 mvebu_mcbin-88f8040 +nanopc-t4-rk3399 +nanopi_a64 nanopi-k2 +nanopi-m4-2gb-rk3399 +nanopi-m4b-rk3399 +nanopi-m4-rk3399 nanopi_neo2 +nanopi-neo4-rk3399 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 odroid-c2 +orangepi_3 +orangepi_lite2 orangepi_one_plus orangepi_pc2 orangepi_prime +orangepi-r1-plus-lts-rk3328 +orangepi-r1-plus-rk3328 +orangepi-rk3399 orangepi_win +orangepi_zero2 +orangepi_zero2w +orangepi_zero3 orangepi_zero_plus orangepi_zero_plus2 p212 p2371-2180 p2771-0000-500 -pine_h64 +pine64-lts pine64_plus +pinebook +pinebook-pro-rk3399 +pine_h64 +pinephone +pinephone-pro-rk3399 +pinetab poplar +puma-rk3399 +qcm6490 +qcom +qcom_qcs8300 +qcom_qcs9100 +qemu_arm64 +qemu_arm64_lwip +roc-cc-rk3328 +rock-4c-plus-rk3399 +rock-4se-rk3399 +rock64-rk3328 rock960-rk3399 -rpi_3 +rock-pi-4c-rk3399 +rock-pi-4-rk3399 +rock-pi-e-rk3328 +rock-pi-e-v3-rk3328 +rock-pi-n10-rk3399pro +rockpro64-rk3399 +roc-pc-mezzanine-rk3399 +roc-pc-rk3399 +rpi_arm64 sopine_baseboard +tanix_tx6 +teres_i +transpeed-8k618-t turris_mox -vexpress_aemv8a_dram vexpress_aemv8a_juno -vexpress_aemv8a_semi -xilinx_zynqmp_zcu100_revC +x96_mate diff --git a/aarch64-chromebooks b/aarch64-chromebooks deleted file mode 100644 index e69de29..0000000 diff --git a/arm-boards b/arm-boards deleted file mode 100644 index 95c7f5a..0000000 --- a/arm-boards +++ /dev/null @@ -1,143 +0,0 @@ -A10-OLinuXino-Lime -A10s-OLinuXino-M -A13-OLinuXino -A13-OLinuXinoM -A20-Olimex-SOM-EVB -A20-OLinuXino-Lime -A20-OLinuXino-Lime2 -A20-OLinuXino_MICRO -am335x_boneblack -am335x_evm -am335x_evm_usbspl -am57xx_evm -Ampe_A76 -arndale -Auxtek-T003 -Auxtek-T004 -ba10_tv_box -Bananapi -bananapi_m2_berry -Bananapi_M2_Ultra -Bananapro -chiliboard -CHIP -Chuwi_V7_CW0825 -clearfog -cl-som-am57x -cm_fx6 -Colombus -colorfly_e708_q1 -CSQ_CS908 -Cubieboard -Cubieboard2 -Cubieboard4 -Cubietruck -Cubietruck_plus -db-mv784mp-gp -difrnce_dit4350 -dserve_dsrv9703c -evb-rk3229 -fennec-rk3288 -firefly-rk3288 -helios4 -Hummingbird_A31 -Hyundai_A7HD -i12-tvbox -icnova-a20-swac -inet1 -iNet_3F -iNet_3W -inet86dz -iNet_86VS -inet97fv2 -inet98v_rev2 -inet9f_rev03 -inet_q972 -Itead_Ibox_A20 -jesurun_q5 -jetson-tk1 -kc1 -Lamobo_R1 -libretech_all_h3_cc_h2_plus -Linksprite_pcDuino -Linksprite_pcDuino3 -Linksprite_pcDuino3_Nano -liteboard -marsboard -Marsboard_A10 -Mele_A1000 -Mele_A1000G_quad -Mele_I7 -Mele_M3 -Mele_M5 -Mele_M9 -Mini-X -mk802 -mk802_a10s -mk802ii -MK808C -MSI_Primo73 -MSI_Primo81 -mx6cuboxi -nanopi_m1 -nanopi_m1_plus -nanopi_neo -novena -odroid -odroid-xu3 -omap3_beagle -omap3_pandora -omap4_panda -omap5_uevm -Orangepi -orangepi_2 -orangepi_lite -Orangepi_mini -orangepi_one -orangepi_pc -orangepi_pc_plus -orangepi_plus -orangepi_plus2e -orangepi_r1 -orangepi_zero -origen -paz00 -polaroid_mid2809pxe04 -pov_protab2_ips9 -q8_a13_tablet -q8_a23_tablet_800x480 -q8_a33_tablet_1024x600 -q8_a33_tablet_800x480 -qemu_arm -r7-tv-dongle -riotboard -rock -rock2 -rpi_2 -rpi_3_32b -Sinlinx_SinA31s -Sinovoip_BPI_M2 -Sinovoip_BPI_M2_Plus -Sinovoip_BPI_M3 -smdkv310 -stih410-b2260 -sunxi_Gemei_G9 -tbs_a711 -tinker-rk3288 -trimslice -turris_omnia -udoo -udoo_neo -usbarmory -UTOO_P66 -vexpress_ca15_tc2 -vexpress_ca9x4 -wandboard -warp -warp7 -Wexler_TAB7200 -Wits_Pro_A20_DKT -Yones_Toptech_BS1078_V2 -zynq_microzed -zynq_zed -zynq_zybo diff --git a/arm-chromebooks b/arm-chromebooks deleted file mode 100644 index 899c823..0000000 --- a/arm-chromebooks +++ /dev/null @@ -1,8 +0,0 @@ -chromebit_mickey_defconfig -chromebook_jerry_defconfig -chromebook_minnie_defconfig -nyan-big_defconfig -peach-pi_defconfig -peach-pit_defconfig -snow_defconfig -spring_defconfig diff --git a/disable-VBE-by-default.patch b/disable-VBE-by-default.patch new file mode 100644 index 0000000..1f1b710 --- /dev/null +++ b/disable-VBE-by-default.patch @@ -0,0 +1,32 @@ +From d9e3a49bc2a29922da5bddd95772279f6edba802 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Fri, 18 Aug 2023 13:28:05 +0100 +Subject: [PATCH] disable VBE by default + +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 +--- + boot/Kconfig | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/boot/Kconfig b/boot/Kconfig +index 30eb5b328d7..e8c3fbcb11d 100644 +--- a/boot/Kconfig ++++ b/boot/Kconfig +@@ -635,7 +635,6 @@ config BOOTMETH_QFW + config BOOTMETH_VBE + bool "Bootdev support for Verified Boot for Embedded" + depends on FIT +- default y + select BOOTMETH_GLOBAL + select EVENT + help +-- +2.49.0 + diff --git a/dragonboard-fixes.patch b/dragonboard-fixes.patch deleted file mode 100644 index 10ee96b..0000000 --- a/dragonboard-fixes.patch +++ /dev/null @@ -1,114 +0,0 @@ -From fbd0bffb20ca5edd21bbeb7cc20e24d091ab4280 Mon Sep 17 00:00:00 2001 -From: Rob Clark -Date: Wed, 21 Jun 2017 14:21:15 -0400 -Subject: [PATCH 1/4] WIP: fix usb - ---- - common/usb_storage.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/common/usb_storage.c b/common/usb_storage.c -index a91b1c0d2f..caea87a09f 100644 ---- a/common/usb_storage.c -+++ b/common/usb_storage.c -@@ -1018,7 +1018,7 @@ static int usb_request_sense(struct scsi_cmd *srb, struct us_data *ss) - - static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss) - { -- int retries = 10; -+ int retries = 20; - - do { - memset(&srb->cmd[0], 0, 12); -@@ -1041,7 +1041,7 @@ static int usb_test_unit_ready(struct scsi_cmd *srb, struct us_data *ss) - if ((srb->sense_buf[2] == 0x02) && - (srb->sense_buf[12] == 0x3a)) - return -1; -- mdelay(100); -+ mdelay(250); - } while (retries--); - - return -1; --- -2.14.3 - -From d1b25b8d6461c5278228d657de9c24e0979e4b9d Mon Sep 17 00:00:00 2001 -From: Rob Clark -Date: Mon, 3 Jul 2017 08:34:37 -0400 -Subject: [PATCH 2/4] HACK: disable emmc - -Hitting some timeout which makes boot take much longer. And -uefi/boot/rootfs partitions will be on sd-card or usb disk, etc, -so we can just ignore emmc. ---- - arch/arm/dts/dragonboard410c.dts | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts -index 5ccfe7f8c8..9e2d3f5d9b 100644 ---- a/arch/arm/dts/dragonboard410c.dts -+++ b/arch/arm/dts/dragonboard410c.dts -@@ -67,6 +67,7 @@ - reg = <0x78d9000 0x400>; - }; - -+/* - sdhci@07824000 { - compatible = "qcom,sdhci-msm-v4"; - reg = <0x7824900 0x11c 0x7824000 0x800>; -@@ -76,6 +77,7 @@ - clock = <&clkc 0>; - clock-frequency = <100000000>; - }; -+*/ - - sdhci@07864000 { - compatible = "qcom,sdhci-msm-v4"; --- -2.14.3 -From 6baac1d73a20f880cb91f3bc03fe4f9cf88c61f6 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 4 Sep 2018 12:21:59 +0100 -Subject: [PATCH] add options for dm410c config - ---- - configs/dragonboard410c_defconfig | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig -index 96a831443a..d167c765b1 100644 ---- a/configs/dragonboard410c_defconfig -+++ b/configs/dragonboard410c_defconfig -@@ -6,6 +6,8 @@ CONFIG_DISTRO_DEFAULTS=y - CONFIG_NR_DRAM_BANKS=1 - CONFIG_FIT=y - CONFIG_OF_BOARD_SETUP=y -+CONFIG_FAT_WRITE=y -+CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y - CONFIG_MISC_INIT_R=y - # CONFIG_DISPLAY_CPUINFO is not set - # CONFIG_DISPLAY_BOARDINFO is not set -@@ -35,6 +37,13 @@ CONFIG_DM_PMIC=y - CONFIG_PMIC_PM8916=y - CONFIG_MSM_SERIAL=y - CONFIG_SPMI_MSM=y -+CONFIG_DM_ETH=y -+CONFIG_DM_KEYBOARD=y -+CONFIG_DM_VIDEO=y -+# CONFG_VIDEO_BPP8 is not set -+CONFIG_NO_FB_CLEAR=y -+CONFIG_VIDEO_SIMPLE=y -+CONFIG_USB_KEYBOARD=y - CONFIG_USB=y - CONFIG_DM_USB=y - CONFIG_USB_EHCI_HCD=y -@@ -46,5 +55,6 @@ CONFIG_USB_HOST_ETHER=y - CONFIG_USB_ETHER_ASIX=y - CONFIG_USB_ETHER_ASIX88179=y - CONFIG_USB_ETHER_MCS7830=y -+CONFIG_USB_ETHER_RTL8152=y - CONFIG_USB_ETHER_SMSC95XX=y - CONFIG_OF_LIBFDT_OVERLAY=y --- -2.19.0.rc0 - diff --git a/enable-bootmenu-by-default.patch b/enable-bootmenu-by-default.patch new file mode 100644 index 0000000..1ecd514 --- /dev/null +++ b/enable-bootmenu-by-default.patch @@ -0,0 +1,49 @@ +From a956480a6d52ae90ef4a46275c2ee29a4074de36 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Fri, 18 Aug 2023 23:10:42 +0100 +Subject: [PATCH] enable bootmenu by default + +We want the boot menu on all Fedora devices as it makes +it a whole lot more user friendly. + +Signed-off-by: Peter Robinson +--- + boot/Kconfig | 2 ++ + cmd/Kconfig | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/boot/Kconfig b/boot/Kconfig +index 467b09e2350..ad67b1f65a6 100644 +--- a/boot/Kconfig ++++ b/boot/Kconfig +@@ -1281,6 +1281,7 @@ config BOOTDELAY + + config AUTOBOOT_KEYED + bool "Stop autobooting via specific input key / string" ++ default y + help + This option enables stopping (aborting) of the automatic + boot feature only by issuing a specific input key or +@@ -1433,6 +1434,7 @@ config AUTOBOOT_MENUKEY + + config AUTOBOOT_MENU_SHOW + bool "Show a menu on boot" ++ default y + depends on CMD_BOOTMENU + help + This enables the boot menu, controlled by environment variables +diff --git a/cmd/Kconfig b/cmd/Kconfig +index 43ca10f69cc..3d39f2914cc 100644 +--- a/cmd/Kconfig ++++ b/cmd/Kconfig +@@ -413,6 +413,7 @@ source lib/efi_selftest/Kconfig + + config CMD_BOOTMENU + bool "bootmenu" ++ default y + select MENU + select CHARSET + help +-- +2.41.0 + diff --git a/mvebu-enable-generic-distro-boot-config.patch b/mvebu-enable-generic-distro-boot-config.patch deleted file mode 100644 index 51ec5b5..0000000 --- a/mvebu-enable-generic-distro-boot-config.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 8de891d0767aafb383b6f533b08a5c0b75b4718b Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Mon, 18 Sep 2017 15:48:32 +0100 -Subject: [PATCH] arm: mvebu: enable generic distro boot config - -Switch all of the mvebu boards to support disto generic booting -This will enable Fedora, Debian and other distros to support -mvebu systems easier. Tested on SolidRun ClearFog - -Signed-off-by: Dennis Gilmore -Signed-off-by: Peter Robinson ---- - include/configs/mv-common.h | 84 +++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 84 insertions(+) - -diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h -index 7c2bab2fc6..2819493fca 100644 ---- a/include/configs/mv-common.h -+++ b/include/configs/mv-common.h -@@ -130,4 +130,88 @@ - #define CONFIG_MTD_PARTITIONS - #endif - -+#ifndef CONFIG_SPL_BUILD -+#include -+ -+/* -+* 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. -+* 32M uncompressed kernel, 16M compressed kernel, 1M fdt, -+* 1M script, 1M pxe and the ramdisk at the end. -+*/ -+#define SDRAM_OFFSET(x) 0x0##x -+ -+#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000)) -+#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000)) -+#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000)) -+#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000)) -+#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3300000)) -+ -+#define MEM_LAYOUT_ENV_SETTINGS \ -+ "bootm_size=0xa000000\0" \ -+ "kernel_addr_r=" KERNEL_ADDR_R "\0" \ -+ "fdt_addr_r=" FDT_ADDR_R "\0" \ -+ "scriptaddr=" SCRIPT_ADDR_R "\0" \ -+ "pxefile_addr_r=" PXEFILE_ADDR_R "\0" \ -+ "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" -+ -+#ifdef CONFIG_MMC -+#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) -+#else -+#define BOOT_TARGET_DEVICES_MMC(func) -+#endif -+ -+#ifdef CONFIG_CMD_SATA -+#define BOOT_TARGET_DEVICES_SATA(func) func(SATA, sata, 0) func(SATA, sata, 1) -+#define CONFIG_PREBOOT "sata init" -+#else -+#define BOOT_TARGET_DEVICES_SATA(func) -+#endif -+ -+#ifdef CONFIG_USB_STORAGE -+#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) -+#else -+#define BOOT_TARGET_DEVICES_USB(func) -+#endif -+ -+#define BOOT_TARGET_DEVICES(func) \ -+ BOOT_TARGET_DEVICES_MMC(func) \ -+ BOOT_TARGET_DEVICES_SATA(func) \ -+ BOOT_TARGET_DEVICES_USB(func) \ -+ func(PXE, pxe, na) -+ -+#include -+ -+#ifdef CONFIG_USB_KEYBOARD -+#define CONSOLE_STDIN_SETTINGS \ -+ "preboot=usb start\0" \ -+ "stdin=serial,usbkbd\0" -+#else -+#define CONSOLE_STDIN_SETTINGS \ -+ "stdin=serial\0" -+#endif -+ -+#ifdef CONFIG_VIDEO -+#define CONSOLE_STDOUT_SETTINGS \ -+ "stdout=serial,vga\0" \ -+ "stderr=serial,vga\0" -+#else -+#define CONSOLE_STDOUT_SETTINGS \ -+ "stdout=serial\0" \ -+ "stderr=serial\0" -+#endif -+ -+#define CONSOLE_ENV_SETTINGS \ -+ CONSOLE_STDIN_SETTINGS \ -+ CONSOLE_STDOUT_SETTINGS -+ -+#define CONFIG_EXTRA_ENV_SETTINGS \ -+ CONSOLE_ENV_SETTINGS \ -+ MEM_LAYOUT_ENV_SETTINGS \ -+ "fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ -+ "console=ttyS0,115200\0" \ -+ BOOTENV -+#else /* ifndef CONFIG_SPL_BUILD */ -+#define CONFIG_EXTRA_ENV_SETTINGS -+#endif -+ - #endif /* _MV_COMMON_H */ --- -2.13.5 - diff --git a/mx6-utilite-distro-boot.patch b/mx6-utilite-distro-boot.patch deleted file mode 100644 index b2fd480..0000000 --- a/mx6-utilite-distro-boot.patch +++ /dev/null @@ -1,154 +0,0 @@ -From af017eb82317dc88c1b23301d76466b389c2e007 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 13 Sep 2016 08:47:34 +0100 -Subject: [PATCH] port utilite to distro generic boot commands - ---- - include/configs/cm_fx6.h | 115 ++++++++++++----------------------------------- - 1 file changed, 29 insertions(+), 86 deletions(-) - -diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h -index c839b03..4dd501e 100644 ---- a/include/configs/cm_fx6.h -+++ b/include/configs/cm_fx6.h -@@ -11,6 +11,7 @@ - #ifndef __CONFIG_CM_FX6_H - #define __CONFIG_CM_FX6_H - -+#include - #include "mx6_common.h" - - /* Machine config */ -@@ -78,101 +79,43 @@ - #define CONFIG_ENV_SIZE (8 * 1024) - #define CONFIG_ENV_OFFSET (768 * 1024) - -+#ifndef CONFIG_SPL_BUILD -+#include -+#include -+ -+#ifdef CONFIG_AHCI -+#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) -+#else -+#define BOOT_TARGET_DEVICES_SCSI(func) -+#endif -+ -+#define BOOT_TARGET_DEVICES(func) \ -+ func(MMC, mmc, 2) \ -+ BOOT_TARGET_DEVICES_SCSI(func) \ -+ func(PXE, pxe, na) \ -+ func(DHCP, dhcp, na) -+ - #define CONFIG_EXTRA_ENV_SETTINGS \ - "stdin=serial,usbkbd\0" \ - "stdout=serial,vga\0" \ - "stderr=serial,vga\0" \ - "panel=HDMI\0" \ -- "autoload=no\0" \ -- "uImage=uImage-cm-fx6\0" \ -- "zImage=zImage-cm-fx6\0" \ -- "kernel=uImage-cm-fx6\0" \ -- "script=boot.scr\0" \ -- "dtb=cm-fx6.dtb\0" \ -- "bootm_low=18000000\0" \ -+ "dtb=imx6q-utilite-pro.dts\0" \ - "loadaddr=0x10800000\0" \ - "fdtaddr=0x11000000\0" \ -+ "fdt_addr_r=0x18000000\0" \ -+ "pxefile_addr_r=0x17f00000\0" \ -+ "scriptaddr=0x17e00000\0" \ -+ "kernel_addr_r=0x11000000\0" \ -+ "ramdisk_addr_r=0x18100000\0" \ -+ "bootm_size=0x20000000\0" \ - "console=ttymxc3,115200\0" \ - "ethprime=FEC0\0" \ -- "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32\0" \ -- "video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \ -- "doboot=bootm ${loadaddr}\0" \ -- "doloadfdt=false\0" \ -- "mtdids=" MTDIDS_DEFAULT "\0" \ -- "mtdparts=" MTDPARTS_DEFAULT "\0" \ -- "setboottypez=setenv kernel ${zImage};" \ -- "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \ -- "setenv doloadfdt true;\0" \ -- "setboottypem=setenv kernel ${uImage};" \ -- "setenv doboot bootm ${loadaddr};" \ -- "setenv doloadfdt false;\0"\ -- "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \ -- "sataroot=/dev/sda2 rw rootwait\0" \ -- "nandroot=/dev/mtdblock4 rw\0" \ -- "nandrootfstype=ubifs\0" \ -- "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \ -- "${video} ${extrabootargs}\0" \ -- "sataargs=setenv bootargs console=${console} root=${sataroot} " \ -- "${video} ${extrabootargs}\0" \ -- "nandargs=setenv bootargs console=${console} " \ -- "root=${nandroot} " \ -- "rootfstype=${nandrootfstype} " \ -- "${video} ${extrabootargs}\0" \ -- "nandboot=if run nandloadkernel; then " \ -- "run nandloadfdt;" \ -- "run setboottypem;" \ -- "run storagebootcmd;" \ -- "run setboottypez;" \ -- "run storagebootcmd;" \ -- "fi;\0" \ -- "run_eboot=echo Starting EBOOT ...; "\ -- "mmc dev 2 && " \ -- "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \ -- "loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};\0"\ -- "loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};\0"\ -- "loadfdt=load ${storagetype} ${storagedev} ${fdtaddr} ${dtb};\0" \ -- "bootscript=echo Running bootscript from ${storagetype} ...;" \ -- "source ${loadaddr};\0" \ -- "nandloadkernel=nand read ${loadaddr} 0 780000;\0" \ -- "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \ -- "setupmmcboot=setenv storagetype mmc; setenv storagedev 2;\0" \ -- "setupsataboot=setenv storagetype sata; setenv storagedev 0;\0" \ -- "setupnandboot=setenv storagetype nand;\0" \ -- "setupusbboot=setenv storagetype usb; setenv storagedev 0;\0" \ -- "storagebootcmd=echo Booting from ${storagetype} ...;" \ -- "run ${storagetype}args; run doboot;\0" \ -- "trybootk=if run loadkernel; then " \ -- "if ${doloadfdt}; then " \ -- "run loadfdt;" \ -- "fi;" \ -- "run storagebootcmd;" \ -- "fi;\0" \ -- "trybootsmz=if run loadscript; then " \ -- "run bootscript;" \ -- "fi;" \ -- "run setboottypem;" \ -- "run trybootk;" \ -- "run setboottypez;" \ -- "run trybootk;\0" -- --#define CONFIG_BOOTCOMMAND \ -- "run setupmmcboot;" \ -- "mmc dev ${storagedev};" \ -- "if mmc rescan; then " \ -- "run trybootsmz;" \ -- "fi;" \ -- "run setupusbboot;" \ -- "if usb start; then "\ -- "if run loadscript; then " \ -- "run bootscript;" \ -- "fi;" \ -- "fi;" \ -- "run setupsataboot;" \ -- "if sata init; then " \ -- "run trybootsmz;" \ -- "fi;" \ -- "run setupnandboot;" \ -- "run nandboot;" -+ BOOTENV -+ -+#else /* ifndef CONFIG_SPL_BUILD */ -+#define CONFIG_EXTRA_ENV_SETTINGS -+#endif - - #define CONFIG_PREBOOT "usb start;sf probe" - --- -2.9.3 - diff --git a/p3450-fix-board.patch b/p3450-fix-board.patch new file mode 100644 index 0000000..74475d5 --- /dev/null +++ b/p3450-fix-board.patch @@ -0,0 +1,25 @@ +From c9b65320d64a60cde74c4c1f9cb4a05198a456c2 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 + diff --git a/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch b/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch new file mode 100644 index 0000000..d6612ee --- /dev/null +++ b/raspberrypi-Add-quirk-for-RPi5-2Gb-rev-1.0.patch @@ -0,0 +1,32 @@ +From 72fd4fdb54721a31d2b4e9f95fdd3b3e398bb2c0 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 +--- + 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 + diff --git a/riscv64-boards b/riscv64-boards new file mode 100644 index 0000000..f96e775 --- /dev/null +++ b/riscv64-boards @@ -0,0 +1,4 @@ +qemu-riscv64_spl +sifive_unleashed +sifive_unmatched +starfive_visionfive2 diff --git a/rk3399-Rock960-Ficus-board-support.patch b/rk3399-Rock960-Ficus-board-support.patch deleted file mode 100644 index 7562922..0000000 --- a/rk3399-Rock960-Ficus-board-support.patch +++ /dev/null @@ -1,2975 +0,0 @@ -From patchwork Thu Sep 27 19:02:58 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot, v3, - 1/4] arm: dts: rockchip: add some common pin-settings to rk3399 -X-Patchwork-Submitter: Manivannan Sadhasivam -X-Patchwork-Id: 975858 -X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com -Message-Id: <20180927190301.9642-2-manivannan.sadhasivam@linaro.org> -To: sjg@chromium.org, - philipp.tomsich@theobroma-systems.com -Cc: Randy Li , tom@vamrs.com, daniel.lezcano@linaro.org, - amit.kucheria@linaro.org, dev@vamrs.com, u-boot@lists.denx.de, - Manivannan Sadhasivam , stephen@vamrs.com -Date: Fri, 28 Sep 2018 00:32:58 +0530 -From: Manivannan Sadhasivam -List-Id: U-Boot discussion - -From: Randy Li - -Those pins would be used by many boards. - -Commit grabbed from Linux: - -commit b41023282d07b61a53e2c9b9508912b1e7ce7b4f -Author: Randy Li -Date: Thu Jun 21 21:32:10 2018 +0800 - - arm64: dts: rockchip: add some common pin-settings to rk3399 - - Those pins would be used by many boards. - - Signed-off-by: Randy Li - Signed-off-by: Heiko Stuebner - -Acked-by: Philipp Tomsich -Signed-off-by: Randy Li -Signed-off-by: Heiko Stuebner -Signed-off-by: Ezequiel Garcia ---- - -Changes in v3: None - -Changes in v2: None - - arch/arm/dts/rk3399.dtsi | 55 +++++++++++++++++++++++++++++++++++----- - 1 file changed, 49 insertions(+), 6 deletions(-) - -diff --git a/arch/arm/dts/rk3399.dtsi b/arch/arm/dts/rk3399.dtsi -index 83c257b1228..8349451b03d 100644 ---- a/arch/arm/dts/rk3399.dtsi -+++ b/arch/arm/dts/rk3399.dtsi -@@ -1602,19 +1602,49 @@ - drive-strength = <12>; - }; - -+ pcfg_pull_none_13ma: pcfg-pull-none-13ma { -+ bias-disable; -+ drive-strength = <13>; -+ }; -+ -+ pcfg_pull_none_18ma: pcfg-pull-none-18ma { -+ bias-disable; -+ drive-strength = <18>; -+ }; -+ -+ pcfg_pull_none_20ma: pcfg-pull-none-20ma { -+ bias-disable; -+ drive-strength = <20>; -+ }; -+ -+ pcfg_pull_up_2ma: pcfg-pull-up-2ma { -+ bias-pull-up; -+ drive-strength = <2>; -+ }; -+ - pcfg_pull_up_8ma: pcfg-pull-up-8ma { - bias-pull-up; - drive-strength = <8>; - }; - -+ pcfg_pull_up_18ma: pcfg-pull-up-18ma { -+ bias-pull-up; -+ drive-strength = <18>; -+ }; -+ -+ pcfg_pull_up_20ma: pcfg-pull-up-20ma { -+ bias-pull-up; -+ drive-strength = <20>; -+ }; -+ - pcfg_pull_down_4ma: pcfg-pull-down-4ma { - bias-pull-down; - drive-strength = <4>; - }; - -- pcfg_pull_up_2ma: pcfg-pull-up-2ma { -- bias-pull-up; -- drive-strength = <2>; -+ pcfg_pull_down_8ma: pcfg-pull-down-8ma { -+ bias-pull-down; -+ drive-strength = <8>; - }; - - pcfg_pull_down_12ma: pcfg-pull-down-12ma { -@@ -1622,9 +1652,22 @@ - drive-strength = <12>; - }; - -- pcfg_pull_none_13ma: pcfg-pull-none-13ma { -- bias-disable; -- drive-strength = <13>; -+ pcfg_pull_down_18ma: pcfg-pull-down-18ma { -+ bias-pull-down; -+ drive-strength = <18>; -+ }; -+ -+ pcfg_pull_down_20ma: pcfg-pull-down-20ma { -+ bias-pull-down; -+ drive-strength = <20>; -+ }; -+ -+ pcfg_output_high: pcfg-output-high { -+ output-high; -+ }; -+ -+ pcfg_output_low: pcfg-output-low { -+ output-low; - }; - - clock { - -From patchwork Thu Sep 27 19:02:59 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot, v3, - 2/4] rockchip: rk3399: Add common Rock960 family from Vamrs -X-Patchwork-Submitter: Manivannan Sadhasivam -X-Patchwork-Id: 975861 -X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com -Message-Id: <20180927190301.9642-3-manivannan.sadhasivam@linaro.org> -To: sjg@chromium.org, - philipp.tomsich@theobroma-systems.com -Cc: tom@vamrs.com, daniel.lezcano@linaro.org, amit.kucheria@linaro.org, - dev@vamrs.com, u-boot@lists.denx.de, - Manivannan Sadhasivam , stephen@vamrs.com -Date: Fri, 28 Sep 2018 00:32:59 +0530 -From: Manivannan Sadhasivam -List-Id: U-Boot discussion - -Rock960 is a family of boards based on Rockchip RK3399 SoC from Vamrs. -It consists of Rock960 (Consumer Edition) and Ficus (Enterprise Edition) -96Boards. - -Below are some of the key differences between both Rock960 and Ficus -boards: - -1. Different host enable GPIO for USB -2. Different power and reset GPIO for PCI-E -3. No Ethernet port on Rock960 - -The common board support will be utilized by both boards. The device -tree has been organized in such a way that only the properties which -differ between both boards are placed in the board specific dts and -the reset of the nodes are placed in common dtsi file. - -Signed-off-by: Manivannan Sadhasivam -[Added instructions for SD card boot] -Signed-off-by: Ezequiel Garcia ---- - -Changes in v3: Added instruction for copying prebuilt bl31.elf for SPL - -Changes in v2: None - - arch/arm/dts/rk3399-rock960.dtsi | 506 ++++++++++++++++++++ - arch/arm/mach-rockchip/rk3399/Kconfig | 26 + - board/vamrs/rock960_rk3399/Kconfig | 15 + - board/vamrs/rock960_rk3399/MAINTAINERS | 6 + - board/vamrs/rock960_rk3399/Makefile | 6 + - board/vamrs/rock960_rk3399/README | 152 ++++++ - board/vamrs/rock960_rk3399/rock960-rk3399.c | 50 ++ - include/configs/rock960_rk3399.h | 15 + - 8 files changed, 776 insertions(+) - create mode 100644 arch/arm/dts/rk3399-rock960.dtsi - create mode 100644 board/vamrs/rock960_rk3399/Kconfig - create mode 100644 board/vamrs/rock960_rk3399/MAINTAINERS - create mode 100644 board/vamrs/rock960_rk3399/Makefile - create mode 100644 board/vamrs/rock960_rk3399/README - create mode 100644 board/vamrs/rock960_rk3399/rock960-rk3399.c - create mode 100644 include/configs/rock960_rk3399.h - -diff --git a/arch/arm/dts/rk3399-rock960.dtsi b/arch/arm/dts/rk3399-rock960.dtsi -new file mode 100644 -index 00000000000..51644d6d02d ---- /dev/null -+++ b/arch/arm/dts/rk3399-rock960.dtsi -@@ -0,0 +1,506 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+/* -+ * Copyright (c) 2018 Linaro Ltd. -+ */ -+ -+#include -+#include -+#include "rk3399.dtsi" -+ -+/ { -+ vcc1v8_s0: vcc1v8-s0 { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc1v8_s0"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ }; -+ -+ vcc_sys: vcc-sys { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc_sys"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ }; -+ -+ vcc3v3_sys: vcc3v3-sys { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_sys"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ vin-supply = <&vcc_sys>; -+ }; -+ -+ vcc3v3_pcie: vcc3v3-pcie-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pcie_drv>; -+ regulator-boot-on; -+ regulator-name = "vcc3v3_pcie"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&vcc3v3_sys>; -+ }; -+ -+ vcc5v0_host: vcc5v0-host-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&host_vbus_drv>; -+ regulator-name = "vcc5v0_host"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ vin-supply = <&vcc_sys>; -+ }; -+ -+ vdd_log: vdd-log { -+ compatible = "pwm-regulator"; -+ pwms = <&pwm2 0 25000 0>; -+ regulator-name = "vdd_log"; -+ regulator-min-microvolt = <800000>; -+ regulator-max-microvolt = <1400000>; -+ regulator-always-on; -+ regulator-boot-on; -+ vin-supply = <&vcc_sys>; -+ }; -+ -+}; -+ -+&cpu_l0 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&cpu_l1 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&cpu_l2 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&cpu_l3 { -+ cpu-supply = <&vdd_cpu_l>; -+}; -+ -+&cpu_b0 { -+ cpu-supply = <&vdd_cpu_b>; -+}; -+ -+&cpu_b1 { -+ cpu-supply = <&vdd_cpu_b>; -+}; -+ -+&emmc_phy { -+ status = "okay"; -+}; -+ -+&hdmi { -+ status = "okay"; -+}; -+ -+&i2c0 { -+ clock-frequency = <400000>; -+ i2c-scl-rising-time-ns = <168>; -+ i2c-scl-falling-time-ns = <4>; -+ status = "okay"; -+ -+ vdd_cpu_b: regulator@40 { -+ compatible = "silergy,syr827"; -+ reg = <0x40>; -+ fcs,suspend-voltage-selector = <1>; -+ regulator-name = "vdd_cpu_b"; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1500000>; -+ regulator-ramp-delay = <1000>; -+ regulator-always-on; -+ regulator-boot-on; -+ vin-supply = <&vcc_sys>; -+ status = "okay"; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdd_gpu: regulator@41 { -+ compatible = "silergy,syr828"; -+ reg = <0x41>; -+ fcs,suspend-voltage-selector = <1>; -+ regulator-name = "vdd_gpu"; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1500000>; -+ regulator-ramp-delay = <1000>; -+ regulator-always-on; -+ regulator-boot-on; -+ vin-supply = <&vcc_sys>; -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ rk808: pmic@1b { -+ compatible = "rockchip,rk808"; -+ reg = <0x1b>; -+ interrupt-parent = <&gpio1>; -+ interrupts = <21 IRQ_TYPE_LEVEL_LOW>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pmic_int_l>; -+ rockchip,system-power-controller; -+ wakeup-source; -+ #clock-cells = <1>; -+ clock-output-names = "xin32k", "rk808-clkout2"; -+ -+ vcc1-supply = <&vcc_sys>; -+ vcc2-supply = <&vcc_sys>; -+ vcc3-supply = <&vcc_sys>; -+ vcc4-supply = <&vcc_sys>; -+ vcc6-supply = <&vcc_sys>; -+ vcc7-supply = <&vcc_sys>; -+ vcc8-supply = <&vcc3v3_sys>; -+ vcc9-supply = <&vcc_sys>; -+ vcc10-supply = <&vcc_sys>; -+ vcc11-supply = <&vcc_sys>; -+ vcc12-supply = <&vcc3v3_sys>; -+ vddio-supply = <&vcc_1v8>; -+ -+ regulators { -+ vdd_center: DCDC_REG1 { -+ regulator-name = "vdd_center"; -+ regulator-min-microvolt = <750000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdd_cpu_l: DCDC_REG2 { -+ regulator-name = "vdd_cpu_l"; -+ regulator-min-microvolt = <750000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc_ddr: DCDC_REG3 { -+ regulator-name = "vcc_ddr"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ vcc_1v8: DCDC_REG4 { -+ regulator-name = "vcc_1v8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vcc1v8_dvp: LDO_REG1 { -+ regulator-name = "vcc1v8_dvp"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vcca1v8_hdmi: LDO_REG2 { -+ regulator-name = "vcca1v8_hdmi"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vcca_1v8: LDO_REG3 { -+ regulator-name = "vcca_1v8"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vcc_sd: LDO_REG4 { -+ regulator-name = "vcc_sd"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3300000>; -+ }; -+ }; -+ -+ vcc3v0_sd: LDO_REG5 { -+ regulator-name = "vcc3v0_sd"; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3000000>; -+ }; -+ }; -+ -+ vcc_1v5: LDO_REG6 { -+ regulator-name = "vcc_1v5"; -+ regulator-min-microvolt = <1500000>; -+ regulator-max-microvolt = <1500000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1500000>; -+ }; -+ }; -+ -+ vcca0v9_hdmi: LDO_REG7 { -+ regulator-name = "vcca0v9_hdmi"; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <900000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <900000>; -+ }; -+ }; -+ -+ vcc_3v0: LDO_REG8 { -+ regulator-name = "vcc_3v0"; -+ regulator-min-microvolt = <3000000>; -+ regulator-max-microvolt = <3000000>; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3000000>; -+ }; -+ }; -+ -+ vcc3v3_s3: SWITCH_REG1 { -+ regulator-name = "vcc3v3_s3"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ vcc3v3_s0: SWITCH_REG2 { -+ regulator-name = "vcc3v3_s0"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ }; -+ }; -+}; -+ -+&i2c1 { -+ status = "okay"; -+}; -+ -+&i2c2 { -+ status = "okay"; -+}; -+ -+&i2c3 { -+ status = "okay"; -+}; -+ -+&i2c4 { -+ status = "okay"; -+}; -+ -+&io_domains { -+ bt656-supply = <&vcc1v8_s0>; /* bt656_gpio2ab_ms */ -+ audio-supply = <&vcc1v8_s0>; /* audio_gpio3d4a_ms */ -+ sdmmc-supply = <&vcc_sd>; /* sdmmc_gpio4b_ms */ -+ gpio1830-supply = <&vcc_3v0>; /* gpio1833_gpio4cd_ms */ -+ status = "okay"; -+}; -+ -+&pcie_phy { -+ status = "okay"; -+}; -+ -+&pcie0 { -+ num-lanes = <4>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pcie_clkreqn_cpm>; -+ vpcie3v3-supply = <&vcc3v3_pcie>; -+ status = "okay"; -+}; -+ -+&pmu_io_domains { -+ pmu1830-supply = <&vcc_1v8>; -+ status = "okay"; -+}; -+ -+&pinctrl { -+ sdmmc { -+ sdmmc_bus1: sdmmc-bus1 { -+ rockchip,pins = -+ <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>; -+ }; -+ -+ sdmmc_bus4: sdmmc-bus4 { -+ rockchip,pins = -+ <4 8 RK_FUNC_1 &pcfg_pull_up_8ma>, -+ <4 9 RK_FUNC_1 &pcfg_pull_up_8ma>, -+ <4 10 RK_FUNC_1 &pcfg_pull_up_8ma>, -+ <4 11 RK_FUNC_1 &pcfg_pull_up_8ma>; -+ }; -+ -+ sdmmc_clk: sdmmc-clk { -+ rockchip,pins = -+ <4 12 RK_FUNC_1 &pcfg_pull_none_18ma>; -+ }; -+ -+ sdmmc_cmd: sdmmc-cmd { -+ rockchip,pins = -+ <4 13 RK_FUNC_1 &pcfg_pull_up_8ma>; -+ }; -+ }; -+ -+ pmic { -+ pmic_int_l: pmic-int-l { -+ rockchip,pins = -+ <1 21 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ -+ vsel1_gpio: vsel1-gpio { -+ rockchip,pins = -+ <1 17 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ -+ vsel2_gpio: vsel2-gpio { -+ rockchip,pins = -+ <1 14 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ }; -+}; -+ -+&pwm2 { -+ status = "okay"; -+}; -+ -+&pwm3 { -+ status = "okay"; -+}; -+ -+&sdhci { -+ bus-width = <8>; -+ mmc-hs400-1_8v; -+ mmc-hs400-enhanced-strobe; -+ non-removable; -+ status = "okay"; -+}; -+ -+&sdmmc { -+ bus-width = <4>; -+ cap-mmc-highspeed; -+ cap-sd-highspeed; -+ clock-frequency = <100000000>; -+ clock-freq-min-max = <100000 100000000>; -+ cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; -+ disable-wp; -+ sd-uhs-sdr104; -+ vqmmc-supply = <&vcc_sd>; -+ card-detect-delay = <800>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; -+ status = "okay"; -+}; -+ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_xfer &uart0_cts>; -+ status = "okay"; -+}; -+ -+&uart2 { -+ status = "okay"; -+}; -+ -+&u2phy0 { -+ status = "okay"; -+}; -+ -+&u2phy1 { -+ status = "okay"; -+}; -+ -+&u2phy0_host { -+ phy-supply = <&vcc5v0_host>; -+ status = "okay"; -+}; -+ -+&u2phy1_host { -+ phy-supply = <&vcc5v0_host>; -+ status = "okay"; -+}; -+ -+&u2phy0_otg { -+ status = "okay"; -+}; -+ -+&u2phy1_otg { -+ status = "okay"; -+}; -+ -+&usb_host0_ehci { -+ status = "okay"; -+}; -+ -+&usb_host0_ohci { -+ status = "okay"; -+}; -+ -+&usb_host1_ehci { -+ status = "okay"; -+}; -+ -+&usb_host1_ohci { -+ status = "okay"; -+}; -+ -+&vopb { -+ status = "okay"; -+}; -+ -+&vopl { -+ status = "okay"; -+}; -diff --git a/arch/arm/mach-rockchip/rk3399/Kconfig b/arch/arm/mach-rockchip/rk3399/Kconfig -index 415466a49bb..8f18e33c76f 100644 ---- a/arch/arm/mach-rockchip/rk3399/Kconfig -+++ b/arch/arm/mach-rockchip/rk3399/Kconfig -@@ -28,6 +28,31 @@ config TARGET_PUMA_RK3399 - * HDMI, eDP, MIPI-DSI, MIPI-DSI/CSI and MIPI-CSI - * SPI, I2C, I2S, UART, GPIO, ... - -+config TARGET_ROCK960_RK3399 -+ bool "Vamrs Limited Rock960 board family" -+ help -+ Support for Rock960 board family by Vamrs Limited. This board -+ family consists of Rock960 (Consumer Edition) and Ficus -+ (Enterprise Edition) 96Boards. -+ -+ Common features implemented on both boards: -+ * Rockchip RK3399 SoC (2xCortex A72, 4xCortex A53, ARM Mali T860MP4) -+ * 16/32GB eMMC, uSD slot -+ * HDMI/DP/MIPI -+ * 20-pin low speed and 40-pin high speed expanders, 6 LED, 3 buttons -+ -+ Additional features of Rock960: -+ * 2GiB/4GiB LPDDR3 RAM -+ * 1x USB 3.0 type A, 1x USB 2.0 type A (host mode only), -+ 1x USB 3.0 type C OTG -+ -+ Additional features of Ficus: -+ * 2GiB/4GiB DDR3 RAM -+ * Ethernet -+ * Dual SATA -+ * 2x USB 3.0 type A, 2x USB 2.0 type A (host mode only), -+ 1x USB 3.0 type C OTG -+ - endchoice - - config SYS_SOC -@@ -38,5 +63,6 @@ config SYS_MALLOC_F_LEN - - source "board/rockchip/evb_rk3399/Kconfig" - source "board/theobroma-systems/puma_rk3399/Kconfig" -+source "board/vamrs/rock960_rk3399/Kconfig" - - endif -diff --git a/board/vamrs/rock960_rk3399/Kconfig b/board/vamrs/rock960_rk3399/Kconfig -new file mode 100644 -index 00000000000..cacc53f3780 ---- /dev/null -+++ b/board/vamrs/rock960_rk3399/Kconfig -@@ -0,0 +1,15 @@ -+if TARGET_ROCK960_RK3399 -+ -+config SYS_BOARD -+ default "rock960_rk3399" -+ -+config SYS_VENDOR -+ default "vamrs" -+ -+config SYS_CONFIG_NAME -+ default "rock960_rk3399" -+ -+config BOARD_SPECIFIC_OPTIONS # dummy -+ def_bool y -+ -+endif -diff --git a/board/vamrs/rock960_rk3399/MAINTAINERS b/board/vamrs/rock960_rk3399/MAINTAINERS -new file mode 100644 -index 00000000000..9f3fe75f4fb ---- /dev/null -+++ b/board/vamrs/rock960_rk3399/MAINTAINERS -@@ -0,0 +1,6 @@ -+ROCK960-RK3399 -+M: Manivannan Sadhasivam manivannan.sadhasivam@linaro.org -+S: Maintained -+F: board/rockchip/rock960_rk3399 -+F: include/configs/rock960_rk3399.h -+F: configs/rock960-rk3399_defconfig -diff --git a/board/vamrs/rock960_rk3399/Makefile b/board/vamrs/rock960_rk3399/Makefile -new file mode 100644 -index 00000000000..6c3e475b3a8 ---- /dev/null -+++ b/board/vamrs/rock960_rk3399/Makefile -@@ -0,0 +1,6 @@ -+# SPDX-License-Identifier: GPL-2.0+ -+# -+# Copyright (C) 2018 Manivannan Sadhasivam -+# -+ -+obj-y += rock960-rk3399.o -diff --git a/board/vamrs/rock960_rk3399/README b/board/vamrs/rock960_rk3399/README -new file mode 100644 -index 00000000000..d14399090e2 ---- /dev/null -+++ b/board/vamrs/rock960_rk3399/README -@@ -0,0 +1,152 @@ -+Contents -+======== -+ -+1. Introduction -+2. Get the Source and prebuild binary -+3. Compile the U-Boot -+4. Compile the rkdeveloptool -+5. Package the image -+ 5.1. Package the image for U-Boot SPL(option 1) -+ 5.2. Package the image for Rockchip miniloader(option 2) -+6. Bootloader storage options -+7. Flash the image to eMMC -+ 7.1. Flash the image with U-Boot SPL(option 1) -+ 7.2. Flash the image with Rockchip miniloader(option 2) -+8. Create a bootable SD/MMC -+9. And that is it -+ -+Introduction -+============ -+ -+Rock960 board family consists of Rock960 (Consumer Edition) and -+Ficus (Enterprise Edition) 96Boards featuring Rockchip RK3399 SoC. -+ -+Common features implemented on both boards: -+ * CPU: ARMv8 64bit Big-Little architecture, -+ * Big: dual-core Cortex-A72 -+ * Little: quad-core Cortex-A53 -+ * IRAM: 200KB -+ * eMMC: 16/32GB eMMC 5.1 -+ * PMU: RK808 -+ * SD/MMC -+ * Display: HDMI/DP/MIPI -+ * Low Speed Expansion Connector -+ * High Speed Expansion Connector -+ -+Additional features of Rock960: -+ * DRAM: 2GB/4GB LPDDR3 @ 1866MHz -+ * 1x USB 3.0 type A, 1x USB 2.0 type A (host mode only), -+ 1x USB 3.0 type C OTG -+ -+Additional features of Ficus: -+ * DRAM: 2GB/4GB DDR3 @ 1600MHz -+ * Ethernet -+ * 2x USB 3.0 type A, 2x USB 2.0 type A (host mode only), -+ 1x USB 3.0 type C OTG -+ -+Here is the step-by-step to boot to U-Boot on Rock960 boards. -+ -+Get the Source and prebuild binary -+================================== -+ -+ > git clone https://github.com/96rocks/rkbin.git -+ > git clone https://github.com/rockchip-linux/rkdeveloptool.git -+ -+Compile the U-Boot -+================== -+ -+ > cd ../u-boot -+ > cp ../rkbin/rk33/rk3399_bl31_v1.00.elf ./bl31.elf -+ > export ARCH=arm64 -+ > export CROSS_COMPILE=aarch64-linux-gnu- -+ > make rock960-rk3399_defconfig -+ > make -+ > make u-boot.itb -+ -+Compile the rkdeveloptool -+========================= -+ -+Follow instructions in latest README -+ > cd ../rkdeveloptool -+ > autoreconf -i -+ > ./configure -+ > make -+ > sudo make install -+ -+Package the image -+================= -+ -+Package the image for U-Boot SPL(option 1) -+-------------------------------- -+ > cd .. -+ > tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img -+ -+ Get idbspl.img in this step. -+ -+Package the image for Rockchip miniloader(option 2) -+------------------------------------------ -+ > cd ../rkbin -+ > ./tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img 0x200000 -+ -+ > ../u-boot/tools/mkimage -n rk3399 -T rksd -d rk3399_ddr_933MHz_v1.08.bin idbloader.img -+ > cat ./rk33/rk3399_miniloader_v1.06.bin >> idbloader.img -+ -+ Get uboot.img and idbloader.img in this step. -+ -+Bootloader storage options -+========================== -+ -+There are a few different storage options for the bootloader. -+This document explores two of these: eMMC and removable SD/MMC. -+ -+Flash the image to eMMC -+======================= -+ -+Flash the image with U-Boot SPL(option 1) -+------------------------------- -+Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then: -+ > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin -+ > rkdeveloptool wl 64 u-boot/idbspl.img -+ > rkdeveloptool wl 0x4000 u-boot/u-boot.itb -+ > rkdeveloptool rd -+ -+Flash the image with Rockchip miniloader(option 2) -+---------------------------------------- -+Power on(or reset with RESET KEY) with MASKROM KEY preesed, and then: -+ > rkdeveloptool db rkbin/rk33/rk3399_loader_v1.08.106.bin -+ > rkdeveloptool wl 0x40 idbloader.img -+ > rkdeveloptool wl 0x4000 uboot.img -+ > rkdeveloptool wl 0x6000 ./img/rk3399/trust.img -+ > rkdeveloptool rd -+ -+Create a bootable SD/MMC -+======================== -+ -+The idbspl.img contains the first stage, and the u-boot.img the second stage. -+As explained in the Rockchip partition table reference [1], the first stage -+(aka loader1) start sector is 64, and the second stage start sector is 16384. -+ -+Each sector is 512 bytes, which means the first stage offset is 32 KiB, -+and the second stage offset is 8 MiB. -+ -+Note: the second stage location is actually not as per the spec, -+but defined by the SPL. Mainline SPL defines an 8 MiB offset for the second -+stage. -+ -+Assuming the SD card is exposed by device /dev/mmcblk0, the commands -+to write the two stages are: -+ -+ > dd if=idbspl.img of=/dev/mmcblk0 bs=1k seek=32 -+ > dd if=u-boot.itb of=/dev/mmcblk0 bs=1k seek=8192 -+ -+Setting up the kernel and rootfs is beyond the scope of this document. -+ -+And that is it -+============== -+ -+You should be able to get U-Boot log in console/UART2(baurdrate 1500000) -+ -+For more detail, please reference [2]. -+ -+[1] http://opensource.rock-chips.com/wiki_Partitions -+[2] http://opensource.rock-chips.com/wiki_Boot_option -diff --git a/board/vamrs/rock960_rk3399/rock960-rk3399.c b/board/vamrs/rock960_rk3399/rock960-rk3399.c -new file mode 100644 -index 00000000000..d3775b22191 ---- /dev/null -+++ b/board/vamrs/rock960_rk3399/rock960-rk3399.c -@@ -0,0 +1,50 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+/* -+ * Copyright (C) 2018 Manivannan Sadhasivam -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+int board_init(void) -+{ -+ int ret; -+ -+ ret = regulators_enable_boot_on(false); -+ if (ret) -+ debug("%s: Cannot enable boot on regulator\n", __func__); -+ -+ return 0; -+} -+ -+void spl_board_init(void) -+{ -+ struct udevice *pinctrl; -+ int ret; -+ -+ ret = uclass_get_device(UCLASS_PINCTRL, 0, &pinctrl); -+ if (ret) { -+ debug("%s: Cannot find pinctrl device\n", __func__); -+ goto err; -+ } -+ -+ /* Enable debug UART */ -+ ret = pinctrl_request_noflags(pinctrl, PERIPH_ID_UART_DBG); -+ if (ret) { -+ debug("%s: Failed to set up console UART\n", __func__); -+ goto err; -+ } -+ -+ preloader_console_init(); -+ return; -+err: -+ printf("%s: Error %d\n", __func__, ret); -+ -+ /* No way to report error here */ -+ hang(); -+} -diff --git a/include/configs/rock960_rk3399.h b/include/configs/rock960_rk3399.h -new file mode 100644 -index 00000000000..746d24cbff5 ---- /dev/null -+++ b/include/configs/rock960_rk3399.h -@@ -0,0 +1,15 @@ -+/* SPDX-License-Identifier: GPL-2.0+ */ -+/* -+ * Copyright (C) 2018 Manivannan Sadhasivam -+ */ -+ -+#ifndef __ROCK960_RK3399_H -+#define __ROCK960_RK3399_H -+ -+#include -+ -+#define CONFIG_SYS_MMC_ENV_DEV 1 -+ -+#define SDRAM_BANK_SIZE (2UL << 30) -+ -+#endif - -From patchwork Thu Sep 27 19:03:00 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,v3,3/4] rockchip: rk3399: Add Rock960 CE board support -X-Patchwork-Submitter: Manivannan Sadhasivam -X-Patchwork-Id: 975860 -X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com -Message-Id: <20180927190301.9642-4-manivannan.sadhasivam@linaro.org> -To: sjg@chromium.org, - philipp.tomsich@theobroma-systems.com -Cc: tom@vamrs.com, daniel.lezcano@linaro.org, amit.kucheria@linaro.org, - dev@vamrs.com, u-boot@lists.denx.de, - Manivannan Sadhasivam , stephen@vamrs.com -Date: Fri, 28 Sep 2018 00:33:00 +0530 -From: Manivannan Sadhasivam -List-Id: U-Boot discussion - -Add board support for Rock960 CE board from Vamrs. This board utilizes -common Rock960 family support. - -Following peripherals are tested and known to work: -* USB 2.0 -* MMC - -This commit also adds DDR configuration for LPDDR3-2GiB-1600MHz which -is being used on the board. - -Signed-off-by: Manivannan Sadhasivam ---- - -Changes in v3: - -* Add config options for USB to Ethernet and USB2 PHY - -Changes in v2: - -* Added missing config options for USB/uSD -* Fixed the commit description for DDR speed - - arch/arm/dts/Makefile | 1 + - arch/arm/dts/rk3399-rock960.dts | 45 + - .../arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi | 1536 +++++++++++++++++ - configs/rock960-rk3399_defconfig | 69 + - 4 files changed, 1651 insertions(+) - create mode 100644 arch/arm/dts/rk3399-rock960.dts - create mode 100644 arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi - create mode 100644 configs/rock960-rk3399_defconfig - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index ebfa2272627..9b891826b73 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -51,6 +51,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ - rk3399-puma-ddr1333.dtb \ - rk3399-puma-ddr1600.dtb \ - rk3399-puma-ddr1866.dtb \ -+ rk3399-rock960.dtb \ - rv1108-evb.dtb - dtb-$(CONFIG_ARCH_MESON) += \ - meson-gxbb-nanopi-k2.dtb \ -diff --git a/arch/arm/dts/rk3399-rock960.dts b/arch/arm/dts/rk3399-rock960.dts -new file mode 100644 -index 00000000000..25c58b42611 ---- /dev/null -+++ b/arch/arm/dts/rk3399-rock960.dts -@@ -0,0 +1,45 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+/* -+ * Copyright (C) 2018 Manivannan Sadhasivam -+ */ -+ -+/dts-v1/; -+#include "rk3399-rock960.dtsi" -+#include "rk3399-sdram-lpddr3-2GB-1600.dtsi" -+ -+/ { -+ model = "96boards Rock960"; -+ compatible = "vamrs,rock960", "rockchip,rk3399"; -+ -+ chosen { -+ stdout-path = "serial2:1500000n8"; -+ }; -+}; -+ -+&pcie0 { -+ ep-gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_HIGH>; -+}; -+ -+&pinctrl { -+ pcie { -+ pcie_drv: pcie-drv { -+ rockchip,pins = -+ <2 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ usb2 { -+ host_vbus_drv: host-vbus-drv { -+ rockchip,pins = -+ <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+}; -+ -+&vcc3v3_pcie { -+ gpio = <&gpio2 5 GPIO_ACTIVE_HIGH>; -+}; -+ -+&vcc5v0_host { -+ gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>; -+}; -diff --git a/arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi b/arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi -new file mode 100644 -index 00000000000..d14e833d228 ---- /dev/null -+++ b/arch/arm/dts/rk3399-sdram-lpddr3-2GB-1600.dtsi -@@ -0,0 +1,1536 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+/* -+ * (C) Copyright 2016 Rockchip Electronics Co., Ltd -+ * (C) Copyright 2018 Manivannan Sadhasivam -+ */ -+ -+&dmc { -+ rockchip,sdram-params = < -+ 0x1 -+ 0xa -+ 0x3 -+ 0x2 -+ 0x2 -+ 0x0 -+ 0xf -+ 0xf -+ 1 -+ 0x1d191519 -+ 0x14040808 -+ 0x00000002 -+ 0x00006226 -+ 0x00000054 -+ 0x00000000 -+ 0x1 -+ 0xa -+ 0x3 -+ 0x2 -+ 0x2 -+ 0x0 -+ 0xf -+ 0xf -+ 1 -+ 0x1d191519 -+ 0x14040808 -+ 0x00000002 -+ 0x00006226 -+ 0x00000054 -+ 0x00000000 -+ 800 -+ 6 -+ 2 -+ 9 -+ 1 -+ 0x00000700 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000050 -+ 0x00027100 -+ 0x00000320 -+ 0x00001f40 -+ 0x00000050 -+ 0x00027100 -+ 0x00000320 -+ 0x00001f40 -+ 0x00000050 -+ 0x00027100 -+ 0x00000320 -+ 0x01001f40 -+ 0x00000000 -+ 0x00000101 -+ 0x00020100 -+ 0x000000a0 -+ 0x00000190 -+ 0x00000000 -+ 0x06180000 -+ 0x00061800 -+ 0x04000618 -+ 0x33080004 -+ 0x280f0622 -+ 0x22330800 -+ 0x00280f06 -+ 0x06223308 -+ 0x0600280f -+ 0x00000a0a -+ 0x0600dac0 -+ 0x0a0a060c -+ 0x0600dac0 -+ 0x0a0a060c -+ 0x0600dac0 -+ 0x0203000c -+ 0x0f0c0f00 -+ 0x040c0f0c -+ 0x14000a0a -+ 0x03030a0a -+ 0x00010003 -+ 0x031b1b1b -+ 0x00111111 -+ 0x00000000 -+ 0x03010000 -+ 0x0c2800a8 -+ 0x0c2800a8 -+ 0x0c2800a8 -+ 0x00000000 -+ 0x00060006 -+ 0x00140006 -+ 0x00140014 -+ 0x000f0f0f -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00b00000 -+ 0x00b000b0 -+ 0x00b000b0 -+ 0x000000b0 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000301 -+ 0x00000001 -+ 0x00000000 -+ 0x00000000 -+ 0x01000000 -+ 0x80104002 -+ 0x00040003 -+ 0x00040005 -+ 0x00030000 -+ 0x00050004 -+ 0x00000004 -+ 0x00040003 -+ 0x00040005 -+ 0x30a00000 -+ 0x00001850 -+ 0x185030a0 -+ 0x30a00000 -+ 0x00001850 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x02020200 -+ 0x00020202 -+ 0x00030200 -+ 0x00040700 -+ 0x00000302 -+ 0x02000407 -+ 0x00000003 -+ 0x00030f04 -+ 0x00070004 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00010000 -+ 0x20040020 -+ 0x00200400 -+ 0x01000400 -+ 0x00000b80 -+ 0x00000000 -+ 0x00000001 -+ 0x00000002 -+ 0x0000000e -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00a00000 -+ 0x00c80050 -+ 0x00c80000 -+ 0x005000a0 -+ 0x000000c8 -+ 0x00a000c8 -+ 0x00c80050 -+ 0x00c80000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00430000 -+ 0x0000001a -+ 0x001a0043 -+ 0x00430000 -+ 0x0000001a -+ 0x00010001 -+ 0x07000001 -+ 0x00000707 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00430000 -+ 0x0000001a -+ 0x001a0043 -+ 0x00430000 -+ 0x0000001a -+ 0x00010001 -+ 0x07000001 -+ 0x00000707 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x01000000 -+ 0x00000000 -+ 0x00000000 -+ 0x18151100 -+ 0x0000000c -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00032003 -+ 0x00480120 -+ 0x00000000 -+ 0x01200320 -+ 0x00000048 -+ 0x00032000 -+ 0x00480120 -+ 0x00000000 -+ 0x00280000 -+ 0x00280028 -+ 0x01010100 -+ 0x01000202 -+ 0x0a000002 -+ 0x01000f0f -+ 0x00000000 -+ 0x00000000 -+ 0x00010003 -+ 0x00000c03 -+ 0x00000100 -+ 0x00010000 -+ 0x01000000 -+ 0x00010000 -+ 0x00000001 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00010000 -+ 0x03030301 -+ 0x01010808 -+ 0x03030001 -+ 0x0a0a0a03 -+ 0x02080808 -+ 0x02050103 -+ 0x02050103 -+ 0x00050103 -+ 0x00020202 -+ 0x05020500 -+ 0x00020502 -+ 0x00000000 -+ 0x00000000 -+ 0x0d000001 -+ 0x00010028 -+ 0x00010000 -+ 0x00000003 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00010100 -+ 0x01000000 -+ 0x00000001 -+ 0x00000303 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x000556aa -+ 0x000aaaaa -+ 0x000aa955 -+ 0x00055555 -+ 0x000b3133 -+ 0x0004cd33 -+ 0x0004cecc -+ 0x000b32cc -+ 0x00010300 -+ 0x03000100 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00ffff00 -+ 0x1e1e0000 -+ 0x0800001e -+ 0x00001850 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00001850 -+ 0x0000f320 -+ 0x1850050a -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00001850 -+ 0x0000f320 -+ 0x1850050a -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00001850 -+ 0x0000f320 -+ 0x0202050a -+ 0x03030202 -+ 0x00000018 -+ 0x00000000 -+ 0x00000000 -+ 0x00001403 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00030000 -+ 0x000e0020 -+ 0x000e0020 -+ 0x000e0020 -+ 0x00000000 -+ 0x00000000 -+ 0x01000000 -+ 0x00070007 -+ 0x00050007 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x01000101 -+ 0x01010101 -+ 0x01000101 -+ 0x01000100 -+ 0x00010001 -+ 0x00010002 -+ 0x00020100 -+ 0x00000002 -+ 0x00000700 -+ 0x00000000 -+ 0x000030a0 -+ 0x00001850 -+ 0x000030a0 -+ 0x00001850 -+ 0x000030a0 -+ 0x18501850 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00001850 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00001850 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00000200 -+ 0x00010000 -+ 0x00000007 -+ 0x81000001 -+ 0x0f0003f0 -+ 0x3fffffff -+ 0x0f0000a0 -+ 0x377ff000 -+ 0x0f000020 -+ 0x377ff000 -+ 0x0f000030 -+ 0x377ff000 -+ 0x0f0000b0 -+ 0x377ff000 -+ 0x0f000100 -+ 0x377ff000 -+ 0x0f000110 -+ 0x377ff000 -+ 0x0f000010 -+ 0x377ff000 -+ 0x03000101 -+ 0x042e2e2e -+ 0x06180006 -+ 0x00061800 -+ 0x00000018 -+ 0x0c2800a8 -+ 0x0c2800a8 -+ 0x0c2800a8 -+ 0x00000500 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x04040000 -+ 0x0d000004 -+ 0x00000128 -+ 0x00000000 -+ 0x00030003 -+ 0x00000018 -+ 0x00000000 -+ 0x00000000 -+ 0x03060002 -+ 0x03010301 -+ 0x01080801 -+ 0x04020201 -+ 0x01080804 -+ 0x00000000 -+ 0x03030000 -+ 0x0a0a0a03 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00030300 -+ 0x00000014 -+ 0x00000000 -+ 0x01010300 -+ 0x00000000 -+ 0x00000000 -+ 0x01000000 -+ 0x00000101 -+ 0x55555a5a -+ 0x55555a5a -+ 0x55555a5a -+ 0x55555a5a -+ 0x0a0a0001 -+ 0x0505000a -+ 0x00000005 -+ 0x00000100 -+ 0x00030000 -+ 0x17030000 -+ 0x000e0020 -+ 0x000e0020 -+ 0x000e0020 -+ 0x00000000 -+ 0x00000000 -+ 0x00000100 -+ 0x140a0000 -+ 0x000a030a -+ 0x03000a03 -+ 0x010a000a -+ 0x00000100 -+ 0x01000000 -+ 0x00000000 -+ 0x00000100 -+ 0x1e1a0000 -+ 0x10010204 -+ 0x07070705 -+ 0x20000202 -+ 0x00201000 -+ 0x00201000 -+ 0x04041000 -+ 0x10100100 -+ 0x00010110 -+ 0x004b004a -+ 0x1a030000 -+ 0x0102041e -+ 0x34000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00004300 -+ 0x0001001a -+ 0x004d4d07 -+ 0x001a0043 -+ 0x4d070001 -+ 0x0000434d -+ 0x0001001a -+ 0x004d4d07 -+ 0x001a0043 -+ 0x4d070001 -+ 0x0000434d -+ 0x0001001a -+ 0x004d4d07 -+ 0x001a0043 -+ 0x4d070001 -+ 0x0043004d -+ 0x0001001a -+ 0x004d4d07 -+ 0x001a0043 -+ 0x4d070001 -+ 0x0000434d -+ 0x0001001a -+ 0x004d4d07 -+ 0x001a0043 -+ 0x4d070001 -+ 0x0000434d -+ 0x0001001a -+ 0x004d4d07 -+ 0x001a0043 -+ 0x4d070001 -+ 0x0100004d -+ 0x00c800c8 -+ 0x060400c8 -+ 0x0c060f11 -+ 0x2200d890 -+ 0x0a0c2005 -+ 0x0f11060a -+ 0x00000c06 -+ 0x2200d890 -+ 0x0a0c2005 -+ 0x0f11060a -+ 0x00000c06 -+ 0x2200d890 -+ 0x0a0c2005 -+ 0x0200020a -+ 0x02000200 -+ 0x02000200 -+ 0x02000200 -+ 0x02000200 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x01000300 -+ 0x00185000 -+ 0x0000f320 -+ 0x00001850 -+ 0x0000f320 -+ 0x00001850 -+ 0x0000f320 -+ 0x08000000 -+ 0x00000100 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000002 -+ 0x76543210 -+ 0x0004c008 -+ 0x000000b3 -+ 0x00000000 -+ 0x00000000 -+ 0x00010000 -+ 0x01665555 -+ 0x00665555 -+ 0x00010f00 -+ 0x05010200 -+ 0x00000003 -+ 0x001700c0 -+ 0x00cc0101 -+ 0x00030066 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x04080000 -+ 0x04080400 -+ 0x08000000 -+ 0x0c00c007 -+ 0x00000100 -+ 0x00000100 -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x00005555 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00200000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x00000270 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00800000 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00b30080 -+ 0x00000003 -+ 0x00000000 -+ 0x00020000 -+ 0x00000200 -+ 0x00000000 -+ 0x51315152 -+ 0xc0013150 -+ 0x020000c0 -+ 0x00100001 -+ 0x07054208 -+ 0x000f0c18 -+ 0x01000140 -+ 0x00000c20 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x76543210 -+ 0x0004c008 -+ 0x000000b3 -+ 0x00000000 -+ 0x00000000 -+ 0x00010000 -+ 0x01665555 -+ 0x00665555 -+ 0x00010f00 -+ 0x05010200 -+ 0x00000003 -+ 0x001700c0 -+ 0x00cc0101 -+ 0x00030066 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x04080000 -+ 0x04080400 -+ 0x08000000 -+ 0x0c00c007 -+ 0x00000100 -+ 0x00000100 -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x00005555 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00200000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x00000270 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00800000 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00b30080 -+ 0x00000003 -+ 0x00000000 -+ 0x00020000 -+ 0x00000200 -+ 0x00000000 -+ 0x51315152 -+ 0xc0013150 -+ 0x020000c0 -+ 0x00100001 -+ 0x07054208 -+ 0x000f0c18 -+ 0x01000140 -+ 0x00000c20 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x76543210 -+ 0x0004c008 -+ 0x000000b3 -+ 0x00000000 -+ 0x00000000 -+ 0x00010000 -+ 0x01665555 -+ 0x00665555 -+ 0x00010f00 -+ 0x05010200 -+ 0x00000003 -+ 0x001700c0 -+ 0x00cc0101 -+ 0x00030066 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x04080000 -+ 0x04080400 -+ 0x08000000 -+ 0x0c00c007 -+ 0x00000100 -+ 0x00000100 -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x00005555 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00200000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x00000270 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00800000 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00b30080 -+ 0x00000003 -+ 0x00000000 -+ 0x00020000 -+ 0x00000200 -+ 0x00000000 -+ 0x51315152 -+ 0xc0013150 -+ 0x020000c0 -+ 0x00100001 -+ 0x07054208 -+ 0x000f0c18 -+ 0x01000140 -+ 0x00000c20 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x76543210 -+ 0x0004c008 -+ 0x000000b3 -+ 0x00000000 -+ 0x00000000 -+ 0x00010000 -+ 0x01665555 -+ 0x00665555 -+ 0x00010f00 -+ 0x05010200 -+ 0x00000003 -+ 0x001700c0 -+ 0x00cc0101 -+ 0x00030066 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x04080000 -+ 0x04080400 -+ 0x08000000 -+ 0x0c00c007 -+ 0x00000100 -+ 0x00000100 -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x55555555 -+ 0xaaaaaaaa -+ 0x00005555 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00200000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x02700270 -+ 0x00000270 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00800000 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00800080 -+ 0x00b30080 -+ 0x00000003 -+ 0x00000000 -+ 0x00020000 -+ 0x00000200 -+ 0x00000000 -+ 0x51315152 -+ 0xc0013150 -+ 0x020000c0 -+ 0x00100001 -+ 0x07054208 -+ 0x000f0c18 -+ 0x01000140 -+ 0x00000c20 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00800000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000001 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00400320 -+ 0x00000040 -+ 0x00806420 -+ 0x00917531 -+ 0x00806420 -+ 0x01917531 -+ 0x00020003 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x000556aa -+ 0x000aaaaa -+ 0x000aa955 -+ 0x00055555 -+ 0x000b3133 -+ 0x0004cd33 -+ 0x0004cecc -+ 0x000b32cc -+ 0x0a418820 -+ 0x103f0000 -+ 0x0000003f -+ 0x00038055 -+ 0x03800380 -+ 0x03800380 -+ 0x00000380 -+ 0x42080010 -+ 0x00000003 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00800000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000001 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00400320 -+ 0x00000040 -+ 0x00008eca -+ 0x00009fdb -+ 0x00008eca -+ 0x01009fdb -+ 0x00020003 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x000556aa -+ 0x000aaaaa -+ 0x000aa955 -+ 0x00055555 -+ 0x000b3133 -+ 0x0004cd33 -+ 0x0004cecc -+ 0x000b32cc -+ 0x0004a0e6 -+ 0x080f0000 -+ 0x0000000f -+ 0x00038055 -+ 0x03800380 -+ 0x03800380 -+ 0x00000380 -+ 0x42080010 -+ 0x00000003 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00800000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000001 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00400320 -+ 0x00000040 -+ 0x00008eca -+ 0x00009fdb -+ 0x00008eca -+ 0x01009fdb -+ 0x00020003 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x000556aa -+ 0x000aaaaa -+ 0x000aa955 -+ 0x00055555 -+ 0x000b3133 -+ 0x0004cd33 -+ 0x0004cecc -+ 0x000b32cc -+ 0x1ee6b16a -+ 0x10000000 -+ 0x00000000 -+ 0x00038055 -+ 0x03800380 -+ 0x03800380 -+ 0x00000380 -+ 0x42080010 -+ 0x00000003 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000001 -+ 0x00000000 -+ 0x01000005 -+ 0x04000f00 -+ 0x00020040 -+ 0x00020055 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000050 -+ 0x00000000 -+ 0x00010100 -+ 0x00000601 -+ 0x00000000 -+ 0x00006400 -+ 0x01221102 -+ 0x00000000 -+ 0x00051f00 -+ 0x051f051f -+ 0x051f051f -+ 0x00030003 -+ 0x03000300 -+ 0x00000300 -+ 0x01221102 -+ 0x00000000 -+ 0x00000000 -+ 0x03020000 -+ 0x00000001 -+ 0x00000011 -+ 0x00000011 -+ 0x00000400 -+ 0x00000000 -+ 0x00000011 -+ 0x00000011 -+ 0x00004410 -+ 0x00004410 -+ 0x00004410 -+ 0x00004410 -+ 0x00004410 -+ 0x00000011 -+ 0x00004410 -+ 0x00000011 -+ 0x00004410 -+ 0x00000011 -+ 0x00004410 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x04000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000508 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0x00000000 -+ 0xe4000000 -+ 0x00000000 -+ 0x00000000 -+ 0x01010000 -+ 0x00000000 -+ >; -+}; -diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig -new file mode 100644 -index 00000000000..bb10ee9a435 ---- /dev/null -+++ b/configs/rock960-rk3399_defconfig -@@ -0,0 +1,69 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_SYS_TEXT_BASE=0x00200000 -+CONFIG_SPL_LIBCOMMON_SUPPORT=y -+CONFIG_SPL_LIBGENERIC_SUPPORT=y -+CONFIG_SYS_MALLOC_F_LEN=0x4000 -+CONFIG_ROCKCHIP_RK3399=y -+CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 -+CONFIG_TARGET_ROCK960_RK3399=y -+CONFIG_DEBUG_UART_BASE=0xFF1A0000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_BAUDRATE=1500000 -+CONFIG_SPL_STACK_R_ADDR=0x80000 -+CONFIG_DEFAULT_DEVICE_TREE="rk3399-rock960" -+CONFIG_DEBUG_UART=y -+CONFIG_FIT=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py" -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock960.dtb" -+CONFIG_SYS_PROMPT="rock960 => " -+# CONFIG_DISPLAY_CPUINFO is not set -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 -+CONFIG_SPL_ATF=y -+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_SF=y -+CONFIG_CMD_USB=y -+# CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_TIME=y -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_REGMAP=y -+CONFIG_SPL_REGMAP=y -+CONFIG_SYSCON=y -+CONFIG_SPL_SYSCON=y -+CONFIG_CLK=y -+CONFIG_SPL_CLK=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_ROCKCHIP=y -+CONFIG_PINCTRL=y -+CONFIG_SPL_PINCTRL=y -+CONFIG_PINCTRL_ROCKCHIP_RK3399=y -+CONFIG_DM_PMIC=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_REGULATOR_PWM=y -+CONFIG_DM_REGULATOR_FIXED=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_RAM=y -+CONFIG_SPL_RAM=y -+CONFIG_SYSRESET=y -+CONFIG_USB=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_STORAGE=y -+CONFIG_ROCKCHIP_USB2_PHY=y -+CONFIG_USB_ETHER_ASIX=y -+CONFIG_USE_TINY_PRINTF=y -+CONFIG_ERRNO_STR=y - -From patchwork Thu Sep 27 19:03:01 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,v3,4/4] rockchip: rk3399: Add Ficus EE board support -X-Patchwork-Submitter: Manivannan Sadhasivam -X-Patchwork-Id: 975859 -X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com -Message-Id: <20180927190301.9642-5-manivannan.sadhasivam@linaro.org> -To: sjg@chromium.org, - philipp.tomsich@theobroma-systems.com -Cc: tom@vamrs.com, daniel.lezcano@linaro.org, amit.kucheria@linaro.org, - dev@vamrs.com, u-boot@lists.denx.de, - Manivannan Sadhasivam , stephen@vamrs.com -Date: Fri, 28 Sep 2018 00:33:01 +0530 -From: Manivannan Sadhasivam -List-Id: U-Boot discussion - -Add board support for Ficus EE board from Vamrs. This board utilizes -common Rock960 family support. - -Following peripherals are tested and known to work: -* Gigabit Ethernet -* USB 2.0 -* MMC - -Signed-off-by: Ezequiel Garcia -[Reworked based on common Rock960 family support] -Signed-off-by: Manivannan Sadhasivam ---- - -Changes in v3: Modified the DRAM config header from LPDDR3 to DDR3 - -Changes in v2: None - - arch/arm/dts/Makefile | 1 + - arch/arm/dts/rk3399-ficus.dts | 78 ++++++++++++++++++++++++++++++++++ - configs/ficus-rk3399_defconfig | 71 +++++++++++++++++++++++++++++++ - 3 files changed, 150 insertions(+) - create mode 100644 arch/arm/dts/rk3399-ficus.dts - create mode 100644 configs/ficus-rk3399_defconfig - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 9b891826b73..e2bd9822aa2 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -42,6 +42,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ - rk3288-veyron-minnie.dtb \ - rk3288-vyasa.dtb \ - rk3328-evb.dtb \ -+ rk3399-ficus.dtb \ - rk3368-lion.dtb \ - rk3368-sheep.dtb \ - rk3368-geekbox.dtb \ -diff --git a/arch/arm/dts/rk3399-ficus.dts b/arch/arm/dts/rk3399-ficus.dts -new file mode 100644 -index 00000000000..4af0e4e3834 ---- /dev/null -+++ b/arch/arm/dts/rk3399-ficus.dts -@@ -0,0 +1,78 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Copyright (c) 2018 Collabora Ltd. -+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd. -+ * -+ * Schematics available at https://dl.vamrs.com/products/ficus/docs/hw -+ */ -+ -+/dts-v1/; -+#include "rk3399-rock960.dtsi" -+#include "rk3399-sdram-ddr3-1600.dtsi" -+ -+/ { -+ model = "96boards RK3399 Ficus"; -+ compatible = "vamrs,ficus", "rockchip,rk3399"; -+ -+ chosen { -+ stdout-path = "serial2:1500000n8"; -+ }; -+ -+ clkin_gmac: external-gmac-clock { -+ compatible = "fixed-clock"; -+ clock-frequency = <125000000>; -+ clock-output-names = "clkin_gmac"; -+ #clock-cells = <0>; -+ }; -+}; -+ -+&gmac { -+ assigned-clocks = <&cru SCLK_RMII_SRC>; -+ assigned-clock-parents = <&clkin_gmac>; -+ clock_in_out = "input"; -+ phy-supply = <&vcc3v3_sys>; -+ phy-mode = "rgmii"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>; -+ snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; -+ snps,reset-active-low; -+ snps,reset-delays-us = <0 10000 50000>; -+ tx_delay = <0x28>; -+ rx_delay = <0x11>; -+ status = "okay"; -+}; -+ -+&pcie0 { -+ ep-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; -+}; -+ -+&pinctrl { -+ gmac { -+ rgmii_sleep_pins: rgmii-sleep-pins { -+ rockchip,pins = -+ <3 15 RK_FUNC_GPIO &pcfg_output_low>; -+ }; -+ }; -+ -+ pcie { -+ pcie_drv: pcie-drv { -+ rockchip,pins = -+ <1 24 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ usb2 { -+ host_vbus_drv: host-vbus-drv { -+ rockchip,pins = -+ <4 27 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+}; -+ -+&vcc3v3_pcie { -+ gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; -+}; -+ -+&vcc5v0_host { -+ gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>; -+}; -diff --git a/configs/ficus-rk3399_defconfig b/configs/ficus-rk3399_defconfig -new file mode 100644 -index 00000000000..e890bc25238 ---- /dev/null -+++ b/configs/ficus-rk3399_defconfig -@@ -0,0 +1,71 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_SYS_TEXT_BASE=0x00200000 -+CONFIG_SPL_LIBCOMMON_SUPPORT=y -+CONFIG_SPL_LIBGENERIC_SUPPORT=y -+CONFIG_SYS_MALLOC_F_LEN=0x4000 -+CONFIG_ROCKCHIP_RK3399=y -+CONFIG_TARGET_ROCK960_RK3399=y -+CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000 -+CONFIG_DEBUG_UART_BASE=0xFF1A0000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SPL_STACK_R_ADDR=0x80000 -+CONFIG_DEFAULT_DEVICE_TREE="rk3399-ficus" -+CONFIG_DEBUG_UART=y -+CONFIG_FIT=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-rockchip/make_fit_atf.py" -+# CONFIG_DISPLAY_CPUINFO is not set -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000 -+CONFIG_SPL_ATF=y -+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_SF=y -+CONFIG_CMD_USB=y -+# CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_TIME=y -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_NET_RANDOM_ETHADDR=y -+CONFIG_REGMAP=y -+CONFIG_SPL_REGMAP=y -+CONFIG_SYSCON=y -+CONFIG_SPL_SYSCON=y -+CONFIG_CLK=y -+CONFIG_SPL_CLK=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_ROCKCHIP=y -+CONFIG_DM_ETH=y -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_RGMII=y -+CONFIG_GMAC_ROCKCHIP=y -+CONFIG_PINCTRL=y -+CONFIG_SPL_PINCTRL=y -+CONFIG_PINCTRL_ROCKCHIP_RK3399=y -+CONFIG_DM_PMIC=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_REGULATOR_PWM=y -+CONFIG_DM_REGULATOR_FIXED=y -+CONFIG_DM_REGULATOR_GPIO=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_RAM=y -+CONFIG_SPL_RAM=y -+CONFIG_BAUDRATE=1500000 -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_SYSRESET=y -+CONFIG_USB=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_STORAGE=y -+CONFIG_USE_TINY_PRINTF=y -+CONFIG_ERRNO_STR=y diff --git a/rockchip-Enable-preboot-start-for-pci-usb.patch b/rockchip-Enable-preboot-start-for-pci-usb.patch new file mode 100644 index 0000000..30aad4d --- /dev/null +++ b/rockchip-Enable-preboot-start-for-pci-usb.patch @@ -0,0 +1,860 @@ +From a6909a16b4cc301f1007d9e75d02abb6d06a1ea7 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Thu, 28 May 2026 21:29:29 +0100 +Subject: [PATCH] rockchip: Enable preboot start for pci/usb + +Enable the preboot so nvme works OOTB + +Signed-off-by: Peter Robinson +--- + configs/anbernic-rgxx3-rk3566_defconfig | 2 ++ + configs/bpi-r2-pro-rk3568_defconfig | 2 ++ + configs/cm3588-nas-rk3588_defconfig | 2 ++ + configs/coolpi-4b-rk3588s_defconfig | 2 ++ + configs/coolpi-cm5-evb-rk3588_defconfig | 2 ++ + configs/evb-rk3568_defconfig | 2 ++ + configs/evb-rk3588_defconfig | 2 ++ + configs/firefly-rk3399_defconfig | 2 ++ + configs/generic-rk3568_defconfig | 2 ++ + configs/generic-rk3588_defconfig | 2 ++ + configs/jaguar-rk3588_defconfig | 2 ++ + configs/lubancat-2-rk3568_defconfig | 2 ++ + configs/nanopc-t4-rk3399_defconfig | 2 ++ + configs/nanopc-t6-rk3588_defconfig | 2 ++ + configs/nanopi-r5c-rk3568_defconfig | 2 ++ + configs/nanopi-r5s-rk3568_defconfig | 2 ++ + configs/nanopi-r6c-rk3588s_defconfig | 2 ++ + configs/nanopi-r6s-rk3588s_defconfig | 2 ++ + configs/neu6a-io-rk3588_defconfig | 2 ++ + configs/neu6b-io-rk3588_defconfig | 2 ++ + configs/nova-rk3588s_defconfig | 2 ++ + configs/odroid-m1-rk3568_defconfig | 2 ++ + configs/odroid-m1s-rk3566_defconfig | 2 ++ + configs/odroid-m2-rk3588s_defconfig | 2 ++ + configs/orangepi-3b-rk3566_defconfig | 2 ++ + configs/orangepi-5-max-rk3588_defconfig | 2 ++ + configs/orangepi-5-plus-rk3588_defconfig | 2 ++ + configs/orangepi-5-rk3588s_defconfig | 2 ++ + configs/orangepi-5-ultra-rk3588_defconfig | 2 ++ + configs/pinebook-pro-rk3399_defconfig | 1 + + configs/pinetab2-rk3566_defconfig | 2 ++ + configs/powkiddy-x55-rk3566_defconfig | 2 ++ + configs/quartz64-a-rk3566_defconfig | 2 ++ + configs/quartz64-b-rk3566_defconfig | 4 ++++ + configs/quartzpro64-rk3588_defconfig | 2 ++ + configs/radxa-cm3-io-rk3566_defconfig | 2 ++ + configs/radxa-e25-rk3568_defconfig | 2 ++ + configs/radxa-zero-3-rk3566_defconfig | 2 ++ + configs/roc-pc-mezzanine-rk3399_defconfig | 2 ++ + configs/rock-3a-rk3568_defconfig | 2 ++ + configs/rock-3b-rk3568_defconfig | 2 ++ + configs/rock-3c-rk3566_defconfig | 2 ++ + configs/rock-4c-plus-rk3399_defconfig | 2 ++ + configs/rock-4se-rk3399_defconfig | 2 ++ + configs/rock-5-itx-rk3588_defconfig | 2 ++ + configs/rock-5c-rk3588s_defconfig | 2 ++ + configs/rock-pi-4-rk3399_defconfig | 2 ++ + configs/rock-pi-4c-rk3399_defconfig | 2 ++ + configs/rock-pi-n10-rk3399pro_defconfig | 2 ++ + configs/rock5a-rk3588s_defconfig | 2 ++ + configs/rock5b-rk3588_defconfig | 2 ++ + configs/rock960-rk3399_defconfig | 2 ++ + configs/rockpro64-rk3399_defconfig | 2 ++ + configs/sige7-rk3588_defconfig | 2 ++ + configs/soquartz-blade-rk3566_defconfig | 2 ++ + configs/soquartz-cm4-rk3566_defconfig | 2 ++ + configs/soquartz-model-a-rk3566_defconfig | 2 ++ + configs/tiger-rk3588_defconfig | 2 ++ + configs/toybrick-rk3588_defconfig | 2 ++ + configs/turing-rk1-rk3588_defconfig | 2 ++ + 60 files changed, 121 insertions(+) + +diff --git a/configs/anbernic-rgxx3-rk3566_defconfig b/configs/anbernic-rgxx3-rk3566_defconfig +index 854de8b00a4..cd91f18ba80 100644 +--- a/configs/anbernic-rgxx3-rk3566_defconfig ++++ b/configs/anbernic-rgxx3-rk3566_defconfig +@@ -12,6 +12,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + # CONFIG_EFI_LOADER is not set + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y +diff --git a/configs/bpi-r2-pro-rk3568_defconfig b/configs/bpi-r2-pro-rk3568_defconfig +index c5199a39448..603e07f2456 100644 +--- a/configs/bpi-r2-pro-rk3568_defconfig ++++ b/configs/bpi-r2-pro-rk3568_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/cm3588-nas-rk3588_defconfig b/configs/cm3588-nas-rk3588_defconfig +index 5b5ef8d5ac1..53147d115dd 100644 +--- a/configs/cm3588-nas-rk3588_defconfig ++++ b/configs/cm3588-nas-rk3588_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/coolpi-4b-rk3588s_defconfig b/configs/coolpi-4b-rk3588s_defconfig +index e6772622403..75e0b373ce9 100644 +--- a/configs/coolpi-4b-rk3588s_defconfig ++++ b/configs/coolpi-4b-rk3588s_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/coolpi-cm5-evb-rk3588_defconfig b/configs/coolpi-cm5-evb-rk3588_defconfig +index 4326e116849..a005e4441d3 100644 +--- a/configs/coolpi-cm5-evb-rk3588_defconfig ++++ b/configs/coolpi-cm5-evb-rk3588_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/evb-rk3568_defconfig b/configs/evb-rk3568_defconfig +index 4a5a7454e10..7ec199a08af 100644 +--- a/configs/evb-rk3568_defconfig ++++ b/configs/evb-rk3568_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/evb-rk3588_defconfig b/configs/evb-rk3588_defconfig +index c7f6256a626..cfa73c660e7 100644 +--- a/configs/evb-rk3588_defconfig ++++ b/configs/evb-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig +index 83b9de5feb9..2ba8f5029c3 100644 +--- a/configs/firefly-rk3399_defconfig ++++ b/configs/firefly-rk3399_defconfig +@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-firefly.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/generic-rk3568_defconfig b/configs/generic-rk3568_defconfig +index a33c3af9255..20966793568 100644 +--- a/configs/generic-rk3568_defconfig ++++ b/configs/generic-rk3568_defconfig +@@ -14,6 +14,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/generic-rk3588_defconfig b/configs/generic-rk3588_defconfig +index ac450e6d757..b5424ac9f16 100644 +--- a/configs/generic-rk3588_defconfig ++++ b/configs/generic-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/jaguar-rk3588_defconfig b/configs/jaguar-rk3588_defconfig +index ed3883b4f9c..47dbd834f30 100644 +--- a/configs/jaguar-rk3588_defconfig ++++ b/configs/jaguar-rk3588_defconfig +@@ -16,6 +16,8 @@ CONFIG_DEBUG_UART_BASE=0xfeb50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/lubancat-2-rk3568_defconfig b/configs/lubancat-2-rk3568_defconfig +index 7548bf60b06..2fb8a432503 100644 +--- a/configs/lubancat-2-rk3568_defconfig ++++ b/configs/lubancat-2-rk3568_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_VAR_BUF_SIZE=16384 + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y +diff --git a/configs/nanopc-t4-rk3399_defconfig b/configs/nanopc-t4-rk3399_defconfig +index f8ae436a1ee..7aa8e1a8d42 100644 +--- a/configs/nanopc-t4-rk3399_defconfig ++++ b/configs/nanopc-t4-rk3399_defconfig +@@ -15,6 +15,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-nanopc-t4.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/nanopc-t6-rk3588_defconfig b/configs/nanopc-t6-rk3588_defconfig +index ba9a5adece7..eaf7fa5a0fc 100644 +--- a/configs/nanopc-t6-rk3588_defconfig ++++ b/configs/nanopc-t6-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r5c-rk3568_defconfig b/configs/nanopi-r5c-rk3568_defconfig +index e75a24dadc8..159ef033932 100644 +--- a/configs/nanopi-r5c-rk3568_defconfig ++++ b/configs/nanopi-r5c-rk3568_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="usb start;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r5s-rk3568_defconfig b/configs/nanopi-r5s-rk3568_defconfig +index c971f376b38..60b5e8fa014 100644 +--- a/configs/nanopi-r5s-rk3568_defconfig ++++ b/configs/nanopi-r5s-rk3568_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="usb start;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r6c-rk3588s_defconfig b/configs/nanopi-r6c-rk3588s_defconfig +index 861e3234d29..bb6e2082e3b 100644 +--- a/configs/nanopi-r6c-rk3588s_defconfig ++++ b/configs/nanopi-r6c-rk3588s_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nanopi-r6s-rk3588s_defconfig b/configs/nanopi-r6s-rk3588s_defconfig +index 743dfca441b..903ec56ad6f 100644 +--- a/configs/nanopi-r6s-rk3588s_defconfig ++++ b/configs/nanopi-r6s-rk3588s_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/neu6a-io-rk3588_defconfig b/configs/neu6a-io-rk3588_defconfig +index 19f129e96f0..08ed699b01d 100644 +--- a/configs/neu6a-io-rk3588_defconfig ++++ b/configs/neu6a-io-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/neu6b-io-rk3588_defconfig b/configs/neu6b-io-rk3588_defconfig +index 2cf5aeccf51..8cafd779a1c 100644 +--- a/configs/neu6b-io-rk3588_defconfig ++++ b/configs/neu6b-io-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/nova-rk3588s_defconfig b/configs/nova-rk3588s_defconfig +index f7d7492ff46..5abb6ebbe18 100644 +--- a/configs/nova-rk3588s_defconfig ++++ b/configs/nova-rk3588s_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/odroid-m1-rk3568_defconfig b/configs/odroid-m1-rk3568_defconfig +index b00985b0405..19d7af53c7f 100644 +--- a/configs/odroid-m1-rk3568_defconfig ++++ b/configs/odroid-m1-rk3568_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/odroid-m1s-rk3566_defconfig b/configs/odroid-m1s-rk3566_defconfig +index d59882a2a59..20f6dc3c26e 100644 +--- a/configs/odroid-m1s-rk3566_defconfig ++++ b/configs/odroid-m1s-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/odroid-m2-rk3588s_defconfig b/configs/odroid-m2-rk3588s_defconfig +index e71e61ddb0b..561c2b28b7a 100644 +--- a/configs/odroid-m2-rk3588s_defconfig ++++ b/configs/odroid-m2-rk3588s_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-3b-rk3566_defconfig b/configs/orangepi-3b-rk3566_defconfig +index 1cd78789fa1..dcf182231da 100644 +--- a/configs/orangepi-3b-rk3566_defconfig ++++ b/configs/orangepi-3b-rk3566_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-max-rk3588_defconfig b/configs/orangepi-5-max-rk3588_defconfig +index 0861df962cf..744aad89c4a 100644 +--- a/configs/orangepi-5-max-rk3588_defconfig ++++ b/configs/orangepi-5-max-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-plus-rk3588_defconfig b/configs/orangepi-5-plus-rk3588_defconfig +index 52523f87aec..e3bb4e43da9 100644 +--- a/configs/orangepi-5-plus-rk3588_defconfig ++++ b/configs/orangepi-5-plus-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-rk3588s_defconfig b/configs/orangepi-5-rk3588s_defconfig +index e0eba389289..33fe68add7b 100644 +--- a/configs/orangepi-5-rk3588s_defconfig ++++ b/configs/orangepi-5-rk3588s_defconfig +@@ -17,6 +17,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/orangepi-5-ultra-rk3588_defconfig b/configs/orangepi-5-ultra-rk3588_defconfig +index fb7f4432983..62419609695 100644 +--- a/configs/orangepi-5-ultra-rk3588_defconfig ++++ b/configs/orangepi-5-ultra-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/pinebook-pro-rk3399_defconfig b/configs/pinebook-pro-rk3399_defconfig +index cbf95b4692f..9e4d1b1061d 100644 +--- a/configs/pinebook-pro-rk3399_defconfig ++++ b/configs/pinebook-pro-rk3399_defconfig +@@ -22,6 +22,7 @@ CONFIG_PCI=y + CONFIG_DEBUG_UART=y + CONFIG_BOOTDELAY=3 + CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-pinebook-pro.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/pinetab2-rk3566_defconfig b/configs/pinetab2-rk3566_defconfig +index f284dadb99d..d87849f0a45 100644 +--- a/configs/pinetab2-rk3566_defconfig ++++ b/configs/pinetab2-rk3566_defconfig +@@ -18,6 +18,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/powkiddy-x55-rk3566_defconfig b/configs/powkiddy-x55-rk3566_defconfig +index 37a359c91a9..70bc5ab6402 100644 +--- a/configs/powkiddy-x55-rk3566_defconfig ++++ b/configs/powkiddy-x55-rk3566_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/quartz64-a-rk3566_defconfig b/configs/quartz64-a-rk3566_defconfig +index 780fd581f0a..7938b5c0d1b 100644 +--- a/configs/quartz64-a-rk3566_defconfig ++++ b/configs/quartz64-a-rk3566_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/quartz64-b-rk3566_defconfig b/configs/quartz64-b-rk3566_defconfig +index 4d92a67cd73..fe8a168373d 100644 +--- a/configs/quartz64-b-rk3566_defconfig ++++ b/configs/quartz64-b-rk3566_defconfig +@@ -1,4 +1,6 @@ + CONFIG_ARM=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_SKIP_LOWLEVEL_INIT=y + CONFIG_COUNTER_FREQUENCY=24000000 + CONFIG_ARCH_ROCKCHIP=y +@@ -17,6 +19,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/quartzpro64-rk3588_defconfig b/configs/quartzpro64-rk3588_defconfig +index 0ad74e8bbef..b9cbddfae77 100644 +--- a/configs/quartzpro64-rk3588_defconfig ++++ b/configs/quartzpro64-rk3588_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/radxa-cm3-io-rk3566_defconfig b/configs/radxa-cm3-io-rk3566_defconfig +index 875f0b76fa5..2523dccd6a3 100644 +--- a/configs/radxa-cm3-io-rk3566_defconfig ++++ b/configs/radxa-cm3-io-rk3566_defconfig +@@ -9,6 +9,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/radxa-e25-rk3568_defconfig b/configs/radxa-e25-rk3568_defconfig +index 779d540e22d..7e003e74520 100644 +--- a/configs/radxa-e25-rk3568_defconfig ++++ b/configs/radxa-e25-rk3568_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/radxa-zero-3-rk3566_defconfig b/configs/radxa-zero-3-rk3566_defconfig +index f5cf09a5e4a..7db7e3fcd3d 100644 +--- a/configs/radxa-zero-3-rk3566_defconfig ++++ b/configs/radxa-zero-3-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/roc-pc-mezzanine-rk3399_defconfig b/configs/roc-pc-mezzanine-rk3399_defconfig +index 8b4d8c1b0aa..54baa07aeae 100644 +--- a/configs/roc-pc-mezzanine-rk3399_defconfig ++++ b/configs/roc-pc-mezzanine-rk3399_defconfig +@@ -21,6 +21,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + # CONFIG_ANDROID_BOOT_IMAGE is not set + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-roc-pc-mezzanine.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y +diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig +index e753185610f..19d303e7f70 100644 +--- a/configs/rock-3a-rk3568_defconfig ++++ b/configs/rock-3a-rk3568_defconfig +@@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-3b-rk3568_defconfig b/configs/rock-3b-rk3568_defconfig +index c3bf48b9e34..0cfa8eba168 100644 +--- a/configs/rock-3b-rk3568_defconfig ++++ b/configs/rock-3b-rk3568_defconfig +@@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-3c-rk3566_defconfig b/configs/rock-3c-rk3566_defconfig +index 417aa33a663..61d0e1b8c6a 100644 +--- a/configs/rock-3c-rk3566_defconfig ++++ b/configs/rock-3c-rk3566_defconfig +@@ -16,6 +16,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-4c-plus-rk3399_defconfig b/configs/rock-4c-plus-rk3399_defconfig +index 0f6bdfdfb06..f31cb061a83 100644 +--- a/configs/rock-4c-plus-rk3399_defconfig ++++ b/configs/rock-4c-plus-rk3399_defconfig +@@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-4se-rk3399_defconfig b/configs/rock-4se-rk3399_defconfig +index 7f22aede912..caf8e02bece 100644 +--- a/configs/rock-4se-rk3399_defconfig ++++ b/configs/rock-4se-rk3399_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-5-itx-rk3588_defconfig b/configs/rock-5-itx-rk3588_defconfig +index cb014de4188..e26a126533c 100644 +--- a/configs/rock-5-itx-rk3588_defconfig ++++ b/configs/rock-5-itx-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-5c-rk3588s_defconfig b/configs/rock-5c-rk3588s_defconfig +index 3d044a81498..27234c250d1 100644 +--- a/configs/rock-5c-rk3588s_defconfig ++++ b/configs/rock-5c-rk3588s_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock-pi-4-rk3399_defconfig b/configs/rock-pi-4-rk3399_defconfig +index e5c9072c27f..35852c017da 100644 +--- a/configs/rock-pi-4-rk3399_defconfig ++++ b/configs/rock-pi-4-rk3399_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-pi-4c-rk3399_defconfig b/configs/rock-pi-4c-rk3399_defconfig +index 4be7b0f8130..eeee446a5bd 100644 +--- a/configs/rock-pi-4c-rk3399_defconfig ++++ b/configs/rock-pi-4c-rk3399_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_EFI_CAPSULE_ON_DISK=y + CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y + # CONFIG_ANDROID_BOOT_IMAGE is not set +diff --git a/configs/rock-pi-n10-rk3399pro_defconfig b/configs/rock-pi-n10-rk3399pro_defconfig +index 602a723ea7d..3dcc2932ae3 100644 +--- a/configs/rock-pi-n10-rk3399pro_defconfig ++++ b/configs/rock-pi-n10-rk3399pro_defconfig +@@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + # CONFIG_ANDROID_BOOT_IMAGE is not set + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399pro-rock-pi-n10.dtb" + # CONFIG_CONSOLE_MUX is not set +diff --git a/configs/rock5a-rk3588s_defconfig b/configs/rock5a-rk3588s_defconfig +index 24b2eef35f2..c5830054921 100644 +--- a/configs/rock5a-rk3588s_defconfig ++++ b/configs/rock5a-rk3588s_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock5b-rk3588_defconfig b/configs/rock5b-rk3588_defconfig +index da5fb3a2c30..053346fc035 100644 +--- a/configs/rock5b-rk3588_defconfig ++++ b/configs/rock5b-rk3588_defconfig +@@ -18,6 +18,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/rock960-rk3399_defconfig b/configs/rock960-rk3399_defconfig +index db121f03ae6..e55f1b6a034 100644 +--- a/configs/rock960-rk3399_defconfig ++++ b/configs/rock960-rk3399_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFF1A0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rock960.dtb" + CONFIG_SYS_PBSIZE=1052 + CONFIG_DISPLAY_BOARDINFO_LATE=y +diff --git a/configs/rockpro64-rk3399_defconfig b/configs/rockpro64-rk3399_defconfig +index 1d2bff35fc0..ea8e90b9f6a 100644 +--- a/configs/rockpro64-rk3399_defconfig ++++ b/configs/rockpro64-rk3399_defconfig +@@ -20,6 +20,8 @@ CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-rockpro64.dtb" + CONFIG_DISPLAY_BOARDINFO_LATE=y + CONFIG_SPL_MAX_SIZE=0x40000 +diff --git a/configs/sige7-rk3588_defconfig b/configs/sige7-rk3588_defconfig +index 00b9759715b..1b837bd554c 100644 +--- a/configs/sige7-rk3588_defconfig ++++ b/configs/sige7-rk3588_defconfig +@@ -13,6 +13,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_SPL_SPI=y + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/soquartz-blade-rk3566_defconfig b/configs/soquartz-blade-rk3566_defconfig +index 7de159a8881..4137f0459b5 100644 +--- a/configs/soquartz-blade-rk3566_defconfig ++++ b/configs/soquartz-blade-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/soquartz-cm4-rk3566_defconfig b/configs/soquartz-cm4-rk3566_defconfig +index 4455ee5b5aa..ad63ba0204f 100644 +--- a/configs/soquartz-cm4-rk3566_defconfig ++++ b/configs/soquartz-cm4-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/soquartz-model-a-rk3566_defconfig b/configs/soquartz-model-a-rk3566_defconfig +index abdab514496..9e01345bdaa 100644 +--- a/configs/soquartz-model-a-rk3566_defconfig ++++ b/configs/soquartz-model-a-rk3566_defconfig +@@ -11,6 +11,8 @@ CONFIG_DEBUG_UART_BASE=0xFE660000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/tiger-rk3588_defconfig b/configs/tiger-rk3588_defconfig +index 105e8e10e0b..bcc2ae302a5 100644 +--- a/configs/tiger-rk3588_defconfig ++++ b/configs/tiger-rk3588_defconfig +@@ -17,6 +17,8 @@ CONFIG_DEBUG_UART_CLOCK=24000000 + # CONFIG_DEBUG_UART_BOARD_INIT is not set + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/toybrick-rk3588_defconfig b/configs/toybrick-rk3588_defconfig +index 14b231ae3e2..7af393731cd 100644 +--- a/configs/toybrick-rk3588_defconfig ++++ b/configs/toybrick-rk3588_defconfig +@@ -10,6 +10,8 @@ CONFIG_SYS_LOAD_ADDR=0xc00800 + CONFIG_DEBUG_UART_BASE=0xFEB50000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +diff --git a/configs/turing-rk1-rk3588_defconfig b/configs/turing-rk1-rk3588_defconfig +index 0b3efec23e6..515db2a2b0c 100644 +--- a/configs/turing-rk1-rk3588_defconfig ++++ b/configs/turing-rk1-rk3588_defconfig +@@ -12,6 +12,8 @@ CONFIG_DEBUG_UART_BASE=0xFEBC0000 + CONFIG_DEBUG_UART_CLOCK=24000000 + CONFIG_PCI=y + CONFIG_DEBUG_UART=y ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="pci enum; usb start; nvme scan;" + CONFIG_FIT=y + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_FIT_SIGNATURE=y +-- +2.54.0 + diff --git a/rockchip-make_fit_atf-fix-warning-unit_address_vs_reg.patch b/rockchip-make_fit_atf-fix-warning-unit_address_vs_reg.patch deleted file mode 100644 index d64cbb1..0000000 --- a/rockchip-make_fit_atf-fix-warning-unit_address_vs_reg.patch +++ /dev/null @@ -1,103 +0,0 @@ -From patchwork Thu Apr 26 06:43:06 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot] rockchip: make_fit_atf: fix warning unit_address_vs_reg -X-Patchwork-Submitter: Kever Yang -X-Patchwork-Id: 904884 -Message-Id: <1524724986-28497-1-git-send-email-kever.yang@rock-chips.com> -To: u-boot@lists.denx.de -Date: Thu, 26 Apr 2018 14:43:06 +0800 -From: Kever Yang -List-Id: U-Boot discussion - -Patch fix warning: -/builddir/BUILD/u-boot-2018.05-rc2/"arch/arm/mach-rockchip/make_fit_atf.py" \ -arch/arm/dts/rk3399-firefly.dtb > u-boot.its - ./tools/mkimage -f u-boot.its -E u-boot.itb >/dev/null && cat -/dev/null -u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/uboot@1 -has a unit name, but no reg property -u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/atf@1 has -a unit name, but no reg property -u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/atf@2 has -a unit name, but no reg property -u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/atf@3 has -a unit name, but no reg property -u-boot.itb.tmp: Warning (unit_address_vs_reg): Node /images/fdt@1 has -a unit name, but no reg property -u-boot.itb.tmp: Warning (unit_address_vs_reg): Node -/configurations/config@1 has a unit name, but no reg property -make[1]: Leaving directory -'/builddir/BUILD/u-boot-2018.05-rc2/builds/firefly-rk3399' - -Reported-by: Peter Robinson -Signed-off-by: Kever Yang ---- - - arch/arm/mach-rockchip/make_fit_atf.py | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py -index 7c6dd57..513e088 100755 ---- a/arch/arm/mach-rockchip/make_fit_atf.py -+++ b/arch/arm/mach-rockchip/make_fit_atf.py -@@ -37,7 +37,7 @@ DT_HEADER="""/* - #address-cells = <1>; - - images { -- uboot@1 { -+ uboot { - description = "U-Boot (64-bit)"; - data = /incbin/("u-boot-nodtb.bin"); - type = "standalone"; -@@ -61,7 +61,7 @@ def append_atf_node(file, atf_index, phy_addr): - Append ATF DT node to input FIT dts file. - """ - data = 'bl31_0x%08x.bin' % phy_addr -- print >> file, '\t\tatf@%d {' % atf_index -+ print >> file, '\t\tatf_%d {' % atf_index - print >> file, '\t\t\tdescription = \"ARM Trusted Firmware\";' - print >> file, '\t\t\tdata = /incbin/("%s");' % data - print >> file, '\t\t\ttype = "firmware";' -@@ -81,7 +81,7 @@ def append_fdt_node(file, dtbs): - cnt = 1 - for dtb in dtbs: - dtname = os.path.basename(dtb) -- print >> file, '\t\tfdt@%d {' % cnt -+ print >> file, '\t\tfdt_%d {' % cnt - print >> file, '\t\t\tdescription = "%s";' % dtname - print >> file, '\t\t\tdata = /incbin/("%s");' % dtb - print >> file, '\t\t\ttype = "flat_dt";' -@@ -91,17 +91,17 @@ def append_fdt_node(file, dtbs): - cnt = cnt + 1 - - def append_conf_section(file, cnt, dtname, atf_cnt): -- print >> file, '\t\tconfig@%d {' % cnt -+ print >> file, '\t\tconfig_%d {' % cnt - print >> file, '\t\t\tdescription = "%s";' % dtname -- print >> file, '\t\t\tfirmware = "atf@1";' -- print >> file, '\t\t\tloadables = "uboot@1",', -+ print >> file, '\t\t\tfirmware = "atf_1";' -+ print >> file, '\t\t\tloadables = "uboot",', - for i in range(1, atf_cnt): -- print >> file, '"atf@%d"' % (i+1), -+ print >> file, '"atf_%d"' % (i+1), - if i != (atf_cnt - 1): - print >> file, ',', - else: - print >> file, ';' -- print >> file, '\t\t\tfdt = "fdt@1";' -+ print >> file, '\t\t\tfdt = "fdt_1";' - print >> file, '\t\t};' - print >> file, '' - -@@ -111,7 +111,7 @@ def append_conf_node(file, dtbs, atf_cnt): - """ - cnt = 1 - print >> file, '\tconfigurations {' -- print >> file, '\t\tdefault = "config@1";' -+ print >> file, '\t\tdefault = "config_1";' - for dtb in dtbs: - dtname = os.path.basename(dtb) - append_conf_section(file, cnt, dtname, atf_cnt) diff --git a/rockchip-make_fit_atf-use-elf-entry-point.patch b/rockchip-make_fit_atf-use-elf-entry-point.patch deleted file mode 100644 index fc2aa99..0000000 --- a/rockchip-make_fit_atf-use-elf-entry-point.patch +++ /dev/null @@ -1,81 +0,0 @@ -From patchwork Wed May 16 16:44:33 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot] rockchip: make_fit_atf: use elf entry point -X-Patchwork-Submitter: Mian Yousaf Kaukab -X-Patchwork-Id: 914901 -Message-Id: <20180516164433.30998-1-yousaf.kaukab@suse.com> -To: u-boot@lists.denx.de -Cc: Mian Yousaf Kaukab -Date: Wed, 16 May 2018 18:44:33 +0200 -From: Mian Yousaf Kaukab -List-Id: U-Boot discussion - -make_fit_atf.py uses physical address of first segment as the -entry point to bl31. It is incorrect and causes following abort -when bl31_entry() is called: - -U-Boot SPL board initTrying to boot from MMC1 -"Synchronous Abort" handler, esr 0x02000000 -elr: 0000000000000000 lr : 00000000ff8c7e8c -x 0: 00000000ff8e0000 x 1: 0000000000000000 -x 2: 0000000000000000 x 3: 00000000ff8e0180 -x 4: 0000000000000000 x 5: 0000000000000000 -x 6: 0000000000000030 x 7: 00000000ff8e0188 -x 8: 00000000000001e0 x 9: 0000000000000000 -x10: 000000000007fcdc x11: 00000000002881b8 -x12: 00000000000001a2 x13: 0000000000000198 -x14: 000000000007fdcc x15: 00000000002881b8 -x16: 00000000003c0724 x17: 00000000003c0718 -x18: 000000000007fe80 x19: 00000000ff8e0000 -x20: 0000000000200000 x21: 00000000ff8e0000 -x22: 0000000000000000 x23: 000000000007fe30 -x24: 00000000ff8d1c3c x25: 00000000ff8d5000 -x26: 00000000deadbeef x27: 00000000000004a0 -x28: 000000000000009c x29: 000000000007fd90 - -Fix it by using the entry point from the elf header. - -Signed-off-by: Mian Yousaf Kaukab ---- - arch/arm/mach-rockchip/make_fit_atf.py | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py -index 6b3d9201c9..b88a5e1f16 100755 ---- a/arch/arm/mach-rockchip/make_fit_atf.py -+++ b/arch/arm/mach-rockchip/make_fit_atf.py -@@ -53,7 +53,7 @@ DT_END=""" - }; - """ - --def append_atf_node(file, atf_index, phy_addr): -+def append_atf_node(file, atf_index, phy_addr, elf_entry): - """ - Append ATF DT node to input FIT dts file. - """ -@@ -67,7 +67,7 @@ def append_atf_node(file, atf_index, phy_addr): - print >> file, '\t\t\tcompression = "none";' - print >> file, '\t\t\tload = <0x%08x>;' % phy_addr - if atf_index == 1: -- print >> file, '\t\t\tentry = <0x%08x>;' % phy_addr -+ print >> file, '\t\t\tentry = <0x%08x>;' % elf_entry - print >> file, '\t\t};' - print >> file, '' - -@@ -141,12 +141,13 @@ def generate_atf_fit_dts(fit_file_name, bl31_file_name, uboot_file_name, dtbs_fi - - with open(bl31_file_name) as bl31_file: - bl31 = ELFFile(bl31_file) -+ elf_entry = bl31.header['e_entry'] - for i in range(bl31.num_segments()): - seg = bl31.get_segment(i) - if ('PT_LOAD' == seg.__getitem__(ELF_SEG_P_TYPE)): - paddr = seg.__getitem__(ELF_SEG_P_PADDR) - p= seg.__getitem__(ELF_SEG_P_PADDR) -- append_atf_node(fit_file, i+1, paddr) -+ append_atf_node(fit_file, i+1, paddr, elf_entry) - atf_cnt = i+1 - append_fdt_node(fit_file, dtbs_file_name) - print >> fit_file, '%s' % DT_IMAGES_NODE_END diff --git a/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch b/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch new file mode 100644 index 0000000..bef5a9e --- /dev/null +++ b/rockchip-rk3568-nanopi-r5-Drop-duplicated-extra-sdhc.patch @@ -0,0 +1,39 @@ +From aef38432fbc93621b434836b95b10c28aa880e84 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 +Tested-by: Dusty Mabe +Signed-off-by: Peter Robinson +--- + 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 + diff --git a/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch b/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch new file mode 100644 index 0000000..c67e4af --- /dev/null +++ b/rockchip-rk356x-Stop-overriding-sdhci-mmc-aliases.patch @@ -0,0 +1,33 @@ +From 29efc0396809384cf37bfcfb01c62e63216fa998 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 +--- + 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 + diff --git a/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch b/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch deleted file mode 100644 index f3d20a6..0000000 --- a/rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 44dd1455f924aa99e6bff0b124a9be0a85dcfa89 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 4 Sep 2018 11:59:18 +0100 -Subject: [PATCH] rpi: Use firmware provided device tree - -Signed-off-by: Peter Robinson ---- - configs/rpi_0_w_defconfig | 2 +- - configs/rpi_2_defconfig | 2 +- - configs/rpi_3_32b_defconfig | 2 +- - configs/rpi_3_defconfig | 2 +- - configs/rpi_defconfig | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig -index d5bf01b76e..08f177f34a 100644 ---- a/configs/rpi_0_w_defconfig -+++ b/configs/rpi_0_w_defconfig -@@ -13,7 +13,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w" - CONFIG_ENV_FAT_INTERFACE="mmc" - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" -diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig -index a50a815759..0918c6c9ff 100644 ---- a/configs/rpi_2_defconfig -+++ b/configs/rpi_2_defconfig -@@ -13,7 +13,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b" - CONFIG_ENV_FAT_INTERFACE="mmc" - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" -diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig -index ec395d29ed..22165bde53 100644 ---- a/configs/rpi_3_32b_defconfig -+++ b/configs/rpi_3_32b_defconfig -@@ -14,7 +14,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" - CONFIG_ENV_FAT_INTERFACE="mmc" - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" -diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig -index ac99f2000a..0ca298cd54 100644 ---- a/configs/rpi_3_defconfig -+++ b/configs/rpi_3_defconfig -@@ -14,7 +14,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" - CONFIG_ENV_FAT_INTERFACE="mmc" - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" -diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig -index db42ffd135..0ec1365b1b 100644 ---- a/configs/rpi_defconfig -+++ b/configs/rpi_defconfig -@@ -13,7 +13,7 @@ CONFIG_SYS_PROMPT="U-Boot> " - CONFIG_CMD_GPIO=y - CONFIG_CMD_MMC=y - CONFIG_CMD_USB=y --CONFIG_OF_EMBED=y -+CONFIG_OF_BOARD=y - CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b" - CONFIG_ENV_FAT_INTERFACE="mmc" - CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" --- -2.19.0.rc0 - diff --git a/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch b/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch new file mode 100644 index 0000000..6d54fa7 --- /dev/null +++ b/rpi-copy-chosen-bootloader-partition-and-set-boot_partition.patch @@ -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 +X-Patchwork-Id: 2280865 +X-Patchwork-Delegate: pbrobinson@gmail.com +Return-Path: +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 ; 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= +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 ; 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 ; 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 ; + 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= +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 ; Tue, 4 Aug 2026 13:39:29 +0000 (UTC) +From: Gregor Herburger +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 , + Peter Robinson , Tom Rini , + =?utf-8?q?Filip_Kokosi=C5=84ski?= , + Ilias Apalodimas , + Gregor Herburger +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 +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Errors-To: u-boot-bounces@lists.u-boot-project.org +Sender: "U-Boot" + +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 +Signed-off-by: Gregor Herburger +--- +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 + +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) diff --git a/sources b/sources index d6e20e0..08618e7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (u-boot-2018.09.tar.bz2) = 48cb60a53450e2820eda706917b61dae053677fecfe177e0d07968313d25c7e9d5ab2d7cc5625b54e4c823f5c8852f88387b94f404e307e737aaa5a2c887ad4a +SHA512 (u-boot-v2026.10-rc3.tar.bz2) = e993f5d78a1ac0eb11f00e3730ff23eb880e206036f78c3eb74852b846a23d59111b4b07f4ced2c88c61a8c1627036c3cc32717c0efcf819376c5cd0a34183d2 diff --git a/sunxi-DT-A64-add-Pine64-LTS-support.patch b/sunxi-DT-A64-add-Pine64-LTS-support.patch deleted file mode 100644 index cf041af..0000000 --- a/sunxi-DT-A64-add-Pine64-LTS-support.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 82cc7aca5fb7c7103256229a3ead0b8075da5813 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 5 Sep 2018 17:00:25 +0100 -Subject: [PATCH] sunxi: DT: A64: add Pine64-LTS support - -The Pine64-LTS board is a new board version of the Pine64, though -actually it's a non-SoM version of the SoPine and its baseboard. -In contrast to the original Pine64 it features LPDDR3 DRAM, an eMMC -socket and a SPI flash chip for storing firmware (like U-Boot). -Add it as a variant to the existing SoPine defconfig, since from a -software point of view they are really not different. - -Signed-off-by: Andre Przywara -Signed-off-by: Peter Robinson ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/sun50i-a64-pine64-lts.dts | 13 +++++++++++++ - configs/sopine_baseboard_defconfig | 1 + - 3 files changed, 15 insertions(+) - create mode 100644 arch/arm/dts/sun50i-a64-pine64-lts.dts - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index ebfa227262..6cd440d6af 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -401,6 +401,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \ - sun50i-a64-nanopi-a64.dtb \ - sun50i-a64-olinuxino.dtb \ - sun50i-a64-orangepi-win.dtb \ -+ sun50i-a64-pine64-lts.dtb \ - sun50i-a64-pine64-plus.dtb \ - sun50i-a64-pine64.dtb \ - sun50i-a64-sopine-baseboard.dtb -diff --git a/arch/arm/dts/sun50i-a64-pine64-lts.dts b/arch/arm/dts/sun50i-a64-pine64-lts.dts -new file mode 100644 -index 0000000000..72d6961dc3 ---- /dev/null -+++ b/arch/arm/dts/sun50i-a64-pine64-lts.dts -@@ -0,0 +1,13 @@ -+/* -+ * SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+ * -+ * Copyright (c) 2018 ARM Ltd. -+ */ -+ -+#include "sun50i-a64-sopine-baseboard.dts" -+ -+/ { -+ model = "Pine64 LTS"; -+ compatible = "pine64,pine64-lts", "allwinner,sun50i-r18", -+ "allwinner,sun50i-a64"; -+}; -diff --git a/configs/sopine_baseboard_defconfig b/configs/sopine_baseboard_defconfig -index 9ede081c08..eead38a1e3 100644 ---- a/configs/sopine_baseboard_defconfig -+++ b/configs/sopine_baseboard_defconfig -@@ -15,6 +15,7 @@ CONFIG_NR_DRAM_BANKS=1 - # CONFIG_SPL_DOS_PARTITION is not set - # CONFIG_SPL_EFI_PARTITION is not set - CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-sopine-baseboard" -+CONFIG_OF_LIST="sun50i-a64-sopine-baseboard sun50i-a64-pine64-lts" - CONFIG_SUN8I_EMAC=y - CONFIG_USB_EHCI_HCD=y - CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y --- -2.19.0.rc0 - diff --git a/tegra-TXx-Add-CONFIG_EFI_LOADER_BOUNCE_BUFFER.patch b/tegra-TXx-Add-CONFIG_EFI_LOADER_BOUNCE_BUFFER.patch deleted file mode 100644 index 3364bb1..0000000 --- a/tegra-TXx-Add-CONFIG_EFI_LOADER_BOUNCE_BUFFER.patch +++ /dev/null @@ -1,54 +0,0 @@ -From c8b9f0c2ca0a4270db811867ad051e75efa4100a Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 5 Sep 2018 11:13:40 +0100 -Subject: [PATCH] tegra: TXx: Add CONFIG_EFI_LOADER_BOUNCE_BUFFER - -The Jetson TX series needs EFI loader bounce buffer enabled otherwise grub doesn't see -the storage when it loads. - -Signed-off-by: Peter Robinson ---- - configs/p2371-2180_defconfig | 1 + - configs/p2771-0000-000_defconfig | 1 + - configs/p2771-0000-500_defconfig | 1 + - 3 files changed, 3 insertions(+) - -diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig -index d9dcf7e014..156a1cbcf9 100644 ---- a/configs/p2371-2180_defconfig -+++ b/configs/p2371-2180_defconfig -@@ -5,6 +5,7 @@ CONFIG_TEGRA210=y - CONFIG_TARGET_P2371_2180=y - CONFIG_NR_DRAM_BANKS=2 - CONFIG_OF_SYSTEM_SETUP=y -+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y - CONFIG_CONSOLE_MUX=y - CONFIG_SYS_STDIO_DEREGISTER=y - CONFIG_SYS_PROMPT="Tegra210 (P2371-2180) # " -diff --git a/configs/p2771-0000-000_defconfig b/configs/p2771-0000-000_defconfig -index 2bf2e31359..15ea2fc6d6 100644 ---- a/configs/p2771-0000-000_defconfig -+++ b/configs/p2771-0000-000_defconfig -@@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_TEGRA186=y - CONFIG_NR_DRAM_BANKS=8 - CONFIG_OF_SYSTEM_SETUP=y -+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y - CONFIG_CONSOLE_MUX=y - CONFIG_SYS_STDIO_DEREGISTER=y - CONFIG_SYS_PROMPT="Tegra186 (P2771-0000-000) # " -diff --git a/configs/p2771-0000-500_defconfig b/configs/p2771-0000-500_defconfig -index 1e33c1f95b..a32b6a866e 100644 ---- a/configs/p2771-0000-500_defconfig -+++ b/configs/p2771-0000-500_defconfig -@@ -4,6 +4,7 @@ CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_TEGRA186=y - CONFIG_NR_DRAM_BANKS=8 - CONFIG_OF_SYSTEM_SETUP=y -+CONFIG_EFI_LOADER_BOUNCE_BUFFER=y - CONFIG_CONSOLE_MUX=y - CONFIG_SYS_STDIO_DEREGISTER=y - CONFIG_SYS_PROMPT="Tegra186 (P2771-0000-500) # " --- -2.19.0.rc0 - diff --git a/tegra-efi_loader-simplify-ifdefs.patch b/tegra-efi_loader-simplify-ifdefs.patch deleted file mode 100644 index 1b39a4a..0000000 --- a/tegra-efi_loader-simplify-ifdefs.patch +++ /dev/null @@ -1,194 +0,0 @@ -From patchwork Thu Aug 30 21:43:43 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,V3,1/3] efi_loader: simplify ifdefs -X-Patchwork-Submitter: Stephen Warren -X-Patchwork-Id: 964248 -X-Patchwork-Delegate: agraf@suse.de -Message-Id: <20180830214345.2475-1-swarren@wwwdotorg.org> -To: Tom Rini -Cc: Stephen Warren , xypron.glpk@gmx.de, agraf@suse.de, - u-boot@lists.denx.de, Tom Warren -Date: Thu, 30 Aug 2018 15:43:43 -0600 -From: Stephen Warren -List-Id: U-Boot discussion - -From: Stephen Warren - -Use CONFIG_IS_ENABLED(EFI_LOADER) to avoid explicitly checking CONFIG_SPL -too. This simplifies the conditional. - -Signed-off-by: Stephen Warren ---- -v3: New patch. ---- - arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 +- - arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 2 +- - arch/x86/lib/e820.c | 4 ++-- - include/efi_loader.h | 6 +++--- - 4 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c -index 052e0708d454..be00bd55ab68 100644 ---- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c -+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c -@@ -835,7 +835,7 @@ int dram_init_banksize(void) - return 0; - } - --#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) -+#if CONFIG_IS_ENABLED(EFI_LOADER) - void efi_add_known_memory(void) - { - int i; -diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c -index fc9de73bcef4..c9c2c3f6d3e8 100644 ---- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c -+++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c -@@ -135,7 +135,7 @@ remove_psci_node: - - fdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code, - *boot_code_size); --#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) -+#if CONFIG_IS_ENABLED(EFI_LOADER) - efi_add_memory_map((uintptr_t)&secondary_boot_code, - ALIGN(*boot_code_size, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT, - EFI_RESERVED_MEMORY_TYPE, false); -diff --git a/arch/x86/lib/e820.c b/arch/x86/lib/e820.c -index 8b34f677d96d..d6ae2c4e9d77 100644 ---- a/arch/x86/lib/e820.c -+++ b/arch/x86/lib/e820.c -@@ -36,7 +36,7 @@ __weak unsigned int install_e820_map(unsigned int max_entries, - return 4; - } - --#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) -+#if CONFIG_IS_ENABLED(EFI_LOADER) - void efi_add_known_memory(void) - { - struct e820_entry e820[E820MAX]; -@@ -72,4 +72,4 @@ void efi_add_known_memory(void) - efi_add_memory_map(start, pages, type, false); - } - } --#endif /* defined(EFI_LOADER) && !defined(CONFIG_SPL_BUILD) */ -+#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */ -diff --git a/include/efi_loader.h b/include/efi_loader.h -index f162adfff7e2..b46babf9316f 100644 ---- a/include/efi_loader.h -+++ b/include/efi_loader.h -@@ -13,7 +13,7 @@ - #include - - /* No need for efi loader support in SPL */ --#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD) -+#if CONFIG_IS_ENABLED(EFI_LOADER) - - #include - -@@ -460,7 +460,7 @@ efi_status_t EFIAPI efi_set_variable(u16 *variable_name, efi_guid_t *vendor, - void *efi_bootmgr_load(struct efi_device_path **device_path, - struct efi_device_path **file_path); - --#else /* defined(EFI_LOADER) && !defined(CONFIG_SPL_BUILD) */ -+#else /* CONFIG_IS_ENABLED(EFI_LOADER) */ - - /* Without CONFIG_EFI_LOADER we don't have a runtime section, stub it out */ - #define __efi_runtime_data -@@ -477,6 +477,6 @@ static inline void efi_set_bootdev(const char *dev, const char *devnr, - static inline void efi_net_set_dhcp_ack(void *pkt, int len) { } - static inline void efi_print_image_infos(void *pc) { } - --#endif /* CONFIG_EFI_LOADER && !CONFIG_SPL_BUILD */ -+#endif /* CONFIG_IS_ENABLED(EFI_LOADER) */ - - #endif /* _EFI_LOADER_H */ - -From patchwork Thu Aug 30 21:43:44 2018 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot, V3, - 2/3] ARM: tegra: reserve unmapped RAM so EFI doesn't use it -X-Patchwork-Submitter: Stephen Warren -X-Patchwork-Id: 964249 -X-Patchwork-Delegate: agraf@suse.de -Message-Id: <20180830214345.2475-2-swarren@wwwdotorg.org> -To: Tom Rini -Cc: Stephen Warren , xypron.glpk@gmx.de, agraf@suse.de, - u-boot@lists.denx.de, Tom Warren -Date: Thu, 30 Aug 2018 15:43:44 -0600 -From: Stephen Warren -List-Id: U-Boot discussion - -From: Stephen Warren - -Tegra U-Boot ensures that board_get_usable_ram_top() never returns a value -over 4GB, since some peripherals can't access such addresses. However, on -systems with more than 2GB of RAM, RAM bank 1 does describe this extra -RAM, so that Linux (or whatever OS) can use it, subject to DMA -limitations. Since board_get_usable_ram_top() points at the top of RAM -bank 0, the memory locations describes by RAM bank 1 are not mapped by -U-Boot's MMU configuration, and so cannot be used for anything. - -For some completely inexplicable reason, U-Boot's EFI support ignores the -value returned by board_get_usable_ram_top(), and EFI memory allocation -routines will return values above U-Boot's RAM top. This causes U-Boot to -crash when it accesses that RAM, since it isn't mapped by the MMU. One -use-case where this happens is TFTP download of a file on Jetson TX1 -(p2371-2180). - -This change explicitly tells the EFI code that this extra RAM should not -be used, thus avoiding the crash. - -A previous attempt to make EFI honor board_get_usable_ram_top() was -rejected. So, this patch will need to be replicated for any board that -implements board_get_usable_ram_top(). - -Fixes: aa909462d018 ("efi_loader: efi_allocate_pages is too restrictive") -Signed-off-by: Stephen Warren ---- -v3: -- Use shift not divide for page count calculation. -- Enhance ifdef to avoid EFI references from SPL builds. -v2: -- Don't hard-code EFI page size. -- Register RAM as a boot services data rather than reserved. ---- - arch/arm/mach-tegra/board2.c | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c -index 421a71b3014d..12257a42b51b 100644 ---- a/arch/arm/mach-tegra/board2.c -+++ b/arch/arm/mach-tegra/board2.c -@@ -6,6 +6,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -210,6 +211,19 @@ int board_early_init_f(void) - - int board_late_init(void) - { -+#if CONFIG_IS_ENABLED(EFI_LOADER) -+ if (gd->bd->bi_dram[1].start) { -+ /* -+ * Only bank 0 is below board_get_usable_ram_top(), so all of -+ * bank 1 is not mapped by the U-Boot MMU configuration, and so -+ * we must prevent EFI from using it. -+ */ -+ efi_add_memory_map(gd->bd->bi_dram[1].start, -+ gd->bd->bi_dram[1].size >> EFI_PAGE_SHIFT, -+ EFI_BOOT_SERVICES_DATA, false); -+ } -+#endif -+ - #if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE) - if (tegra_cpu_is_non_secure()) { - printf("CPU is in NS mode\n"); - diff --git a/tegra-fix-tx1.patch b/tegra-fix-tx1.patch deleted file mode 100644 index 9c03262..0000000 --- a/tegra-fix-tx1.patch +++ /dev/null @@ -1,472 +0,0 @@ -From a2872b1e2f81e04f92f0970e18c6c8a40640eea8 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 5 Sep 2018 12:11:40 +0100 -Subject: [PATCH] tegra fix tx1 - -Signed-off-by: Peter Robinson ---- - arch/arm/include/asm/arch-tegra/xusb-padctl.h | 1 + - arch/arm/mach-tegra/board.c | 4 +- - arch/arm/mach-tegra/board2.c | 12 ++++ - arch/arm/mach-tegra/dt-setup.c | 5 +- - arch/arm/mach-tegra/gpu.c | 2 + - .../mach-tegra/{tegra186 => }/nvtboot_board.c | 70 +++++++++++++++++++ - .../mach-tegra/{tegra186 => }/nvtboot_ll.S | 0 - .../mach-tegra/{tegra186 => }/nvtboot_mem.c | 0 - arch/arm/mach-tegra/tegra186/Makefile | 6 +- - arch/arm/mach-tegra/tegra210/Makefile | 3 + - arch/arm/mach-tegra/tegra210/clock.c | 19 ----- - arch/arm/mach-tegra/tegra210/xusb-padctl.c | 68 +++++++++++------- - arch/arm/mach-tegra/xusb-padctl-dummy.c | 4 ++ - configs/p2371-0000_defconfig | 2 +- - configs/p2371-2180_defconfig | 2 +- - configs/p2571_defconfig | 2 +- - 16 files changed, 146 insertions(+), 54 deletions(-) - rename arch/arm/mach-tegra/{tegra186 => }/nvtboot_board.c (84%) - rename arch/arm/mach-tegra/{tegra186 => }/nvtboot_ll.S (100%) - rename arch/arm/mach-tegra/{tegra186 => }/nvtboot_mem.c (100%) - -diff --git a/arch/arm/include/asm/arch-tegra/xusb-padctl.h b/arch/arm/include/asm/arch-tegra/xusb-padctl.h -index deccdf455d..7e14d8109d 100644 ---- a/arch/arm/include/asm/arch-tegra/xusb-padctl.h -+++ b/arch/arm/include/asm/arch-tegra/xusb-padctl.h -@@ -16,6 +16,7 @@ struct tegra_xusb_phy; - struct tegra_xusb_phy *tegra_xusb_phy_get(unsigned int type); - - void tegra_xusb_padctl_init(void); -+void tegra_xusb_padctl_exit(void); - int tegra_xusb_phy_prepare(struct tegra_xusb_phy *phy); - int tegra_xusb_phy_enable(struct tegra_xusb_phy *phy); - int tegra_xusb_phy_disable(struct tegra_xusb_phy *phy); -diff --git a/arch/arm/mach-tegra/board.c b/arch/arm/mach-tegra/board.c -index f8fc042a1d..ddef228831 100644 ---- a/arch/arm/mach-tegra/board.c -+++ b/arch/arm/mach-tegra/board.c -@@ -35,7 +35,7 @@ enum { - - static bool from_spl __attribute__ ((section(".data"))); - --#ifndef CONFIG_SPL_BUILD -+#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TEGRA210) - void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) - { - from_spl = r0 != UBOOT_NOT_LOADED_FROM_SPL; -@@ -66,6 +66,7 @@ bool tegra_cpu_is_non_secure(void) - } - #endif - -+#if !defined(CONFIG_ARM64) - /* Read the RAM size directly from the memory controller */ - static phys_size_t query_sdram_size(void) - { -@@ -122,6 +123,7 @@ int dram_init(void) - gd->ram_size = query_sdram_size(); - return 0; - } -+#endif - - static int uart_configs[] = { - #if defined(CONFIG_TEGRA20) -diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c -index 421a71b301..22ecd99760 100644 ---- a/arch/arm/mach-tegra/board2.c -+++ b/arch/arm/mach-tegra/board2.c -@@ -171,6 +171,12 @@ int board_init(void) - return nvidia_board_init(); - } - -+void board_cleanup_before_linux(void) -+{ -+ /* power down UPHY PLL */ -+ tegra_xusb_padctl_exit(); -+} -+ - #ifdef CONFIG_BOARD_EARLY_INIT_F - static void __gpio_early_init(void) - { -@@ -220,9 +226,14 @@ int board_late_init(void) - #endif - start_cpu_fan(); - -+#if defined(CONFIG_TEGRA210) -+ tegra_soc_board_init_late(); -+#endif -+ - return 0; - } - -+#ifndef CONFIG_TEGRA210 - /* - * In some SW environments, a memory carve-out exists to house a secure - * monitor, a trusted OS, and/or various statically allocated media buffers. -@@ -348,3 +359,4 @@ ulong board_get_usable_ram_top(ulong total_size) - { - return CONFIG_SYS_SDRAM_BASE + usable_ram_size_below_4g(); - } -+#endif -diff --git a/arch/arm/mach-tegra/dt-setup.c b/arch/arm/mach-tegra/dt-setup.c -index 8ac723f41e..a961fab20f 100644 ---- a/arch/arm/mach-tegra/dt-setup.c -+++ b/arch/arm/mach-tegra/dt-setup.c -@@ -12,12 +12,10 @@ - */ - int ft_system_setup(void *blob, bd_t *bd) - { -+#if !defined(CONFIG_ARM64) - const char *gpu_compats[] = { - #if defined(CONFIG_TEGRA124) - "nvidia,gk20a", --#endif --#if defined(CONFIG_TEGRA210) -- "nvidia,gm20b", - #endif - }; - int i, ret; -@@ -28,6 +26,7 @@ int ft_system_setup(void *blob, bd_t *bd) - if (ret) - return ret; - } -+#endif - - return 0; - } -diff --git a/arch/arm/mach-tegra/gpu.c b/arch/arm/mach-tegra/gpu.c -index e047f67821..3b8c1a0434 100644 ---- a/arch/arm/mach-tegra/gpu.c -+++ b/arch/arm/mach-tegra/gpu.c -@@ -17,6 +17,7 @@ static bool _configured; - - void tegra_gpu_config(void) - { -+#if !defined(CONFIG_ARM64) - struct mc_ctlr *mc = (struct mc_ctlr *)NV_PA_MC_BASE; - - #if defined(CONFIG_TEGRA_SUPPORT_NON_SECURE) -@@ -34,6 +35,7 @@ void tegra_gpu_config(void) - debug("configured VPR\n"); - - _configured = true; -+#endif - } - - #if defined(CONFIG_OF_LIBFDT) -diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_board.c b/arch/arm/mach-tegra/nvtboot_board.c -similarity index 84% -rename from arch/arm/mach-tegra/tegra186/nvtboot_board.c -rename to arch/arm/mach-tegra/nvtboot_board.c -index 83c0e931ea..7b98b502ef 100644 ---- a/arch/arm/mach-tegra/tegra186/nvtboot_board.c -+++ b/arch/arm/mach-tegra/nvtboot_board.c -@@ -5,6 +5,7 @@ - - #include - #include -+#include - #include - #include - #include -@@ -270,6 +271,27 @@ static void set_calculated_env_vars(void) - free(vars); - } - -+char *strstrip(char *s) -+{ -+ size_t size; -+ char *end; -+ -+ size = strlen(s); -+ -+ if (!size) -+ return s; -+ -+ end = s + size - 1; -+ while (end >= s && isblank(*end)) -+ end--; -+ *(end + 1) = '\0'; -+ -+ while (*s && isblank(*s)) -+ s++; -+ -+ return s; -+} -+ - static int set_fdt_addr(void) - { - int ret; -@@ -283,6 +305,7 @@ static int set_fdt_addr(void) - return 0; - } - -+#if defined(CONFIG_TEGRA186) - /* - * Attempt to use /chosen/nvidia,ether-mac in the nvtboot DTB to U-Boot's - * ethaddr environment variable if possible. -@@ -316,6 +339,49 @@ static int set_ethaddr_from_nvtboot(void) - - return 0; - } -+#endif -+ -+static int set_cbootargs(void) -+{ -+ const void *nvtboot_blob = (void *)nvtboot_boot_x0; -+ const void *prop; -+ char *bargs, *s; -+ int node, len, ret = 0; -+ -+ /* -+ * Save the bootargs passed in the DTB by the previous bootloader -+ * (CBoot) to the env. (pointer in reg x0) -+ */ -+ -+ debug("%s: nvtboot_blob = %p\n", __func__, nvtboot_blob); -+ -+ node = fdt_path_offset(nvtboot_blob, "/chosen"); -+ if (node < 0) { -+ pr_err("Can't find /chosen node in nvtboot DTB"); -+ return node; -+ } -+ debug("%s: found 'chosen' node: %d\n", __func__, node); -+ -+ prop = fdt_getprop(nvtboot_blob, node, "bootargs", &len); -+ if (!prop) { -+ pr_err("Can't find /chosen/bootargs property in nvtboot DTB"); -+ return -ENOENT; -+ } -+ debug("%s: found 'bootargs' property, len =%d\n", __func__, len); -+ -+ /* CBoot seems to add trailing whitespace - strip it here */ -+ s = strdup((char *)prop); -+ bargs = strstrip(s); -+ debug("%s: bootargs = %s!\n", __func__, bargs); -+ -+ /* Set cbootargs to env for later use by extlinux files */ -+ ret = env_set("cbootargs", bargs); -+ if (ret) -+ printf("Failed to set cbootargs from cboot DTB: %d\n", ret); -+ -+ free(s); -+ return ret; -+} - - int tegra_soc_board_init_late(void) - { -@@ -325,8 +391,12 @@ int tegra_soc_board_init_late(void) - * extlinux.conf or boot script content. - */ - set_fdt_addr(); -+#if defined(CONFIG_TEGRA186) - /* Ignore errors here; not all cases care about Ethernet addresses */ - set_ethaddr_from_nvtboot(); -+#endif -+ /* Save CBoot bootargs to env */ -+ set_cbootargs(); - - return 0; - } -diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_ll.S b/arch/arm/mach-tegra/nvtboot_ll.S -similarity index 100% -rename from arch/arm/mach-tegra/tegra186/nvtboot_ll.S -rename to arch/arm/mach-tegra/nvtboot_ll.S -diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_mem.c b/arch/arm/mach-tegra/nvtboot_mem.c -similarity index 100% -rename from arch/arm/mach-tegra/tegra186/nvtboot_mem.c -rename to arch/arm/mach-tegra/nvtboot_mem.c -diff --git a/arch/arm/mach-tegra/tegra186/Makefile b/arch/arm/mach-tegra/tegra186/Makefile -index 56f3378ece..1a43ef7a45 100644 ---- a/arch/arm/mach-tegra/tegra186/Makefile -+++ b/arch/arm/mach-tegra/tegra186/Makefile -@@ -4,6 +4,6 @@ - - obj-y += ../board186.o - obj-y += cache.o --obj-y += nvtboot_board.o --obj-y += nvtboot_ll.o --obj-y += nvtboot_mem.o -+obj-y += ../nvtboot_board.o -+obj-y += ../nvtboot_ll.o -+obj-y += ../nvtboot_mem.o -diff --git a/arch/arm/mach-tegra/tegra210/Makefile b/arch/arm/mach-tegra/tegra210/Makefile -index b6012fc7ba..6de6d810eb 100644 ---- a/arch/arm/mach-tegra/tegra210/Makefile -+++ b/arch/arm/mach-tegra/tegra210/Makefile -@@ -8,5 +8,8 @@ - obj-y += clock.o - obj-y += funcmux.o - obj-y += pinmux.o -+obj-y += ../nvtboot_board.o -+obj-y += ../nvtboot_ll.o -+obj-y += ../nvtboot_mem.o - obj-y += xusb-padctl.o - obj-y += ../xusb-padctl-common.o -diff --git a/arch/arm/mach-tegra/tegra210/clock.c b/arch/arm/mach-tegra/tegra210/clock.c -index 06068c4b7b..341c97f16d 100644 ---- a/arch/arm/mach-tegra/tegra210/clock.c -+++ b/arch/arm/mach-tegra/tegra210/clock.c -@@ -1235,25 +1235,6 @@ int tegra_plle_enable(void) - value &= ~PLLE_SS_CNTL_INTERP_RESET; - writel(value, NV_PA_CLK_RST_BASE + PLLE_SS_CNTL); - -- /* 7. Enable HW power sequencer for PLLE */ -- -- value = readl(NV_PA_CLK_RST_BASE + PLLE_MISC); -- value &= ~PLLE_MISC_IDDQ_SWCTL; -- writel(value, NV_PA_CLK_RST_BASE + PLLE_MISC); -- -- value = readl(NV_PA_CLK_RST_BASE + PLLE_AUX); -- value &= ~PLLE_AUX_SS_SWCTL; -- value &= ~PLLE_AUX_ENABLE_SWCTL; -- value |= PLLE_AUX_SS_SEQ_INCLUDE; -- value |= PLLE_AUX_USE_LOCKDET; -- writel(value, NV_PA_CLK_RST_BASE + PLLE_AUX); -- -- /* 8. Wait 1 us */ -- -- udelay(1); -- value |= PLLE_AUX_SEQ_ENABLE; -- writel(value, NV_PA_CLK_RST_BASE + PLLE_AUX); -- - return 0; - } - -diff --git a/arch/arm/mach-tegra/tegra210/xusb-padctl.c b/arch/arm/mach-tegra/tegra210/xusb-padctl.c -index ab6684f027..64dc297ae2 100644 ---- a/arch/arm/mach-tegra/tegra210/xusb-padctl.c -+++ b/arch/arm/mach-tegra/tegra210/xusb-padctl.c -@@ -170,6 +170,17 @@ static int phy_unprepare(struct tegra_xusb_phy *phy) - return tegra_xusb_padctl_disable(phy->padctl); - } - -+#define XUSB_PADCTL_USB3_PAD_MUX 0x28 -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE (1 << 0) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK0 (1 << 1) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK1 (1 << 2) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK2 (1 << 3) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK3 (1 << 4) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK4 (1 << 5) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK5 (1 << 6) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK6 (1 << 7) -+#define XUSB_PADCTL_USB3_PAD_MUX_FORCE_SATA_PAD_IDDQ_DISABLE_MASK0 (1 << 8) -+ - #define XUSB_PADCTL_UPHY_PLL_P0_CTL1 0x360 - #define XUSB_PADCTL_UPHY_PLL_P0_CTL1_FREQ_NDIV_MASK (0xff << 20) - #define XUSB_PADCTL_UPHY_PLL_P0_CTL1_FREQ_NDIV(x) (((x) & 0xff) << 20) -@@ -366,31 +377,6 @@ static int pcie_phy_enable(struct tegra_xusb_phy *phy) - value &= ~XUSB_PADCTL_UPHY_PLL_P0_CTL8_RCAL_CLK_EN; - padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL8); - -- value = readl(NV_PA_CLK_RST_BASE + CLK_RST_XUSBIO_PLL_CFG0); -- value &= ~CLK_RST_XUSBIO_PLL_CFG0_PADPLL_RESET_SWCTL; -- value &= ~CLK_RST_XUSBIO_PLL_CFG0_CLK_ENABLE_SWCTL; -- value |= CLK_RST_XUSBIO_PLL_CFG0_PADPLL_USE_LOCKDET; -- value |= CLK_RST_XUSBIO_PLL_CFG0_PADPLL_SLEEP_IDDQ; -- writel(value, NV_PA_CLK_RST_BASE + CLK_RST_XUSBIO_PLL_CFG0); -- -- value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); -- value &= ~XUSB_PADCTL_UPHY_PLL_P0_CTL1_PWR_OVRD; -- padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); -- -- value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL2); -- value &= ~XUSB_PADCTL_UPHY_PLL_P0_CTL2_CAL_OVRD; -- padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL2); -- -- value = padctl_readl(padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL8); -- value &= ~XUSB_PADCTL_UPHY_PLL_P0_CTL8_RCAL_OVRD; -- padctl_writel(padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL8); -- -- udelay(1); -- -- value = readl(NV_PA_CLK_RST_BASE + CLK_RST_XUSBIO_PLL_CFG0); -- value |= CLK_RST_XUSBIO_PLL_CFG0_SEQ_ENABLE; -- writel(value, NV_PA_CLK_RST_BASE + CLK_RST_XUSBIO_PLL_CFG0); -- - debug("< %s()\n", __func__); - return 0; - } -@@ -454,3 +440,35 @@ void tegra_xusb_padctl_init(void) - ret = tegra_xusb_process_nodes(nodes, count, &tegra210_socdata); - debug("%s: done, ret=%d\n", __func__, ret); - } -+ -+void tegra_xusb_padctl_exit(void) -+{ -+ u32 value; -+ -+ debug("> %s\n", __func__); -+ -+ value = padctl_readl(&padctl, XUSB_PADCTL_USB3_PAD_MUX); -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK0; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK1; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK2; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK3; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK4; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK5; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_PCIE_PAD_IDDQ_DISABLE_MASK6; -+ value &= ~XUSB_PADCTL_USB3_PAD_MUX_FORCE_SATA_PAD_IDDQ_DISABLE_MASK0; -+ padctl_writel(&padctl, value, XUSB_PADCTL_USB3_PAD_MUX); -+ -+ value = padctl_readl(&padctl, XUSB_PADCTL_UPHY_PLL_P0_CTL1); -+ value &= ~XUSB_PADCTL_UPHY_PLL_P0_CTL1_IDDQ; -+ value &= ~XUSB_PADCTL_UPHY_PLL_P0_CTL1_SLEEP_MASK; -+ value |= XUSB_PADCTL_UPHY_PLL_P0_CTL1_SLEEP(3); -+ value &= ~XUSB_PADCTL_UPHY_PLL_P0_CTL1_ENABLE; -+ padctl_writel(&padctl, value, XUSB_PADCTL_UPHY_PLL_P0_CTL1); -+ -+ reset_set_enable(PERIPH_ID_PEX_USB_UPHY, 1); -+ while (padctl.enable) -+ tegra_xusb_padctl_disable(&padctl); -+ -+ debug("< %s()\n", __func__); -+} -diff --git a/arch/arm/mach-tegra/xusb-padctl-dummy.c b/arch/arm/mach-tegra/xusb-padctl-dummy.c -index 3ec27a2e3a..f2d90302f6 100644 ---- a/arch/arm/mach-tegra/xusb-padctl-dummy.c -+++ b/arch/arm/mach-tegra/xusb-padctl-dummy.c -@@ -36,3 +36,7 @@ int __weak tegra_xusb_phy_unprepare(struct tegra_xusb_phy *phy) - void __weak tegra_xusb_padctl_init(void) - { - } -+ -+void __weak tegra_xusb_padctl_exit(void) -+{ -+} -diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig -index 02a7569205..d9b8be15e7 100644 ---- a/configs/p2371-0000_defconfig -+++ b/configs/p2371-0000_defconfig -@@ -1,6 +1,6 @@ - CONFIG_ARM=y - CONFIG_TEGRA=y --CONFIG_SYS_TEXT_BASE=0x80110000 -+CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_TEGRA210=y - CONFIG_TARGET_P2371_0000=y - CONFIG_NR_DRAM_BANKS=2 -diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig -index 156a1cbcf9..602c5c1fad 100644 ---- a/configs/p2371-2180_defconfig -+++ b/configs/p2371-2180_defconfig -@@ -1,6 +1,6 @@ - CONFIG_ARM=y - CONFIG_TEGRA=y --CONFIG_SYS_TEXT_BASE=0x80110000 -+CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_TEGRA210=y - CONFIG_TARGET_P2371_2180=y - CONFIG_NR_DRAM_BANKS=2 -diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig -index 5cbb1c3201..29929e2d99 100644 ---- a/configs/p2571_defconfig -+++ b/configs/p2571_defconfig -@@ -1,6 +1,6 @@ - CONFIG_ARM=y - CONFIG_TEGRA=y --CONFIG_SYS_TEXT_BASE=0x80110000 -+CONFIG_SYS_TEXT_BASE=0x80080000 - CONFIG_TEGRA210=y - CONFIG_TARGET_P2571=y - CONFIG_NR_DRAM_BANKS=2 --- -2.19.0.rc0 - diff --git a/tegra186-jetson-tx2-disable-onboard-emmc.patch b/tegra186-jetson-tx2-disable-onboard-emmc.patch deleted file mode 100644 index d31a6df..0000000 --- a/tegra186-jetson-tx2-disable-onboard-emmc.patch +++ /dev/null @@ -1,52 +0,0 @@ -From dbe4dff86520a1373076563d1bee5ada1d7fd7c5 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Thu, 26 Apr 2018 16:56:54 +0100 -Subject: [PATCH] tegra186: jetson-tx2: disable onboard emmc - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/tegra186-p2771-0000.dtsi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/dts/tegra186-p2771-0000.dtsi b/arch/arm/dts/tegra186-p2771-0000.dtsi -index a1319dc493..e220f086ee 100644 ---- a/arch/arm/dts/tegra186-p2771-0000.dtsi -+++ b/arch/arm/dts/tegra186-p2771-0000.dtsi -@@ -53,7 +53,7 @@ - }; - - sdhci@3460000 { -- status = "okay"; -+ status = "disabled"; - bus-width = <8>; - non-removable; - }; --- -2.17.0 - -From 7bba3cc32c8b8b5d3688c42a803768761df0a23f Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 1 Aug 2018 11:47:56 +0100 -Subject: [PATCH] tegra210: Jetson TX1: disable onboard emmc - -Signed-off-by: Peter Robinson ---- - arch/arm/dts/tegra210-p2371-2180.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/dts/tegra210-p2371-2180.dts b/arch/arm/dts/tegra210-p2371-2180.dts -index da4349bd039..87ce030e701 100644 ---- a/arch/arm/dts/tegra210-p2371-2180.dts -+++ b/arch/arm/dts/tegra210-p2371-2180.dts -@@ -80,7 +80,7 @@ - }; - - sdhci@700b0600 { -- status = "okay"; -+ status = "disabled"; - bus-width = <8>; - non-removable; - }; --- -2.17.1 - diff --git a/uboot-tools.spec b/uboot-tools.spec index 2ec81a8..056cc94 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -1,441 +1,573 @@ -#global candidate rc3 +%global candidate rc3 +%if 0%{?rhel} +%bcond_with toolsonly +%else +%bcond_without toolsonly +%endif -Name: uboot-tools -Version: 2018.09 -Release: 1%{?candidate:.%{candidate}}%{?dist} -Summary: U-Boot utilities -License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ -URL: http://www.denx.de/wiki/U-Boot +# Set it to "opensbi" (stable) or "opensbi-unstable" (unstable, git) +%global opensbi opensbi -Source0: ftp://ftp.denx.de/pub/u-boot/u-boot-%{version}%{?candidate:-%{candidate}}.tar.bz2 -Source1: arm-boards -Source2: arm-chromebooks -Source3: aarch64-boards -Source4: aarch64-chromebooks -Source5: 10-devicetree.install +Name: uboot-tools +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: https://u-boot-project.org/ +ExcludeArch: s390x +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 -# Fedoraisms patches -Patch1: uefi-use-Fedora-specific-path-name.patch +# Fedora patches to enable/disable features +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 -# general fixes -Patch2: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch -Patch3: usb-kbd-fixes.patch - -# Board fixes and enablement -Patch10: rpi-Enable-using-the-DT-provided-by-the-Raspberry-Pi.patch -Patch11: rockchip-make_fit_atf-fix-warning-unit_address_vs_reg.patch -Patch12: rockchip-make_fit_atf-use-elf-entry-point.patch -Patch13: rk3399-Rock960-Ficus-board-support.patch -Patch14: dragonboard-fixes.patch -Patch15: tegra186-jetson-tx2-disable-onboard-emmc.patch -Patch16: tegra-efi_loader-simplify-ifdefs.patch -Patch17: tegra-TXx-Add-CONFIG_EFI_LOADER_BOUNCE_BUFFER.patch -Patch18: tegra-fix-tx1.patch -Patch19: sunxi-DT-A64-add-Pine64-LTS-support.patch - -# Upstream UEFI fixes -Patch20: uefi-fixes.patch +# Device improvments +# USB-PD improvements +Patch10: USB-PD-TCPM-improvements.patch +# Rockchips improvements +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: 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 BuildRequires: dtc -BuildRequires: make -# Added for .el7 rebuild, so newer gcc is used -%if 0%{?rhel} == 7 -BuildRequires: devtoolset-7-build -BuildRequires: devtoolset-7-binutils -BuildRequires: devtoolset-7-gcc -%else +BuildRequires: flex BuildRequires: gcc -%endif -BuildRequires: flex bison -BuildRequires: git-core -BuildRequires: openssl-devel -%if 0%{?fedora} -BuildRequires: python-unversioned-command -%endif -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-libfdt -%if 0%{?rhel} == 7 -BuildRequires: python-pyelftools +BuildRequires: gnutls-devel +BuildRequires: libuuid-devel +BuildRequires: make +BuildRequires: ncurses-devel +%if 0%{?fedora} > 44 +BuildRequires: openssl3-devel +BuildRequires: openssl3-devel-engine %else -BuildRequires: python2-pyelftools +BuildRequires: openssl-devel +BuildRequires: openssl-devel-engine %endif -BuildRequires: SDL-devel +BuildRequires: perl-interpreter +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-libfdt +BuildRequires: SDL2-devel BuildRequires: swig -%ifarch %{arm} aarch64 -BuildRequires: vboot-utils -%endif +%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 -Requires: systemd %description This package contains a few U-Boot utilities - mkimage for creating boot images and fw_printenv/fw_setenv for manipulating the boot environment variables. +%if %{with toolsonly} %ifarch aarch64 %package -n uboot-images-armv8 -Summary: u-boot bootloader images for aarch64 boards -Requires: uboot-tools +Summary: U-Boot firmware images for aarch64 boards BuildArch: noarch %description -n uboot-images-armv8 -u-boot bootloader binaries for aarch64 boards +U-Boot firmware binaries for aarch64 boards %endif -%ifarch %{arm} -%package -n uboot-images-armv7 -Summary: u-boot bootloader images for armv7 boards -Requires: uboot-tools +%ifarch riscv64 +%package -n uboot-images-riscv64 +Summary: U-Boot firmware images for riscv64 boards BuildArch: noarch -%description -n uboot-images-armv7 -u-boot bootloader binaries for armv7 boards +%description -n uboot-images-riscv64 +U-Boot firmware binaries for riscv64 boards %endif -%ifarch %{arm} aarch64 -%package -n uboot-images-elf -Summary: u-boot bootloader images for armv7 boards -Requires: uboot-tools -Obsoletes: uboot-images-qemu -Provides: uboot-images-qemu +%ifarch x86_64 +%package -n uboot-images-x86_64 +Summary: U-Boot firmware images for x86_64 boards +BuildArch: noarch -%description -n uboot-images-elf -u-boot bootloader ELF binaries for use with qemu and other platforms +%description -n uboot-images-x86_64 +U-Boot firmware binaries for x86_64 boards +%endif %endif %prep -%setup -q -n u-boot-%{version}%{?candidate:-%{candidate}} +%autosetup -p1 -n u-boot-v%{version}%{?candidate:-%{candidate}} -git init -git config --global gc.auto 0 -git config user.email "noone@example.com" -git config user.name "no one" -git add . -git commit -a -q -m "%{version} baseline" -git am %{patches} -- Added conditional to enable devtoolset-7-gcc for .el7 build (Arrfab) -- Added conditional BR, python2-pyelftools is python-pyelftools in .el7 (Arrfab) +* Thu Aug 27 2026 Peter Robinson - 1:2026.10-0.3.rc3 +- Update to 2026.10 RC3 -* Sun Sep 23 2018 Peter Robinson -- Update Rock960 patches, enable Rock960 Enterprise Edition (ficus) +* Wed Aug 12 2026 Peter Robinson - 1:2026.10-0.2.rc2 +- Update to 2026.10 RC2 -* Mon Sep 10 2018 Peter Robinson 2018.09-1 -- 2018.09 +* Thu Jul 30 2026 Peter Robinson - 1:2026.10-0.1.rc1 +- Update to 2026.10 RC1 +- Update source URL -* Tue Sep 4 2018 Peter Robinson 2018.09-0.4.rc3 -- 2018.09 RC3 -- Enable nanopi_neo_plus2, pine_h64, rock960-rk3399, a64-olinuxino -- Build against new upstream AllWinner ATF support -- Use firmware provided DT on Raspberry Pi -- Support for Pine64-LTS +* Fri Jul 17 2026 Fedora Release Engineering - 1:2026.07-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild -* Tue Aug 14 2018 Peter Robinson 2018.09-0.2.rc2 -- 2018.09 RC2 -- Improve Jetson TX1 support -- Enable OrangePi 1+ and Avnet Ultra96 +* Tue Jul 07 2026 Peter Robinson - 1:2026.07-1 +- Update to 2026.07 GA -* Tue Jul 31 2018 Peter Robinson 2018.09-0.1.rc1 -- 2018.09 RC1 +* Tue Jun 23 2026 Peter Robinson - 1:2026.07-0.4.rc5 +- Update to 2026.07 RC5 -* Sat Jul 14 2018 Fedora Release Engineering - 2018.07-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild +* Mon Jun 08 2026 Peter Robinson - 1:2026.07-0.3.rc4 +- Update to 2026.07 RC4 -* Mon Jul 9 2018 Peter Robinson 2018.07-1 -- 2018.07 +* Fri May 29 2026 Peter Robinson - 1:2026.07-0.2.rc3 +- Update to 2026.07 RC3 +- Update U-Boot Project URL +- Update RPi PCIe patches +- Various RPi fixes -* Tue Jul 3 2018 Peter Robinson 2018.07-0.4.rc3 -- 2018.07 RC3 +* Fri May 01 2026 Peter Robinson - 1:2026.07-0.1.rc1 +- Update to 2026.07 RC1 -* Wed Jun 20 2018 Peter Robinson 2018.07-0.3.rc2 -- 2018.07 RC2 -- Enable Helios4 +* Sat Apr 11 2026 Peter Robinson - 1:2026.04-2 +- Fix PCIe/USB on Raspberry Pi 4 (rhbz#2448365) +- Fix detection of some revisions of RPi5 -* Fri Jun 8 2018 Peter Robinson 2018.07-0.2.rc1 -- Update sunxi MMC patch series, Tegra Nyan patch, SolidRun i.MX6 SoM rev 1.5 patch +* Tue Apr 07 2026 Peter Robinson - 1:2026.04-1 +- Update to 2026.04 GA -* Tue Jun 5 2018 Peter Robinson 2018.07-0.1.rc1 -- 2018.07 RC1 -- Enable Turris Mox, BananaPi m2 Berry, some Libretech boards +* Sun Mar 29 2026 Peter Robinson - 1:2026.04-0.9.rc5 +- Enable NVME booting on RPi5 -* Mon May 7 2018 Peter Robinson 2018.05-1 -- 2018.05 GA +* Tue Mar 24 2026 Peter Robinson - 1:2026.04-0.8.rc5 +- Update to 2026.04 RC5 -* Wed May 2 2018 Peter Robinson 2018.05-0.5.rc3 -- Build Xilnix ZynqMP zcu100 (96boards Ultra96) +* Sat Mar 14 2026 Peter Robinson - 1:2026.04-0.7.rc4 +- Raspberry Pi fixes -* Tue May 1 2018 Peter Robinson 2018.05-0.4.rc3 -- 2018.05 RC3 +* Tue Mar 10 2026 Peter Robinson - 1:2026.04-0.6.rc4 +- Update to 2026.04 RC4 -* Thu Apr 26 2018 Peter Robinson 2018.05-0.3.rc2 -- uEFI improvements -- Fixes for Rockchips rk33xx 64 bit devices -- Build AllWinner 64 bit devices against new ATF +* Fri Feb 27 2026 Peter Robinson - 1:2026.04-0.5.rc3 +- Update to 2026.04 RC3 -* Tue Apr 17 2018 Peter Robinson 2018.05-0.2.rc2 -- 2018.05 RC2 -- Enable Raspberry Pi option to use firmware DT +* Tue Feb 17 2026 Peter Robinson - 1:2026.04-0.4.rc2 +- Add initial bcm2712d0 identification -* Sun Apr 8 2018 Peter Robinson 2018.05-0.1.rc1 -- 2018.05 RC1 +* Mon Feb 09 2026 Peter Robinson - 1:2026.04-0.3.rc2 +- Update to 2026.04 RC2 -* Fri Apr 6 2018 Peter Robinson 2018.03-4 -- Improvements for Raspberry Pi, AllWinner MMC perf, mvebu devices +* Tue Jan 27 2026 Peter Robinson - 1:2026.04-0.2.rc1 +- Update to 2026.04 RC1 -* Tue Mar 20 2018 Peter Robinson 2018.03-3 -- Fix issue with certain MMC cards on Raspberry Pi +* Mon Jan 19 2026 Javier Martinez Canillas - 1:2026.01-3 +- Add a uboot-images-x86_64 subpackage -* Fri Mar 16 2018 Peter Robinson 2018.03-2 -- Add support for Raspberry Pi 3+ +* Sat Jan 17 2026 Fedora Release Engineering - 1:2026.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild -* Tue Mar 13 2018 Peter Robinson 2018.03-1 -- 2018.03 GA +* Tue Jan 06 2026 Peter Robinson - 1:2026.01-1 +- Update to 2026.01 GA -* Fri Mar 9 2018 Peter Robinson 2018.03-0.11.rc4 -- Enable support for Jetson TX2 +* Mon Dec 29 2025 Peter Robinson - 1:2026.01-0.4.rc5 +- Update to 2026.01 RC5 -* Thu Mar 8 2018 Peter Robinson 2018.03-0.10.rc4 -- Fix for Raspberry Pi 2 boot +* Mon Dec 08 2025 Peter Robinson - 1:2026.01-0.3.rc4 +- Update to 2026.01 RC4 -* Wed Mar 7 2018 Peter Robinson 2018.03-0.9.rc4 -- 2018.03 RC4 -- Fixes for Raspberry Pi 3 boot -- Minor kernel install fixes -- Enable am335x_evm_usbspl for Beagle Pocket -- DragonBoard patch rebase +* Fri Nov 28 2025 Peter Robinson - 1:2026.01-0.2.rc3 +- Updates for RPi -* Sun Mar 4 2018 Peter Robinson 2018.03-0.8.rc3 -- Add support for SoM rev 1.5 to mx6cuboxi -- Rebuild for new ATF 1.5 rc0 release +* Mon Nov 24 2025 Peter Robinson - 1:2026.01-0.1.rc3 +- Update to 2026.01 RC3 -* Sun Feb 25 2018 Peter Robinson 2018.03-0.7.rc3 -- Build 64 bit Rockchips FIT images with ARM Trusted Firmware +* Thu Oct 16 2025 Peter Robinson - 1:2025.10-2 +- Drop residual Rockchip firmware (saves ~150Mb) -* Tue Feb 20 2018 Peter Robinson 2018.03-0.6.rc3 -- 2018.03 RC3 +* Mon Oct 13 2025 Peter Robinson - 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 Feb 16 2018 Peter Robinson 2018.03-0.5.rc2 -- A few upstream fixes +* Fri Sep 26 2025 Peter Robinson - 1:2025.10-0.7.rc5 +- Update to 2025.10 RC5 -* Thu Feb 15 2018 Peter Robinson 2018.03-0.4.rc2 -- Fix for GBps network on some AllWinner devices +* Mon Sep 08 2025 Peter Robinson - 1:2025.10-0.6.rc4 +- Update to 2025.10 RC4 -* Tue Feb 13 2018 Peter Robinson 2018.03-0.3.rc2 -- 2018.03 RC2 +* Sun Sep 07 2025 Peter Robinson - 1:2025.10-0.5.rc3 +- Boot fixes for some Raspberry Pi variants -* Wed Feb 7 2018 Peter Robinson 2018.03-0.2.rc1 -- Update uEFI patches +* Wed Aug 27 2025 Peter Robinson - 1:2025.10-0.4.rc3 +- Fix booting on some Allwinner devices -* Tue Jan 30 2018 Peter Robinson 2018.03-0.1.rc1 -- 2018.03 RC1 +* Mon Aug 25 2025 Peter Robinson - 1:2025.10-0.3.rc3 +- Update to 2025.10 RC3 -* Tue Jan 9 2018 Peter Robinson 2018.01-1 -- 2018.01 +* Tue Aug 19 2025 Peter Robinson - 1:2025.10-0.2.rc2 +- Fix and re-enable Jetson Nano + +* Mon Aug 18 2025 Peter Robinson - 1:2025.10-0.1.rc2 +- Update to 2025.10 RC2 + +* Fri Jul 25 2025 Fedora Release Engineering - 1:2025.07-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jul 10 2025 Peter Robinson - 1:2025.07-2 +- Update patch for rebase issue + +* Wed Jul 09 2025 Peter Robinson - 1:2025.07-1 +- Update to 2025.07 GA + +* Fri Jun 27 2025 Peter Robinson - 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 - 1:2025.07-0.4.rc4 +- Add EFI_PARTITION_INFO_PROTOCOL support + +* Sun Jun 15 2025 Peter Robinson - 1:2025.07-0.3.rc4 +- Update to 2025.07 RC4 + +* Tue May 13 2025 Peter Robinson - 1:2025.07-0.2.rc2 +- Update to 2025.07 RC2 + +* Thu May 01 2025 Peter Robinson - 1:2025.07-0.1.rc1 +- Update to 2025.07 RC1 + +* Sun Apr 20 2025 Peter Robinson - 1:2025.04-2 +- Fix for RPi5 serial console + +* Tue Apr 08 2025 Peter Robinson - 1:2025.04-1 +- Update to 2025.04 GA + +* Tue Mar 25 2025 Peter Robinson - 1:2025.04-0.7.rc5 +- Update to 2025.04 RC5 + +* Wed Mar 12 2025 Peter Robinson - 1:2025.04-0.6.rc4 +- Update to 2025.04 RC4 + +* Wed Feb 26 2025 Peter Robinson - 1:2025.04-0.5.rc3 +- Update to 2025.04 RC3 + +* Tue Feb 18 2025 David Abdurachmanov - 1:2025.04-0.4.rc2 +- Add support for riscv64 + +* Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.3.rc2 +- Update to 2025.05 RC2 + +* Tue Feb 11 2025 Peter Robinson - 1:2025.04-0.2.rc1 +- Update to 2025.05 RC1 + +* Tue Jan 28 2025 Peter Robinson - 1:2025.01-3 +- Add new fdt_add_pubkey tool + +* Sun Jan 19 2025 Fedora Release Engineering - 1:2025.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Tue Jan 07 2025 Peter Robinson - 1:2025.01-1 +- Update to 2025.01 GA + +* Mon Jan 06 2025 Peter Robinson - 1:2025.01-0.2.rc6 +- Rebuild for TF-A 2.12 + +* Tue Dec 31 2024 Peter Robinson - 1:2025.01-0.1.rc6 +- Update to 2025.01 RC6 + +* Fri Oct 11 2024 Peter Robinson - 1:2024.10-1 +- Update to 2024.10 GA +- Fix passing RPi firmware CMA setting to kernel DT +- Update Geekbox + +* Thu Oct 03 2024 Peter Robinson - 1:2024.10-0.8.rc6 +- Pass CMA FW setting through to kernel DT for Raspberry Pi + +* Tue Oct 01 2024 Peter Robinson - 1:2024.10-0.7.rc6 +- Update to 2024.10 RC6 + +* Mon Sep 16 2024 Peter Robinson - 1:2024.10-0.6.rc5 +- Update to 2024.10 RC5 + +* Fri Sep 6 2024 Peter Robinson - 1:2024.10-0.5.rc4 +- Add missing licenses directory + +* Tue Sep 03 2024 Peter Robinson - 1:2024.10-0.4.rc4 +- Update to 2024.10 RC4 + +* Mon Sep 02 2024 Peter Robinson - 1:2024.10-0.3.rc3 +- Fix Allwinner firmware chainloading (rhbz#2309138) +- Fix ATF firmware selection on a number of devices +- Support Allwinner SCP firmware (fixes suspend/resume) + +* Tue Aug 27 2024 Peter Robinson - 1:2024.10-0.2.rc3 +- Update to 2024.10 RC3 +- Enable initial QCM6490 SoC support + +* Thu Aug 15 2024 Peter Robinson - 1:2024.10-0.1.rc2 +- Update to 2024.10 RC2 + +* Tue Jul 23 2024 Peter Robinson - 1:2024.07-1 +- Update to 2024.07 + +* Sat Jul 20 2024 Fedora Release Engineering - 1:2024.07-0.3.rc4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Tue Jun 18 2024 Peter Robinson - 1:2024.07-0.2.rc4 +- Update to 2024.07 RC4 + +* Sat May 25 2024 Peter Robinson - 1:2024.07-0.1.rc3 +- Update to 2024.07 RC3 + +* Wed Apr 03 2024 Peter Robinson - 1:2024.04-1 +- Update to 2024.04 GA +- Rockchip rk3328 USB fixes + +* Wed Mar 27 2024 Peter Robinson - 1:2024.04-0.8.rc5 +- Update to 2024.04 RC5 + +* Thu Mar 21 2024 Peter Robinson - 1:2024.04-0.7.rc4 +- Updated patch for DTB loading + +* Fri Mar 15 2024 Peter Robinson - 1:2024.04-0.6.rc4 +- Updated fix for FDT load + +* Wed Mar 13 2024 Peter Robinson - 1:2024.04-0.5.rc4 +- Fixes for Rockchip rk3399 autoboot + +* Tue Mar 12 2024 Peter Robinson - 1:2024.04-0.4.rc4 +- Update to 2024.04 RC4 +- Initial fix for loading DT off /boot (rhbz 2247873) + +* Thu Feb 29 2024 Peter Robinson - 1:2024.04-0.3.rc3 +- Update to 2024.04 RC3 +- Enable a number of new upstream devices +- Upstream now builds Rockchip SPI artifacts +- Various cleanups +- Fix ESP partition detection to enable EFI vars + +* Wed Feb 14 2024 Peter Robinson - 1:2024.04-0.2.rc2 +- Update to 2024.04 RC2 + +* Sat Jan 27 2024 Fedora Release Engineering - 1:2024.01-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 08 2024 Peter Robinson - 1:2024.01-1 +- Update to 2024.01 diff --git a/uefi-Add-all-options-for-EFI-System-Partitions.patch b/uefi-Add-all-options-for-EFI-System-Partitions.patch new file mode 100644 index 0000000..3bf1ec8 --- /dev/null +++ b/uefi-Add-all-options-for-EFI-System-Partitions.patch @@ -0,0 +1,57 @@ +From 86782e882e9542f5f402e00cd87efb36ad0552d3 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sat, 2 Mar 2024 11:17:42 +0000 +Subject: [PATCH v4] disk: dos: Add all options for EFI System Partitions + +The EFI spec states that the ESP can be any of FAT12/16/32 but for +compatibility doesn't necssarily require the partition to be the +EFI partition table ID of 0xef. A number of arm devices will not +find their firmware on a FAT partition with an ID of 0xef so also +allow the original FAT12/16/32 partition IDs as they are also +permissable for an ESP. + +Signed-off-by: Peter Robinson +--- + +v2: +- Add 0x0c option +- Make hex constants consistent +- Move from if to switch statement +v3: +- Fix switch brain fart +v4: +- Drop boot_ind out of switch + + disk/part_dos.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/disk/part_dos.c b/disk/part_dos.c +index 567ead7511d..a35181dff4f 100644 +--- a/disk/part_dos.c ++++ b/disk/part_dos.c +@@ -40,10 +40,21 @@ static int get_bootable(dos_partition_t *p) + { + int ret = 0; + +- if (p->sys_ind == 0xef) ++ switch (p->sys_ind) { ++ case 0x01: ++ case 0x06: ++ case 0x0b: ++ case 0x0c: ++ case 0xef: + ret |= PART_EFI_SYSTEM_PARTITION; ++ break; ++ default: ++ break; ++ } ++ + if (p->boot_ind == 0x80) + ret |= PART_BOOTABLE; ++ + return ret; + } + +-- +2.44.0 + diff --git a/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch b/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch index a2340fd..5954848 100644 --- a/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch +++ b/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch @@ -1,6 +1,6 @@ -From 8bc6f62541436ebaf87133792726d9b48f878d09 Mon Sep 17 00:00:00 2001 +From 4306c538d4a00dd1aa46c55c3c4005c2b0bf7cd5 Mon Sep 17 00:00:00 2001 From: Peter Robinson -Date: Tue, 5 Dec 2017 00:11:08 +0000 +Date: Thu, 24 Nov 2022 12:57:55 +0000 Subject: [PATCH] distro: load FDT from any partition on boot device In the EFI_LOADER boot path, we were only checking the FAT partition @@ -22,14 +22,14 @@ knows) and SoC/board specific ${fdtfile} (which grub does not know). Signed-off-by: Rob Clark Signed-off-by: Peter Robinson --- - include/config_distro_bootcmd.h | 34 +++++++++++++++++++++++----------- - 1 file changed, 23 insertions(+), 11 deletions(-) + include/config_distro_bootcmd.h | 37 +++++++++++++++++++++------------ + 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h -index 7746366ec8..c87f7c2a42 100644 +index fcb319a20ae..e71004fad9c 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h -@@ -135,25 +135,37 @@ +@@ -155,28 +155,39 @@ "fi\0" \ \ "load_efi_dtb=" \ @@ -44,13 +44,16 @@ index 7746366ec8..c87f7c2a42 100644 + "scan_dev_for_dtb=" \ "setenv efi_fdtfile ${fdtfile}; " \ BOOTENV_EFI_SET_FDTFILE_FALLBACK \ + BOOTENV_RUN_EXTENSION_INIT \ - "for prefix in ${efi_dtb_prefixes}; do " \ - "if test -e ${devtype} " \ - "${devnum}:${distro_bootpart} " \ - "${prefix}${efi_fdtfile}; then " \ - "run load_efi_dtb; " \ +- BOOTENV_RUN_EXTENSION_APPLY \ - "fi;" \ - "done;" \ +- "run boot_efi_bootmgr;" \ + "part list ${devtype} ${devnum} dtb_devplist; " \ + "env exists dtb_devplist || setenv dtb_devplist " \ + "${distro_bootpart}; " \ @@ -64,20 +67,21 @@ index 7746366ec8..c87f7c2a42 100644 + "${devnum}:${dtb_devp} " \ + "${prefix}${efi_fdtfile};"\ + "run load_efi_dtb; " \ ++ BOOTENV_RUN_EXTENSION_APPLY \ + "fi;" \ + "done; " \ + "done; " \ + "run boot_efi_binary\0" \ + "scan_dev_for_efi=" \ "if test -e ${devtype} ${devnum}:${distro_bootpart} " \ - "efi/fedora/"BOOTEFI_NAME"; then " \ + "efi/boot/"BOOTEFI_NAME"; then " \ "echo Found EFI removable media binary " \ - "efi/fedora/"BOOTEFI_NAME"; " \ + "efi/boot/"BOOTEFI_NAME"; " \ - "run boot_efi_binary; " \ + "run scan_dev_for_dtb; " \ "echo EFI LOAD FAILED: continuing...; " \ "fi; " \ "setenv efi_fdtfile\0" -- -2.14.3 +2.38.1 diff --git a/uefi-enable-SetVariableRT-with-volotile-storage.patch b/uefi-enable-SetVariableRT-with-volotile-storage.patch new file mode 100644 index 0000000..ee9bcf4 --- /dev/null +++ b/uefi-enable-SetVariableRT-with-volotile-storage.patch @@ -0,0 +1,33 @@ +From fd736dd720b29fa69a4bb87492f3f94dc6076996 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Tue, 25 Mar 2025 17:13:44 +0000 +Subject: [PATCH] efi: enable SetVariableRT with volotile storage + +Signed-off-by: Peter Robinson +--- + 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 + diff --git a/uefi-enable-https-boot-by-default.patch b/uefi-enable-https-boot-by-default.patch new file mode 100644 index 0000000..dc0a683 --- /dev/null +++ b/uefi-enable-https-boot-by-default.patch @@ -0,0 +1,82 @@ +From 7eabab2fda12b7a4417e5c7f29a507dfa9e7fffd Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Sun, 3 May 2026 09:24:34 +0100 +Subject: [PATCH] enable https boot by default + +Signed-off-by: Peter Robinson +--- + 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 + diff --git a/uefi-fixes.patch b/uefi-fixes.patch deleted file mode 100644 index 8b53dc6..0000000 --- a/uefi-fixes.patch +++ /dev/null @@ -1,1017 +0,0 @@ -From 6aef5da1b5b6a649e64b00e3209a580359db9179 Mon Sep 17 00:00:00 2001 -From: Alexander Graf -Date: Mon, 17 Sep 2018 13:54:33 +0200 -Subject: [PATCH 1/5] efi_loader: Align runtime section to 64kb - -The UEFI spec mandates that runtime sections are 64kb aligned to enable -support for 64kb page size OSs. - -This patch ensures that we extend the runtime section to 64kb to be spec -compliant. - -Signed-off-by: Alexander Graf ---- - lib/efi_loader/efi_memory.c | 20 +++++++++++++++++--- - 1 file changed, 17 insertions(+), 3 deletions(-) - -diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c -index e2b40aa85b5..50c3515f5e6 100644 ---- a/lib/efi_loader/efi_memory.c -+++ b/lib/efi_loader/efi_memory.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - - DECLARE_GLOBAL_DATA_PTR; - -@@ -519,6 +520,7 @@ __weak void efi_add_known_memory(void) - static void add_u_boot_and_runtime(void) - { - unsigned long runtime_start, runtime_end, runtime_pages; -+ unsigned long runtime_mask = EFI_PAGE_MASK; - unsigned long uboot_start, uboot_pages; - unsigned long uboot_stack_size = 16 * 1024 * 1024; - -@@ -527,10 +529,22 @@ static void add_u_boot_and_runtime(void) - uboot_pages = (gd->ram_top - uboot_start) >> EFI_PAGE_SHIFT; - efi_add_memory_map(uboot_start, uboot_pages, EFI_LOADER_DATA, false); - -- /* Add Runtime Services */ -- runtime_start = (ulong)&__efi_runtime_start & ~EFI_PAGE_MASK; -+#if defined(__aarch64__) -+ /* -+ * Runtime Services must be 64KiB aligned according to the -+ * "AArch64 Platforms" section in the UEFI spec (2.7+). -+ */ -+ -+ runtime_mask = SZ_64K - 1; -+#endif -+ -+ /* -+ * Add Runtime Services. We mark surrounding boottime code as runtime as -+ * well to fulfill the runtime alignment constraints but avoid padding. -+ */ -+ runtime_start = (ulong)&__efi_runtime_start & ~runtime_mask; - runtime_end = (ulong)&__efi_runtime_stop; -- runtime_end = (runtime_end + EFI_PAGE_MASK) & ~EFI_PAGE_MASK; -+ runtime_end = (runtime_end + runtime_mask) & ~runtime_mask; - runtime_pages = (runtime_end - runtime_start) >> EFI_PAGE_SHIFT; - efi_add_memory_map(runtime_start, runtime_pages, - EFI_RUNTIME_SERVICES_CODE, false); --- -2.19.0 - -From af3ef8121fbfff175e963e03b3eedf13df5ce548 Mon Sep 17 00:00:00 2001 -From: Alexander Graf -Date: Mon, 17 Sep 2018 04:35:10 +0200 -Subject: [PATCH 2/5] efi_loader: Merge memory map entries - -We currently do not combine memory entries that are adjacent and have -the same attributes. The problem with that is that our memory map can -easily grow multiple hundreds of entries in a simple UEFI Shell -environment. - -So let's make sure we always combine all entries to make the memory -map as small as possible. That way every other piece of code that -loops through it should also gain some nice speed ups. - -Signed-off-by: Alexander Graf ---- - lib/efi_loader/efi_memory.c | 45 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 45 insertions(+) - -diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c -index 50c3515f5e6..3fe014d9e72 100644 ---- a/lib/efi_loader/efi_memory.c -+++ b/lib/efi_loader/efi_memory.c -@@ -67,9 +67,54 @@ static int efi_mem_cmp(void *priv, struct list_head *a, struct list_head *b) - return -1; - } - -+static uint64_t desc_get_end(struct efi_mem_desc *desc) -+{ -+ return desc->physical_start + (desc->num_pages << EFI_PAGE_SHIFT); -+} -+ - static void efi_mem_sort(void) - { -+ struct list_head *lhandle; -+ struct efi_mem_list *prevmem = NULL; -+ bool merge_again = true; -+ - list_sort(NULL, &efi_mem, efi_mem_cmp); -+ -+ /* Now merge entries that can be merged */ -+ while (merge_again) { -+ merge_again = false; -+ list_for_each(lhandle, &efi_mem) { -+ struct efi_mem_list *lmem; -+ struct efi_mem_desc *prev = &prevmem->desc; -+ struct efi_mem_desc *cur; -+ uint64_t pages; -+ -+ lmem = list_entry(lhandle, struct efi_mem_list, link); -+ if (!prevmem) { -+ prevmem = lmem; -+ continue; -+ } -+ -+ cur = &lmem->desc; -+ -+ if ((desc_get_end(cur) == prev->physical_start) && -+ (prev->type == cur->type) && -+ (prev->attribute == cur->attribute)) { -+ /* There is an existing map before, reuse it */ -+ pages = cur->num_pages; -+ prev->num_pages += pages; -+ prev->physical_start -= pages << EFI_PAGE_SHIFT; -+ prev->virtual_start -= pages << EFI_PAGE_SHIFT; -+ list_del(&lmem->link); -+ free(lmem); -+ -+ merge_again = true; -+ break; -+ } -+ -+ prevmem = lmem; -+ } -+ } - } - - /** efi_mem_carve_out - unmap memory region --- -2.19.0 - -From 2b72b771cc760ca85f47a561c4055817e8bc8f25 Mon Sep 17 00:00:00 2001 -From: Alexander Graf -Date: Sun, 23 Sep 2018 16:26:58 +0200 -Subject: [PATCH 3/5] efi_loader: Fix loaded_image handle passing from EL3 - -When running in EL3 mode on AArch64, we have to first drop to EL2 -to execute a UEFI payload. When dropping down, the arguments to -the entry point have to stay identical to the ones for normal entry -though. - -In commit ea54ad59286 ("efi_loader: pass handle of loaded image") -we incorrectly changed that logic and had the el3 entry path diverge. -Fix it up by syncing it back to what it's supposed to be. - -Fixes: ea54ad59286 ("efi_loader: pass handle of loaded image") -Signed-off-by: Alexander Graf ---- - cmd/bootefi.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmd/bootefi.c b/cmd/bootefi.c -index b60c151fb4a..f2939da3e1a 100644 ---- a/cmd/bootefi.c -+++ b/cmd/bootefi.c -@@ -373,7 +373,7 @@ static efi_status_t do_bootefi_exec(void *efi, - - /* Move into EL2 and keep running there */ - armv8_switch_to_el2((ulong)entry, -- (ulong)&loaded_image_info_obj.handle, -+ (ulong)loaded_image_info_obj.handle, - (ulong)&systab, 0, (ulong)efi_run_in_el2, - ES_TO_AARCH64); - --- -2.19.0 - -From fdbf589100f6b1f9e4e12a53a0d370d88de5f7e3 Mon Sep 17 00:00:00 2001 -From: Stephen Warren -Date: Tue, 31 Jul 2018 13:44:12 -0600 -Subject: [PATCH 4/5] efi_loader: don't allocate unusable RAM - -Some boards define a maximum usable RAM top that's more restrictive than -the ranges defined by U-Boot's memory bank definitions[1]. In this case, -the unusable RAM isn't mapped in the page tables, and so the EFI code must -not attempt to allocate RAM from outside the usable regions. Fix -efi_find_free_memory() to detect when max_addr is unconstrained or out of -range, and substitue a valid value. - -[1] For example, when some peripherals can't access RAM above 4GiB, it's -simplest to force U-Boot's ram_top to a smaller value to avoid dealing -with this issue more explicitly. However, the RAM bank definitions still -describe the unusable RAM so that the booted OS has access to it, since -the OS can typically deal with such restrictions in a more complex -manner. - -Fixes: aa909462d018 "efi_loader: efi_allocate_pages is too restrictive" -Cc: Heinrich Schuchardt -Cc: Alexander Graf -Signed-off-by: Stephen Warren ---- - lib/efi_loader/efi_memory.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c -index 3fe014d9e72..bf9d6963cbe 100644 ---- a/lib/efi_loader/efi_memory.c -+++ b/lib/efi_loader/efi_memory.c -@@ -296,6 +296,9 @@ static uint64_t efi_find_free_memory(uint64_t len, uint64_t max_addr) - { - struct list_head *lhandle; - -+ if ((max_addr == -1ULL) || (max_addr > gd->ram_top)) -+ max_addr = gd->ram_top; -+ - list_for_each(lhandle, &efi_mem) { - struct efi_mem_list *lmem = list_entry(lhandle, - struct efi_mem_list, link); --- -2.19.0 - -From df3831a3833c2f477ef779a207cf973dd74ef0ee Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Fri, 28 Sep 2018 15:56:25 +0100 -Subject: [PATCH 5/5] efi_loader: remove efi_exit_caches() - -Since GRUB patch d0c070179d4d ("arm/efi: Switch to arm64 linux loader", -2018-07-09) we do not need a workaround for GRUB on 32bit ARM anymore. - -So let's eliminate function efi_exit_caches(). - -This will require Linux distributions to update grub-efi-arm to the GRUB -git HEAD (a tag containing the aforementioned GRUB patch is not available -yet). - -Signed-off-by: Heinrich Schuchardt -Signed-off-by: Peter Robinson ---- - lib/efi_loader/efi_boottime.c | 28 ---------------------------- - 1 file changed, 28 deletions(-) - -diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c -index 3935e4f1ce9..56557205d00 100644 ---- a/lib/efi_loader/efi_boottime.c -+++ b/lib/efi_loader/efi_boottime.c -@@ -27,14 +27,6 @@ LIST_HEAD(efi_obj_list); - /* List of all events */ - LIST_HEAD(efi_events); - --/* -- * If we're running on nasty systems (32bit ARM booting into non-EFI Linux) -- * we need to do trickery with caches. Since we don't want to break the EFI -- * aware boot path, only apply hacks when loading exiting directly (breaking -- * direct Linux EFI booting along the way - oh well). -- */ --static bool efi_is_direct_boot = true; -- - #ifdef CONFIG_ARM - /* - * The "gd" pointer lives in a register on ARM and AArch64 that we declare -@@ -1696,8 +1688,6 @@ static efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle, - EFI_ENTRY("%p, %p, %p", image_handle, exit_data_size, exit_data); - entry = info->reserved; - -- efi_is_direct_boot = false; -- - /* call the image! */ - if (setjmp(&info->exit_jmp)) { - /* -@@ -1811,21 +1801,6 @@ static efi_status_t EFIAPI efi_unload_image(efi_handle_t image_handle) - return EFI_EXIT(EFI_SUCCESS); - } - --/** -- * efi_exit_caches() - fix up caches for EFI payloads if necessary -- */ --static void efi_exit_caches(void) --{ --#if defined(CONFIG_ARM) && !defined(CONFIG_ARM64) -- /* -- * Grub on 32bit ARM needs to have caches disabled before jumping into -- * a zImage, but does not know of all cache layers. Give it a hand. -- */ -- if (efi_is_direct_boot) -- cleanup_before_linux(); --#endif --} -- - /** - * efi_exit_boot_services() - stop all boot services - * @image_handle: handle of the loaded image -@@ -1879,9 +1854,6 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle, - - board_quiesce_devices(); - -- /* Fix up caches for EFI payloads if necessary */ -- efi_exit_caches(); -- - /* This stops all lingering devices */ - bootm_disable_interrupts(); - --- -2.19.0 -From 05e6d0b69f30c6b902ab9a343f4c4080a837ebd2 Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Thu, 4 Oct 2018 10:37:24 +0100 -Subject: [PATCH] efi_loader: fix simple network protocol - -We should not call eth_rx() before the network interface is initialized. -The services of the simple network protocol should check the state of -the network adapter. - -Provide a correctly aligned transmit buffer not depending on -CONFIG_EFI_LOADER_BOUNCE_BUFFER. - -Correct the unit test. - -Add and correct comments. - -Without this patch i.mx6 system Wandboard Quad rev B1 fails to execute -bootefi selftest. - -Signed-off-by: Heinrich Schuchardt -Signed-off-by: Peter Robinson ---- - lib/efi_loader/efi_net.c | 419 +++++++++++++++++++++++----- - lib/efi_selftest/efi_selftest_snp.c | 16 +- - 2 files changed, 359 insertions(+), 76 deletions(-) - -diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c -index 5a3d7be86cf..871c4c98228 100644 ---- a/lib/efi_loader/efi_net.c -+++ b/lib/efi_loader/efi_net.c -@@ -16,6 +16,8 @@ static const efi_guid_t efi_pxe_guid = EFI_PXE_GUID; - static struct efi_pxe_packet *dhcp_ack; - static bool new_rx_packet; - static void *new_tx_packet; -+static void *transmit_buffer; -+ - /* - * The notification function of this event is called in every timer cycle - * to check if a new network packet has been received. -@@ -37,22 +39,68 @@ struct efi_net_obj { - struct efi_pxe_mode pxe_mode; - }; - -+/* -+ * efi_net_start() - start the network interface -+ * -+ * This function implements the Start service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * Return: status code -+ */ - static efi_status_t EFIAPI efi_net_start(struct efi_simple_network *this) - { -+ efi_status_t ret = EFI_SUCCESS; -+ - EFI_ENTRY("%p", this); - -- return EFI_EXIT(EFI_SUCCESS); -+ /* Check parameters */ -+ if (!this) { -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ -+ if (this->mode->state != EFI_NETWORK_STOPPED) -+ ret = EFI_ALREADY_STARTED; -+ else -+ this->mode->state = EFI_NETWORK_STARTED; -+out: -+ return EFI_EXIT(ret); - } - -+/* -+ * efi_net_stop() - stop the network interface -+ * -+ * This function implements the Stop service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * Return: status code -+ */ - static efi_status_t EFIAPI efi_net_stop(struct efi_simple_network *this) - { -+ efi_status_t ret = EFI_SUCCESS; -+ - EFI_ENTRY("%p", this); - -- return EFI_EXIT(EFI_SUCCESS); -+ /* Check parameters */ -+ if (!this) { -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ -+ if (this->mode->state == EFI_NETWORK_STOPPED) -+ ret = EFI_NOT_STARTED; -+ else -+ this->mode->state = EFI_NETWORK_STOPPED; -+out: -+ return EFI_EXIT(ret); - } - - /* -- * Initialize network adapter and allocate transmit and receive buffers. -+ * efi_net_initialize() - initialize the network interface - * - * This function implements the Initialize service of the - * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -@@ -61,7 +109,7 @@ static efi_status_t EFIAPI efi_net_stop(struct efi_simple_network *this) - * @this: pointer to the protocol instance - * @extra_rx: extra receive buffer to be allocated - * @extra_tx: extra transmit buffer to be allocated -- * @return: status code -+ * Return: status code - */ - static efi_status_t EFIAPI efi_net_initialize(struct efi_simple_network *this, - ulong extra_rx, ulong extra_tx) -@@ -71,9 +119,10 @@ static efi_status_t EFIAPI efi_net_initialize(struct efi_simple_network *this, - - EFI_ENTRY("%p, %lx, %lx", this, extra_rx, extra_tx); - -+ /* Check parameters */ - if (!this) { - r = EFI_INVALID_PARAMETER; -- goto error; -+ goto out; - } - - /* Setup packet buffers */ -@@ -86,32 +135,83 @@ static efi_status_t EFIAPI efi_net_initialize(struct efi_simple_network *this, - ret = eth_init(); - if (ret < 0) { - eth_halt(); -+ this->mode->state = EFI_NETWORK_STOPPED; - r = EFI_DEVICE_ERROR; -+ goto out; -+ } else { -+ this->mode->state = EFI_NETWORK_INITIALIZED; - } -- --error: -+out: - return EFI_EXIT(r); - } - -+/* -+ * efi_net_reset() - reinitialize the network interface -+ * -+ * This function implements the Reset service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * @extended_verification: execute exhaustive verification -+ * Return: status code -+ */ - static efi_status_t EFIAPI efi_net_reset(struct efi_simple_network *this, - int extended_verification) - { - EFI_ENTRY("%p, %x", this, extended_verification); - -- return EFI_EXIT(EFI_SUCCESS); -+ return EFI_EXIT(EFI_CALL(efi_net_initialize(this, 0, 0))); - } - -+/* -+ * efi_net_shutdown() - shut down the network interface -+ * -+ * This function implements the Shutdown service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * Return: status code -+ */ - static efi_status_t EFIAPI efi_net_shutdown(struct efi_simple_network *this) - { -+ efi_status_t ret = EFI_SUCCESS; -+ - EFI_ENTRY("%p", this); - -- return EFI_EXIT(EFI_SUCCESS); -+ /* Check parameters */ -+ if (!this) { -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ -+ eth_halt(); -+ this->mode->state = EFI_NETWORK_STOPPED; -+ -+out: -+ return EFI_EXIT(ret); - } - --static efi_status_t EFIAPI efi_net_receive_filters( -- struct efi_simple_network *this, u32 enable, u32 disable, -- int reset_mcast_filter, ulong mcast_filter_count, -- struct efi_mac_address *mcast_filter) -+/* -+ * efi_net_receive_filters() - mange multicast receive filters -+ * -+ * This function implements the ReceiveFilters service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * @enable: bit mask of receive filters to enable -+ * @disable: bit mask of receive filters to disable -+ * @reset_mcast_filter: true resets contents of the filters -+ * @mcast_filter_count: number of hardware MAC addresses in the new filters list -+ * @mcast_filter: list of new filters -+ * Return: status code -+ */ -+static efi_status_t EFIAPI efi_net_receive_filters -+ (struct efi_simple_network *this, u32 enable, u32 disable, -+ int reset_mcast_filter, ulong mcast_filter_count, -+ struct efi_mac_address *mcast_filter) - { - EFI_ENTRY("%p, %x, %x, %x, %lx, %p", this, enable, disable, - reset_mcast_filter, mcast_filter_count, mcast_filter); -@@ -119,15 +219,40 @@ static efi_status_t EFIAPI efi_net_receive_filters( - return EFI_EXIT(EFI_UNSUPPORTED); - } - --static efi_status_t EFIAPI efi_net_station_address( -- struct efi_simple_network *this, int reset, -- struct efi_mac_address *new_mac) -+/* -+ * efi_net_station_address() - set the hardware MAC address -+ * -+ * This function implements the StationAddress service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * @reset: if true reset the address to default -+ * @new_mac: new MAC address -+ * Return: status code -+ */ -+static efi_status_t EFIAPI efi_net_station_address -+ (struct efi_simple_network *this, int reset, -+ struct efi_mac_address *new_mac) - { - EFI_ENTRY("%p, %x, %p", this, reset, new_mac); - - return EFI_EXIT(EFI_UNSUPPORTED); - } - -+/* -+ * efi_net_statistics() - reset or collect statistics of the network interface -+ * -+ * This function implements the Statistics service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * @reset: if true, the statistics are reset -+ * @stat_size: size of the statistics table -+ * @stat_table: table to receive the statistics -+ * Return: status code -+ */ - static efi_status_t EFIAPI efi_net_statistics(struct efi_simple_network *this, - int reset, ulong *stat_size, - void *stat_table) -@@ -137,6 +262,19 @@ static efi_status_t EFIAPI efi_net_statistics(struct efi_simple_network *this, - return EFI_EXIT(EFI_UNSUPPORTED); - } - -+/* -+ * efi_net_mcastiptomac() - translate multicast IP address to MAC address -+ * -+ * This function implements the Statistics service of the -+ * EFI_SIMPLE_NETWORK_PROTOCOL. See the Unified Extensible Firmware Interface -+ * (UEFI) specification for details. -+ * -+ * @this: pointer to the protocol instance -+ * @ipv6: true if the IP address is an IPv6 address -+ * @ip: IP address -+ * @mac: MAC address -+ * Return: status code -+ */ - static efi_status_t EFIAPI efi_net_mcastiptomac(struct efi_simple_network *this, - int ipv6, - struct efi_ip_address *ip, -@@ -147,6 +285,19 @@ static efi_status_t EFIAPI efi_net_mcastiptomac(struct efi_simple_network *this, - return EFI_EXIT(EFI_INVALID_PARAMETER); - } - -+/** -+ * efi_net_nvdata() - read or write NVRAM -+ * -+ * This function implements the GetStatus service of the Simple Network -+ * Protocol. See the UEFI spec for details. -+ * -+ * @this: the instance of the Simple Network Protocol -+ * @readwrite: true for read, false for write -+ * @offset: offset in NVRAM -+ * @buffer_size: size of buffer -+ * @buffer: buffer -+ * Return: status code -+ */ - static efi_status_t EFIAPI efi_net_nvdata(struct efi_simple_network *this, - int read_write, ulong offset, - ulong buffer_size, char *buffer) -@@ -157,13 +308,42 @@ static efi_status_t EFIAPI efi_net_nvdata(struct efi_simple_network *this, - return EFI_EXIT(EFI_UNSUPPORTED); - } - -+/** -+ * efi_net_get_status() - get interrupt status -+ * -+ * This function implements the GetStatus service of the Simple Network -+ * Protocol. See the UEFI spec for details. -+ * -+ * @this: the instance of the Simple Network Protocol -+ * @int_status: interface status -+ * @txbuf: transmission buffer -+ */ - static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this, - u32 *int_status, void **txbuf) - { -+ efi_status_t ret = EFI_SUCCESS; -+ - EFI_ENTRY("%p, %p, %p", this, int_status, txbuf); - - efi_timer_check(); - -+ /* Check parameters */ -+ if (!this) { -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ -+ switch (this->mode->state) { -+ case EFI_NETWORK_STOPPED: -+ ret = EFI_NOT_STARTED; -+ goto out; -+ case EFI_NETWORK_STARTED: -+ ret = EFI_DEVICE_ERROR; -+ goto out; -+ default: -+ break; -+ } -+ - if (int_status) { - /* We send packets synchronously, so nothing is outstanding */ - *int_status = EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT; -@@ -174,65 +354,103 @@ static efi_status_t EFIAPI efi_net_get_status(struct efi_simple_network *this, - *txbuf = new_tx_packet; - - new_tx_packet = NULL; -- -- return EFI_EXIT(EFI_SUCCESS); -+out: -+ return EFI_EXIT(ret); - } - --static efi_status_t EFIAPI efi_net_transmit(struct efi_simple_network *this, -- size_t header_size, size_t buffer_size, void *buffer, -- struct efi_mac_address *src_addr, -- struct efi_mac_address *dest_addr, u16 *protocol) -+/** -+ * efi_net_transmit() - transmit a packet -+ * -+ * This function implements the Transmit service of the Simple Network Protocol. -+ * See the UEFI spec for details. -+ * -+ * @this: the instance of the Simple Network Protocol -+ * @header_size: size of the media header -+ * @buffer_size: size of the buffer to receive the packet -+ * @buffer: buffer to receive the packet -+ * @src_addr: source hardware MAC address -+ * @dest_addr: destination hardware MAC address -+ * @protocol: type of header to build -+ * Return: status code -+ */ -+static efi_status_t EFIAPI efi_net_transmit -+ (struct efi_simple_network *this, size_t header_size, -+ size_t buffer_size, void *buffer, -+ struct efi_mac_address *src_addr, -+ struct efi_mac_address *dest_addr, u16 *protocol) - { -+ efi_status_t ret = EFI_SUCCESS; -+ - EFI_ENTRY("%p, %lu, %lu, %p, %p, %p, %p", this, - (unsigned long)header_size, (unsigned long)buffer_size, - buffer, src_addr, dest_addr, protocol); - - efi_timer_check(); - -+ /* Check parameters */ -+ if (!this) { -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ -+ /* We do not support jumbo packets */ -+ if (buffer_size > PKTSIZE_ALIGN) { -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ - if (header_size) { -- /* We would need to create the header if header_size != 0 */ -- return EFI_EXIT(EFI_INVALID_PARAMETER); -+ /* -+ * TODO: We would need to create the header -+ * if header_size != 0 -+ */ -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ -+ switch (this->mode->state) { -+ case EFI_NETWORK_STOPPED: -+ ret = EFI_NOT_STARTED; -+ goto out; -+ case EFI_NETWORK_STARTED: -+ ret = EFI_DEVICE_ERROR; -+ goto out; -+ default: -+ break; - } - --#ifdef CONFIG_EFI_LOADER_BOUNCE_BUFFER - /* Ethernet packets always fit, just bounce */ -- memcpy(efi_bounce_buffer, buffer, buffer_size); -- net_send_packet(efi_bounce_buffer, buffer_size); --#else -- net_send_packet(buffer, buffer_size); --#endif -+ memcpy(transmit_buffer, buffer, buffer_size); -+ net_send_packet(transmit_buffer, buffer_size); - - new_tx_packet = buffer; - -- return EFI_EXIT(EFI_SUCCESS); -+out: -+ return EFI_EXIT(ret); - } - --static void efi_net_push(void *pkt, int len) --{ -- new_rx_packet = true; -- wait_for_packet->is_signaled = true; --} -- --/* -- * Receive a packet from a network interface. -+/** -+ * efi_net_receive() - receive a packet from a network interface - * - * This function implements the Receive service of the Simple Network Protocol. - * See the UEFI spec for details. - * -- * @this the instance of the Simple Network Protocol -- * @header_size size of the media header -- * @buffer_size size of the buffer to receive the packet -- * @buffer buffer to receive the packet -- * @src_addr source MAC address -- * @dest_addr destination MAC address -- * @protocol protocol -- * @return status code -+ * @this: the instance of the Simple Network Protocol -+ * @header_size: size of the media header -+ * @buffer_size: size of the buffer to receive the packet -+ * @buffer: buffer to receive the packet -+ * @src_addr: source MAC address -+ * @dest_addr: destination MAC address -+ * @protocol: protocol -+ * Return: status code - */ --static efi_status_t EFIAPI efi_net_receive(struct efi_simple_network *this, -- size_t *header_size, size_t *buffer_size, void *buffer, -- struct efi_mac_address *src_addr, -- struct efi_mac_address *dest_addr, u16 *protocol) -+static efi_status_t EFIAPI efi_net_receive -+ (struct efi_simple_network *this, size_t *header_size, -+ size_t *buffer_size, void *buffer, -+ struct efi_mac_address *src_addr, -+ struct efi_mac_address *dest_addr, u16 *protocol) - { -+ efi_status_t ret = EFI_SUCCESS; - struct ethernet_hdr *eth_hdr; - size_t hdr_size = sizeof(struct ethernet_hdr); - u16 protlen; -@@ -240,14 +458,35 @@ static efi_status_t EFIAPI efi_net_receive(struct efi_simple_network *this, - EFI_ENTRY("%p, %p, %p, %p, %p, %p, %p", this, header_size, - buffer_size, buffer, src_addr, dest_addr, protocol); - -+ /* Execute events */ - efi_timer_check(); - -- if (!new_rx_packet) -- return EFI_EXIT(EFI_NOT_READY); -+ /* Check parameters */ -+ if (!this) { -+ ret = EFI_INVALID_PARAMETER; -+ goto out; -+ } -+ -+ switch (this->mode->state) { -+ case EFI_NETWORK_STOPPED: -+ ret = EFI_NOT_STARTED; -+ goto out; -+ case EFI_NETWORK_STARTED: -+ ret = EFI_DEVICE_ERROR; -+ goto out; -+ default: -+ break; -+ } -+ -+ if (!new_rx_packet) { -+ ret = EFI_NOT_READY; -+ goto out; -+ } - /* Check that we at least received an Ethernet header */ - if (net_rx_packet_len < sizeof(struct ethernet_hdr)) { - new_rx_packet = false; -- return EFI_EXIT(EFI_NOT_READY); -+ ret = EFI_NOT_READY; -+ goto out; - } - /* Fill export parameters */ - eth_hdr = (struct ethernet_hdr *)net_rx_packet; -@@ -265,18 +504,24 @@ static efi_status_t EFIAPI efi_net_receive(struct efi_simple_network *this, - if (protocol) - *protocol = protlen; - if (*buffer_size < net_rx_packet_len) { -- /* Packet doesn't fit, try again with bigger buf */ -+ /* Packet doesn't fit, try again with bigger buffer */ - *buffer_size = net_rx_packet_len; -- return EFI_EXIT(EFI_BUFFER_TOO_SMALL); -+ ret = EFI_BUFFER_TOO_SMALL; -+ goto out; - } - /* Copy packet */ - memcpy(buffer, net_rx_packet, net_rx_packet_len); - *buffer_size = net_rx_packet_len; - new_rx_packet = false; -- -- return EFI_EXIT(EFI_SUCCESS); -+out: -+ return EFI_EXIT(ret); - } - -+/** -+ * efi_net_set_dhcp_ack() - take note of a selected DHCP IP address -+ * -+ * This function is called by dhcp_handler(). -+ */ - void efi_net_set_dhcp_ack(void *pkt, int len) - { - int maxsize = sizeof(*dhcp_ack); -@@ -287,8 +532,22 @@ void efi_net_set_dhcp_ack(void *pkt, int len) - memcpy(dhcp_ack, pkt, min(len, maxsize)); - } - --/* -- * Check if a new network packet has been received. -+/** -+ * efi_net_push() - callback for received network packet -+ * -+ * This function is called when a network packet is received by eth_rx(). -+ * -+ * @pkt: network packet -+ * @len: length -+ */ -+static void efi_net_push(void *pkt, int len) -+{ -+ new_rx_packet = true; -+ wait_for_packet->is_signaled = true; -+} -+ -+/** -+ * efi_network_timer_notify() - check if a new network packet has been received - * - * This notification function is called in every timer cycle. - * -@@ -298,20 +557,34 @@ void efi_net_set_dhcp_ack(void *pkt, int len) - static void EFIAPI efi_network_timer_notify(struct efi_event *event, - void *context) - { -+ struct efi_simple_network *this = (struct efi_simple_network *)context; -+ - EFI_ENTRY("%p, %p", event, context); - -+ /* -+ * Some network drivers do not support calling eth_rx() before -+ * initialization. -+ */ -+ if (!this || this->mode->state != EFI_NETWORK_INITIALIZED) -+ goto out; -+ - if (!new_rx_packet) { - push_packet = efi_net_push; - eth_rx(); - push_packet = NULL; - } -+out: - EFI_EXIT(EFI_SUCCESS); - } - --/* This gets called from do_bootefi_exec(). */ -+/** -+ * efi_net_register() - register the simple network protocol -+ * -+ * This gets called from do_bootefi_exec(). -+ */ - efi_status_t efi_net_register(void) - { -- struct efi_net_obj *netobj; -+ struct efi_net_obj *netobj = NULL; - efi_status_t r; - - if (!eth_get_dev()) { -@@ -321,10 +594,15 @@ efi_status_t efi_net_register(void) - - /* We only expose the "active" eth device, so one is enough */ - netobj = calloc(1, sizeof(*netobj)); -- if (!netobj) { -- printf("ERROR: Out of memory\n"); -- return EFI_OUT_OF_RESOURCES; -- } -+ if (!netobj) -+ goto out_of_resources; -+ -+ /* Allocate an aligned transmit buffer */ -+ transmit_buffer = calloc(1, PKTSIZE_ALIGN + ARCH_DMA_MINALIGN); -+ if (!transmit_buffer) -+ goto out_of_resources; -+ transmit_buffer = (void *)ALIGN((uintptr_t)transmit_buffer, -+ ARCH_DMA_MINALIGN); - - /* Hook net up to the device list */ - efi_add_handle(&netobj->parent); -@@ -387,13 +665,13 @@ efi_status_t efi_net_register(void) - * iPXE is running at TPL_CALLBACK most of the time. Use a higher TPL. - */ - r = efi_create_event(EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_NOTIFY, -- efi_network_timer_notify, NULL, NULL, -+ efi_network_timer_notify, &netobj->net, NULL, - &network_timer_event); - if (r != EFI_SUCCESS) { - printf("ERROR: Failed to register network event\n"); - return r; - } -- /* Network is time critical, create event in every timer cyle */ -+ /* Network is time critical, create event in every timer cycle */ - r = efi_set_timer(network_timer_event, EFI_TIMER_PERIODIC, 0); - if (r != EFI_SUCCESS) { - printf("ERROR: Failed to set network timer\n"); -@@ -404,4 +682,9 @@ efi_status_t efi_net_register(void) - failure_to_add_protocol: - printf("ERROR: Failure to add protocol\n"); - return r; -+out_of_resources: -+ free(netobj); -+ /* free(transmit_buffer) not needed yet */ -+ printf("ERROR: Out of memory\n"); -+ return EFI_OUT_OF_RESOURCES; - } -diff --git a/lib/efi_selftest/efi_selftest_snp.c b/lib/efi_selftest/efi_selftest_snp.c -index 09bd53da82d..e10a34ba645 100644 ---- a/lib/efi_selftest/efi_selftest_snp.c -+++ b/lib/efi_selftest/efi_selftest_snp.c -@@ -103,7 +103,7 @@ static efi_status_t send_dhcp_discover(void) - struct dhcp p = {}; - - /* -- * Fill ethernet header -+ * Fill Ethernet header - */ - boottime->copy_mem(p.eth_hdr.et_dest, (void *)BROADCAST_MAC, ARP_HLEN); - boottime->copy_mem(p.eth_hdr.et_src, &net->mode->current_address, -@@ -229,19 +229,19 @@ static int setup(const efi_handle_t handle, - return EFI_ST_FAILURE; - } - /* -- * Initialize network adapter. -+ * Start network adapter. - */ -- ret = net->initialize(net, 0, 0); -- if (ret != EFI_SUCCESS) { -- efi_st_error("Failed to initialize network adapter\n"); -+ ret = net->start(net); -+ if (ret != EFI_SUCCESS && ret != EFI_ALREADY_STARTED) { -+ efi_st_error("Failed to start network adapter\n"); - return EFI_ST_FAILURE; - } - /* -- * Start network adapter. -+ * Initialize network adapter. - */ -- ret = net->start(net); -+ ret = net->initialize(net, 0, 0); - if (ret != EFI_SUCCESS) { -- efi_st_error("Failed to start network adapter\n"); -+ efi_st_error("Failed to initialize network adapter\n"); - return EFI_ST_FAILURE; - } - return EFI_ST_SUCCESS; --- -2.19.0 - diff --git a/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch b/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch new file mode 100644 index 0000000..ac58bad --- /dev/null +++ b/uefi-initial-find_fdt_location-for-finding-the-DT-on-disk.patch @@ -0,0 +1,190 @@ +From 56a985cec8592a8de88e7f254df82f5d444a5ecc Mon Sep 17 00:00:00 2001 +From: Peter Robinson +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 +in the /dtb or /dtb/current directories, and Fedora extended this +to look not just on the boot partition but all the partitions on +that disk. + +The new ways of booting, both bootstd and bootefi bootmgr processes +don't properly look for those options. This provides a function +to search for the DTB on disk so that if the other DT mechanisms +don't work this will look for one on disk to provide a working DT +so that devices will continue to work as they did previously. + +Signed-off-by: Peter Robinson +--- + cmd/bootmenu.c | 5 ++ + include/efi_loader.h | 2 + + lib/efi_loader/efi_helper.c | 106 +++++++++++++++++++++++++++++++++++- + 3 files changed, 112 insertions(+), 1 deletion(-) + +diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c +index 528afd221d0..a10ea35a687 100644 +--- a/cmd/bootmenu.c ++++ b/cmd/bootmenu.c +@@ -502,6 +502,11 @@ static void handle_uefi_bootnext(void) + u16 bootnext; + efi_status_t ret; + efi_uintn_t size; ++ const char *fdt_opt; ++ ++ /* Find the DTB on disk */ ++ log_debug("We will load the DTB\n"); ++ fdt_opt = find_fdt_location(); + + /* Initialize EFI drivers */ + ret = efi_init_obj_list(); +diff --git a/include/efi_loader.h b/include/efi_loader.h +index 3a4d502631c..b11f8a2cb42 100644 +--- a/include/efi_loader.h ++++ b/include/efi_loader.h +@@ -574,6 +574,8 @@ struct efi_register_notify_event { + struct list_head handles; + }; + ++/* Find the FDT on any partition */ ++char *find_fdt_location(void); + /* called at pre-initialization */ + 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 44b806aadc4..61e982091b9 100644 +--- a/lib/efi_loader/efi_helper.c ++++ b/lib/efi_loader/efi_helper.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -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) ++{ ++ const char *fdt_filename; ++ /* FIXME: dynamic size */ ++ char fdt_fullpath[60]; ++ const char *prefix; ++ struct udevice *blk; ++ /* FIXME: Fedora really only cares about first 2*/ ++ int MAX_PART = 8; ++ int part; ++ struct disk_partition info; ++ int fdtext; ++ int ret; ++ int retfdt; ++ int retload; ++ loff_t fdtsize; ++ ulong pbraddr; ++ loff_t len_read; ++ ++ /* step one logic: we have the DT name we're hunting for */ ++ fdt_filename = env_get("fdtfile"); ++ if (fdt_filename) { ++ log_debug("FFL: We're looking for the DTB now!: %s\n", fdt_filename); ++ ++ /* probe all block disks to search for fdt */ ++ uclass_foreach_dev_probe(UCLASS_BLK, blk) { ++ log_debug("FFL: dev name: %s\n", blk->name); ++ struct blk_desc *desc; ++ desc = dev_get_uclass_plat(blk); ++ /* we should get a partition count here for looping */ ++ /* For loop for each partition */ ++ /* Need to also deal with zero part whole disk - part_get_info_whole_disk */ ++ for (part = 1; part <= MAX_PART; part++) { ++ log_debug("FFL: part num: %d\n", part); ++ ret = part_get_info(desc, part, &info); ++ /* if we have partition check it for DT */ ++ if (ret < 0) { ++ log_debug("FFL: no partition\n"); ++ } else { ++ log_debug("FFL: we have a partition\n"); ++ /* we should have a case/for prefix in =/ /dtb/ /dtb/current/ */ ++ /* but for now we hard code if for Fedora */ ++ prefix = "/dtb"; ++ snprintf(fdt_fullpath, sizeof(fdt_fullpath), "%s/%s", prefix, fdt_filename); ++ log_debug("FFL: full name: %s\n", fdt_fullpath); ++ /* search for DT on partition and either find and exit or continue */ ++ if (fs_set_blk_dev_with_part(desc, part) == 0){ ++ log_debug("FFL: set block part pass\n"); ++ fdtext = fs_exists(fdt_fullpath); ++ if (fdtext) { ++ /* we have a fdt!*/ ++ if (fs_set_blk_dev_with_part(desc, part) == 0){ ++ retfdt = fs_size(fdt_fullpath, &fdtsize); ++ if (retfdt == 0) { ++ log_debug("FFL: we have found a DT on disk, size %lld\n", fdtsize); ++ /* Get the main fdt and map it */ ++ const char *fdt_pbr; ++ fdt_pbr = env_get("fdt_addr_r"); ++ pbraddr = hextoul(fdt_pbr, NULL); ++ log_debug("FFL: fdr addr: %s\n", fdt_pbr); ++ if (fs_set_blk_dev_with_part(desc, part) == 0){ ++ retload = fs_read(fdt_fullpath, pbraddr, 0, fdtsize, &len_read); ++ if (retload == 0) { ++ log_debug("FFL: we have a loaded DT, size %lld we can return\n", fdtsize); ++ log_info("Found DTB: %s\n", fdt_filename); ++ return fdt_pbr; ++ } else { ++ log_debug("FFL: DT load failed\n"); ++ } ++ } ++ } else { ++ log_debug("FFL: we DON'T have a DT with size\n"); ++ } ++ } ++ } else { ++ /* we don't have a fdt!*/ ++ log_debug("FFL: we DON'T have a DT\n"); ++ } ++ } else { ++ log_debug("FFL: set block part FAIL\n"); ++ } ++ } ++ } ++ } ++ } else { ++ log_debug("FFL: fdt_filename not defined!!\n"); ++ } ++ ++ /* We didn't find a FDT */ ++ return NULL; ++} ++ + /** + * efi_create_current_boot_var() - Return Boot#### name were #### is replaced by + * the value of BootCurrent +@@ -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_info("Found DTB on disk\n"); ++ + /* Check if there is a hardware device tree */ +- fdt_opt = env_get("fdt_addr"); ++ if (!fdt_opt) { ++ fdt_opt = env_get("fdt_addr"); ++ if (fdt_opt) ++ log_info("Found DTB: Prior firmware\n"); ++ } + /* Use our own device tree as fallback */ + if (!fdt_opt) { + fdt_opt = env_get("fdtcontroladdr"); ++ log_info("Using DT from U-Boot\n"); + if (!fdt_opt) { + log_err("need device tree\n"); + return EFI_NOT_FOUND; +-- +2.54.0 + diff --git a/uefi-use-Fedora-specific-path-name.patch b/uefi-use-Fedora-specific-path-name.patch deleted file mode 100644 index 7f61250..0000000 --- a/uefi-use-Fedora-specific-path-name.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 2b411f6edf298899098e2077a5ca2dfdaf3d882f Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Wed, 7 Feb 2018 12:37:58 +0000 -Subject: [PATCH] use Fedora specific EFI path/name - -Signed-off-by: Peter Robinson ---- - include/config_distro_bootcmd.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h -index f567cebd38..7746366ec8 100644 ---- a/include/config_distro_bootcmd.h -+++ b/include/config_distro_bootcmd.h -@@ -93,7 +93,7 @@ - - #ifdef CONFIG_EFI_LOADER - #if defined(CONFIG_ARM64) --#define BOOTEFI_NAME "bootaa64.efi" -+#define BOOTEFI_NAME "grubaa64.efi" - #elif defined(CONFIG_ARM) - #define BOOTEFI_NAME "bootarm.efi" - #elif defined(CONFIG_X86_RUN_32BIT) -@@ -127,7 +127,7 @@ - "bootefi bootmgr ${fdtcontroladdr};" \ - "fi;" \ - "load ${devtype} ${devnum}:${distro_bootpart} " \ -- "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; " \ -+ "${kernel_addr_r} efi/fedora/"BOOTEFI_NAME"; " \ - "if fdt addr ${fdt_addr_r}; then " \ - "bootefi ${kernel_addr_r} ${fdt_addr_r};" \ - "else " \ -@@ -150,9 +150,9 @@ - "fi;" \ - "done;" \ - "if test -e ${devtype} ${devnum}:${distro_bootpart} " \ -- "efi/boot/"BOOTEFI_NAME"; then " \ -+ "efi/fedora/"BOOTEFI_NAME"; then " \ - "echo Found EFI removable media binary " \ -- "efi/boot/"BOOTEFI_NAME"; " \ -+ "efi/fedora/"BOOTEFI_NAME"; " \ - "run boot_efi_binary; " \ - "echo EFI LOAD FAILED: continuing...; " \ - "fi; " \ --- -2.14.3 - diff --git a/usb-kbd-fixes.patch b/usb-kbd-fixes.patch deleted file mode 100644 index 095029a..0000000 --- a/usb-kbd-fixes.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 1a8fa60aedff8a2368ac357a51dc15357065fabe Mon Sep 17 00:00:00 2001 -From: Peter Robinson -Date: Tue, 5 Dec 2017 00:11:54 +0000 -Subject: [PATCH 3/5] usb kbd fixes - -Signed-off-by: Peter Robinson ---- - common/usb_kbd.c | 66 +++++++++++++++++++++++++++++++++++++++++-------------- - include/console.h | 2 -- - 2 files changed, 50 insertions(+), 18 deletions(-) - -diff --git a/common/usb_kbd.c b/common/usb_kbd.c -index 8cbdba6ac2..82ad93f6ca 100644 ---- a/common/usb_kbd.c -+++ b/common/usb_kbd.c -@@ -516,25 +516,59 @@ static int probe_usb_keyboard(struct usb_device *dev) - return error; - - stdinname = env_get("stdin"); --#if CONFIG_IS_ENABLED(CONSOLE_MUX) -- error = iomux_doenv(stdin, stdinname); -- if (error) -- return error; --#else -- /* Check if this is the standard input device. */ -- if (strcmp(stdinname, DEVNAME)) -- return 1; -+ if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { -+ char *devname = DEVNAME; -+ char *newstdin = NULL; -+ /* -+ * stdin might not be set yet.. either way, with console- -+ * mux the sensible thing to do is add ourselves to the -+ * list of stdio devices: -+ */ -+ if (stdinname && !strstr(stdinname, DEVNAME)) { -+ newstdin = malloc(strlen(stdinname) + -+ strlen(","DEVNAME) + 1); -+ sprintf(newstdin, "%s,"DEVNAME, stdinname); -+ stdinname = newstdin; -+ } else if (!stdinname) { -+ stdinname = devname; -+ } -+ error = iomux_doenv(stdin, stdinname); -+ free(newstdin); -+ if (error) -+ goto unregister_stdio; -+ } else { -+ /* Check if this is the standard input device. */ -+ if (strcmp(stdinname, DEVNAME)) { -+ error = -1; -+ goto unregister_stdio; -+ } - -- /* Reassign the console */ -- if (overwrite_console()) -- return 1; -+ /* Reassign the console */ -+ if (overwrite_console()) { -+ error = -1; -+ goto unregister_stdio; -+ } - -- error = console_assign(stdin, DEVNAME); -- if (error) -- return error; --#endif -+ error = console_assign(stdin, DEVNAME); -+ if (error) -+ goto unregister_stdio; -+ } -+ -+ return 0; - -+unregister_stdio: -+ /* -+ * If probe fails, the device will be removed.. leaving dangling -+ * pointers if the stdio device is not unregistered. If u-boot -+ * is built without stdio_deregister(), just pretend to succeed -+ * in order to avoid dangling pointers. -+ */ -+#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) -+ stdio_deregister(DEVNAME, 1); -+ return error; -+#else - return 0; -+#endif - } - - #ifndef CONFIG_DM_USB -@@ -640,7 +674,7 @@ static int usb_kbd_remove(struct udevice *dev) - - return 0; - err: -- printf("%s: warning, ret=%d", __func__, ret); -+ printf("%s: warning, ret=%d\n", __func__, ret); - return ret; - } - -diff --git a/include/console.h b/include/console.h -index cea29ed6dc..7dfd36d7d1 100644 ---- a/include/console.h -+++ b/include/console.h -@@ -57,8 +57,6 @@ int console_announce_r(void); - /* - * CONSOLE multiplexing. - */ --#ifdef CONFIG_CONSOLE_MUX - #include --#endif - - #endif --- -2.14.3 - diff --git a/x86_64-boards b/x86_64-boards new file mode 100644 index 0000000..dec8df3 --- /dev/null +++ b/x86_64-boards @@ -0,0 +1 @@ +qemu-x86_64