From nobody Tue Feb 22 09:42:42 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B1DF519E1614 for ; Tue, 22 Feb 2022 09:42:49 +0000 (UTC) (envelope-from peterj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2vNT4gBqz4RDt; Tue, 22 Feb 2022 09:42:49 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645522969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=ycnZwT3D5JAiu1NxbgD5y3ue6rqMwiAslkF/AYry5iI=; b=RfZZPuJDXqOeMs4MVlmnHtlX3ItYWyWtMsKD5+Yz5zH/mMuuSP6dp9lAp379GOnJQMQC3j VdNkAZdN+al5Gz/vlZhHdNrxuy5vqmhFqociHrSHL8WRCHyVdSl5Um3yw4gGZfKUTA76/o 2pdwUewDEEExW0VvBRpL53q1aiq0MrXRleGX48DME3Pbi+JaiEaAxPlfl+isKqI+KWah8i hbIv5SgPQLqbAb4GbdjMPaBUL6YWeWvwVtWSX3FSlrayPUzASLaMHKe6c0dE673a5zn2dR sumY63ttP59dN6sVXv5rPEmusKaIqWrdJNSyDnFlSfZs5did4ZzrgksYZwbhgA== Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 89F5EE978; Tue, 22 Feb 2022 09:42:48 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Tue, 22 Feb 2022 20:42:42 +1100 From: peterj@freebsd.org To: manu@freebsd.org Cc: FreeBSD-arm@freebsd.org Subject: Allwinner H6 thermal support Message-ID: List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iFNHVD+8cDNfhebL" Content-Disposition: inline X-PGP-Key: http://www.rulingia.com/keys/peter.pgp ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645522969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=ycnZwT3D5JAiu1NxbgD5y3ue6rqMwiAslkF/AYry5iI=; b=PUHKNhhd8c82tKrI2xV+suYOeTgICtJXz1D4D8+sYmA7F278JRk7rFe/YTXyyaLENQ/HCh A/HCq2AcoS3RduRPFz0xWrjXTfpt0q/D962FUsimhrZXQ1LVcrBdqZR0ftSZSMd3Py5tXS k9UfqS5ztkF9/DuuA+aElwETtO4s8P0DryHgshyW2Z8MrFy5EBtgbQrAbPirX5LJV2bXit jk/m+xywd0C5jWPb2Oq6BmLeFQTHiE4ot+XkPwV4Hlabskvg/NJPkXh4bPyv955F4PrT5M 69nU94TOHHy+DA4ylooVmFk5PZ8zi2I6DSAjVFSK2Aa/1WxwksaKBSiRx3I63Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645522969; a=rsa-sha256; cv=none; b=EoDotdoOkqdT7MJatf9kM7u8WHgFmXtIFoaUAOKUK6Pa1Eok5u5JUuk4iIJS+VXaBTjuvS lqjIBmvR1287/pZEBd09KF5/i7FLdXfB7pcigIaTwXLgsWAoT2VFjUYn1wLchAdQxxU2vT /By8bxEtkzZUU8pmZLPxgePeqb8NAf/c1Rot/4NpZ31p0LILSoFvIPiOIaOtawzYuL7b4W Rb8oM7QkmMuO+RHFMADPmEkuj+fg+ctXg6dhnrHyKGO8zpjLuAo90Y3WI7/yYcJpEHxWCI lzXtjKijRDLjo4HsrBczK0wKf+tZEy6fnplzHcIwOXEoNd4i1pmSM7dk7l+D/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --iFNHVD+8cDNfhebL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Emmanuel, I notice you indicated that there is thermal support for the H6 on https://wiki.freebsd.org/arm/Allwinner. I've just started experimenting with a PINE H64 and noticed the board didn't report any temperature data. Looking through the head code, the doesn't seem to be any support for sun50i-h6-ths. Do you have the code in a branch somewhere? Before I noticed the wiki page, I started looking at implementing the code myself. I had expected it would just be a matter of replicating the H5 code and tweaking the constants but, reading the Thermal Sensor Controller section of the H6 manual, it looks like the H6 controller is very different to the H5 controller: The registers are at different offsets and laid out differently, so it's not compatible with (eg) sys/arm/allwinner/aw_thermal.c:aw_thermal_init(), which is a PITA. Have I missed something? --=20 Peter Jeremy --iFNHVD+8cDNfhebL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmIUsAxfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzQzYRAAm8cl+UkCEgBokimJvbzroA436/BPnIVBVmE++LRG2gU9/Udm/WpUBD0d qM5M816EMXDGNDEDOgTbR/60wEEVGE2jHvFnyWSfKIGnYloKdyRZ1+d2X7KEHyt/ DXXaXpFm9uTLUg+LS1BwW+b9D/h40lwxnk7KB/1YcX2WmPvEPXTVHlAJWoCigBq4 lRAzvzYzsbL54Z1JCNqceQZuo5Mf+z1kwG/I22E7QoP++JmAU1t7luy0F6qlVoCj WpF3hpvtAxI2PxWhQRAaSpp+Vjhf3//irryns1brCQ/wgmLMB/aDZxBLHQPbITdR ROVQooDJ8+XHAo/A7bbOmWff9CvybC/jZK9AcAAdDUGczJselzQIMnrnxBiYfLAk NdiKgaQ9rlhlqQZTGKP+9u0q7qEfOhvsnLwcI6ZgbdBN3h+NUTi/6zMq8QVwG8if Vl6M6j4bh3ycBSwTow9qiASMKAt43S5OGmn+OoluKsjsANDjO9fr+mk9GnDoKOxc S+4gvIjKK5nUPGcXTM8mp98cvjDWXU9if9uJDNrTjBjWrVxvW3vrUt7XYWAwgKfc YUevPHDMf/2u/gnE8uvNBVrgHJlVwKigmfupBNUGHqdiw9zew4oj307oMLpY3KNq unHTu2SwnA+N0kRGlxsv0joAkTN5Ep1NX/uuGh8Rdh84T82nayM= =pXMT -----END PGP SIGNATURE----- --iFNHVD+8cDNfhebL--