Skip to content

Radxa E52C: add mainline U-Boot support and kernel target configuration#9366

Open
okrc wants to merge 1 commit intoarmbian:mainfrom
okrc:radxa-e52c
Open

Radxa E52C: add mainline U-Boot support and kernel target configuration#9366
okrc wants to merge 1 commit intoarmbian:mainfrom
okrc:radxa-e52c

Conversation

@okrc
Copy link
Contributor

@okrc okrc commented Feb 6, 2026

Summary by CodeRabbit

  • New Features

    • Added comprehensive support for Radxa E52C board equipped with RK3582 processor, including U-Boot and kernel configurations.
    • Introduced RK3582 chip support with device tree customization based on hardware configuration.
  • Documentation

    • Updated Rockchip boards documentation to include Radxa E52C in supported boards list.

Testing by schwar3kat

  • Build completed successfully
  • Tested on real hardware radxa-e52c
  • Current - Trixie minimal, Noble minimal
  • Edge - Trixie minimal, Noble minimal
  • Vendor - Trixie minimal, Noble minimal
  • Boot, reboot, shutdown verified
  • Network both ports

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This pull request adds support for the Radxa E52C board powered by the RK3582 SoC. Changes include board configuration with mainline U-Boot support, initial RK3582 support in U-Boot with OTP-based device tree fixups, generic RK3588 configuration updates, and Radxa E52C-specific device tree and defconfig files.

Changes

Cohort / File(s) Summary
Board Configuration
config/boards/radxa-e52c.conf
Updated kernel targets to include multiple branches; added serial console default; introduced mainline U-Boot support functions that override boot-related settings and configure BTRFS.
RK3582 Core Support
patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch
Added ft_system_setup() function with OTP-based device tree fixups; defines CPU code and ip-state constants; filters RK3582 variants and disables/fails hardware blocks (CPU clusters, GPU, codec) based on OTP policies; provides FDT path manipulation helpers.
Generic RK3588 Updates
patch/u-boot/v2026.01/board_radxa-e52c/0001-rk3588-generic-support-for-rk3582.patch
Enabled OF_SYSTEM_SETUP in generic RK3588 defconfig; updated device tree model string and documentation to reflect RK3582/RK3588S/RK3588 support.
Radxa E52C Board Support
patch/u-boot/v2026.01/board_radxa-e52c/1000-add-support-for-radxa-e52c.patch
Added Radxa E52C device tree source, board defconfig, and updated Rockchip board documentation listing.

Sequence Diagram

sequenceDiagram
    participant UBoot as U-Boot
    participant OTP as OTP Hardware
    participant FDT as Device Tree
    
    UBoot->>OTP: Read CPU code from OTP offset
    OTP-->>UBoot: Return CPU code value
    alt CPU code matches RK3582
        UBoot->>OTP: Read ip-state (failed/disabled blocks)
        OTP-->>UBoot: Return ip-state bitmask
        UBoot->>UBoot: Apply disable policy based on FAIL_* masks
        alt Cluster disabled
            UBoot->>FDT: Remove/rename cpu-map clusters
        end
        alt GPU/Codec disabled
            UBoot->>FDT: Fail gpu@, video-codec@, iommu@ nodes
        end
        UBoot->>FDT: Append rk3582 to soc-compatible
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 New E52C joins the fold,
With RK3582 brave and bold,
OTP reads what's true,
Device trees fixed anew,
Mainline U-Boot takes control! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly reflects the main changes: adding mainline U-Boot support and kernel target configuration for the Radxa E52C device, which aligns with the core modifications across all files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/large PR with 250 lines or more 02 Milestone: First quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Feb 6, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
config/boards/radxa-e52c.conf (1)

1-1: ⚠️ Potential issue | 🟡 Minor

Board description says "octa core" but RK3582 is a 6-core SoC.

The RK3582 has 2× Cortex-A76 + 4× Cortex-A55 = 6 cores (confirmed by the patch commit message at line 10 of 1000-add-support-for-radxa-e52c.patch and the OTP/policy output showing 2 CPU cores failed from the RK3588's 8). Also, "SoC" appears twice in the description.

Proposed fix
-# Rockchip RK3582 SoC octa core 4-16GB SoC eMMC USB3
+# Rockchip RK3582 hexa core 4-16GB SoC eMMC USB3
🧹 Nitpick comments (1)
patch/u-boot/v2026.01/board_radxa-e52c/0000-add-initial-rk3582-support.patch (1)

161-176: cluster1_removed is set unconditionally — fine in practice, but fragile if the DT structure were ever unexpected.

On line 165, cluster1_removed = true executes regardless of whether fdt_path_del_node succeeded. If the cluster1 node were absent from the DT, this would still trigger the cluster2 → cluster1 rename at line 175, which would also silently fail. Functionally harmless since the RK3588 DT is expected to always have cluster0/1/2, but a guard could prevent a misleading rename attempt.

This is a very minor robustness nit on an upstream-authored patch, so no change is necessary.

Optional: guard `cluster1_removed` on success
 	if ((ip_state[0] & FAIL_CPU_CLUSTER1) == FAIL_CPU_CLUSTER1) {
 		log_debug("remove cpu-map cluster1\n");
-		fdt_path_del_node(blob, "/cpus/cpu-map/cluster1");
-		cluster1_removed = true;
+		if (!fdt_path_del_node(blob, "/cpus/cpu-map/cluster1"))
+			cluster1_removed = true;
 	}

@schwar3kat
Copy link
Contributor

schwar3kat commented Feb 6, 2026

I will build images and test this on radxa-e52c board.
Done.

@rpardini
Copy link
Member

rpardini commented Feb 6, 2026

Nice. Maybe you could run ./compile.sh BOARD=radxa-e52c BRANCH=edge rewrite-uboot-patches and commit, so we avoid churn down the line. Although I suspect those will land in 24.04 so quite optional

Copy link
Contributor

@schwar3kat schwar3kat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested okay on the board.

@github-actions github-actions bot added the Ready to merge Reviewed, tested and ready for merge label Feb 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot removed the Needs review Seeking for review label Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

02 Milestone: First quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/large PR with 250 lines or more

Development

Successfully merging this pull request may close these issues.

3 participants