freebsd-skq/sys/arm
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
..
allwinner Follow r261352 by updating all drivers which are children of simplebus 2014-02-02 19:17:28 +00:00
arm Remove bogus blank line. 2014-02-21 05:17:30 +00:00
at91 Honor the disabled status by only grabbing resources and returning 2014-02-13 16:50:08 +00:00
broadcom/bcm2835 Correct the order of arguments to mtx_init(). 2014-02-14 11:18:15 +00:00
conf Make the gpioled(4) work out of the box on BBB. 2014-02-13 18:51:37 +00:00
econa It turns out a global variable is the only straightforward way to 2014-02-09 02:39:00 +00:00
freescale Add basic cpu frequency control and temperature monitoring to imx6_anatop. 2014-02-21 06:00:06 +00:00
include Give the fdt helper routines static linkage since no global definition 2014-02-17 20:04:57 +00:00
lpc Follow r261352 by updating all drivers which are children of simplebus 2014-02-02 19:17:28 +00:00
mv Move Open Firmware device root on PowerPC, ARM, and MIPS systems to 2014-02-05 14:44:22 +00:00
rockchip Follow r261352 by updating all drivers which are children of simplebus 2014-02-02 19:17:28 +00:00
s3c2xx0 It turns out a global variable is the only straightforward way to 2014-02-09 02:39:00 +00:00
sa11x0 Update legacy platforms to use new arm_physmem helper routines. 2014-02-09 22:10:14 +00:00
samsung/exynos Follow r261352 by updating all drivers which are children of simplebus 2014-02-02 19:17:28 +00:00
tegra Remove STARTUP_PAGETABLE_ADDR from the ARM configs and replace it with 2014-01-28 09:12:04 +00:00
ti Allow the use of the OFW GPIO bus for ti_gpio and bcm2835_gpio. With this 2014-02-13 18:42:23 +00:00
versatile Follow r261352 by updating all drivers which are children of simplebus 2014-02-02 19:17:28 +00:00
xilinx Follow r261352 by updating all drivers which are children of simplebus 2014-02-02 19:17:28 +00:00
xscale Make it possible to use the env kernel config file option for AVILA 2014-02-17 11:05:57 +00:00