orangepi3b: switch to Kwiboo's 23.10(-rc4) u-boot, plus patches
> Based on AmazingFate's kernel DT and Kwiboo's `rk3568-2023.10` Tested with a OrangePi 3B 4GB v1.1: - SD-card boot - eMMC boot - SPI Flash boot - chip is XMC `XM25QU128CWIQ`, not `W25Q256JWEIQ` listed in schematics - PCIe/NVMe - Ethernet has stable MAC - can boot both edge (mainline) and legacy (vendor rk 5.10) kernels - USB in uboot is untested - UMS untested (I lost my A-to-A otg cable)
This commit is contained in:
parent
71f03ee380
commit
a79c2f7544
@ -1,8 +1,9 @@
|
||||
# Rockchip RK3566 quad core 4GB RAM SoC WIFI/BT eMMC USB2
|
||||
# Rockchip RK3566 quad core 4/8GB RAM SoC WIFI/BT eMMC USB2 USB3 NVMe PCIe GbE HDMI SPI
|
||||
BOARD_NAME="orangepi3b"
|
||||
BOARDFAMILY="rk35xx"
|
||||
BOARD_MAINTAINER=""
|
||||
BOOTCONFIG="orangepi-3b-rk3566_defconfig"
|
||||
BOOT_SOC="rk3566"
|
||||
KERNEL_TARGET="legacy,edge"
|
||||
FULL_DESKTOP="yes"
|
||||
BOOT_LOGO="desktop"
|
||||
@ -16,12 +17,41 @@ MODULES_BLACKLIST_LEGACY="bcmdhd"
|
||||
|
||||
# Newer blobs. Tested to work with opi3b
|
||||
DDR_BLOB="rk35/rk3566_ddr_1056MHz_v1.18.bin"
|
||||
BL31_BLOB="rk35/rk3568_bl31_v1.43.elf"
|
||||
BL31_BLOB="rk35/rk3568_bl31_v1.43.elf" # NOT a typo, bl31 is shared across 68 and 66
|
||||
ROCKUSB_BLOB="rk35/rk3566_spl_loader_1.14.bin" # For `EXT=rkdevflash` flashing
|
||||
|
||||
# Override family config for this board; let's avoid conditionals in family config.
|
||||
function post_family_config__orangepi3b_use_vendor_uboot() {
|
||||
BOOTSOURCE='https://github.com/orangepi-xunlong/u-boot-orangepi.git'
|
||||
BOOTBRANCH='branch:v2017.09-rk3588'
|
||||
BOOTPATCHDIR="legacy"
|
||||
function post_family_config__orangepi3b_use_mainline_uboot() {
|
||||
display_alert "$BOARD" "mainline u-boot overrides" "info"
|
||||
|
||||
BOOTSOURCE="https://github.com/Kwiboo/u-boot-rockchip.git"
|
||||
BOOTBRANCH="commit:a821e84f39ed32f150cb8c6aeced836a2cdfee0a" # specific commit, from "branch:rk3568-2023.10"
|
||||
BOOTDIR="u-boot-${BOARD}" # do not share u-boot directory
|
||||
BOOTPATCHDIR="v2023.10" # has SPI NOR ID, defconfig & DT patches in "board_orangepi3b" subdir
|
||||
|
||||
BOOTDELAY=1 # Wait for UART interrupt to enter UMS/RockUSB mode etc
|
||||
UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.bin u-boot.itb idbloader.img idbloader-spi.img"
|
||||
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd # disable stuff from rockchip64_common; we're using binman here which does all the work already
|
||||
|
||||
# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
|
||||
function write_uboot_platform() {
|
||||
dd if=${1}/u-boot-rockchip.bin of=${2} bs=32k seek=1 conv=fsync
|
||||
}
|
||||
|
||||
# Smarter/faster/better to-spi writer using flashcp (hopefully with --partition), using the binman-provided 'u-boot-rockchip-spi.bin'
|
||||
function write_uboot_platform_mtd() {
|
||||
declare -a extra_opts_flashcp=("--verbose")
|
||||
if flashcp -h | grep -q -e '--partition'; then
|
||||
echo "Confirmed flashcp supports --partition -- read and write only changed blocks." >&2
|
||||
extra_opts_flashcp+=("--partition")
|
||||
else
|
||||
echo "flashcp does not support --partition, will write full SPI flash blocks." >&2
|
||||
fi
|
||||
flashcp "${extra_opts_flashcp[@]}" "${1}/u-boot-rockchip-spi.bin" /dev/mtd0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function add_host_dependencies__new_uboot_wants_python3_orangepi3b() {
|
||||
declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} python3-pyelftools" # @TODO: convert to array later
|
||||
}
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
From 0de7f977a0ede9bcc8ca503466d8a955765d1cf3 Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Pardini <ricardo@pardini.net>
|
||||
Date: Mon, 25 Sep 2023 20:50:38 +0200
|
||||
Subject: [PATCH 1/2] mtd: spi-nor: Add support for XMC's XM25QU128C
|
||||
|
||||
Add support for XMC 128M-bit flash XM25QU128C.
|
||||
Used in the OrangePi 3B.
|
||||
|
||||
Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
|
||||
---
|
||||
drivers/mtd/spi/spi-nor-ids.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
|
||||
index c461c1b928d..000b67e679c 100644
|
||||
--- a/drivers/mtd/spi/spi-nor-ids.c
|
||||
+++ b/drivers/mtd/spi/spi-nor-ids.c
|
||||
@@ -535,6 +535,7 @@ const struct flash_info spi_nor_ids[] = {
|
||||
{ INFO("XM25QH64A", 0x207017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ INFO("XM25QH64C", 0x204017, 0, 64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ INFO("XM25QH128A", 0x207018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
+ { INFO("XM25QU128C", 0x204118, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
#endif
|
||||
#ifdef CONFIG_SPI_FLASH_XTX
|
||||
/* XTX Technology Limited */
|
||||
--
|
||||
2.42.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user