From nobody Tue Feb 22 10:08:34 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 A7BB119E556A for ; Tue, 22 Feb 2022 10:08:40 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mail.blih.net [212.83.155.74]) (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 (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2vyH4XLJz4Tjm; Tue, 22 Feb 2022 10:08:36 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1645524514; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gPiKYog6atIfrS8w3ABNsfbXUJKISJAJj+MsvZfpciA=; b=AbXYlCMxwChwWKdLH3wTjZ7qKQRszkFE5b/ieIVwB52zeQ8wxavHYIjmHmYDEdXNDc2/wi RvMekh9PNHGoahdhJSjCC0a9pRplVm868FaIV26ra3x+TQIL5XBMcX+Md6ZJ68eXMYBL96 3x4FwsXOB8PHUHEU8ZQKbhsP7ubXBpE= Received: from skull.home.blih.net (lfbn-idf2-1-1209-14.w90-92.abo.wanadoo.fr [90.92.34.14]) by mx.blih.net (OpenSMTPD) with ESMTPSA id ed89bbc2 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 22 Feb 2022 10:08:34 +0000 (UTC) Date: Tue, 22 Feb 2022 11:08:34 +0100 From: Emmanuel Vadot To: peterj@freebsd.org Cc: FreeBSD-arm@freebsd.org Subject: Re: Allwinner H6 thermal support Message-Id: <20220222110834.60b99a4edb8a4322a4c0a7ac@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4K2vyH4XLJz4Tjm X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=AbXYlCMx; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-3.46 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; FREEFALL_USER(0.00)[manu]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.155.74/32:c]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-0.96)[-0.963]; MLMMJ_DEST(0.00)[FreeBSD-arm]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Status: O Content-Length: 1527 Lines: 36 Hi Peter, On Tue, 22 Feb 2022 20:42:42 +1100 peterj@freebsd.org wrote: > 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? If it's indeed me who put this on the wiki it's a mistake, I don't remember ever working on H6 thermal support sorry. > 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? Haven't looked myself but I'm not surprised, Allwinner is known to change its design from time to time. Also tbh the only reason I've added basic H6 support was to work on the designware usb3 controller as at the time I had problems with Rockchip and didn't knew if it was my driver for the usb3 controller or the phy and the phy driver was simpler on Allwinner. -- Emmanuel Vadot