From a9479f848c35722e97aa82fe59442c34e348872c Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sat, 6 Dec 2025 16:34:23 +0100 Subject: [PATCH 1/3] rockchip64-edge (6.18): enable Realtek DSA switches (`NET_DSA_REALTEK_RTL8365MB`) - for the Radxa E24C --- config/kernel/linux-rockchip64-edge.config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/kernel/linux-rockchip64-edge.config b/config/kernel/linux-rockchip64-edge.config index 4203290376c0..6e1208f1621c 100644 --- a/config/kernel/linux-rockchip64-edge.config +++ b/config/kernel/linux-rockchip64-edge.config @@ -817,6 +817,10 @@ CONFIG_NET_DSA_SJA1105=m CONFIG_NET_DSA_XRS700X_I2C=m CONFIG_NET_DSA_XRS700X_MDIO=m CONFIG_NET_DSA_REALTEK=m +CONFIG_NET_DSA_REALTEK_MDIO=y +CONFIG_NET_DSA_REALTEK_SMI=y +CONFIG_NET_DSA_REALTEK_RTL8365MB=m +CONFIG_NET_DSA_REALTEK_RTL8366RB=m CONFIG_NET_DSA_SMSC_LAN9303_I2C=m CONFIG_NET_DSA_SMSC_LAN9303_MDIO=m CONFIG_NET_DSA_VITESSE_VSC73XX_SPI=m From 0631bef0dd6d78ab721c6fe83724deaa25329c19 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 7 Dec 2025 15:43:02 +0100 Subject: [PATCH 2/3] Add Radxa E24C; vendor kernel and vendor u-boot only for now - vendor stuff boots, mostly works - edge started, using Kwiboo's tree, but not enabled - u-boot mostly works, but needs rework against v2026.01 - revisit after 6.19 - rk3528 pcie already landed - the RTL8367RB switch vs the GMAC might need more work --- config/boards/radxa-e24c.wip | 112 +++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 config/boards/radxa-e24c.wip diff --git a/config/boards/radxa-e24c.wip b/config/boards/radxa-e24c.wip new file mode 100644 index 000000000000..2b54e502564f --- /dev/null +++ b/config/boards/radxa-e24c.wip @@ -0,0 +1,112 @@ +# Rockchip RK3528 SoC GMAC1 RTL8367RB NVMe +BOARD_NAME="Radxa E24C" +BOARDFAMILY="rockchip-rk3588" +BOARD_MAINTAINER="rpardini" +BOOTCONFIG="radxa-e24c-spi-rk3528_defconfig" # vendor uboot defconfig; Radxa's name +KERNEL_TARGET="vendor" # edge (6.18) is not ready yet: ,edge +BOOT_FDT_FILE="rockchip/rk3528-radxa-e24c-spi.dtb" # for non-eMMC boards, with SPI NOR: "SF: Detected mx25u12835f with page size 256 Bytes, erase size 4 KiB, total 16 MiB" +#BOOT_FDT_FILE="rockchip/rk3528-radxa-e24c.dtb" # for eMMC boards +BOOT_SCENARIO="spl-blobs" +BOOT_SOC="rk3528" +IMAGE_PARTITION_TABLE="gpt" + +# Schematics: https://dl.radxa.com/e/e24c/docs/radxa_e24c_v1200_schematic.pdf + +# Mainline U-Boot, only for non-vendor BRANCH +function post_family_config__e24c_use_mainline_uboot() { + if [[ "${BRANCH}" == "vendor" ]]; then + return 0 + fi + + declare -g BOOTCONFIG="radxa-e24c-rk3528_defconfig" # mainline uboot defconfig; Kwiboo's name + display_alert "$BOARD" "Using Kwiboo's U-Boot for $BOARD / $BRANCH" "info" + + declare -g BOOTDELAY=1 + + # This is Kwiboo's work branch, based on 2025.07 at ebd699c97de0576d9f8703b8afc5e71f98ff18d2 + declare -g BOOTSOURCE="https://github.com/Kwiboo/u-boot-rockchip.git" + declare -g BOOTBRANCH="branch:rk3528" # at commit:ebd699c97de0576d9f8703b8afc5e71f98ff18d2 + declare -g BOOTPATCHDIR="kwiboo-rk3528-no-patches" + declare -g BOOTDIR="u-boot-${BOARD}" + declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.bin" + 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=notrunc status=none + } + + function write_uboot_platform_mtd() { + flashcp -v -p "$1/u-boot-rockchip-spi.bin" /dev/mtd0 + } +} + +# Mainline U-Boot, only for non-vendor BRANCH +# "rockchip-common: boot SD card first, then NVMe, then mmc" +# On radxa-e24c, mmc0 is the eMMC, mmc1 is the SD card slot +function pre_config_uboot_target__cm3588_patch_rockchip_common_boot_order() { + if [[ "${BRANCH}" == "vendor" ]]; then + return 0 + fi + + declare -a rockchip_uboot_targets=("mmc1" "nvme" "mmc0" "scsi" "usb" "pxe" "dhcp" "spi") # for future make-this-generic delight + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: adjust boot order to '${rockchip_uboot_targets[*]}'" "info" + sed -i -e "s/#define BOOT_TARGETS.*/#define BOOT_TARGETS \"${rockchip_uboot_targets[*]}\"/" include/configs/rockchip-common.h + regular_git diff -u include/configs/rockchip-common.h || true +} + +# Mainline U-Boot, only for non-vendor BRANCH +function post_config_uboot_target__extra_configs_for_e24c_uboot() { + if [[ "${BRANCH}" == "vendor" ]]; then + return 0 + fi + + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable preboot & flash user LED in preboot" "info" + run_host_command_logged scripts/config --enable CONFIG_USE_PREBOOT + run_host_command_logged scripts/config --set-str CONFIG_PREBOOT "'led SYS on; sleep 0.1; led SYS off; led LAN1 on; sleep 0.1; led LAN1 off; led LAN2 on; sleep 0.1; led LAN2 off; led LAN3 on; sleep 0.1; led LAN3 off; '" # double quotes required due to run_host_command_logged's quirks + + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable EFI debugging commands" "info" + run_host_command_logged scripts/config --enable CMD_EFIDEBUG + run_host_command_logged scripts/config --enable CMD_NVEDIT_EFI + + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more filesystems support" "info" + run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS + + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more compression support" "info" + run_host_command_logged scripts/config --enable CONFIG_LZO + run_host_command_logged scripts/config --enable CONFIG_BZIP2 + run_host_command_logged scripts/config --enable CONFIG_ZSTD + + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable gpio LED support" "info" + run_host_command_logged scripts/config --enable CONFIG_LED + run_host_command_logged scripts/config --enable CONFIG_LED_GPIO + + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable networking cmds" "info" + run_host_command_logged scripts/config --enable CONFIG_CMD_NFS + run_host_command_logged scripts/config --enable CONFIG_CMD_WGET + run_host_command_logged scripts/config --enable CONFIG_CMD_DNS + run_host_command_logged scripts/config --enable CONFIG_PROT_TCP + run_host_command_logged scripts/config --enable CONFIG_PROT_TCP_SACK + + # UMS, RockUSB, gadget stuff + display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable UMS/RockUSB gadget" "info" + declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB" "CONFIG_CMD_USB_MASS_STORAGE") + for config in "${enable_configs[@]}"; do + run_host_command_logged scripts/config --enable "${config}" + done + # Auto-enabled by the above, force off... + run_host_command_logged scripts/config --disable USB_FUNCTION_FASTBOOT + + return 0 +} + +# When not using vendor, set use ttyS0 as default console in bootscript +function post_family_config__e24c_set_serial_console_for_edge() { + if [[ "${BRANCH}" == vendor ]]; then + display_alert "$BOARD" "Using vendor kernel; keeping default console settings" "info" + else + display_alert "$BOARD" "Setting default console to serial ttyS0 for mainline kernel bootscript" "info" + declare -g BOOTSCRIPT="boot-rockchip64-ttyS0.cmd:boot.cmd" + declare -g SERIALCON="ttyS0" + fi +} From f1f580ffc6a7507d4d9adbb380ef4204fc3eed3f Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 7 Dec 2025 15:44:31 +0100 Subject: [PATCH 3/3] rockchip64_common: rk3528: add ROCKUSB_BLOB --- config/sources/families/include/rockchip64_common.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/config/sources/families/include/rockchip64_common.inc b/config/sources/families/include/rockchip64_common.inc index 553689e360d1..108e07149886 100644 --- a/config/sources/families/include/rockchip64_common.inc +++ b/config/sources/families/include/rockchip64_common.inc @@ -118,6 +118,7 @@ case "$BOOT_SOC" in BOOT_SCENARIO="${BOOT_SCENARIO:=spl-blobs}" DDR_BLOB="${DDR_BLOB:-"rk35/rk3528_ddr_1056MHz_v1.09.bin"}" BL31_BLOB="${BL31_BLOB:-"rk35/rk3528_bl31_v1.17.elf"}" + ROCKUSB_BLOB="rk35/rk3528_spl_loader_v1.07.104.bin" ;; rk3566)