From: Niklas Cassel <niklas.cassel@linaro.org> To: linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: amit.kucheria@linaro.org, sboyd@kernel.org, vireshk@kernel.org, bjorn.andersson@linaro.org, ulf.hansson@linaro.org, Niklas Cassel <niklas.cassel@linaro.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 0/5] Add support for QCOM Core Power Reduction Date: Fri, 29 Nov 2019 22:39:10 +0100 [thread overview] Message-ID: <20191129213917.1301110-1-niklas.cassel@linaro.org> (raw) 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=207821 as well as that series' matching device tree changes: https://patchwork.kernel.org/project/linux-arm-msm/list/?series=207831 For testing purposes, this patch series, including the dependencies listed above, is available on the following git tag: https://git.linaro.org/people/niklas.cassel/kernel.git/log/?h=cpr-v7 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://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/drivers/regulator/cpr-regulator.c?h=msm-4.14 Changes since v6: (Addressed comments from Ulf Hansson) -Initialize mutex later. -Take the mutex in cpr_pd_attach_dev(), in case we ever implement async attach in the future. -Add comment regarding why we get the cpu clock rate. -Add comment how we handle unlisted frequencies. -Clarify comment regarding why things related to virtual corners are performed in cpr_pd_attach_dev(). -Removed the internal performance_state variable, the performance state is instead calculated using the current corner pointer. -Save a pointer to the first genpd dev that gets attached, and use that rather than get_cpu_device(0), when getting the CPU OPP table. Niklas Cassel (5): 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 .../bindings/power/avs/qcom,cpr.txt | 130 ++ MAINTAINERS | 8 + arch/arm64/boot/dts/qcom/qcs404.dtsi | 132 +- arch/arm64/configs/defconfig | 2 + drivers/power/avs/Kconfig | 15 + drivers/power/avs/Makefile | 1 + drivers/power/avs/qcom-cpr.c | 1792 +++++++++++++++++ 7 files changed, 2072 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/avs/qcom,cpr.txt create mode 100644 drivers/power/avs/qcom-cpr.c -- 2.23.0
WARNING: multiple messages have this Message-ID (diff)
From: Niklas Cassel <niklas.cassel@linaro.org> To: linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: devicetree@vger.kernel.org, ulf.hansson@linaro.org, sboyd@kernel.org, vireshk@kernel.org, linux-kernel@vger.kernel.org, amit.kucheria@linaro.org, bjorn.andersson@linaro.org, Niklas Cassel <niklas.cassel@linaro.org>, linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 0/5] Add support for QCOM Core Power Reduction Date: Fri, 29 Nov 2019 22:39:10 +0100 [thread overview] Message-ID: <20191129213917.1301110-1-niklas.cassel@linaro.org> (raw) 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=207821 as well as that series' matching device tree changes: https://patchwork.kernel.org/project/linux-arm-msm/list/?series=207831 For testing purposes, this patch series, including the dependencies listed above, is available on the following git tag: https://git.linaro.org/people/niklas.cassel/kernel.git/log/?h=cpr-v7 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://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/drivers/regulator/cpr-regulator.c?h=msm-4.14 Changes since v6: (Addressed comments from Ulf Hansson) -Initialize mutex later. -Take the mutex in cpr_pd_attach_dev(), in case we ever implement async attach in the future. -Add comment regarding why we get the cpu clock rate. -Add comment how we handle unlisted frequencies. -Clarify comment regarding why things related to virtual corners are performed in cpr_pd_attach_dev(). -Removed the internal performance_state variable, the performance state is instead calculated using the current corner pointer. -Save a pointer to the first genpd dev that gets attached, and use that rather than get_cpu_device(0), when getting the CPU OPP table. Niklas Cassel (5): 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 .../bindings/power/avs/qcom,cpr.txt | 130 ++ MAINTAINERS | 8 + arch/arm64/boot/dts/qcom/qcs404.dtsi | 132 +- arch/arm64/configs/defconfig | 2 + drivers/power/avs/Kconfig | 15 + drivers/power/avs/Makefile | 1 + drivers/power/avs/qcom-cpr.c | 1792 +++++++++++++++++ 7 files changed, 2072 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/avs/qcom,cpr.txt create mode 100644 drivers/power/avs/qcom-cpr.c -- 2.23.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-11-29 21:39 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-29 21:39 Niklas Cassel [this message] 2019-11-29 21:39 ` [PATCH v7 0/5] Add support for QCOM Core Power Reduction Niklas Cassel 2019-11-29 21:39 ` [PATCH v7 1/5] dt-bindings: power: avs: Add support for CPR (Core Power Reduction) Niklas Cassel 2019-12-20 9:31 ` Rafael J. Wysocki 2019-12-20 14:33 ` Niklas Cassel 2019-12-23 14:58 ` Niklas Cassel 2019-11-29 21:39 ` [PATCH v7 2/5] " Niklas Cassel 2019-12-02 9:56 ` Ulf Hansson 2019-11-29 21:39 ` [PATCH v7 3/5] arm64: dts: qcom: qcs404: Add CPR and populate OPP table Niklas Cassel 2019-11-29 21:39 ` [PATCH v7 4/5] arm64: defconfig: enable CONFIG_QCOM_CPR Niklas Cassel 2019-11-29 21:39 ` Niklas Cassel 2019-11-29 21:39 ` [PATCH v7 5/5] arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM Niklas Cassel 2019-11-29 21:39 ` Niklas Cassel
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=20191129213917.1301110-1-niklas.cassel@linaro.org \ --to=niklas.cassel@linaro.org \ --cc=amit.kucheria@linaro.org \ --cc=bjorn.andersson@linaro.org \ --cc=devicetree@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=sboyd@kernel.org \ --cc=ulf.hansson@linaro.org \ --cc=vireshk@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.