Re: [PATCH 3/3] riscv: dts: spacemit: Add K3 eFuse and temperature trim cells
From: Aurelien Jarno
Date: Tue Nov 17 2026 - 16:23:56 EST
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@xxxxxxxxx>
> > > ---
> > > 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@xxxxxxxxxxx http://aurel32.net