summaryrefslogtreecommitdiffstats
path: root/sys/boot/fdt
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-02-21 06:00:06 +0000
committerian <ian@FreeBSD.org>2014-02-21 06:00:06 +0000
commit93f036b416df246f046e0e472858b39dac58aaa6 (patch)
tree15ddae0d0bde06f918d54a56587153e6fabcd8c3 /sys/boot/fdt
parentb5a71d5e6677054d1de17be700f2ae0e0df900e6 (diff)
downloadFreeBSD-src-93f036b416df246f046e0e472858b39dac58aaa6.zip
FreeBSD-src-93f036b416df246f046e0e472858b39dac58aaa6.tar.gz
Add basic cpu frequency control and temperature monitoring to imx6_anatop.
The temperature monitor device is enabled to sample the die temperature at 16hz. The temperature is published via sysctl. A callout routine at 10hz monitors the temperature and throttles back the cpu if the temperature goes over a user-settable throttle point (by default 10C less than the critical high-point temperature for the chip). The hardware is supposed to be able to deliver an interrupt when the temperature exceeds a settable limit, but the interrupt never arrives so for now a callout does the job. At attach time we read the maximum cpu frequency the chip is allowed to run at and the cpu is set to run at that speed. It's reported at attach time. A sysctl variable reports the current speed when queried. New sysctl values: dev.imx6_anatop.0.cpu_mhz: 984 dev.imx6_anatop.0.temperature: 37.9C dev.imx6_anatop.0.throttle_temperature: 95.0C Steven Lawrance did the initial heavy lifting on this, but I changed enough stuff that I'm the one to blame if anything breaks. Submitted by: Steven Lawrance <stl@koffein.net>
Diffstat (limited to 'sys/boot/fdt')
-rw-r--r--sys/boot/fdt/dts/imx6.dtsi2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/boot/fdt/dts/imx6.dtsi b/sys/boot/fdt/dts/imx6.dtsi
index 377a4af..da81d79 100644
--- a/sys/boot/fdt/dts/imx6.dtsi
+++ b/sys/boot/fdt/dts/imx6.dtsi
@@ -97,6 +97,8 @@
anatop: anatop@020c8000 {
compatible = "fsl,imx6q-anatop";
reg = <0x020c8000 0x1000>;
+ interrupt-parent = <&gic>;
+ interrupts = <49>;
}
gpt: timer@02098000 {
OpenPOWER on IntegriCloud