Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Jiayu Du <duge1256@gmail.com>
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
Date: Tue, 17 Nov 2026 22:23:15 +0100	[thread overview]
Message-ID: <avzFw8hydMX-9G1_@aurel32.net> (raw)
In-Reply-To: <uot2mqhilzdfngqcwpipdo5xzncyvesmw2hw6rqk7mnveer57f@6m4cqzotx53k>

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 <duge1256@gmail.com>
> > > ---
> > >  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

      reply	other threads:[~2026-11-17 21:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  6:05 [PATCH 0/3] Add read-only SpacemiT K3 eFuse support Jiayu Du
2026-11-06  6:05 ` [PATCH 1/3] dt-bindings: nvmem: Add SpacemiT K3 eFuse controller Jiayu Du
2026-11-06 17:37   ` Conor Dooley
2026-11-06  6:05 ` [PATCH 2/3] nvmem: Add read-only SpacemiT K3 eFuse support Jiayu Du
2026-11-06 12:15   ` Troy Mitchell
2026-11-13 13:49     ` Jiayu Du
2026-11-07  4:22   ` Yao Zi
2026-11-09 15:19     ` Troy Mitchell
2026-11-13 13:13     ` Jiayu Du
2026-11-06  6:05 ` [PATCH 3/3] riscv: dts: spacemit: Add K3 eFuse and temperature trim cells Jiayu Du
2026-11-06 22:13   ` Aurelien Jarno
2026-11-13 12:24     ` Jiayu Du
2026-11-17 21:23       ` Aurelien Jarno [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avzFw8hydMX-9G1_@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=duge1256@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=p.zabel@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=srini@kernel.org \
    --cc=troy.mitchell@linux.spacemit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox