Skip to content

[Contribution] RK3576 Mainline Support: TRNG, Thermal OTP, and NPU Infrastructure #9

@th3cavalry

Description

@th3cavalry

Overview

To assist with the flipper-devel mainline effort, we'd like to contribute several RK3576 hardware block implementations that we stabilized while porting the mainline kernel to the PhotoniCAT 2.

Disclaimer: While some of the initial integration was "vibe coded", this code is fully functional on live hardware across both OpenWrt and Ubuntu/Debian builds (building, flashing, and operating reliably).

What we are sharing:

  1. Hardware RNG (TRNG): Support for the RK3576 standalone TRNG. Given Flipper's role as a security tool, a functional hardware RNG is critical.
  2. Thermal OTP & TSADC: Support for reading thermal trim values directly from OTP memory. This is required for accurate temperature monitoring across the A72/A53/NPU clusters to prevent throttling issues.
  3. PCIe & Naneng Combo PHY: Stability fixes for Gen2x1 configurations, specifically addressing PHY initialization issues we encountered with M.2 expansion modules.
  4. NPU Infrastructure: Our rk3576.dtsi already includes the full power domain hierarchy (PD_NPUTOP, PD_NPU0, PD_NPU1), npu_grf system controllers, and all seven NPU QoS nodes. This provides the necessary "wiring" to enable the RKNPU2 stack.

References

  • Mainline Tracking Repo: photonicat/rockchip_rk3576_linux_mainline
  • Specific Patches: See the patches/kernel/ directory in the repository above (e.g., 060-v6.13-arm64-dts-rockchip-Add-rk3576-SoC-base-DT.patch and 330-02-thermal-rockchip-support-reading-trim-values-from-otp.patch).

Let us know if you'd like us to open a PR against the flipper-devel branch or if you'd prefer the patches formatted via git send-email.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions