From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E318606A33E for ; Tue, 17 Nov 2026 21:23:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TpfFmFkG; dkim=fail reason="signature verification failed" (2048-bit key) header.d=aurel32.net header.i=@aurel32.net header.a=rsa-sha256 header.s=202004.hall header.b=T2hjufLh DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=jPnxbiDrD88R7fxyuWwb5Cns5IgXZT19fnWTStJyLp4=; b=TpfFmFkGFO4W0aumYQfwj8cdDg BmR5JpL5mU+S9Un7ltz/PQX/Go79wlEK2vwkzlR5FZOWOUXLHUcRTdm1DFZQVm4/C0JhpBVgdWpWi y10WZBhpKs+Zi8o7MsGgpfCpeMJGb4Opj3Prk7OXXE0nFaq+02Cg1IaJqeNdYvv2oS93XQewFCmbj RexyGv05g8q+nUaB9D/Z7wntrHcCMlwB108jVEqOvAh8/TQva0wV+Yr7DWWAC9ouxCYXhB9K4iAHG v4SGr2pZsC/oXu/7+Q134iO2SbznkTDNZGpCcTcHxpNFpeF1avPyIoYMYjM7W15XZhKEUJpensRCr Wz0EXrrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xTQeC-000000076x1-0YOu; Tue, 17 Nov 2026 21:23:24 +0000 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xTQe8-000000076vn-2UXv for linux-riscv@lists.infradead.org; Tue, 17 Nov 2026 21:23:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=Przrgbdbv85cvbqLBXsL7DGaaikgzPBDFnvarr+iJb4=; b=T2hjufLh0q4o5/+0lDWEDnqhGD Ah0i8IUkddvpr5lELGxNvbUY4ubRasOnxz5fq9KUXQL//6N1b2FfoDk/Xr/QCTtc+s8VJ9rfP9TRQ bK710C4dGLCWVcCNhs1YG4pOF18tK0noHDDmbSP7FSk0FpF8mp4Sy5uKjTxbBaC60pRy0X5reKqEn P1luZPbnd5+QSUEBCW5kOZROOvSqx2U6k2ZJmDz4EPyRxuAUDxbnEypps5W6+TAr61Iq7E26FDW7w NFkrpgW6FBLEWyBDo8LZxycbEilw3sDg3Mrpclacrp2EK4+c7WZbcvTvn22fmFS621wf5jS+fj38/ M/hzmeiw==; Received: from authenticated user by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xTQe4-0000000GZBY-0QzT; Tue, 17 Nov 2026 22:23:16 +0100 Date: Tue, 17 Nov 2026 22:23:15 +0100 From: Aurelien Jarno To: Jiayu Du Cc: srini@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dlan@kernel.org, troy.mitchell@linux.spacemit.com, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] riscv: dts: spacemit: Add K3 eFuse and temperature trim cells Message-ID: Mail-Followup-To: Jiayu Du , srini@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dlan@kernel.org, troy.mitchell@linux.spacemit.com, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, p.zabel@pengutronix.de, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org References: <20261106060525.346873-1-duge1256@gmail.com> <20261106060525.346873-4-duge1256@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.4.1 (2026-07-04) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261117_132320_643724_AEDB4D70 X-CRM114-Status: GOOD ( 24.92 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi, On 2026-11-13 20:24, Jiayu Du wrote: > On Fri, Nov 06, 2026 at 11:13:10PM +0100, Aurelien Jarno wrote: > > Hi, > > > > On 2026-11-06 14:05, Jiayu Du wrote: > > > Add the K3 eFuse controller with its AES_WTM clock and reset. Describe > > > fixed-layout cells for the temperature calibration parameters stored in > > > bank 0 and bank 7, using controller-relative offsets. > > > > > > Leave the controller disabled for board-level enablement. > > > > What is the reason for enabling it at the board-level? AFAIU, this is > > part of the SoC and does not require any board level hardware. Therefore > > I believe it should just be enabled by default. > > Agreed, there is no board-specific dependency. I'll fix it. > > > > > > Signed-off-by: Jiayu Du > > > --- > > > arch/riscv/boot/dts/spacemit/k3.dtsi | 25 +++++++++++++++++++++++++ > > > 1 file changed, 25 insertions(+) > > ... > > > > + #size-cells = <1>; > > > + > > > + soc_rtemp_trim1: temperature-trim@120 { > > > + reg = <0x120 0x1>; > > > + bits = <0 8>; > > > + }; > > > + > > > + soc_rtemp_trim: temperature-trim@19a { > > > + reg = <0x19a 0x2>; > > > + bits = <4 8>; > > > + }; > > > > I have tried this patchset, and while I can see non-zero data in the > > /sys/bus/nvmem/devices/f0702800.efuse, both temperature calibration data > > appear as 0. Is that expected? > > I see the same on my COM260 Kit: both banks contain non-zero data, but > the two trim fields are zero. The factory 6.18.3 kernel gives the same > bank data and temperature calibration data. > > The thermal driver change in [1] reads the bank 7 trim first, tries bank > 0 if it is below 8, and uses 0xd8 if both values are below 8. This handles > the zero-value case. I don't have an explanation for the zero trim values > themselves. Thanks for the explanations, that make sense. I guess that first versions of the K3 were not temperature calibrated, so the value is 0. Regards Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://aurel32.net _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv