rockchip-rk3588: add Rock 5 ITX PWM fan control overlay#9695
rockchip-rk3588: add Rock 5 ITX PWM fan control overlay#9695ccarpinteri wants to merge 1 commit intoarmbian:mainfrom
Conversation
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.
📝 WalkthroughWalkthroughA 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
🧹 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-fannode, cooling-levels starting at 0) and the corrective curve. Minor nit: since the PR description states testing was performed only withlinux-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 therockchip,temp-tripsramp behavior.Also, as noted on the 6.18/7.0 Makefiles, please copy this section into the README files in
rockchip64-6.18/overlay/androckchip64-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 forrockchip64-6.18too, users installing on a 6.18 image won't see the overlay described in the packaged README. Please mirror the same section intopatch/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
📒 Files selected for processing (7)
patch/kernel/archive/rockchip64-6.12/overlay/Makefilepatch/kernel/archive/rockchip64-6.12/overlay/README.rockchip-overlayspatch/kernel/archive/rockchip64-6.12/overlay/rockchip-rk3588-rock-5-itx-pwm-fan.dtsopatch/kernel/archive/rockchip64-6.18/overlay/Makefilepatch/kernel/archive/rockchip64-6.18/overlay/rockchip-rk3588-rock-5-itx-pwm-fan.dtsopatch/kernel/archive/rockchip64-7.0/overlay/Makefilepatch/kernel/archive/rockchip64-7.0/overlay/rockchip-rk3588-rock-5-itx-pwm-fan.dtso
Summary
The Rock 5 ITX DTB defines the PWM fan as
/pwm-fanwithout a labelled phandle. The existingrockchip-rk3588-fanctrloverlay targets&fanwhich does not exist on this board, so it has no effect.The default
cooling-levelsin the Rock 5 ITX DTB start at0, 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-fanthat:/pwm-fandirectly usingtarget-path(required since no&fanlabel exists)cooling-levelswith a curve starting at1(near-silent at idle) instead of0rockchip,temp-tripsto ramp the fan gradually at 45°C / 50°C / 55°C / 65°CTest plan
linux-vendor-rk35xx 6.1.115user_overlays=rockchip-rk3588-rock-5-itx-pwm-faninarmbianEnv.txt/sys/devices/platform/pwm-fan/hwmon/hwmon*/pwm1and running device tree dumpRelated
Summary by CodeRabbit
Release Notes
New Features
Documentation
Chores