[PATCH] arm64: dts: rockchip: enable built-in thermal monitoring on rk3588

Dragan Simic dsimic at manjaro.org
Mon Jan 22 09:33:14 PST 2024


On 2024-01-22 15:20, Alexey Charkov wrote:
> On Mon, Jan 22, 2024 at 11:57 AM Dragan Simic <dsimic at manjaro.org> 
> wrote:
>> On 2024-01-22 08:36, Alexey Charkov wrote:
>> > On Mon, Jan 22, 2024 at 10:22 AM Dragan Simic <dsimic at manjaro.org> wrote:
>> >> As a suggestion, it would be good to test with a couple of different
>> >> fans, to make sure that the PWM values work well for more that one fan
>> >> model.  The Rock 5B requires a 5 V fan, if I'm not mistaken?
>> >
>> > It is 5V, yes. I only have one fan to try though, and I simply relied
>> > on the PWM values that are already defined in the upstream
>> > rk3588-rock-5b.dts. They don't look ideal for my particular fan,
>> > because the lowest non-zero cooling state currently uses a PWM value
>> > of 95, which doesn't always make it spin up. But in the end it doesn't
>> > seem to matter that much, because that tiny fan needs to spin at full
>> > 255 whenever all eight cores are loaded (and even then it can only
>> > balance the temperature at around 60.5С), and when the load is lighter
>> > (such as during various ./configure runs) it just switches off
>> > completely as the temperature goes down to 46C even with the fan not
>> > spinning.
>> 
>> I see, 5 V fans unfortunately aren't very common.  I'm not sure why
>> Radxa opted for 5 V there;  maybe the goal was to use Raspberry Pi 5 V
>> fans, but using those tiny fans doesn't make much sense, IMHO.
>> 
>> I think you can freely adjust the PWM values a bit to make your fan
>> start reliably at the lowest state, regardless of how rarely that 
>> state
>> will be used.  See, if your fan doesn't spin up reliably with the 
>> current
>> lowest state, chances for other fan models not to spin up are quite
>> high.  IOW, it's better to play safe there, if you agree.
>> 
>> What kind of heatsink are you using with your Rock 5B?  Ah yes, and
>> what's the actual model of the fan you're using?
> 
> I use Radxa's 4012 heatsink-fan assembly that comes as an add-on
> option when buying the board itself from Allnet. I guess I'll include
> slightly adjusted PWM values in the rk3588-rock-5b.dts patch to better
> represent my fan's "preferred" range (in my experience a PWM value of
> around 120 is the reliable lower end - it would continue spinning
> below that point but won't always start without being pushed manually)

Sure, just go ahead.  You're using an official active cooling solution
for the Rock 5B, so adjusting the PWM values a bit to make the fan start
up reliably is even more warranted.

>> > I don't currently use the GPU/NPU/VPU though - maybe those would
>> > produce more moderate load which could benefit from spinning the fan
>> > at medium speeds.
>> 
>> Perhaps, but it will need to be tested at some point.  Have you tried
>> loading only one or two CPU cores?
> 
> I do see the full range of PWM values being used, including
> intermediate ones. It doesn't go zero to hero :) My point was more
> about the default fan not being super mighty vs. the full package
> thermal output, which will likely mean that intermediate values are
> rarely used. But I'll double check with more varied loads to make sure
> it behaves in a sensible way (especially given that I'll be testing
> purely interrupt-driven operation per Daniel's guidance in the other
> sub-thread).

I see, thanks for the clarification. :)  The 4012 fan and heatsink seem
rather tiny; [1]  a more beefy assembly, with more thermal mass, larger
fin surface and a fan that pushes a bit more air across its RPM range,
would probably result in a noticeably broader use of the intermediate
PWM values.

[1] 
https://shop.allnetchina.cn/products/active-heat-sink-for-visionfive-sbc



More information about the Linux-rockchip mailing list