Limit CPU Frequency on Apalis T30 and Linux Kernel 4.6.2

Dear Sir,

I`m writing a bash script to limit cpu frequency in case of over heating. I would like to do this by monitor the processor tempereture in file /sys/class/hwmon/hwmon0/temp2_input, and when the temperature is above 95°C limit temperature by limiting procressor frequency in files /sys/devices/system/cpu/cpu/cpufreq/scaling_max_freq*. The problem, which I’m facing is that there is no /sys/devices/system/cpu/cpu/cpufreq/* directories and files in my system. There is only /sys/devices/system/cpu/cpufreq directory, which is empty. The question is, if am I missing some kernel module or do I have to change the processor cores frequency in different way? Thank you in advance for your assistance.

As already stated here there simply is no mainline cpufreq driver available for Tegra 3 aka T30 as of yet.

If I good understand you have already implemented the cpufreq driver in your custom kernel? The question is, can I copy this driver from your kernel into mainline?

If I good understand you have already implemented the cpufreq driver in your custom kernel?

Not really, no. Our BSP is really just based on NVIDIA’s Linux4Tegra L4T R16.5 featuring that Linux 3.1.10 kernel in question.

The question is, can I copy this driver from your kernel into mainline?

As mentioned before I don’t believe this being that simple as mainline’s cpufreq subsystem really significantly differs.

Dear mr Marcel,

Thank you for your response. Due to lack of the cpu freq driver I`have decided to abandon limit cpu frequency via governor, and use cpulimit tool instead. I have made few tests, and it looks like this tool works good. Do you think, that this solution is safe for the processor without active cooling? Safe running environment is very important for us, because we are planning using hundreds of terminals based on apalis tegra T30 in different environments.

Best regards,
Kamil