Commit Graph

97 Commits

Author SHA1 Message Date
Mark Langsdorf bbf280d798 cpufreq: qcom-nvmem: Introduce cpufreq for ipq95xx
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 5b5b5806f22390808b8e8fa180fe35b003a4a74d
Author: Varadarajan Narayanan <quic_varada@quicinc.com>
Date: Thu, 02 Nov 2023 11:04:53 +0000

IPQ95xx SoCs have different OPPs available for the CPU based on
the SoC variant. This can be determined from an eFuse register
present in the silicon.

Added support for ipq95xx on nvmem driver which helps to
determine OPPs at runtime based on the eFuse register which
has the CPU frequency limits. opp-supported-hw dt binding
can be used to indicate the available OPPs for each limit.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Praveenkumar I <ipkumar@codeaurora.org>
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
[ Viresh: Fixed subject ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:25 -04:00
Mark Langsdorf 6af5861e04 cpufreq: qcom-nvmem: Enable cpufreq for ipq53xx
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit ba5a61a08d83b18b99c461b4ddb9009947a4aa0e
Author: Varadarajan Narayanan <quic_varada@quicinc.com>
Date: Thu, 02 Nov 2023 11:04:53 +0000

IPQ53xx have different OPPs available for the CPU based on
SoC variant. This can be determined through use of an eFuse
register present in the silicon.

Added support for ipq53xx on nvmem driver which helps to
determine OPPs at runtime based on the eFuse register which
has the CPU frequency limits. opp-supported-hw dt binding
can be used to indicate the available OPPs for each limit.

nvmem driver also creates the "cpufreq-dt" platform_device after
passing the version matching data to the OPP framework so that the
cpufreq-dt handles the actual cpufreq implementation.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
[ Viresh: Fixed subject ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:25 -04:00
Mark Langsdorf 62a3fbfd1d cpufreq: qcom-nvmem: add support for IPQ8074
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 0b9cd949136f1b63f7aa9424b6e583a1ab261e36
Author: Robert Marko <robimarko@gmail.com>
Date: Thu, 02 Nov 2023 11:04:53 +0000

IPQ8074 comes in 3 families:
* IPQ8070A/IPQ8071A (Acorn) up to 1.4GHz
* IPQ8172/IPQ8173/IPQ8174 (Oak) up to 1.4GHz
* IPQ8072A/IPQ8074A/IPQ8076A/IPQ8078A (Hawkeye) up to 2.2GHz

So, in order to be able to share one OPP table lets add support for IPQ8074
family based of SMEM SoC ID-s as speedbin fuse is always 0 on IPQ8074.

IPQ8074 compatible is blacklisted from DT platdev as the cpufreq device
will get created by NVMEM CPUFreq driver.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[ Viresh: Fixed rebase conflict. ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:25 -04:00
Mark Langsdorf 4037e80940 cpufreq: qcom-nvmem: add support for IPQ6018
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 47e161a7873b0891f4e01a69a839f6161d816ea8
Author: Robert Marko <robimarko@gmail.com>
Date: Wed, 25 Oct 2023 15:50:45 +0000

IPQ6018 SoC series comes in multiple SKU-s, and not all of them support
high frequency OPP points.

SoC itself does however have a single bit in QFPROM to indicate the CPU
speed-bin.
That bit is used to indicate frequency limit of 1.5GHz, but that alone is
not enough as IPQ6000 only goes up to 1.2GHz, but SMEM ID can be used to
limit it further.

IPQ6018 compatible is blacklisted from DT platdev as the cpufreq device
will get created by NVMEM CPUFreq driver.

Signed-off-by: Robert Marko <robimarko@gmail.com>
[ Viresh: Fixed rebase conflict. ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:24 -04:00
Mark Langsdorf dbe4648e3e cpufreq: dt-platdev: add am62p5 to blocklist
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 8b8eb859b5a71e0eaf7422c366d936ac57e5e76e
Author: Bryan Brattlof <bb@ti.com>
Date: Thu, 12 Oct 2023 09:10:22 +0000

The am62p5 family of SoCs is a variation of the am625 and am62a7 SoC
family. Add this device along with the devices which will use the
operating-points-v2 property.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:24 -04:00
Mark Langsdorf 07b4de1b08 cpufreq: dt: platdev: Add MSM8909 to blocklist
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 40f6be3ef2bed759ad91d335d36f8dc9d64c87e2
Author: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Date: Thu, 28 Sep 2023 12:22:03 +0000

MSM8909 uses qcom-cpufreq-nvmem to attach power domains and to parse the
speedbin from NVMEM (for opp-supported-hw).

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
[ Viresh: Fixed order in table ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:23 -04:00
Mark Langsdorf 90f7924ebe cpufreq: Add QCM6490 to cpufreq-dt-platdev blocklist
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit aa01dd7bc100af0bd230fc498d4a5750d0be73b2
Author: Luca Weiss <luca.weiss@fairphone.com>
Date: Wed, 27 Sep 2023 12:26:01 +0000

The Qualcomm QCM6490 platform uses the qcom-cpufreq-hw driver, so add it
to the cpufreq-dt-platdev driver's blocklist.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:23 -04:00
Mark Langsdorf d196ccd834 cpufreq: blocklist MSM8998 in cpufreq-dt-platdev
JIRA: https://issues.redhat.com/browse/RHEL-32446
Conflicts:
	drivers/cpufreq/cpufreq-dt-platdev.c - minor context
differences

commit 6b6349d0d685fc3032455b43fce57f374819fb54
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Date: Thu, 03 Aug 2023 11:19:09 +0000

Add the MSM8998 to the blocklist since the CPU scaling on this platform
is handled by a separate driver.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Tested-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:22 -04:00
Mark Langsdorf f1a2648288 cpufreq: dt-platdev: Support building as module
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 3b062a086984d35a3c6d3a1c7841d0aa73aa76af
Author: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Date: Mon, 05 Jun 2023 16:33:05 +0000

Make the cpufreq platdev driver as tristate so that it can be built
as loadable module.

Also add MODULE_LICENSE to support building as module.

Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
[ Viresh: Merged two commits, included module.h ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:19 -04:00
Mark Langsdorf f2c49ca3ed cpufreq: dt-platdev: Blacklist ti,am62a7 SoC
JIRA: https://issues.redhat.com/browse/RHEL-32446
Conflicts:
	drivers/cpufreq/cpufreq-dt-platdev.c - minor
context differences

commit b2b2029eb17888117a9dad3b111db004f2e7353b
Author: Vibhore Vardhan <vibhore@ti.com>
Date: Mon, 29 May 2023 10:34:17 +0000

Add ti,am62a7 SoC to the blacklist as the ti-cpufreq driver will handle
creating the cpufreq-dt platform device after it completes so it is not
created twice.

Based on AM625 CPUFreq patch series by Dave Gerlach.

Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-05-01 11:47:19 -04:00
Mark Langsdorf 7bdebb7b82 cpufreq: Adjust includes to remove of_device.h
JIRA: https://issues.redhat.com/browse/RHEL-32446
Conflicts:
	drivers/cpufreq/qcom-cpufreq-hw.c - changes
applied in the previous commit

commit 21bb32b155dfe7b40e5e6545f2df53f81f2e69cc
Author: Rob Herring <robh@kernel.org>
Date: Thu, 13 Apr 2023 17:46:35 +0000

Now that of_cpu_device_node_get() is defined in of.h, of_device.h is just
implicitly including other includes, and is no longer needed. Adjust the
include files with what was implicitly included by of_device.h (cpu.h and
of.h) and drop including of_device.h.

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-14-581e2605fe47@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-29 11:38:48 -04:00
Mark Langsdorf dc16ec76b2 cpufreq: dt-platdev: Add JH7110 SOC to the allowlist
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 4b4c0d37164c296efbdbceacb8d2535a3910b13e
Author: Mason Huo <mason.huo@starfivetech.com>
Date: Thu, 11 May 2023 14:32:30 +0000

Add the compatible strings for supporting the generic
cpufreq driver on the StarFive JH7110 SoC.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-29 11:38:48 -04:00
Mark Langsdorf fa92fab4ed cpufreq: Add SM7225 to cpufreq-dt-platdev blocklist
JIRA: https://issues.redhat.com/browse/RHEL-32446

commit 417598f998520b1484a7cef2ac0563de7d975937
Author: Luca Weiss <luca.weiss@fairphone.com>
Date: Thu, 30 Mar 2023 09:21:35 +0000

The Qualcomm SM7225 platform uses the qcom-cpufreq-hw driver, so add
it to the cpufreq-dt-platdev driver's blocklist.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2024-04-29 11:38:47 -04:00
Mark Langsdorf 6af3a60d44 cpufreq: blocklist more Qualcomm platforms in cpufreq-dt-platdev
JIRA: https://issues.redhat.com/browse/RHEL-1026

commit 0aea7a2f88a551d9dd38a2b405063cf5f97bfc29
Author: Konrad Dybcio <konrad.dybcio@linaro.org>
Date:   Wed Aug 9 02:07:59 2023 +0200

Conflicts:
       drivers/cpufreq/cpufreq-dt-platdev.c - minor conext differences
when adding the first qcom entry

All Qualcomm platforms utilizing the qcom-cpufreq-hw driver have no
business in using cpufreq-dt. Prevent that from happening.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-11-02 17:02:15 -04:00
Mark Langsdorf 85548fcc2e cpufreq: Use of_property_present() for testing DT property presence
JIRA: https://issues.redhat.com/browse/RHEL-1026

commit b8f3a396a7ee43e6079176cc0fb8de2b95a23681
Author: Rob Herring <robh@kernel.org>
Date: Mon, 13 Mar 2023 09:58:11 +0000

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-09-28 11:48:29 -04:00
Mark Langsdorf 3032106bd8 cpufreq: Add SM6375 to cpufreq-dt-platdev blocklist
JIRA: https://issues.redhat.com/browse/RHEL-1026

commit faf28e240dd118d9521c68aeb9388b9b8f02d9d0
Author: Konrad Dybcio <konrad.dybcio@linaro.org>
Date: Wed, 04 Jan 2023 12:05:06 +0000

The Qualcomm SM6375 platform uses the qcom-cpufreq-hw driver, so add
it to the cpufreq-dt-platdev driver's blocklist.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-09-28 11:48:29 -04:00
Mark Langsdorf 7d37a3c52b cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist
JIRA: https://issues.redhat.com/browse/RHEL-1026

commit 01c5bb0cc2a39fbc56ff9a5ef28b79447f0c2351
Author: Sumit Gupta <sumitg@nvidia.com>
Date: Tue, 27 Dec 2022 08:27:14 +0000

Tegra234 platform uses the tegra194-cpufreq driver, so add it
to the blocklist in cpufreq-dt-platdev driver to avoid the cpufreq
driver registration from there.

Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
2023-09-28 11:48:29 -04:00
Adrien Thierry e8f2d79cd7 cpufreq: Add SM6115 to cpufreq-dt-platdev blocklist
Bugzilla: https://bugzilla.redhat.com/2152669

commit 0612d928b7ff8c87043115f74f08cb4af1f0c4cf
Author: Adam Skladowski <a39.skl@gmail.com>
Date:   Mon Aug 15 12:09:42 2022 +0200

    cpufreq: Add SM6115 to cpufreq-dt-platdev blocklist

    The Qualcomm SM6115 platform uses the
    qcom-cpufreq-hw driver, so add it to the cpufreq-dt-platdev driver's
    blocklist.

    Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2022-12-13 13:40:54 -05:00
Adrien Thierry 8ec90a9930 cpufreq: Add MT8186 to cpufreq-dt-platdev blocklist
Bugzilla: https://bugzilla.redhat.com/2152669

commit be4b61ec45b3efe5e9077525fc92d544305eb2a6
Author: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date:   Fri Jun 17 13:09:26 2022 +0200

    cpufreq: Add MT8186 to cpufreq-dt-platdev blocklist

    This SoC shall use the mediatek-cpufreq driver, or the system will
    crash upon any clock scaling request: add it to the cpufreq-dt-platdev
    blocklist.

    Fixes: 39b360102f3a ("cpufreq: mediatek: Add support for MT8186")
    Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2022-12-13 13:40:54 -05:00
Adrien Thierry cfa98b7427 cpufreq: blocklist Qualcomm sc8280xp and sa8540p in cpufreq-dt-platdev
Bugzilla: https://bugzilla.redhat.com/2152669

commit 72951a77c00fb23275c8164aeee409c06b6f197c
Author: Bjorn Andersson <bjorn.andersson@linaro.org>
Date:   Thu Feb 24 19:57:06 2022 -0800

    cpufreq: blocklist Qualcomm sc8280xp and sa8540p in cpufreq-dt-platdev

    The Qualcomm sc8280xp and sa8540p platforms also uses the
    qcom-cpufreq-hw driver, so add them to the cpufreq-dt-platdev driver's
    blocklist.

    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2022-12-13 13:40:54 -05:00
Adrien Thierry 0a3215b36b cpufreq: Add i.MX7S to cpufreq-dt-platdev blocklist
Bugzilla: https://bugzilla.redhat.com/2152669

commit bc8b0c271bbf1e1a303087eb4b393cc0b791fc9d
Author: Stefan Agner <stefan.agner@toradex.com>
Date:   Mon Jan 24 09:28:03 2022 +0100

    cpufreq: Add i.MX7S to cpufreq-dt-platdev blocklist

    The i.MX 7Solo currently does not have multiple operating points,
    however, in order for the i.MX Thermal driver to successfully probe
    a cpufreq device is required. Add it to the cpufreq-dt-platdev
    driver's blocklist to allow using imx-cpufreq-dt.

    Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
    Cc: Stefan Agner <stefan@agner.ch>
    Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
    Reviewed-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2022-12-13 13:40:54 -05:00
Adrien Thierry ad7a70e19e cpufreq: blocklist more Qualcomm platforms in cpufreq-dt-platdev
Bugzilla: https://bugzilla.redhat.com/2152669

commit 5e79d6d9ea00c273f3efbced841212de85a384d1
Author: Bjorn Andersson <bjorn.andersson@linaro.org>
Date:   Fri Aug 20 14:57:00 2021 -0700

    cpufreq: blocklist more Qualcomm platforms in cpufreq-dt-platdev

    The Qualcomm sa8155p, sm6350, sm8250 and sm8350 platforms also uses the
    qcom-cpufreq-hw driver, so add them to the cpufreq-dt-platdev driver's
    blocklist.

    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Signed-off-by: Adrien Thierry <athierry@redhat.com>
2022-12-13 13:40:54 -05:00
Thara Gopinath 5d79e5ce54 cpufreq: blocklist Qualcomm sm8150 in cpufreq-dt-platdev
The Qualcomm sm8150 platform uses the qcom-cpufreq-hw driver, so
add it to the cpufreq-dt-platdev driver's blocklist.

Signed-off-by: Thara Gopinath <thara.gopinath@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-08-05 09:43:04 +05:30
Bjorn Andersson d66cd5dea5 cpufreq: blacklist Qualcomm sc8180x in cpufreq-dt-platdev
The Qualcomm SC8180x platform uses the qcom-cpufreq-hw driver, so
it in the cpufreq-dt-platdev driver's blocklist.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-07-26 09:53:35 +05:30
Viresh Kumar 4814d9c5d3 cpufreq: dt: Rename black/white-lists
Rename them in accordance with the coding guidelines.

Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-05-24 11:16:46 +05:30
Fabien Parent 70d99a8f04 cpufreq: mediatek: add support for mt8365
Add compatible stirng for MediaTek MT8365 SoC. Add also the
compatible in the blacklist of the cpufreq-dt-platdev driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-05-20 09:24:59 +05:30
Sibi Sankar 17a8b0b6dd cpufreq: blacklist SC7280 in cpufreq-dt-platdev
Add SC7280 to cpufreq-dt-platdev blacklist since the actual scaling is
handled by the 'qcom-cpufreq-hw' driver.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-05-20 09:23:37 +05:30
Sudeep Holla fbb31cb805 cpufreq: blacklist Arm Vexpress platforms in cpufreq-dt-platdev
Add "arm,vexpress" to cpufreq-dt-platdev blacklist since the actual
scaling is handled by the firmware cpufreq drivers(scpi, scmi and
vexpress-spc).

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-03-08 16:20:07 +05:30
Arnd Bergmann 7114ebffd3 cpufreq: remove tango driver
The tango platform is getting removed, so the driver is no
longer needed.

Cc: Marc Gonzalez <marc.w.gonzalez@free.fr>
Cc: Mans Rullgard <mans@mansr.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[ Viresh: Update cpufreq-dt-platdev.c as well ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2021-01-21 09:34:46 +05:30
Fabien Parent 75118c8ef9 cpufreq: blacklist mt8516 in cpufreq-dt-platdev
Add MT8516 to cpufreq-dt-platdev blacklist since the actual scaling is
handled by the 'mediatek-cpufreq' driver.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-12-07 13:02:37 +05:30
Fabien Parent de4ca30958 cpufreq: mediatek: Add support for mt8167
Add compatible string for mediatek mt8167

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-12-07 13:02:37 +05:30
Alain Volmat 305accf3b5 cpufreq: dt-platdev: Blacklist st,stih418 SoC
Add st,stih418 SoC in the blacklist since the cpufreq driver
for this platform is already registering the driver.

Signed-off-by: Alain Volmat <avolmat@me.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-09-16 14:12:18 +05:30
Sibi Sankar fb091802d7 cpufreq: blacklist SC7180 in cpufreq-dt-platdev
Add SC7180 to cpufreq-dt-platdev blacklist since the actual scaling is
handled by the 'qcom-cpufreq-hw' driver.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-06-23 16:12:07 +05:30
Sibi Sankar 49ef12215f cpufreq: blacklist SDM845 in cpufreq-dt-platdev
Add SDM845 to cpufreq-dt-platdev blacklist since the actual scaling is
handled by the 'qcom-cpufreq-hw' driver.

Signed-off-by: Sibi Sankar <sibis@codeaurora.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-06-23 16:12:07 +05:30
Lad Prabhakar a6d1bfa055 cpufreq: dt: Add support for r8a7742
Add the compatible strings for supporting the generic cpufreq driver on
the Renesas RZ/G1H (R8A7742) SoC.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-04-28 09:45:55 +05:30
Peng Fan a08e1b6c2d cpufreq: Add i.MX7ULP to cpufreq-dt-platdev blacklist
Add i.MX7ULP to cpufreq-dt-platdev blacklist.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-04-28 09:45:54 +05:30
Ansuel Smith a8811ec764 cpufreq: qcom: Add support for krait based socs
In Certain QCOM SoCs like ipq8064, apq8064, msm8960, msm8974
that has KRAIT processors the voltage/current value of each OPP
varies based on the silicon variant in use.

The required OPP related data is determined based on
the efuse value. This is similar to the existing code for
kryo cores. So adding support for krait cores here.

Signed-off-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-03-20 09:59:57 +05:30
Anson Huang 24f371f77e cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle
speed grading bits just like other i.MX8M SoCs.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2020-01-07 13:29:58 +05:30
Dmitry Osipenko 26a7a47510 cpufreq: dt-platdev: Blacklist NVIDIA Tegra20 and Tegra30 SoCs
Both NVIDIA Tegra20 and Tegra30 SoCs should be blacklisted because CPU
OPPs use supported_hw and thus platdev isn't suitable for these SoCs.
Currently cpufreq-dt driver produces a bit annoying warning splats
during boot because valid OPPs are not found, this will be fixed once
tegra20-cpufreq driver will be update to support cpufreq-dt. The warnings
will also happen on older stable kernels using newer device-trees, thus
this patch should be backported to stable kernels as well.

Cc: <stable@vger.kernel.org>
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Fixes: 4053aa65c5 ("ARM: tegra: cardhu-a04: Add CPU Operating Performance Points")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-12-16 09:34:45 +05:30
Linus Torvalds fb3da48a86 Merge branch 'thermal/next' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux
Pull thermal management updates from Zhang Rui:

 - Fix a deadlock regression in thermal core framework, which was
   introduced in 5.3 (Wei Wang)

 - Initialize thermal control framework earlier to enable thermal
   mitigation during boot (Amit Kucheria)

 - Convert the Intelligent Power Allocator (IPA) thermal governor to
   follow the generic PM_EM instead of its own Energy Model (Quentin
   Perret)

 - Introduce a new Amlogic soc thermal driver (Guillaume La Roque)

 - Add interrupt support for tsens thermal driver (Amit Kucheria)

 - Add support for MSM8956/8976 in tsens thermal driver
   (AngeloGioacchino Del Regno)

 - Add support for r8a774b1 in rcar thermal driver (Biju Das)

 - Add support for Thermal Monitor Unit v2 in qoriq thermal driver
   (Yuantian Tang)

 - Some other fixes/cleanups on thermal core framework and soc thermal
   drivers (Colin Ian King, Daniel Lezcano, Hsin-Yi Wang, Tian Tao)

* 'thermal/next' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (32 commits)
  thermal: Fix deadlock in thermal thermal_zone_device_check
  thermal: cpu_cooling: Migrate to using the EM framework
  thermal: cpu_cooling: Make the power-related code depend on IPA
  PM / EM: Declare EM data types unconditionally
  arm64: defconfig: Enable CONFIG_ENERGY_MODEL
  drivers: thermal: tsens: fix potential integer overflow on multiply
  thermal: cpu_cooling: Reorder the header file
  thermal: cpu_cooling: Remove pointless dependency on CONFIG_OF
  thermal: no need to set .owner when using module_platform_driver
  thermal: qcom: tsens-v1: Fix kfree of a non-pointer value
  cpufreq: qcom-hw: Move driver initialization earlier
  clk: qcom: Initialize clock drivers earlier
  cpufreq: Initialize cpufreq-dt driver earlier
  cpufreq: Initialize the governors in core_initcall
  thermal: Initialize thermal subsystem earlier
  thermal: Remove netlink support
  dt: thermal: tsens: Document compatible for MSM8976/56
  thermal: qcom: tsens-v1: Add support for MSM8956 and MSM8976
  MAINTAINERS: add entry for Amlogic Thermal driver
  thermal: amlogic: Add thermal driver to support G12 SoCs
  ...
2019-12-05 11:21:24 -08:00
Amit Kucheria 57db08f41b cpufreq: Initialize cpufreq-dt driver earlier
This allows HW drivers that depend on cpufreq-dt to initialize earlier.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/353c745d4ca1feff600bd44154c01c013f185ca4.1571656015.git.amit.kucheria@linaro.org
2019-11-07 07:00:26 +01:00
H. Nikolaus Schaller b7dbe349e1 ARM: dts: omap34xx & omap36xx: replace opp-v1 tables by opp-v2 for
With the driver installed, we can change the opp-v1 table format
to opp-v2.

In addition, move omap3 from whitelist to blacklist in cpufreq-dt-platdev
in the same patch, because doing either first breaks operation and
may make trouble in bisect.

We also can remove opp-v1 table for omap3-n950-n9 since its 1GHz
capability is now automatically detected.

We also fix a wrong OPP4 voltage for omap3430 which must be
0.6V + 54*12.5mV = 1275mV. Otherwise the twl4030 driver will reject
this OPP.

Note: the high speed OPPs that were not available in the opp-v1 tables
are tagged "turbo-mode;" which means they are not automatically
activated by the govenors or cpu-freq.

To enable you have to write

echo 1 >/sys/devices/system/cpu/cpufreq/boost

Note: to hard disable an OPP in a board.dts file use e.g.

&cpu0_opp_table: {
	/delete-node/ opp1g-1000000000;	/* do not use */
};

or alternatively:

&cpu0_opp_table: {
	opp1g-1000000000 {
		status = "disabled";	/* do not use */
	};
};

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-10-10 16:11:50 +05:30
Viresh Kumar f75d2accca Merge branch 'cpufreq/qcom-updates' into cpufreq/arm/linux-next 2019-09-03 07:55:22 +05:30
Jorge Ramirez-Ortiz 248b5f297c cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist
Add qcs404 to cpufreq-dt-platdev blacklist.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-09-03 07:55:00 +05:30
Andrew-sh.Cheng 9176b425bf cpufreq: mediatek: Add support for mt8183
Add compatible string for mediatek mt8183

Signed-off-by: Andrew-sh.Cheng <andrew-sh.cheng@mediatek.com>
[ VK: Fixed rebase conflict ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-08-22 11:31:04 +05:30
Anson Huang 8ec5035039 cpufreq: Use imx-cpufreq-dt for i.MX8MN's speed grading
Add i.MX8MN to blacklist, so that imx-cpufreq-dt driver can handle
speed grading bits just like other i.MX8M SoCs.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-08-22 11:31:04 +05:30
Yangtao Li f328584f7b cpufreq: Add sun50i nvmem based CPU scaling driver
For some SoCs, the CPU frequency subset and voltage value of each OPP
varies based on the silicon variant in use. The sun50i-cpufreq-nvmem
driver reads the efuse value from the SoC to provide the OPP framework
with required information.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-07-22 11:10:51 +05:30
Rafael J. Wysocki 586a07dca8 Merge branch 'pm-cpufreq'
* pm-cpufreq:
  cpufreq: Avoid calling cpufreq_verify_current_freq() from handle_update()
  cpufreq: Consolidate cpufreq_update_current_freq() and __cpufreq_get()
  cpufreq: Don't skip frequency validation for has_target() drivers
  cpufreq: Use has_target() instead of !setpolicy
  cpufreq: Remove redundant !setpolicy check
  cpufreq: Move the IS_ENABLED(CPU_THERMAL) macro into a stub
  cpufreq: s5pv210: Don't flood kernel log after cpufreq change
  cpufreq: pcc-cpufreq: Fail initialization if driver cannot be registered
  cpufreq: add driver for Raspberry Pi
  cpufreq: Switch imx7d to imx-cpufreq-dt for speed grading
  cpufreq: imx-cpufreq-dt: Remove global platform match list
  cpufreq: brcmstb-avs-cpufreq: Fix types for voltage/frequency
  cpufreq: brcmstb-avs-cpufreq: Fix initial command check
  cpufreq: armada-37xx: Remove set but not used variable 'freq'
  cpufreq: imx-cpufreq-dt: Fix no OPPs available on unfused parts
  dt-bindings: imx-cpufreq-dt: Document opp-supported-hw usage
  cpufreq: Add imx-cpufreq-dt driver
2019-07-08 11:00:02 +02:00
Thomas Gleixner d2912cb15b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-19 17:09:55 +02:00
Leonard Crestez e6abacabb5 cpufreq: Switch imx7d to imx-cpufreq-dt for speed grading
This driver can handle speed grading bits on imx7d just like on imx8mq
and imx8mm.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-06-06 08:37:41 +05:30