From bd95d8610a0ca9cd3b17afe2b708cecec5d7d479 Mon Sep 17 00:00:00 2001 From: Jared McNeill Date: Sun, 30 Oct 2016 14:39:33 +0000 Subject: [PATCH] Fix H3 temperature reporting. The formula in for V1.0 of the H3 datasheet seems to be incorrect, so use the same method of conversion as the H3 BSP instead. --- sys/arm/allwinner/aw_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/allwinner/aw_thermal.c b/sys/arm/allwinner/aw_thermal.c index c4c8bc1035ce..12146afd968d 100644 --- a/sys/arm/allwinner/aw_thermal.c +++ b/sys/arm/allwinner/aw_thermal.c @@ -109,9 +109,9 @@ __FBSDID("$FreeBSD$"); #define H3_ADC_ACQUIRE_TIME 0x3f #define H3_FILTER 0x6 #define H3_INTC 0x191000 -#define H3_TEMP_BASE 2794000 +#define H3_TEMP_BASE 1794000 #define H3_TEMP_MUL 1000 -#define H3_TEMP_DIV -14882 +#define H3_TEMP_DIV -8253 #define H3_CLK_RATE 4000000 #define TEMP_C_TO_K 273