Received: by 2002:a05:6358:579e:b0:115:34ad:32ad with SMTP id m30csp17612rwf; Thu, 6 Apr 2023 12:02:27 -0700 (PDT) X-Google-Smtp-Source: AKy350aFiWJC8h+JUnWurZ9sORry98Ydow3rywL9NhGkHqr026RjjOnFRtJTt1mz31k9/lcaSUOI X-Received: by 2002:a17:907:2bd7:b0:933:499e:62a7 with SMTP id gv23-20020a1709072bd700b00933499e62a7mr5934867ejc.49.1680807746836; Thu, 06 Apr 2023 12:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680807746; cv=none; d=google.com; s=arc-20160816; b=DhDk2sopt9vER7Ip0QG8kLwNxFQN2aj4fIzOCy0nRwp+VsO7h+Nj/bphQOIR2Gm3R0 pwpt3+NqX5agDK0yJlFtZ6Q+DAx8cUwFwlIvUa3NS/Z5Tc2UVOXVc/QH+8g0erNQWYzb WxXBNHu2sQNxacCXXo4o8KhiwBZ7I7DmxMRZzCwuj/8bXLZd7BTCArn1t93ZPyn9p0v/ 5/2anrtU6IJrY5ZEwalDmEHQquFUnttVR2++JTKD44OZX+Zg+UFCQ0Wfozok/psFUkSu JRnvkra6lVniNAs1mvAq957PgrBx9kU6uC29DKdpDC30ip9hwiaRQEqbVDvnJ8/lBGHT PAZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=JEhkFvUyxEn8D3p5Mcj0lkTCPKG2HqPfDmdKXjq8qRI=; b=CXYQAtgGxDOVyqj7cFY+tZ9271Tl4Db9vpo9jphnICT/bPVYDNx9pVtWe0m0zgAF68 m2leWcqnGMSwtwI5lOImpN4TmUUVv5i8jbFOY28MPMquuKfSj/xLJY9Xnzj6cZhZqvcf IBtCGMFDgJi4HjIg6yYC97KuoWVaNt+X1DA3Pi2DWisjleytaccOCzYQ9TJoagOI/W0Q 2wK/xp+lMg7rHMC/nBJ+fi454Do7q7O7dwQCktDTCTW7FxdzHcmipd06og8kUKl3sOXT pwgvt97QcK2xrcmPsqXdxZi+cg7xG2RgCUAaNy80Udz8Otgt6C2YRSjw1hd0wtJSFqbp NSRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a17090614c800b0094418931226si1053018ejc.404.2023.04.06.12.01.56; Thu, 06 Apr 2023 12:02:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238771AbjDFS4W convert rfc822-to-8bit (ORCPT + 99 others); Thu, 6 Apr 2023 14:56:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239786AbjDFS4T (ORCPT ); Thu, 6 Apr 2023 14:56:19 -0400 Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B2559039; Thu, 6 Apr 2023 11:56:17 -0700 (PDT) Received: by mail-ej1-f49.google.com with SMTP id g18so3723274ejx.7; Thu, 06 Apr 2023 11:56:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680807376; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GEDpzpwkdqfhFP/l/6sXm+y2yJSiLZZYXAjgzwTJOBs=; b=GDlLdDlSQbNiLnFVm4JxjQMX9RMjDUUhgGrHHonW9lRrB0ofKc7mIkhPnP/qY4UNJJ cy8PW3k/x810yHsL/n+7mtO8sXKVHNQVGx+lwS5PoPMsaDLjMf3TwQPs4hnKae3SDd2f 4WRpdY1vJSgD/YWSM6wZSboJyUSzjlaOEnNuR2HO5FeirSDOVf8lFG1mug+F11GfVkMx Vr46pibwSGRXn6JQQl8q6//FoKpNc3/0gFQJfalcfhwPUiJ4VD7WFQmDdp7Vas8Nt6Nt F6y/Ux7cDPchYWO+/IlxMYnqY2UJkYua2qpvO5dj7bP3HoB5zcrUwEXfAiit9nA7OU6R vPWA== X-Gm-Message-State: AAQBX9f0g9LgT4npSda3srYPsT3WhGhL/Rnsgadonf3BBI3kb3Yq7BVw XVDmpyImLitmqAuxaEuLCBGfboDvktNWwYGsE7qiwd3ScSM= X-Received: by 2002:a17:907:96a5:b0:946:a095:b314 with SMTP id hd37-20020a17090796a500b00946a095b314mr3678555ejc.2.1680807375859; Thu, 06 Apr 2023 11:56:15 -0700 (PDT) MIME-Version: 1.0 References: <20230331165336.1047102-1-srinivas.pandruvada@linux.intel.com> <221ff60648e0e76920cb5054e9cfb98ec77612b1.camel@linux.intel.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 6 Apr 2023 20:56:04 +0200 Message-ID: Subject: Re: [PATCH] thermal/drivers/intel/int340x: Add DLVR support To: srinivas pandruvada Cc: "Rafael J. Wysocki" , rui.zhang@intel.com, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 4, 2023 at 7:55 PM srinivas pandruvada wrote: > > On Tue, 2023-04-04 at 18:46 +0200, Rafael J. Wysocki wrote: > > On Tue, Apr 4, 2023 at 6:39 PM srinivas pandruvada > > 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 > > > > 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. So the first two paragraphs in the "DPTF Processor thermal RFIM interface" section need to be updated to mention/cover DLVR. Then, it will all be clear (at least AFAIAC). > 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/ Yes, I know what "spread spectrum" means.