Re: [PATCH] thermal/drivers/intel/int340x: Add DLVR support

From: Rafael J. Wysocki
Date: Tue Apr 04 2023 - 12:47:17 EST


On Tue, Apr 4, 2023 at 6:39 PM srinivas pandruvada
<srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:
>
> On Mon, 2023-04-03 at 20:37 +0200, Rafael J. Wysocki wrote:
> > On Fri, Mar 31, 2023 at 6:53 PM Srinivas Pandruvada
> > <srinivas.pandruvada@xxxxxxxxxxxxxxx> wrote:
> > >
> > > Add support for DLVR (Digital Linear Voltage Regulator) attributes,
> > > which can be used to control RFIM.
> > > Here instead of "fivr" another directory "dlvr" is created with
> > > DLVR
> > > attributes:
> > >
> > > /sys/bus/pci/devices/0000:00:04.0/dlvr
> > > ├── dlvr_freq_mhz
> > > ├── dlvr_freq_select
> > > ├── dlvr_hardware_rev
> > > ├── dlvr_pll_busy
> > > ├── dlvr_rfim_enable
> > > └── dlvr_spread_spectrum_pct
> > >
> > > Attributes
> > > dlvr_freq_mhz (RO):
> > > Current DLVR PLL frequency in MHz.
> > >
> > > dlvr_freq_select (RW):
> > > Sets DLVR PLL clock frequency.
> > >
> > > dlvr_hardware_rev (RO):
> > > DLVR hardware revision.
> > >
> > > dlvr_pll_busy (RO):
> > > PLL can't accept frequency change when set.
> > >
> > > dlvr_rfim_enable (RW):
> > > 0: Disable RF frequency hopping, 1: Enable RF frequency hopping.
> > >
> > > dlvr_spread_spectrum_pct (RW)
> > > A write to this register updates the DLVR spread spectrum percent
> > > value.
> >
> > How is this attribute going to be used by user space in practice?
>
> Spread spectrum percent helps to reduce the DLVR clock noise to meet
> regulatory compliance. This spreading % increases bandwidth of signal
> transmission and hence reduces the effects of interference, noise, and
> signal fading.

The above information should be added to the documentation I think.

Still, I would like to know when user space is going to write to it
and how it is going to find out what value to write.

> > Also should it be split like the frequency one (for consistency)?
>
> This is a RW field and is applied immediately unlike frequency, where
> it is two step process. First you specify and enable and then see the
> effect. So they are two fields.

I was talking about dlvr_freq_mhz (RO) and dlvr_freq_select (RW). I'm
not sure how the above is related to them TBH.