PINE64
SOQuartz with Waveshare CM4 fan heatsink - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Quartz64 (https://forum.pine64.org/forumdisplay.php?fid=166)
+--- Forum: Quartz64 Hardware and Accessories (https://forum.pine64.org/forumdisplay.php?fid=169)
+--- Thread: SOQuartz with Waveshare CM4 fan heatsink (/showthread.php?tid=18874)



SOQuartz with Waveshare CM4 fan heatsink - stormwyrm - 11-17-2023

I have an SOQuartz and a Pine64 Model A carrier board, and I'm slowly getting it to work. After CPU temperatures soared to 71°C on moderate CPU load, I found a CM4 heatsink from Waveshare with a 12V fan, apparently this model:

https://www.waveshare.com/product/cm4-fan-3007-b.htm

I was able to get the fan running by using a couple of DuPont wires to plug it into the 12V power header beside the power jack on the Model A board, and while thermal problems are now no longer an issue (temperatures peak at 54°C even when doing a make -j4 compile of the Linux kernel) I'm wondering if I could plug the other two pins on the fan somewhere and get the fan speed adaptively controlled instead of having it on all the time. It seems to be a typical PWM fan with the standard colours for the wires. I can see from the Model A schematic that there's apparently a PWM to I2C chip that is probably suitable for this purpose, but it is unclear where it actually terminates. The Model A board picture on the Pine64 Wiki shows a four-pin unshrouded header on the top left , but I instead have a two-pin JST header there with + and - indicators printed beside it on the board. Any help on how I can do this, including any software I might need to do fan control?


RE: SOQuartz with Waveshare CM4 fan heatsink - stormwyrm - 11-18-2023

Well, I kinda sorta figured out how to control the fan. One plugs in the fan control wire (blue) in the - pin (toward the HDMI port) of the 2-pin JST header. There is a GP7101 PWM controller sitting on I²C bus 1 at address 0x58, and from reading the datasheet available I'd managed to figure out that you can put in a particular 8-bit value that controls the PWM signal.

i2cset -y 0x58 3 0x00

turns the fan on permanently

i2cset -y 0x58 3 0xff

turns the fan off permanently.

Values between 0x00 and 0xff should cycle the fan on and off at longer and longer intervals. It doesn't seem to be that noticeable below 0xc4 or so as the on cycle is too long. 0xd0 turns the fan on for 1 second with two seconds off. 0xe0 turns the fan on for about half a second with 4 seconds off. 0xf0 turns the fan on for less than half a second with six seconds off. I suppose I should be able to hack the Active Thermal Service package to make use of this method of controlling the PWM fan.