Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Oct 2016 12:12:15 -0300 (ADT)
From:      Jared McNeill <jmcneill@invisible.ca>
To:        Milan Obuch <freebsd-arm@dino.sk>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: aw_thermal breakage on Allwinner H3 SoC
Message-ID:  <alpine.DEB.2.11.1610251208390.641@dis.invisible.ca>
In-Reply-To: <alpine.DEB.2.11.1610251058480.641@dis.invisible.ca>
References:  <20161024165820.16e6dd6f@zeta.dino.sk> <alpine.DEB.2.11.1610251058480.641@dis.invisible.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323329-456550499-1477408337=:641
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Does this patch help? It uses the same values as the BSP for sun8iw7p1 
found here:
https://github.com/friendlyarm/h3_lichee/blob/master/linux-3.4/drivers/thermal/sunxi-temperature.c#L1287

With this patch my NanoPi NEO shows around 39C when idle.

Cheers,
Jared

On Tue, 25 Oct 2016, Jared McNeill wrote:

> 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
>> 
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
>
>
--8323329-456550499-1477408337=:641
Content-Type: TEXT/x-diff; name=aw_thermal.patch
Content-Transfer-Encoding: BASE64
Content-ID: <alpine.DEB.2.11.1610251212140.641@dis.invisible.ca>
Content-Description: 
Content-Disposition: attachment; filename=aw_thermal.patch

ZGlmZiAtLWdpdCBhL3N5cy9hcm0vYWxsd2lubmVyL2F3X3RoZXJtYWwuYyBi
L3N5cy9hcm0vYWxsd2lubmVyL2F3X3RoZXJtYWwuYw0KaW5kZXggYjM2ZGUx
YS4uODk4NmRjZiAxMDA2NDQNCi0tLSBhL3N5cy9hcm0vYWxsd2lubmVyL2F3
X3RoZXJtYWwuYw0KKysrIGIvc3lzL2FybS9hbGx3aW5uZXIvYXdfdGhlcm1h
bC5jDQpAQCAtMTA4LDkgKzEwOCw5IEBAIF9fRkJTRElEKCIkRnJlZUJTRCQi
KTsNCiAjZGVmaW5lCUgzX0FEQ19BQ1FVSVJFX1RJTUUJMHgzZg0KICNkZWZp
bmUJSDNfRklMVEVSCQkweDYNCiAjZGVmaW5lCUgzX0lOVEMJCQkweDE5MTAw
MA0KLSNkZWZpbmUJSDNfVEVNUF9CQVNFCQkyNzk0MDAwDQorI2RlZmluZQlI
M19URU1QX0JBU0UJCTE3OTQwMDANCiAjZGVmaW5lCUgzX1RFTVBfTVVMCQkx
MDAwDQotI2RlZmluZQlIM19URU1QX0RJVgkJLTE0ODgyDQorI2RlZmluZQlI
M19URU1QX0RJVgkJLTgyNTMNCiAjZGVmaW5lCUgzX0NMS19SQVRFCQk0MDAw
MDAwDQogDQogI2RlZmluZQlURU1QX0NfVE9fSwkJMjczDQo=

--8323329-456550499-1477408337=:641--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.DEB.2.11.1610251208390.641>