Skip to main content

I have SDK Version 1.3.3, there is a comment in release notes about fan but it seems to be for the Metis. I saw already threads discussing the PCIe and M.2 fan speed on the Metis, this question is about the Aetina evalkit running at 100% fan all the time.

There are none of these types of details in here.

https://support.axelera.ai/hc/en-us/articles/22846665291794-AETINA-RK3588-Industrial-Motherboard-M-2

I tried wider searching Aetina and Firefly on Google, there are some suggestion that control might be possible in /sys/class/hwmon but I could not find a match, or I should be looking for something else in there.

Can I make the fan speed of the SBC by dynamic?

@llrds the fan speed of our PCIe is indeed controlled by our software.
Control of the Aetina RK3588 fanspeed is up to the user so I would suggest to look into Aetina RK3588 documentation on info how to control the fan speed. 


Btw, has anyone been able to find any documentation for the Aetina RK3588 board? Even the Aetina website only has a flyer for the board, and no detailed datasheet etc as far as I could see.


I also cannot find any documentation for the Aetina board, I’d checked their website already. 

I guess the Axelera guys would have linked it if they had any, I'll reach out to Aetina. 


Hi, 

Thanks for the question!

Aetina usually has this firefly_fan_control binary running as a background process to control the fan, I know we have this on their Firefly boards, so if this binary is available, then perhaps it can be used to control the fan speed. And for a feedback we can read the temp from sysfs via /sys/class/thermal/thermal_zone*/temp

Hope this helps!


yes, firefly_fan_control is there and we can read the temp from sysfs.

There is a reference here to that command - with reference to being able too control fan speed here, but it’s not successful for me.

https://wiki.t-firefly.com/en/EC-A1684XJD4/fan_strategy.html

I don't think firefly_fan_control is there for interacting with, it’s just doing it’s thing and seems to allow no input for control.


@llrds 

Thanks for the reply!

Can you please try these s1] two scripts, hysteresis_fan.py and read_temp.sh, the latter either needs to be placed in the /home/firefly/Downloads or we can modify the TEMP_SCRIPT var in the former, and we run them as follows:

python3 -u hysteresis_fan.py --low-threshold 30 --high-threshold 45 --high 50 --low 90 --interval 5

Hope this helps! 
Please do let us know if you have any more questions, comments or suggestions.
Thanks again!

---

<1] https://gist.github.com/ha6i6khalid/61af34a28c4ca37ca289d03da343c81c
For some reason I am unable to post the snippets here in the post, hence made a public gist


Hi ​@Habib , Thanks for making this & sorry for the delay. But so far it does not make a difference to the fan speed for me. 

I can see the Python script working and interfacing with the firefly program:

aetina@aetina:~/voyager-sdk$ sudo journalctl --follow | grep firefly

Aug 09 13:04:09 aetina sudos4140]: root : TTY=pts/3 ; PWD=/home/aetina/voyager-sdk ; USER=root ; COMMAND=/usr/bin/firefly_fan_control ITX-3588J 90

When I try to interface directly with the firefly_fan_control, there are some errors that would suggest the fan program is not up to date - it’s looking for something that just isn't there for this board I think:

(venv) aetina@aetina:~/voyager-sdk$ sudo /usr/bin/firefly_fan_control ITX-3588J 90

board ITX-3588J

sh: 1: cannot create /sys/devices/platform/pwm-fan/hwmon/hwmon7/pwm1: Directory nonexistent

set_PWM: 229

pwm: 90

set_ITX_3588J_fan_pwm: Can not open /sys/devices/platform/pwm-fan/hwmon/hwmon7/pwm1 file

27769.000000

26846.000000

27769.000000

27769.000000

26846.000000

26846.000000

27769.000000

sum = 24.636084

 

If you have any other suggestions I'd be glad to try it!


@llrds 
The scripts don’t work perhaps because your board version might be different … (that’s my bad, should have added the --model-version argument as well, apologies)

Can you please let me know your board version; with:
cat /sys/firmware/devicetree/base/model

E.g. in my case I get:

firefly@firefly:~$ cat /sys/firmware/devicetree/base/model
Firefly ITX-3588J MIPI(Linux)

and for me ITX-3588J worked

maybe you can try using the firefly_fan_control binary with your board-version (as follows):
sudo /usr/bin/firefly_fan_control <your-board-version> 90


Hope this helps!


Hi ​@Habib, my board is indeed different. 

aetina@aetina:~$ cat /sys/firmware/devicetree/base/model 
RKC-A02_V0.4.2aetina@aetina:~$ 


And trying the binary directly 

aetina@aetina:~$ sudo /usr/bin/firefly_fan_control RKC-A02_V0.4.2 90
sh: 1: echo: echo: I/O error
sh: 1: cannot create /sys/class/pwm/pwmchip0/pwm0/period: Directory nonexistent
sh: 1: cannot create /sys/class/pwm/pwmchip0/pwm0/polarity: Directory nonexistent
sh: 1: cannot create /sys/class/pwm/pwmchip0/pwm0/duty_cycle: Directory nonexistent
sh: 1: cannot create /sys/class/pwm/pwmchip0/pwm0/enable: Directory nonexistent
set_PWM: 91000
 pwm: 90
set_CS_R1_3399JD4_MAIN_fan_pwm: Can not open /sys/class/pwm/pwmchip0/pwm0/duty_cycle file
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature
no such file /tmp/fan_temperature

 

The binary gives some hints to what models are supported, yours is listed, mine is unfortunately not 😞 I have tried all of those, they all have a similar error that a file does not exist.

aetina@aetina:~$ sudo /usr/bin/firefly_fan_control 
./main CS-R1-3399JD4-MAIN 50
./main CS-R2-3399JD4-MAIN --debug
./main ROC-RK3588S-PC 50
./main ITX-3588J 50
./main ROC-RK3588-PC 50
./main AIO-3588Q 50
./main AIO-3588MQ 50
./main AIO-3588SG 50
./main CS-A1-N8S-3588S-JD4-MAIN 50


Reply