From patchwork Fri Jul 5 09:57:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 168519 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3354371ilk; Fri, 5 Jul 2019 02:57:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwybgA4vrJhUThAHG5+Nh9gCMTjVcCPygZGSWa2VsLZnziENkT8VJJqiDzBaDlLJ4/3v9Kh X-Received: by 2002:a63:1658:: with SMTP id 24mr4512051pgw.167.1562320671412; Fri, 05 Jul 2019 02:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562320671; cv=none; d=google.com; s=arc-20160816; b=E+OG1F5pdxwGp4wve8UQC4KdcjXHNu/vdXo4U9c4S4/RKV+lt1DE+B61ebO0DKlIqe 3a3fjFAGBlLr2cGIL4sLKSrnhioMpZ3Ut8V4QI6HeRGdXI44kWHTQkEacuYbF/qJRrkh TJs6uHZTslzNU+aahA/Y9cRBMZlKCarup98lBdYpT7hb/7L8MwE4jcLywA1++R6kOlw6 ku5j0RzUY7xcWSFzicavc15Jz6n6neEdnmmJ4s85F8osI3jZA60pykTOXf2jMASR2lgy 4RT0DHJTbWfnIpR/8LLQG7Zyb+LGHA/GfT4VcgWpDxbDlhwhoqN+knE3T6+wYRen0ABS atkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aR9uAvgeaPzmKk1YhWutKX7D15M3aAKx9HHCruqrY3s=; b=I+xzoASzyaFqs3FQdEj5rU/lA3OI3/PkjQjrba+vjM3202yl4yq5p5lqjqtMcDX4Vy Oijvf92jcQ+ikCG9Mp6wxONrJkSfAWRXb6Mj9vKfpNqNw4NU+ZD/AyIESrhD+OZxzC+j JcvaBsS5eWECi3xLTs9r9Ruc3kVNYP3UkHDwRu1Js6GzQkEAXR4A6UYZ1u4TKQh7A2To 4G0eSuaNnS4vVM7hTfdOEKkpy3c5Ox8SFKvWCoVR53BTzGrjaYTRduDaLRzYeg0stTEO Y2K5o8N5v/w5DbT7uytTDCQlYXi6BOcHwzYjMDEVHlzOaeguaVVsoh5gfjVo0RAb5L3C PkWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MWycKuBR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si7744220plt.306.2019.07.05.02.57.50; Fri, 05 Jul 2019 02:57:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MWycKuBR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728382AbfGEJ5s (ORCPT + 30 others); Fri, 5 Jul 2019 05:57:48 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:41962 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728184AbfGEJ5r (ORCPT ); Fri, 5 Jul 2019 05:57:47 -0400 Received: by mail-lf1-f66.google.com with SMTP id 62so5939107lfa.8 for ; Fri, 05 Jul 2019 02:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aR9uAvgeaPzmKk1YhWutKX7D15M3aAKx9HHCruqrY3s=; b=MWycKuBRX+yk7xrNtRuZUKiQquKUSF3f8BCs3i94Tg0jpBzZZSvrg/KD7XjF4dZzSj WSrqJ6zerqnMOvMfSPwSVX3FvQGTSplMbTnriDo9DNz+qLIXcuuEsZ5lpvxuokKTpCBK 91jIzkvGtmoB8LaQtWv0mH8JH43enZMRtsDRSFjZY/Lh4IBxpsbtWgkEWI2FSsmU2vRs e5akyZHNQOVUmjeUAH2tLlxyWfr/pDHyCokuz1SLnr7wKHi8quESwtQgQdlN8CW0Eqlp is8yXlOGy337hHmkBlxu5b/sOae3LXt5VVrrXfKPDVNivJ+s5X4AhNns1P5oip54DDm6 UzjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aR9uAvgeaPzmKk1YhWutKX7D15M3aAKx9HHCruqrY3s=; b=s+qFrihLIXD4duQCLiHv3hXp7YChMPzsTacJY/2n1zn9322S4vXddR0wkXMojOuqws pp+zHggFbpQu1PMOH6CphijyIA3Pmy9bNhPOgKuGZ67mEHPKeMS6nknEsl83pbFqnvBU vajyb5MyUD/a9Q+N5WxSfglB69/NSSyOtWtNm9o6pMiAebCrBcwFcc2BJofWaDeTLZC2 auyaaBVgdmpn3GcISCcGqgFoIrFPRqq0jeC1W2HYXRSjvMiZxayHI0bHAbBHC+V6jfXI 4Y+OilVsjeGrS3CUi1bHm8PQHUUTmVGH3sVODf/7iARZlxQdYaPlZ622HMLrsOboumw4 MOow== X-Gm-Message-State: APjAAAXbk5E+Wyb2T+3OOzcGBm/QV3CnB2j5BlXI/DrHO1i960qGiRuy crUxr5SSpM6eOF4ARTcdxVlLXQ== X-Received: by 2002:a19:7709:: with SMTP id s9mr1485305lfc.86.1562320665755; Fri, 05 Jul 2019 02:57:45 -0700 (PDT) Received: from localhost.localdomain (ua-83-226-34-119.bbcust.telenor.se. [83.226.34.119]) by smtp.gmail.com with ESMTPSA id q2sm1298364lfj.25.2019.07.05.02.57.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 02:57:45 -0700 (PDT) From: Niklas Cassel To: Viresh Kumar , Nishanth Menon , Stephen Boyd , Ilia Lin , Andy Gross Cc: linux-arm-msm@vger.kernel.org, jorge.ramirez-ortiz@linaro.org, bjorn.andersson@linaro.org, ulf.hansson@linaro.org, Sricharan R , Niklas Cassel , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/13] dt-bindings: cpufreq: Re-organise kryo cpufreq to use it for other nvmem based qcom socs Date: Fri, 5 Jul 2019 11:57:12 +0200 Message-Id: <20190705095726.21433-2-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190705095726.21433-1-niklas.cassel@linaro.org> References: <20190705095726.21433-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sricharan R The kryo cpufreq driver reads the nvmem cell and uses that data to populate the opps. There are other qcom cpufreq socs like krait which does similar thing. Except for the interpretation of the read data, rest of the driver is same for both the cases. So pull the common things out for reuse. Signed-off-by: Sricharan R [niklas.cassel@linaro.org: split dt-binding into a separate patch and do not rename the compatible string.] Signed-off-by: Niklas Cassel --- Changes since RFC: -Made DT bindings a separate patch. -Keep the original compatible string, since renaming it breaks DT backwards compatibility. .../opp/{kryo-cpufreq.txt => qcom-nvmem-cpufreq.txt} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename Documentation/devicetree/bindings/opp/{kryo-cpufreq.txt => qcom-nvmem-cpufreq.txt} (98%) -- 2.21.0 diff --git a/Documentation/devicetree/bindings/opp/kryo-cpufreq.txt b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt similarity index 98% rename from Documentation/devicetree/bindings/opp/kryo-cpufreq.txt rename to Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt index c2127b96805a..198441e80ba8 100644 --- a/Documentation/devicetree/bindings/opp/kryo-cpufreq.txt +++ b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt @@ -1,13 +1,13 @@ -Qualcomm Technologies, Inc. KRYO CPUFreq and OPP bindings +Qualcomm Technologies, Inc. NVMEM CPUFreq and OPP bindings =================================== -In Certain Qualcomm Technologies, Inc. SoCs like apq8096 and msm8996 -that have KRYO processors, the CPU ferequencies subset and voltage value -of each OPP varies based on the silicon variant in use. +In Certain Qualcomm Technologies, Inc. SoCs like apq8096 and msm8996, +the CPU frequencies subset and voltage value of each OPP varies based on +the silicon variant in use. Qualcomm Technologies, Inc. Process Voltage Scaling Tables defines the voltage and frequency value based on the msm-id in SMEM and speedbin blown in the efuse combination. -The qcom-cpufreq-kryo driver reads the msm-id and efuse value from the SoC +The qcom-cpufreq-nvmem driver reads the msm-id and efuse value from the SoC to provide the OPP framework with required information (existing HW bitmap). This is used to determine the voltage and frequency value for each OPP of operating-points-v2 table when it is parsed by the OPP framework.