[PATCH v3 14/15] luckfox-pico: Add the initial support
Simon Glass
sjg at chromium.org
Tue Jul 7 17:31:12 CEST 2026
Add the initial support for the Luckfox Pico Mini B board, which uses
the RV1103 with 64MB of in-package DDR2 and a 128MB Winbond SPI NAND.
The board boots from the SPI NAND, or over USB in maskrom mode using
the u-boot-rockchip-usb471/usb472 images, in which case U-Boot runs
entirely from RAM. The console is on UART2 at 115200 baud
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
.../rv1103-luckfox-pico-mini-b-u-boot.dtsi | 10 +++
arch/arm/dts/rv1103-luckfox-pico-mini-b.dts | 85 +++++++++++++++++++
board/luckfox/pico/MAINTAINERS | 6 ++
board/luckfox/pico/Makefile | 7 ++
board/luckfox/pico/pico.c | 19 +++++
board/luckfox/pico/pico.env | 4 +
configs/luckfox-pico-mini-b-rv1103_defconfig | 79 +++++++++++++++++
doc/board/index.rst | 1 +
doc/board/luckfox/index.rst | 9 ++
doc/board/luckfox/luckfox-pico.rst | 71 ++++++++++++++++
doc/board/rockchip/rockchip.rst | 4 +
include/configs/luckfox_pico.h | 11 +++
12 files changed, 306 insertions(+)
create mode 100644 arch/arm/dts/rv1103-luckfox-pico-mini-b-u-boot.dtsi
create mode 100644 arch/arm/dts/rv1103-luckfox-pico-mini-b.dts
create mode 100644 board/luckfox/pico/MAINTAINERS
create mode 100644 board/luckfox/pico/Makefile
create mode 100644 board/luckfox/pico/pico.c
create mode 100644 board/luckfox/pico/pico.env
create mode 100644 configs/luckfox-pico-mini-b-rv1103_defconfig
create mode 100644 doc/board/luckfox/index.rst
create mode 100644 doc/board/luckfox/luckfox-pico.rst
create mode 100644 include/configs/luckfox_pico.h
diff --git a/arch/arm/dts/rv1103-luckfox-pico-mini-b-u-boot.dtsi b/arch/arm/dts/rv1103-luckfox-pico-mini-b-u-boot.dtsi
new file mode 100644
index 00000000000..968bf1dfa66
--- /dev/null
+++ b/arch/arm/dts/rv1103-luckfox-pico-mini-b-u-boot.dtsi
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
+// (C) Copyright 2026 Simon Glass <sjg at chromium.org>
+
+#include "rockchip-u-boot.dtsi"
+
+/ {
+ chosen {
+ u-boot,spl-boot-order = &spi_nand;
+ };
+};
diff --git a/arch/arm/dts/rv1103-luckfox-pico-mini-b.dts b/arch/arm/dts/rv1103-luckfox-pico-mini-b.dts
new file mode 100644
index 00000000000..b0eac7d13c1
--- /dev/null
+++ b/arch/arm/dts/rv1103-luckfox-pico-mini-b.dts
@@ -0,0 +1,85 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023 Luckfox Electronics Co., Ltd
+ */
+
+/dts-v1/;
+
+#include "rv1103.dtsi"
+
+/ {
+ model = "Luckfox Pico Mini B";
+ compatible = "luckfox,pico-mini-b", "rockchip,rv1103";
+
+ aliases {
+ mmc0 = &sdmmc;
+ spi0 = &sfc;
+ };
+
+ chosen {
+ stdout-path = "serial2:115200n8";
+ };
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ disable-wp;
+ status = "okay";
+};
+
+&sfc {
+ status = "okay";
+
+ spi_nand: flash at 0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ bootph-pre-ram;
+ bootph-some-ram;
+ spi-max-frequency = <75000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition at 0 {
+ label = "env";
+ reg = <0x00000000 0x00040000>;
+ };
+
+ partition at 40000 {
+ label = "idblock";
+ reg = <0x00040000 0x00100000>;
+ read-only;
+ };
+
+ partition at 140000 {
+ label = "uboot";
+ reg = <0x00140000 0x00100000>;
+ read-only;
+ };
+
+ partition at 240000 {
+ label = "boot";
+ reg = <0x00240000 0x00800000>;
+ };
+
+ partition at a40000 {
+ label = "ubi";
+ reg = <0x00a40000 0x075c0000>;
+ };
+ };
+ };
+};
+
+&uart2 {
+ bootph-all;
+ status = "okay";
+};
+
+&wdt {
+ status = "okay";
+};
diff --git a/board/luckfox/pico/MAINTAINERS b/board/luckfox/pico/MAINTAINERS
new file mode 100644
index 00000000000..debf7059cf9
--- /dev/null
+++ b/board/luckfox/pico/MAINTAINERS
@@ -0,0 +1,6 @@
+LUCKFOX PICO
+M: Simon Glass <sjg at chromium.org>
+S: Maintained
+F: board/luckfox/pico
+F: include/configs/luckfox_pico.h
+F: configs/luckfox-pico-mini-b-rv1103_defconfig
diff --git a/board/luckfox/pico/Makefile b/board/luckfox/pico/Makefile
new file mode 100644
index 00000000000..4d2f5caff96
--- /dev/null
+++ b/board/luckfox/pico/Makefile
@@ -0,0 +1,7 @@
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright 2026 Simon Glass <sjg at chromium.org>
+#
+
+obj-y += pico.o
diff --git a/board/luckfox/pico/pico.c b/board/luckfox/pico/pico.c
new file mode 100644
index 00000000000..a8a471c20f3
--- /dev/null
+++ b/board/luckfox/pico/pico.c
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
+//
+// Copyright 2026 Simon Glass <sjg at chromium.org>
+
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+ gd->ram_size = SZ_64M;
+
+ return 0;
+}
+
+phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
+{
+ return gd->ram_top;
+}
diff --git a/board/luckfox/pico/pico.env b/board/luckfox/pico/pico.env
new file mode 100644
index 00000000000..0d954ee4f98
--- /dev/null
+++ b/board/luckfox/pico/pico.env
@@ -0,0 +1,4 @@
+kernel_addr_r=0x00800000
+fdt_addr_r=0x02000000
+ramdisk_addr_r=0x03000000
+bootargs=console=ttyS2,115200 mtdparts=spi0.0:256K(env),1M at 256K(idblock),1M(uboot),8M(boot),-(ubi) ro rootwait ubi.mtd=ubi ubi.block=0,rootfs root=/dev/ubiblock0_0 rootfstype=squashfs
diff --git a/configs/luckfox-pico-mini-b-rv1103_defconfig b/configs/luckfox-pico-mini-b-rv1103_defconfig
new file mode 100644
index 00000000000..f857f0a42c0
--- /dev/null
+++ b/configs/luckfox-pico-mini-b-rv1103_defconfig
@@ -0,0 +1,79 @@
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=24000000
+CONFIG_SYS_ARCH_TIMER=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_TEXT_BASE=0x00200000
+CONFIG_SYS_MALLOC_F_LEN=0x80000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x00400000
+CONFIG_SF_DEFAULT_SPEED=24000000
+CONFIG_DEFAULT_DEVICE_TREE="rv1103-luckfox-pico-mini-b"
+CONFIG_ROCKCHIP_RV1106=y
+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y
+CONFIG_ROCKCHIP_EXTERNAL_TPL=y
+CONFIG_ROCKCHIP_MASKROM_IMAGE=y
+CONFIG_SPL_SERIAL=y
+CONFIG_TARGET_LUCKFOX_PICO_RV1103=y
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x100000
+CONFIG_SYS_BOOTM_LEN=0x04000000
+CONFIG_SYS_LOAD_ADDR=0x00008000
+CONFIG_DEBUG_UART_BASE=0xff4c0000
+CONFIG_DEBUG_UART_CLOCK=24000000
+# CONFIG_DEBUG_UART_BOARD_INIT is not set
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
+CONFIG_SPL_SPI=y
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_FIT_CIPHER=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_FIT_BEST_MATCH=y
+CONFIG_LEGACY_IMAGE_FORMAT=y
+CONFIG_BOOTDELAY=1
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_SPL_NO_BSS_LIMIT=y
+CONFIG_SPL_MTD=y
+CONFIG_SPL_SPI_NAND_LOAD=y
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x140000
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_SPI=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_TIME=y
+CONFIG_SPL_OF_CONTROL=y
+CONFIG_ENV_RELOC_GD_ENV_ADDR=y
+CONFIG_NO_NET=y
+CONFIG_SPL_DM_SEQ_ALIAS=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_DM_MTD=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_XTX=y
+CONFIG_SPI_FLASH_MTD=y
+CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_SYS_NS16550_MEM32=y
+CONFIG_ROCKCHIP_SFC=y
+CONFIG_SYSRESET=y
+# CONFIG_RSA is not set
+# CONFIG_SPL_SHA1 is not set
+# CONFIG_SPL_SHA256 is not set
+CONFIG_LZMA=y
+CONFIG_ERRNO_STR=y
diff --git a/doc/board/index.rst b/doc/board/index.rst
index 2454c3598fb..11ec39cf915 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -39,6 +39,7 @@ Board-specific doc
kontron/index
lenovo/index
lg/index
+ luckfox/index
liebherr/index
mediatek/index
microchip/index
diff --git a/doc/board/luckfox/index.rst b/doc/board/luckfox/index.rst
new file mode 100644
index 00000000000..66feee84257
--- /dev/null
+++ b/doc/board/luckfox/index.rst
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Luckfox
+=======
+
+.. toctree::
+ :maxdepth: 2
+
+ luckfox-pico
diff --git a/doc/board/luckfox/luckfox-pico.rst b/doc/board/luckfox/luckfox-pico.rst
new file mode 100644
index 00000000000..a971ee67e0b
--- /dev/null
+++ b/doc/board/luckfox/luckfox-pico.rst
@@ -0,0 +1,71 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Luckfox Pico boards
+===================
+
+U-Boot for the Luckfox Pico series of RV1103/RV1106 boards. Only the
+Pico Mini B (RV1103, 64MB DDR2, 128MB SPI NAND) is supported so far.
+
+Quick Start
+-----------
+
+- Get the DDR initialization binary
+- Build U-Boot
+- Boot the board over USB, or flash U-Boot into the SPI NAND
+
+Get the DDR initialization binary
+---------------------------------
+
+.. code-block:: bash
+
+ $ git clone https://github.com/rockchip-linux/rkbin.git
+
+The DDR initialization binary is at rkbin/bin/rv11/rv1106_ddr_924MHz_v1.15.bin
+and covers both the RV1103 and the RV1106.
+
+Build U-Boot
+------------
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=arm-linux-gnueabihf-
+ $ export ROCKCHIP_TPL=<path-to-rkbin>/bin/rv11/rv1106_ddr_924MHz_v1.15.bin
+ $ make luckfox-pico-mini-b-rv1103_defconfig
+ $ make
+
+This produces idbloader.img and u-boot.img for flashing to the SPI
+NAND, plus u-boot-rockchip-usb471.bin and u-boot-rockchip-usb472.bin
+for booting over USB.
+
+Boot over USB (maskrom mode)
+----------------------------
+
+Hold the BOOT button while applying power (or leave the boot media
+blank) and the BootROM enters maskrom mode on the USB OTG port,
+appearing as USB ID 2207:110c. U-Boot then runs entirely from RAM;
+nothing is written to the flash.
+
+Send the two images with a maskrom download tool such as rockusb or
+rkdeveloptool (note that the loader format parser in older
+rkdeveloptool versions is not needed here, since these are raw
+images):
+
+.. code-block:: bash
+
+ $ rockusb download-boot u-boot-rockchip-usb471.bin u-boot-rockchip-usb472.bin
+
+Flash U-Boot into the SPI NAND
+------------------------------
+
+Enter maskrom mode as above, then use a loader from rkbin to run the
+Rockchip usbplug and write the images:
+
+.. code-block:: bash
+
+ $ cd <path-to-rkbin>
+ $ ./tools/boot_merger RKBOOT/RV1106MINIALL.ini
+ $ ./tools/upgrade_tool db rv1106_download_*.bin
+ $ ./tools/upgrade_tool wl 0x200 idbloader.img
+ $ ./tools/upgrade_tool wl 0xa00 u-boot.img
+
+Power cycle the board and U-Boot output appears on UART2 (115200,8N1).
diff --git a/doc/board/rockchip/rockchip.rst b/doc/board/rockchip/rockchip.rst
index 2574a1da52c..532a13594fc 100644
--- a/doc/board/rockchip/rockchip.rst
+++ b/doc/board/rockchip/rockchip.rst
@@ -180,6 +180,10 @@ List of mainline supported Rockchip boards:
- Yanyi Tech CoolPi CM5 EVB (coolpi-cm5-evb-rk3588)
- Yanyi Tech CoolPi CM5 GenBook (coolpi-cm5-genbook-rk3588)
+* rv1103
+ - Luckfox Pico Mini B (luckfox-pico-mini-b-rv1103), see
+ :doc:`../luckfox/luckfox-pico`
+
* rv1103b
- Onion Omega4 (omega4-rv1103b), see :doc:`../onion/omega4-rv1103b`
diff --git a/include/configs/luckfox_pico.h b/include/configs/luckfox_pico.h
new file mode 100644
index 00000000000..107ab622dd5
--- /dev/null
+++ b/include/configs/luckfox_pico.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2026 Simon Glass <sjg at chromium.org>
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+#include <configs/rv1106_common.h>
+
+#endif
--
2.43.0
More information about the U-Boot
mailing list