mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: rui.zhang@intel.com, daniel.lezcano@linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thermal/drivers/intel/int340x: Add DLVR support
Date: Tue, 04 Apr 2023 10:55:28 -0700	[thread overview]
Message-ID: <a32bbd493a8d9decc275c327d40e15985e11b0be.camel@linux.intel.com> (raw)
In-Reply-To: <CAJZ5v0gSfNpPx_6daiHSrzozeqU7iMnErbMhD6fBU9w3EtYhJw@mail.gmail.com>

On Tue, 2023-04-04 at 18:46 +0200, Rafael J. Wysocki wrote:
> On Tue, Apr 4, 2023 at 6:39 PM srinivas pandruvada
> <srinivas.pandruvada@linux.intel.com> 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@linux.intel.com> 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.
As specified in the
https://docs.kernel.org/driver-api/thermal/intel_dptf.html
This is all related to reduce interference with WiFi radio frequencies.

The algorithm should be read current dlvr_freq_mhz,
dlvr_spread_spectrum_pct, current WiFi frequency (channel has a fix
freq), find the error in WiFi frame error rates (From WiFi module), and
do small adjustment +- to dlvr_freq. While changing the dlvr
frequencies you may induce more interference so you spread the signal
to reduce S/N ratio using this percent knob.

> 
> > > 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.
The frequency is the base signal to which interference must be reduced.
A good explanation for this technique
https://www.eetimes.com/tutorial-on-spread-spectrum-technology/

Thanks,
Srinivas

  reply	other threads:[~2023-04-04 17:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 16:53 Srinivas Pandruvada
2023-04-03 18:37 ` Rafael J. Wysocki
2023-04-04 16:39   ` srinivas pandruvada
2023-04-04 16:46     ` Rafael J. Wysocki
2023-04-04 17:55       ` srinivas pandruvada [this message]
2023-04-06 18:56         ` Rafael J. Wysocki

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=a32bbd493a8d9decc275c327d40e15985e11b0be.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.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

all inboxes | Powered by JetHome®