Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3162108ybi; Fri, 5 Jul 2019 02:59:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCywY+HpGX12hqoZXB5QRASRBoU89I8jC/8hoL696JOoFoiWXxpZ9/TF/YAivFuvSqMrtP X-Received: by 2002:a17:90a:8c92:: with SMTP id b18mr4253049pjo.97.1562320781912; Fri, 05 Jul 2019 02:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562320781; cv=none; d=google.com; s=arc-20160816; b=pSmIuvCRwdG+AHAutCcqqwzEqk3NT2TcdrflyDDFaV590ZoP53KXx6jiwozFBH9j6D xbjqzTCTXqW8W/MRDYi4sVgCzq7vXZG6EzkJKZB5IGmO806KsDdBU7iF91KYMlcpcG5a ynuu+dM66SJp65C47dbhVxicWQfEl75sLctXn8vMkjy+hN6IWxGN36HZC7DZoCfifQCw WKDntr17XVVsOsq4j5tyRcpg12MpHuOeUkRQuCatV5rwgkj0nZ3ao5EHjKu9hnm2aApL A1Ma/kmSMTFtAPphslAHo/+bflTVdmRVu8tIKUyz0p5XxsrcNIJVwjn8eR73HUaVf/pY xMfw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=jfb8N34fRP1vMCo/Q4EmvhjgMM4QUZHFL/DkTTJzvfw=; b=JuFywEqbIULW6WbGUeA3ktzC+rD3I2ApnwY9p3/onfiXWHs4YNpUYaGRjtRW5/IsMh Ci2CieCu1F9OBrpbDKskCG/0EMFF+c+DGuiuPhPdIHdJWMq0MQvklvF+nUVOSkQd3GR8 0TvQiO2uP0fk//f6rYGT6IixXFx6lWZBlk7IbM4KUknJrnJr158HhvbExmQRjSED5eoa Fr5ITAagalpd3DAa98oH7eMcgqUCqWCRs2zDFV3Of47Kyj8ouFh8JnInzBsPDLUbQDa6 V62S47Iu/nw5q2cENpjAFOQIQUp5GkKbTEkYz6Kzai+vpEPAz0C63RKs3mscuhoFIzET e3rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iV/bDXXG"; 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 44si8859547plb.366.2019.07.05.02.59.27; Fri, 05 Jul 2019 02:59:41 -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="iV/bDXXG"; 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 S1728232AbfGEJ5r (ORCPT + 99 others); Fri, 5 Jul 2019 05:57:47 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:34018 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727311AbfGEJ5q (ORCPT ); Fri, 5 Jul 2019 05:57:46 -0400 Received: by mail-lf1-f66.google.com with SMTP id b29so5977553lfq.1 for ; Fri, 05 Jul 2019 02:57:45 -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:mime-version :content-transfer-encoding; bh=jfb8N34fRP1vMCo/Q4EmvhjgMM4QUZHFL/DkTTJzvfw=; b=iV/bDXXGIF2SCjKP+mvbagzIEpJnRgeHAciZAGW4BAO+x7mUbVcnb6ujCII0qEIvag B+9nuDksqPI0mCEFf75sXKlOCwbGaD06VAJKLym1HR6+vEmcMdSgMufD1qQ/UigCRXAc ptdXpUj40ht00oZMamy9VwDHzoqUG68PoDxL4ROV3wu5aCujWyY/WunfDhJQCaz9ynJl N/1kQdYUCXSx9Fm84Zt8RYZkiAtS9DpsG2O3kzNO9PkNVw3QFS+N6aIUajmN8tWvEanV HZ6NUpwwyn1yxwN8ZDmnb1hLDsHVF3pcTl+e2zwIfycP/z9LpD7+CsDS58kkqjo2//QY wm1A== 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:mime-version :content-transfer-encoding; bh=jfb8N34fRP1vMCo/Q4EmvhjgMM4QUZHFL/DkTTJzvfw=; b=MphmVGct3Ce7nwXAUmJzbPcnIWJYuompzZLUL2E8aLwPqvGjFNGZZG8pVT4NrH97WZ LoB0SknNg9JdwgXEfJZfGBTy2CddFi8uGHnHWwnKmV9lkoIxeVCX1XULVpMVabuaeCY9 inEeScNrLnc2McqN/Bm7U4+ClDj0h2C/LA75cbpGtayNz6Av5irjkBAIbE9J3w33NTMY rr9J+HRMQQ1SRKp9EcKqwqVt/VMD/DSE5vUJM6y1gXB0bDbKT2H9cEeUVZ8b40hxBvm4 97ZdAaDE1bHN3LfH7dSZDD5KD10sugO7I9phoL4fhalim06tCDiwV6R7fCN/+V1jdeNG 2Ghg== X-Gm-Message-State: APjAAAX2BERUTbWXvToriWBIChzBJo0ZGCxURFrJInUaqkGZBErotTc5 9mdQMtsh2aCQ7HYwOBKqwk4YFQ== X-Received: by 2002:a19:9111:: with SMTP id t17mr1532125lfd.113.1562320664397; Fri, 05 Jul 2019 02:57:44 -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.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 02:57:43 -0700 (PDT) From: Niklas Cassel To: linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: jorge.ramirez-ortiz@linaro.org, sboyd@kernel.org, vireshk@kernel.org, bjorn.andersson@linaro.org, ulf.hansson@linaro.org, Niklas Cassel , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 00/13] Add support for QCOM Core Power Reduction Date: Fri, 5 Jul 2019 11:57:11 +0200 Message-Id: <20190705095726.21433-1-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series adds support for Core Power Reduction (CPR), a form of Adaptive Voltage Scaling (AVS), found on certain Qualcomm SoCs. This series is based on top of the qcs404 cpufreq patch series that hasn't landed yet: https://patchwork.kernel.org/project/linux-arm-msm/list/?series=137809 CPR is a technology that reduces core power on a CPU or on other device. It reads voltage settings from efuses (that have been written in production), it uses these voltage settings as initial values, for each OPP. After moving to a certain OPP, CPR monitors dynamic factors such as temperature, etc. and adjusts the voltage for that frequency accordingly to save power and meet silicon characteristic requirements. This driver has been developed together with Jorge Ramirez-Ortiz, and is based on an RFC by Stephen Boyd[1], which in turn is based on work by others on codeaurora.org[2]. [1] https://lkml.org/lkml/2015/9/18/833 [2] https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/regulator/cpr-regulator.c?h=msm-3.10 Jorge Ramirez-Ortiz (1): cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist Niklas Cassel (10): dt-bindings: cpufreq: qcom-nvmem: Make speedbin related properties optional cpufreq: qcom: Refactor the driver to make it easier to extend dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain cpufreq: qcom: Add support for qcs404 on nvmem driver dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR dt-bindings: power: avs: Add support for CPR (Core Power Reduction) power: avs: Add support for CPR (Core Power Reduction) arm64: dts: qcom: qcs404: Add CPR and populate OPP table arm64: defconfig: enable CONFIG_QCOM_CPR arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM Sricharan R (2): dt-bindings: cpufreq: Re-organise kryo cpufreq to use it for other nvmem based qcom socs cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs ...ryo-cpufreq.txt => qcom-nvmem-cpufreq.txt} | 125 +- .../devicetree/bindings/opp/qcom-opp.txt | 19 + .../bindings/power/avs/qcom,cpr.txt | 193 ++ MAINTAINERS | 13 +- arch/arm64/boot/dts/qcom/qcs404.dtsi | 145 +- arch/arm64/configs/defconfig | 2 + drivers/cpufreq/Kconfig.arm | 4 +- drivers/cpufreq/Makefile | 2 +- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/qcom-cpufreq-kryo.c | 249 --- drivers/cpufreq/qcom-cpufreq-nvmem.c | 351 ++++ drivers/power/avs/Kconfig | 15 + drivers/power/avs/Makefile | 1 + drivers/power/avs/qcom-cpr.c | 1839 +++++++++++++++++ 14 files changed, 2692 insertions(+), 267 deletions(-) rename Documentation/devicetree/bindings/opp/{kryo-cpufreq.txt => qcom-nvmem-cpufreq.txt} (87%) create mode 100644 Documentation/devicetree/bindings/opp/qcom-opp.txt create mode 100644 Documentation/devicetree/bindings/power/avs/qcom,cpr.txt delete mode 100644 drivers/cpufreq/qcom-cpufreq-kryo.c create mode 100644 drivers/cpufreq/qcom-cpufreq-nvmem.c create mode 100644 drivers/power/avs/qcom-cpr.c -- 2.21.0