From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Cc: Fabio Estevam <festevam@nabladev.com>,
Jonas Karlman <jonas@kwiboo.se>, Simon Glass <sjg@chromium.org>,
Alexey Charkov <alchark@flipper.net>,
Anshul Dalal <anshuld@ti.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jeffy Chen <jeffy.chen@rock-chips.com>,
Kever Yang <kever.yang@rock-chips.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Quentin Schulz <quentin.schulz@cherry.de>,
Tom Rini <trini@konsulko.com>, huang lin <hl@rock-chips.com>
Subject: [PATCH v3 05/15] rockchip: spl-boot-order: Add SPI NAND support
Date: Tue, 7 Jul 2026 09:31:03 -0600 [thread overview]
Message-ID: <20260707153135.2048115-6-sjg@chromium.org> (raw)
In-Reply-To: <20260707153135.2048115-1-sjg@chromium.org>
From: Fabio Estevam <festevam@nabladev.com>
Make spl-boot-order accept booting from SPI NAND as well.
With this change, it is possible to specify spi_nand as the boot medium
like this:
u-boot,spl-boot-order = &spi_nand;
Signed-off-by: Fabio Estevam <festevam@nabladev.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v3:
- Guard the spi-nand checks with SPI_NAND_LOAD so that boards without
SPI NAND support do not grow in size
arch/arm/mach-rockchip/spl-boot-order.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-rockchip/spl-boot-order.c b/arch/arm/mach-rockchip/spl-boot-order.c
index d2dd5e10935..3942dfe6f5c 100644
--- a/arch/arm/mach-rockchip/spl-boot-order.c
+++ b/arch/arm/mach-rockchip/spl-boot-order.c
@@ -4,6 +4,7 @@
*/
#include <dm.h>
+#include <dm/device_compat.h>
#include <fdt_support.h>
#include <log.h>
#include <mmc.h>
@@ -75,6 +76,9 @@ static int spl_node_to_boot_device(int node)
*/
if (!uclass_find_device_by_of_offset(UCLASS_SPI_FLASH, node, &parent))
return BOOT_DEVICE_SPI;
+ if (CONFIG_IS_ENABLED(SPI_NAND_LOAD) &&
+ !fdt_node_check_compatible(gd->fdt_blob, node, "spi-nand"))
+ return BOOT_DEVICE_SPI;
if (!uclass_find_device_by_of_offset(UCLASS_UFS, node, &parent))
return BOOT_DEVICE_UFS;
@@ -223,8 +227,14 @@ int spl_decode_boot_device(u32 boot_device, char *buf, size_t buflen)
}
ret = uclass_find_device_by_of_offset(UCLASS_SPI_FLASH, node, &dev);
+ if (ret && CONFIG_IS_ENABLED(SPI_NAND_LOAD)) {
+ ret = uclass_find_device_by_of_offset(UCLASS_MTD, node, &dev);
+ if (!ret && !device_is_compatible(dev, "spi-nand"))
+ ret = -ENODEV;
+ }
if (ret) {
- debug("%s: could not find udevice for %s\n", __func__, conf);
+ debug("%s: could not find udevice for %s\n",
+ __func__, conf);
continue;
}
--
2.43.0
next prev parent reply other threads:[~2026-07-07 15:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 15:30 [PATCH v3 00/15] rockchip: Add support for the RV1103B, RV1103 and RV1106 Simon Glass
2026-07-07 15:30 ` [PATCH v3 01/15] ARM: dts: Add the RV1103B devicetree files Simon Glass
2026-07-07 15:31 ` [PATCH v3 02/15] pinctrl: rockchip: Add RV1103B support Simon Glass
2026-07-07 15:31 ` [PATCH v3 03/15] clk: rockchip: Add RV1103B clock driver Simon Glass
2026-07-07 15:31 ` [PATCH v3 04/15] tools: rkcommon: Add RV1103B support Simon Glass
2026-07-07 15:31 ` Simon Glass [this message]
2026-07-07 15:31 ` [PATCH v3 06/15] spl: Add SPI NAND support via MTD in SPL Simon Glass
2026-07-07 15:31 ` [PATCH v3 07/15] rockchip: rv1103b: Add SoC support Simon Glass
2026-07-07 15:31 ` [PATCH v3 08/15] omega4-rv1103b: Add the initial support Simon Glass
2026-07-07 15:31 ` [PATCH v3 09/15] tools: rkcommon: Add RV1106 support Simon Glass
2026-07-07 15:31 ` [PATCH v3 10/15] pinctrl: rockchip: " Simon Glass
2026-07-07 15:31 ` [PATCH v3 11/15] ARM: dts: Add the RV1103/RV1106 devicetree files Simon Glass
2026-07-07 15:31 ` [PATCH v3 12/15] clk: rockchip: Add RV1106 clock driver Simon Glass
2026-07-07 15:31 ` [PATCH v3 13/15] rockchip: rv1106: Add SoC support Simon Glass
2026-07-07 15:31 ` [PATCH v3 14/15] luckfox-pico: Add the initial support Simon Glass
2026-07-07 15:31 ` [PATCH v3 15/15] rockchip: Support legacy images when booting from RAM Simon Glass
2026-07-07 15:35 ` [PATCH v3 00/15] rockchip: Add support for the RV1103B, RV1103 and RV1106 Tom Rini
2026-07-08 22:36 ` Simon Glass
2026-07-09 0:38 ` Tom Rini
2026-07-09 1:27 ` Simon Glass
2026-07-09 1:40 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260707153135.2048115-6-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=alchark@flipper.net \
--cc=anshuld@ti.com \
--cc=festevam@nabladev.com \
--cc=hl@rock-chips.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jeffy.chen@rock-chips.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@cherry.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox