recomputer-rk3588-devkit: edge: mainline kernel & u-boot - #10357
recomputer-rk3588-devkit: edge: mainline kernel & u-boot#10357rpardini wants to merge 2 commits into
Conversation
- DeviceTree will be submitted to LKML separately - identical across v7.1 and v7.2 - board file: - make way for `edge` by sprinkling "only for vendor" shortcircuits in strategic places - use a case/esac to gate `aic8800` extension, extra packages, and `recomputer-rk35xx-common.inc` sourcing - series: - `arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on reComputer RK3588` - `arm64: dts: rockchip: Add NPU to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add cooling fan to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add 40-pin header to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add mini PCIe slot to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add analog audio to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add HDMI input to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add HDMI to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add M.2 slots to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add PCIe Ethernet to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add DisplayPort to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add USB Type-C to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add USB host to Seeed reComputer RK3588 Dev Kit` - `arm64: dts: rockchip: Add Seeed reComputer RK3588 Dev Kit` - `dt-bindings: arm: rockchip: Add Seeed Studio reComputer RK3588 Dev Kit`
…defconfig +fancy - `.dts` is copy from rockchip64-7.1 - `recomputer-rk3588_defconfig` is similar to other rk3588 boards, except: - enable all/most SPI Flash drivers - enable FUSB302 driver - `-u-boot.dtsi` just pulls in the generic dtsi + sfc/flash0 bootph - stores environment in SPI at offset 0xc00000 size 0x20000 - fw_printenv/fw_setenv userspace vs SPI environment - preboot flashes R/G/B LED (tri-color user LED) - use mainline AT-F for mainline builds (so HDMI-RX works with mainline kernel) - keep rkbin blob for vendor builds (although vendor is using rk u-boot for now)
📝 WalkthroughWalkthroughThe PR adds edge/mainline support for the RK3588 reComputer Dev Kit. It adds branch-specific board configuration, U-Boot v2026.07 settings, early-boot device-tree support, and complete kernel device trees for multiple Rockchip kernel trees. ChangesRK3588 mainline board support
Estimated code review effort: 4 (Complex) | ~75 minutes Sequence Diagram(s)sequenceDiagram
participant BoardConfig
participant UBoot
participant SPIFlash
participant KernelDT
BoardConfig->>UBoot: build mainline boot image
UBoot->>SPIFlash: load environment and boot media
UBoot->>KernelDT: load RK3588 board device tree
KernelDT->>KernelDT: enable power, USB, storage, and display peripherals
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
config/boards/recomputer-rk3588-devkit.conf (1)
87-99: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove the unreachable vendor branch.
Line 83 returns when
BRANCHisvendor. The condition at line 89 can never be true, so the rkbin BL31 path andATF_COMPILE="no"are dead code. Simplify to the mainline path only.♻️ Proposed fix
- # If BRANCH==vendor, use rkbin BL31 ${RKBIN_DIR}/${BL31_BLOB}, otherwise, bl31.elf from mainline ATF/TF-A - declare bl31_blob="undetermined" - if [[ "${BRANCH}" == "vendor" ]]; then - display_alert "${BOARD}/${BRANCH}" "Using Rockchip rkbin BL31 blob : ${RKBIN_DIR}/${BL31_BLOB}" "info" - bl31_blob="${RKBIN_DIR}/${BL31_BLOB}" - declare -g ATF_COMPILE="no" # no need to build mainline it either - else - display_alert "${BOARD}/${BRANCH}" "Using mainline BL31: bl31.elf from mainline ATF/TF-A" "info" - bl31_blob="bl31.elf" - # To reuse ATF code in rockchip64_common, let's change the BOOT_SCENARIO and call prepare_boot_configuration() again - BOOT_SCENARIO="tpl-blob-atf-mainline" - prepare_boot_configuration - fi + display_alert "${BOARD}/${BRANCH}" "Using mainline BL31: bl31.elf from mainline ATF/TF-A" "info" + declare bl31_blob="bl31.elf" + # To reuse ATF code in rockchip64_common, let's change the BOOT_SCENARIO and call prepare_boot_configuration() again + BOOT_SCENARIO="tpl-blob-atf-mainline" + prepare_boot_configuration🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@config/boards/recomputer-rk3588-devkit.conf` around lines 87 - 99, Remove the unreachable vendor conditional in the BL31 setup, including the rkbin blob assignment and ATF_COMPILE override. Keep the mainline path from the else branch as the unconditional behavior, including its alert, bl31.elf assignment, BOOT_SCENARIO update, and prepare_boot_configuration() call.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@config/boards/recomputer-rk3588-devkit.conf`:
- Around line 202-206: Update the generated fw_env.config comment in the heredoc
to use the literal board name instead of ${BOARD_NAME}; keep the quoted
FW_ENV_CONFIG delimiter and all configuration values unchanged.
- Around line 31-38: Update the PACKAGE_LIST_BOARD assignment in the wildcard
branch to use declare -g, matching the vendor branch, so libubootenv-tool
remains available when the board configuration is sourced inside a function.
In `@patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts`:
- Around line 20-31: Add poll-interval = <100>; to the adc-keys node in
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts#L20-L31,
patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts#L20-L31, and
patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts#L20-L31,
keeping all three device-tree definitions identical.
- Around line 361-366: Correct the line-name in the usb-hub-reset-hog node to
the USB hub reset net name, replacing the incorrect sys_3v3_en value in
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts lines
361-366, patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts
lines 361-366, and
patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts lines
361-366.
---
Nitpick comments:
In `@config/boards/recomputer-rk3588-devkit.conf`:
- Around line 87-99: Remove the unreachable vendor conditional in the BL31
setup, including the rkbin blob assignment and ATF_COMPILE override. Keep the
mainline path from the else branch as the unconditional behavior, including its
alert, bl31.elf assignment, BOOT_SCENARIO update, and
prepare_boot_configuration() call.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f04b9e98-f37b-4fa5-bc5c-cb130465b19a
📒 Files selected for processing (6)
config/boards/recomputer-rk3588-devkit.confpatch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dtspatch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dtspatch/u-boot/v2026.07/defconfig/recomputer-rk3588_defconfigpatch/u-boot/v2026.07/dt_uboot/rk3588-recomputer-devkit-u-boot.dtsipatch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts
| *) | ||
| # @TODO: there is no aic8800 support for kernel > v7.0 yet | ||
| # mainline DTB name is different | ||
| display_alert "$BOARD" "Using mainline kernel DTB: rockchip/rk3588-recomputer-devkit.dtb -> boot_fdt_file" "warn" | ||
| declare -g BOOT_FDT_FILE="rockchip/rk3588-recomputer-devkit.dtb" | ||
| # userspace for manipulating the u-boot env stored in SPI flash | ||
| PACKAGE_LIST_BOARD="libubootenv-tool" # libubootenv-tool provides fw_printenv and fw_setenv, for talking to U-Boot environment | ||
| ;; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Use declare -g for PACKAGE_LIST_BOARD.
Line 26 uses declare -g PACKAGE_LIST_BOARD in the vendor branch. Line 37 uses a plain assignment. Board configs are sourced inside a function in the Armbian build, so a plain assignment can stay function-local and the package can be dropped for edge. Keep both branches consistent.
♻️ Proposed fix
# userspace for manipulating the u-boot env stored in SPI flash
- PACKAGE_LIST_BOARD="libubootenv-tool" # libubootenv-tool provides fw_printenv and fw_setenv, for talking to U-Boot environment
+ declare -g PACKAGE_LIST_BOARD="libubootenv-tool" # libubootenv-tool provides fw_printenv and fw_setenv, for talking to U-Boot environment
;;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| *) | |
| # @TODO: there is no aic8800 support for kernel > v7.0 yet | |
| # mainline DTB name is different | |
| display_alert "$BOARD" "Using mainline kernel DTB: rockchip/rk3588-recomputer-devkit.dtb -> boot_fdt_file" "warn" | |
| declare -g BOOT_FDT_FILE="rockchip/rk3588-recomputer-devkit.dtb" | |
| # userspace for manipulating the u-boot env stored in SPI flash | |
| PACKAGE_LIST_BOARD="libubootenv-tool" # libubootenv-tool provides fw_printenv and fw_setenv, for talking to U-Boot environment | |
| ;; | |
| *) | |
| # `@TODO`: there is no aic8800 support for kernel > v7.0 yet | |
| # mainline DTB name is different | |
| display_alert "$BOARD" "Using mainline kernel DTB: rockchip/rk3588-recomputer-devkit.dtb -> boot_fdt_file" "warn" | |
| declare -g BOOT_FDT_FILE="rockchip/rk3588-recomputer-devkit.dtb" | |
| # userspace for manipulating the u-boot env stored in SPI flash | |
| declare -g PACKAGE_LIST_BOARD="libubootenv-tool" # libubootenv-tool provides fw_printenv and fw_setenv, for talking to U-Boot environment | |
| ;; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@config/boards/recomputer-rk3588-devkit.conf` around lines 31 - 38, Update the
PACKAGE_LIST_BOARD assignment in the wildcard branch to use declare -g, matching
the vendor branch, so libubootenv-tool remains available when the board
configuration is sourced inside a function.
| cat <<- 'FW_ENV_CONFIG' > "${SDCARD}"/etc/fw_env.config | ||
| # MTD/SPI u-boot env for the ${BOARD_NAME} | ||
| # MTD device name Device offset Env. size Flash sector size Number of sectors | ||
| /dev/mtd0 0xc00000 0x20000 | ||
| FW_ENV_CONFIG |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the non-expanded variable in the generated comment.
The heredoc delimiter is quoted ('FW_ENV_CONFIG'), so ${BOARD_NAME} is written literally into /etc/fw_env.config. Use a literal board name in the comment.
♻️ Proposed fix
cat <<- 'FW_ENV_CONFIG' > "${SDCARD}"/etc/fw_env.config
- # MTD/SPI u-boot env for the ${BOARD_NAME}
+ # MTD/SPI u-boot env for the reComputer RK3588
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc00000 0x20000
FW_ENV_CONFIG📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| cat <<- 'FW_ENV_CONFIG' > "${SDCARD}"/etc/fw_env.config | |
| # MTD/SPI u-boot env for the ${BOARD_NAME} | |
| # MTD device name Device offset Env. size Flash sector size Number of sectors | |
| /dev/mtd0 0xc00000 0x20000 | |
| FW_ENV_CONFIG | |
| cat <<- 'FW_ENV_CONFIG' > "${SDCARD}"/etc/fw_env.config | |
| # MTD/SPI u-boot env for the reComputer RK3588 | |
| # MTD device name Device offset Env. size Flash sector size Number of sectors | |
| /dev/mtd0 0xc00000 0x20000 | |
| FW_ENV_CONFIG |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@config/boards/recomputer-rk3588-devkit.conf` around lines 202 - 206, Update
the generated fw_env.config comment in the heredoc to use the literal board name
instead of ${BOARD_NAME}; keep the quoted FW_ENV_CONFIG delimiter and all
configuration values unchanged.
| adc-keys { | ||
| compatible = "adc-keys"; | ||
| io-channels = <&saradc 1>; | ||
| io-channel-names = "buttons"; | ||
| keyup-threshold-microvolt = <1800000>; | ||
|
|
||
| button-vol-up { | ||
| label = "Volume Up"; | ||
| linux,code = <KEY_VOLUMEUP>; | ||
| press-threshold-microvolt = <1750000>; | ||
| }; | ||
| }; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Missing poll-interval in the adc-keys node in three copies of the device tree. The three files share the same adc-keys node without poll-interval.
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts#L20-L31: addpoll-interval = <100>;.patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts#L20-L31: add the same property.patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts#L20-L31: add the same property to keep the three files identical.
📍 Affects 3 files
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts#L20-L31(this comment)patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts#L20-L31patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts#L20-L31
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts` around
lines 20 - 31, Add poll-interval = <100>; to the adc-keys node in
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts#L20-L31,
patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts#L20-L31, and
patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts#L20-L31,
keeping all three device-tree definitions identical.
| usb-hub-reset-hog { | ||
| gpio-hog; | ||
| gpios = <RK_PC3 GPIO_ACTIVE_HIGH>; | ||
| line-name = "sys_3v3_en"; | ||
| output-high; | ||
| }; |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Wrong line-name on the USB hub reset hog in three copies of the device tree. The three device trees hold identical content, so the same incorrect line-name appears in each one.
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts#L361-L366: changeline-name = "sys_3v3_en"inusb-hub-reset-hogto the hub reset net name.patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts#L361-L366: apply the sameline-namecorrection.patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts#L361-L366: apply the sameline-namecorrection.
📍 Affects 3 files
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts#L361-L366(this comment)patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts#L361-L366patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts#L361-L366
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts` around
lines 361 - 366, Correct the line-name in the usb-hub-reset-hog node to the USB
hub reset net name, replacing the incorrect sys_3v3_en value in
patch/kernel/archive/rockchip64-7.1/dt/rk3588-recomputer-devkit.dts lines
361-366, patch/kernel/archive/rockchip64-7.2/dt/rk3588-recomputer-devkit.dts
lines 361-366, and
patch/u-boot/v2026.07/dt_upstream_rockchip/rk3588-recomputer-devkit.dts lines
361-366.
| ;; | ||
|
|
||
| *) | ||
| # @TODO: there is no aic8800 support for kernel > v7.0 yet |
There was a problem hiding this comment.
Um if you mean radxa aic8800, then it has been updated to work up to 7.2 now
radxa-pkg/aic8800@bd01abe
|
How does Linux 7.x support Rockchip's GPU and NPU? Does the middleware within the system also support synchronization? @rpardini |
Best place to understand mainline rk3588 in general is https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/mainline-status.md - everything is documented, each link leads to lore with the full series. |
recomputer-rk3588-devkit: edge: mainline kernel & u-boot
BRANCH=edgeand mainline kernel DTedgeby sprinkling "only for vendor" shortcircuits in strategic placesaic8800extension, extra packages, andrecomputer-rk35xx-common.incsourcingarm64: dts: rockchip: describe PCIe RTL8125 Ethernet on reComputer RK3588arm64: dts: rockchip: Add NPU to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add cooling fan to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add 40-pin header to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add mini PCIe slot to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add analog audio to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add HDMI input to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add HDMI to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add M.2 slots to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add PCIe Ethernet to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add DisplayPort to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add USB Type-C to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add USB host to Seeed reComputer RK3588 Dev Kitarm64: dts: rockchip: Add Seeed reComputer RK3588 Dev Kitdt-bindings: arm: rockchip: Add Seeed Studio reComputer RK3588 Dev Kit.dtsis copy from rockchip64-7.1recomputer-rk3588_defconfigis similar to other rk3588 boards, except:-u-boot.dtsijust pulls in the generic dtsi + sfc/flash0 bootphSummary by CodeRabbit