freebsd-dev/sys/boot/fdt
Ian Lepore 86a5575402 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>
2014-02-21 06:00:06 +00:00
..
dts Add basic cpu frequency control and temperature monitoring to imx6_anatop. 2014-02-21 06:00:06 +00:00
fdt_loader_cmd.c Fix the boot on FDT-enabled systems after r261819. 2014-02-20 13:09:08 +00:00
help.fdt Provide verbose help for fdt commands on platforms that use it. 2013-02-11 02:15:26 +00:00
Makefile Provide support in loader for booting 64-bit PowerPC kernels. Like amd64, 2010-07-12 00:49:22 +00:00