Skip to content

rockchip-rk3588: add Rock 5 ITX PWM fan control overlay#9695

Open
ccarpinteri wants to merge 1 commit intoarmbian:mainfrom
ccarpinteri:rock-5-itx-pwm-fan-overlay
Open

rockchip-rk3588: add Rock 5 ITX PWM fan control overlay#9695
ccarpinteri wants to merge 1 commit intoarmbian:mainfrom
ccarpinteri:rock-5-itx-pwm-fan-overlay

Conversation

@ccarpinteri
Copy link
Copy Markdown

@ccarpinteri ccarpinteri commented Apr 19, 2026

Summary

The Rock 5 ITX DTB defines the PWM fan as /pwm-fan without a labelled phandle. The existing rockchip-rk3588-fanctrl overlay targets &fan which does not exist on this board, so it has no effect.

The default cooling-levels in the Rock 5 ITX DTB start at 0, meaning the fan receives no PWM signal at idle and falls back to full speed regardless of temperature.

This PR adds a new board-specific overlay rockchip-rk3588-rock-5-itx-pwm-fan that:

  • Patches /pwm-fan directly using target-path (required since no &fan label exists)
  • Replaces cooling-levels with a curve starting at 1 (near-silent at idle) instead of 0
  • Adds rockchip,temp-trips to ramp the fan gradually at 45°C / 50°C / 55°C / 65°C

Test plan

  • Tested on Rock 5 ITX running Armbian with linux-vendor-rk35xx 6.1.115
  • Fan spins down to near-silent at idle (~34–40°C)
  • Fan ramps up correctly under CPU load
  • Overlay loads cleanly via user_overlays=rockchip-rk3588-rock-5-itx-pwm-fan in armbianEnv.txt
  • Verified via /sys/devices/platform/pwm-fan/hwmon/hwmon*/pwm1 and running device tree dump

Related

Summary by CodeRabbit

Release Notes

  • New Features

    • Added PWM fan control overlay for Rock 5 ITX boards with configurable cooling levels and temperature-based thresholds to optimize fan performance.
  • Documentation

    • Added documentation for Rock 5 ITX PWM fan overlay configuration and behavior.
  • Chores

    • Updated build configuration across kernel versions to include new overlay.

The Rock 5 ITX DTB defines the PWM fan as /pwm-fan without a labelled
phandle, so the existing rockchip-rk3588-fanctrl overlay (which targets
&fan) has no effect on this board.

The default cooling-levels in the Rock 5 ITX DTB start at 0, which means
the fan receives no PWM signal at idle and falls back to running at full
speed regardless of temperature.

This overlay patches /pwm-fan directly using target-path, replacing the
cooling-levels with a curve that starts at 1 (near-silent at idle) and
adds rockchip,temp-trips to ramp the fan gradually across four steps
at 45°C, 50°C, 55°C, and 65°C.

Tested on Rock 5 ITX running Armbian with linux-vendor-rk35xx 6.1.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 19, 2026

📝 Walkthrough

Walkthrough

A new Device Tree Overlay for PWM fan control on the Rock 5 ITX board is added across three kernel versions (6.12, 6.18, 7.0), with corresponding build configuration updates, overlay source files, and documentation detailing the cooling-level temperature-trip mappings.

Changes

Cohort / File(s) Summary
Makefile DTBO build list
patch/kernel/archive/rockchip64-{6.12,6.18,7.0}/overlay/Makefile
Added rockchip-rk3588-rock-5-itx-pwm-fan.dtbo to dtbo-$(CONFIG_ARCH_ROCKCHIP) build target across all three kernel versions.
Device Tree Overlay source
patch/kernel/archive/rockchip64-{6.12,6.18,7.0}/overlay/rockchip-rk3588-rock-5-itx-pwm-fan.dtso
New overlay files defining PWM fan cooling-levels (1 64 128 192 255) and temperature trip points (45°C / 50°C / 55°C / 65°C) targeting the /pwm-fan node.
Documentation
patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays
Added "Details for Rock 5 ITX overlays" section explaining that the overlay patches /pwm-fan to set proper cooling curve behavior, avoiding idle full-speed operation on Rock 5 ITX boards.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop, hop, the fans now spin with grace!
Three kernels cooled in every place,
PWM levels smooth and sweet,
Temperature trips keep Rock 5 ITX neat.

🚥 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 title accurately describes the main change: adding a Rock 5 ITX PWM fan control overlay to the rockchip-rk3588 kernel patches across multiple kernel versions.
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

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/medium PR with more then 50 and less then 250 lines 05 Milestone: Second quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Apr 19, 2026
Copy link
Copy Markdown
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.

🧹 Nitpick comments (2)
patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays (1)

295-306: Documentation reads well; consider noting the tested kernel.

The description clearly explains the root cause (unlabelled /pwm-fan node, cooling-levels starting at 0) and the corrective curve. Minor nit: since the PR description states testing was performed only with linux-vendor-rk35xx 6.1, consider adding a one-liner noting the kernel(s) on which the overlay has been validated, so users on mainline 6.12/6.18/7.0 set expectations correctly regarding the rockchip,temp-trips ramp behavior.

Also, as noted on the 6.18/7.0 Makefiles, please copy this section into the README files in rockchip64-6.18/overlay/ and rockchip64-7.0/overlay/ so all three kernel packages document the overlay.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays` around
lines 295 - 306, Add a one-line note to the rockchip-rk3588-rock-5-itx-pwm-fan
section in README.rockchip-overlays stating which kernel(s) this overlay was
tested with (e.g. "Validated on linux-vendor-rk35xx 6.1") so users on
6.12/6.18/7.0 know expectations, and then copy that entire patched section
(including the new one-liner) into the corresponding README files for
rockchip64-6.18/overlay/README.rockchip-overlays and
rockchip64-7.0/overlay/README.rockchip-overlays so all three kernel packages
include the same documentation about testing and ramp behavior.
patch/kernel/archive/rockchip64-6.18/overlay/Makefile (1)

70-70: Propagate the README documentation to this kernel's overlay directory.

The PR adds a "Details for Rock 5 ITX overlays" section only to patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays. Since this DTBO is now built for rockchip64-6.18 too, users installing on a 6.18 image won't see the overlay described in the packaged README. Please mirror the same section into patch/kernel/archive/rockchip64-6.18/overlay/README.rockchip-overlays (and the 7.0 counterpart) for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@patch/kernel/archive/rockchip64-6.18/overlay/Makefile` at line 70, Add the
missing "Details for Rock 5 ITX overlays" section to the README used by the 6.18
kernel overlay set: copy the same "Details for Rock 5 ITX overlays" content from
the existing
patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays into
patch/kernel/archive/rockchip64-6.18/overlay/README.rockchip-overlays so the
rockchip-rk3588-rock-5-itx-pwm-fan.dtbo is documented for 6.18 users; also
mirror the same section into the 7.0 overlay README (README.rockchip-overlays)
so both kernel overlays have identical documentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays`:
- Around line 295-306: Add a one-line note to the
rockchip-rk3588-rock-5-itx-pwm-fan section in README.rockchip-overlays stating
which kernel(s) this overlay was tested with (e.g. "Validated on
linux-vendor-rk35xx 6.1") so users on 6.12/6.18/7.0 know expectations, and then
copy that entire patched section (including the new one-liner) into the
corresponding README files for rockchip64-6.18/overlay/README.rockchip-overlays
and rockchip64-7.0/overlay/README.rockchip-overlays so all three kernel packages
include the same documentation about testing and ramp behavior.

In `@patch/kernel/archive/rockchip64-6.18/overlay/Makefile`:
- Line 70: Add the missing "Details for Rock 5 ITX overlays" section to the
README used by the 6.18 kernel overlay set: copy the same "Details for Rock 5
ITX overlays" content from the existing
patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays into
patch/kernel/archive/rockchip64-6.18/overlay/README.rockchip-overlays so the
rockchip-rk3588-rock-5-itx-pwm-fan.dtbo is documented for 6.18 users; also
mirror the same section into the 7.0 overlay README (README.rockchip-overlays)
so both kernel overlays have identical documentation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 170430c1-9575-49c9-82f8-81773dfb14de

📥 Commits

Reviewing files that changed from the base of the PR and between ef5966a and a2a7608.

📒 Files selected for processing (7)
  • patch/kernel/archive/rockchip64-6.12/overlay/Makefile
  • patch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlays
  • patch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3588-rock-5-itx-pwm-fan.dtso
  • patch/kernel/archive/rockchip64-6.18/overlay/Makefile
  • patch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3588-rock-5-itx-pwm-fan.dtso
  • patch/kernel/archive/rockchip64-7.0/overlay/Makefile
  • patch/kernel/archive/rockchip64-7.0/overlay/rockchip-rk3588-rock-5-itx-pwm-fan.dtso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

1 participant