thermal: amlogic: Add thermal driver to support G12 SoCs
authorGuillaume La Roque <glaroque@baylibre.com>
Fri, 4 Oct 2019 09:01:09 +0000 (11:01 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 7 Nov 2019 06:00:26 +0000 (07:00 +0100)
commit421eda108e6c63a72feb178c441bb769d4076836
treefe98d38f851a7cdffbda17a17be216f69b75c1f5
parent66798674026398e10f6a0bce7ffb3f5ced565847
thermal: amlogic: Add thermal driver to support G12 SoCs

Amlogic G12A and G12B SoCs integrate two thermal sensors
with the same design. One is located close to the DDR controller
and the other one is located close to the PLLs (between the CPU and GPU).

The calibration data for each of the thermal sensors instance is stored
in a different location within the AO region.

Implement reading the temperature from each thermal sensor.

The IP block has more functionality, which may be added to this driver
in the future:
- chip reset when the temperature exceeds a configurable threshold
- up to four interrupts when the temperature has risen above a
configurable threshold
- up to four interrupts when the temperature has fallen below a
configurable threshold

Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20191004090114.30694-3-glaroque@baylibre.com
drivers/thermal/Kconfig
drivers/thermal/Makefile
drivers/thermal/amlogic_thermal.c [new file with mode: 0644]