From owner-freebsd-arm@freebsd.org Tue Oct 25 14:01:13 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B824AC21DE8 for ; Tue, 25 Oct 2016 14:01:13 +0000 (UTC) (envelope-from jmcneill@invisible.ca) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:c:538::198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85591301 for ; Tue, 25 Oct 2016 14:01:13 +0000 (UTC) (envelope-from jmcneill@invisible.ca) Received: from mfilter46-d.gandi.net (mfilter46-d.gandi.net [217.70.178.177]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 9C483FB8FF; Tue, 25 Oct 2016 16:01:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter46-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter46-d.gandi.net (mfilter46-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 8WvY0SpLaVzK; Tue, 25 Oct 2016 16:01:09 +0200 (CEST) X-Originating-IP: 142.163.95.249 Received: from dis (stjhnbsu1kw-142163095249.dhcp-dynamic.FibreOP.nb.bellaliant.net [142.163.95.249]) (Authenticated sender: jmcneill@invisible.ca) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B0047FB8B9; Tue, 25 Oct 2016 16:01:08 +0200 (CEST) Date: Tue, 25 Oct 2016 11:01:06 -0300 (ADT) From: Jared McNeill To: Milan Obuch cc: freebsd-arm@freebsd.org Subject: Re: aw_thermal breakage on Allwinner H3 SoC In-Reply-To: <20161024165820.16e6dd6f@zeta.dino.sk> Message-ID: References: <20161024165820.16e6dd6f@zeta.dino.sk> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 14:01:13 -0000 Hi Milan -- There appears to be an inconsistency between the temperature conversion formula in the H3 datasheet and the BSP. I'm looking into it.. Cheers, Jared On Mon, 24 Oct 2016, Milan Obuch wrote: > Hi, > > today I svnup'ped sources for 12-CURRENT I use to test on Orange Pi One > to svn revision 307846 and there was no aw_thermal device anymore. > After some fiddling I found reason is in aw_sid.c, namely in function > aw_sid_read_tscalib. I managed to get it working, somehow, giving the > patch in attachment. This way "sun8i-h3-sid" is defined and attaches, > which in turn makes aw_thermal attached and working, a bit. > > Almost identical patch, without the last chunk was necessary in past, > but now behavior changed a bit - namely, sysctl dev.aw_thermal.0.cpu > shows 99C right after start, now, running for almost six hours idle, > 100C. This is surely wrong. SoC is not that hot given I can put my > finger on it without risk of being immediatelly burned. Before this > change it showed some 49 degrees right after power on and rises slowly > up to 60 - 63 degrees. This values were not correct, too, temperature > is maybe 45 degrees or so according to my finger integrated > thermometer :) > > Did anybody test this on H3 based board? If yes, is there anything > special to be put into FDT definition file? > > Has anybody a clue what's going on? If someone has an idea what to > check, I am ready to check it, but currently have not much experience > with sensors in SoC. > > Regards, > Milan >