Hi,
This series enables CPUFreq for AM625. This version is a fixup and
rebase of the patch series by Dave Gerlach on v6.1-rc3 [1].
It updates the ti-cpufreq driver to support parsing of the speed grade
value out of the JTAG_USER_ID register and adds necessary support code
to use cpufreq-dt.
The operating-points table that gets added support 200,400,600,800 for
all variants and then 1GHz for the S Speed grade only and 1.25 for the T
Speed grade only. 1.4GHz has been added in board specific dts file as it
requires VDD_CORE to be at 0.85V.
The latency between pre and post frequency transition was measured in
CPUFreq driver for all combinations of OPP changes. The average value
was selected as overall clock-latency.
Tested on am62-sk board using manual frequency changes and then reading
back frequency with k3conf, and this shows matching frequency to what
was set.
This should not impact existing K3 platforms that do not have operating
points table defined.
Regards,
Vibhore
[1] https://github.com/dgerlach/linux-pm/tree/v5.18/am62x-cpufreq
Dave Gerlach (4):
cpufreq: ti-cpufreq: Add support for AM625
cpufreq: dt-platdev: Blacklist ti,am625 SoC
arm64: dts: ti: k3-am625: Introduce operating-points table
cpufreq: ti: Enable ti-cpufreq for ARCH_K3
Vibhore Vardhan (1):
arm64: dts: ti: k3-am625-sk: Add 1.4GHz OPP
arch/arm64/boot/dts/ti/k3-am625-sk.dts | 9 +++++
arch/arm64/boot/dts/ti/k3-am625.dtsi | 51 ++++++++++++++++++++++++++
drivers/cpufreq/Kconfig.arm | 4 +-
drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
drivers/cpufreq/ti-cpufreq.c | 36 ++++++++++++++++++
5 files changed, 99 insertions(+), 2 deletions(-)
--
2.34.1
From: Dave Gerlach <[email protected]>
Make ti-cpufreq driver depend on ARCH_K3 and set it to `default y` so it
is always enabled for platforms that it depends on.
Signed-off-by: Dave Gerlach <[email protected]>
Signed-off-by: Vibhore Vardhan <[email protected]>
---
drivers/cpufreq/Kconfig.arm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index 954749afb5fe..33bb890a0a5b 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -340,8 +340,8 @@ config ARM_TEGRA194_CPUFREQ
config ARM_TI_CPUFREQ
bool "Texas Instruments CPUFreq support"
- depends on ARCH_OMAP2PLUS
- default ARCH_OMAP2PLUS
+ depends on ARCH_OMAP2PLUS || ARCH_K3
+ default y
help
This driver enables valid OPPs on the running platform based on
values contained within the SoC in use. Enable this in order to
--
2.34.1
From: Dave Gerlach <[email protected]>
Add ti,am625 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.
Signed-off-by: Dave Gerlach <[email protected]>
Signed-off-by: Vibhore Vardhan <[email protected]>
---
drivers/cpufreq/cpufreq-dt-platdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 2c96de3f2d83..d987093fad27 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -159,6 +159,7 @@ static const struct of_device_id blocklist[] __initconst = {
{ .compatible = "ti,am43", },
{ .compatible = "ti,dra7", },
{ .compatible = "ti,omap3", },
+ { .compatible = "ti,am625", },
{ .compatible = "qcom,ipq8064", },
{ .compatible = "qcom,apq8064", },
--
2.34.1
The 1.4 GHz OPP requires supported silicon variant (T speed grade) and
also VDD_CORE to be at 0.85V. All production revisions of the AM625-SK
have both so we can enable the 1.4 GHz OPP for it. Any other boards
based on this design should verify that they have the right silicon
variant and the right power tree before adding 1.4 GHz support in their
board dts file.
Signed-off-by: Vibhore Vardhan <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am625-sk.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
index 9b4dbae9d4aa..d3060147ad25 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts
@@ -31,6 +31,15 @@ chosen {
bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";
};
+ opp-table {
+ /* Add 1.4GHz OPP for am625-sk board. Requires VDD_CORE to be at 0.85V */
+ opp-1400000000 {
+ opp-hz = /bits/ 64 <1400000000>;
+ opp-supported-hw = <0x01 0x0004>;
+ clock-latency-ns = <6000000>;
+ };
+ };
+
memory@80000000 {
device_type = "memory";
/* 2G RAM */
--
2.34.1
On 01/11/2022 13:10, Vibhore Vardhan wrote:
> Hi,
> This series enables CPUFreq for AM625. This version is a fixup and
> rebase of the patch series by Dave Gerlach on v6.1-rc3 [1].
>
Use subject prefixes matching the subsystem - missing PATCH. Tools are
doing it automatically. You kind of break people's filters...
Best regards,
Krzysztof