Banana pi R3 fan with PWM

the problem with the top clock is still there (i do not have this in mainline).

and yes -517 is -EPROBEDEFER so a depency is not met and driver tries again later (it should)

but i sent fix for the thermal trips after verify it with daniel

https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

Those look much better, thanks

Iā€™m on RC3 and this does not work for me:

echo 1 > /sys/class/thermal/cooling_device0/cur_state

Tried with 2 different Noctua PWM fans.

How have you both connected the fan? Iā€™ve had problem with fan too because my fan requires a 5v pwm signal,but r3 only serves 3v3 level on pwm-pin on the 3pin-header.

But if it was working before it is strange

Can you show us how the fan is connected?

Before it used to be working.

It is the same fan with the same cable. I tried several cables.

image

After:

echo 1 > /sys/class/thermal/cooling_device0/cur_state

The fan stops working when I connect the red cable with the blue one of the fan.

This is the fan: https://noctua.at/en/products/fan/nf-a4x20-5v-pwm

Tried also with this: https://noctua.at/en/products/fan/nf-f12-5v-pwm

The picture is from some previous post.

this is where I bought the complete kit : https://www.amazon.com/dp/B0BDG6R41Q

You can try this tree as daniel added the missing parts

https://git.openwrt.org/openwrt/staging/dangole.git

I also bought the same kit. I donā€™t get how the fan gets attached to the board. The fan did come with 4 screws but the holes in the board are much thicker than the screw. The base of the board also does not have sockets for the screw. How did you attach the fan to the board?

Sorry, it took me a while to figure out that the screws enter from the bottom of the board. I was trying enter the screw from the top of the fan into the board

yes thatā€™s it :sweat_smile:

Build an image but it wonā€™t boot.

Iā€™m starting to doubt that the router is broken

Interesting. After fresh boot executed this:

echo 1 > /sys/class/thermal/cooling_device0/cur_state

Check to confirm and

cat /sys/class/thermal/cooling_device0/cur_state
is 1

And after few seconds check again and

/sys/class/thermal/cooling_device0/cur_state

is 0 again.

Yes because the trips are updated every x seconds (imho 5s) from systemā€¦you can only override it only till next update

What is the chance that this is a hardware problem on the board?

The reset of cur_state is normal behaviourā€¦or what do you mean with hardware fault?

Well, the fan works only if I disconnect the PWM wire, which is the red one in my case. And then it only runs at full speed and is a bit noisy. It used to work normally. I could set/adjust RPMs before .

is this the same with openwrt from @dangowrt?

I managed to build an image but was not able to boot with it. Can I test PWM functionality with your image @frank-w ? I mean this one:

Afair pwm patches were added after i created the imageā€¦but you could use the image as base and build and install a newer kernel (6.5.rc)