rockchip: rk3399: add tsadc driver
commitf4181ce3b312b2113010403feb40fd3d179acad1
authorShunqian Zheng <zhengsq@rock-chips.com>
Fri, 6 May 2016 08:50:48 +0000 (6 16:50 +0800)
committerMartin Roth <martinroth@google.com>
Wed, 18 May 2016 18:19:29 +0000 (18 20:19 +0200)
tree410d846b47e014793fb2fe2747c9bdf29bb10942
parent307ca379d147d3ecce4d05a2172f20a6f14950a2
rockchip: rk3399: add tsadc driver

This patch configures clock for tsadc and then
makes it in automatic mode to generate TSHUT when
CPU temperature is higer than 120 degree Celsius.

BRANCH=none
BUG=chrome-os-partner:52382,chrome-os-partner:51537
TEST=Set a lower tshut threshold(45C), run coreboot and check
     that coreboot reboot again and again.

Change-Id: I0b070a059d2941f12d31fc3002e78ea083e70b13
Signed-off-by: Martin Roth <martinroth@google.com>
Original-Commit-Id: 05107bd6a3430e31db216c247ff0213e12373390
Original-Change-Id: Iffe54d3b09080d0f1ff31e8b3020d69510f07c95
Original-Signed-off-by: Lin Huang <hl@rock-chips.com>
Original-Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/342797
Original-Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://review.coreboot.org/14848
Tested-by: build bot (Jenkins)
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
src/soc/rockchip/rk3399/Makefile.inc
src/soc/rockchip/rk3399/clock.c
src/soc/rockchip/rk3399/include/soc/clock.h
src/soc/rockchip/rk3399/include/soc/tsadc.h [new file with mode: 0644]
src/soc/rockchip/rk3399/romstage.c
src/soc/rockchip/rk3399/tsadc.c [new file with mode: 0644]