svn commit: r308105 - head/sys/arm/allwinner

Jared McNeill jmcneill at FreeBSD.org
Sun Oct 30 14:39:34 UTC 2016


Author: jmcneill
Date: Sun Oct 30 14:39:33 2016
New Revision: 308105
URL: https://svnweb.freebsd.org/changeset/base/308105

Log:
  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.

Modified:
  head/sys/arm/allwinner/aw_thermal.c

Modified: head/sys/arm/allwinner/aw_thermal.c
==============================================================================
--- head/sys/arm/allwinner/aw_thermal.c	Sun Oct 30 12:15:33 2016	(r308104)
+++ head/sys/arm/allwinner/aw_thermal.c	Sun Oct 30 14:39:33 2016	(r308105)
@@ -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


More information about the svn-src-head mailing list