Skip to contentSkip to conversation

ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

PATCH New Jon Hunter 4 participants 10 messages Jun 3, 2015 – Nov 20, 2015

Subsystems (3)
lore
Share & tools
lore

Jon Hunter

author
#0 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

---
This has been tested on a tegra124 nyan-big by using the userspace CPUFreq governor with a simple CPU benchmark to measure the time taken for the test to execute.

The tegra124 chromebooks use the same ams,as3722 PMIC as the Jetson TK1 board and hence, this change is based upon that for the Jetson TK1.

 arch/arm/boot/dts/tegra124-nyan.dtsi | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-nyan.dtsi +14 -1
index a9aec23e06f2..40c23a0b7cfc 100644
@@ -159,7 +159,7 @@
 				vin-ldo9-10-supply = <&vdd_5v0_sys>;
 				vin-ldo11-supply = <&vdd_3v3_run>;
 
-				sd0 {
+				vdd_cpu: sd0 {
 					regulator-name = "+VDD_CPU_AP";
 					regulator-min-microvolt = <700000>;
 					regulator-max-microvolt = <1350000>;
@@ -397,6 +397,13 @@
 		non-removable;
 	};
 
+	/* CPU DFLL clock */
+	clock@0,70110000 {
+		status = "okay";
+		vdd-cpu-supply = <&vdd_cpu>;
+		nvidia,i2c-fs-rate = <400000>;
+	};
+
 	ahub@0,70300000 {
 		i2s@0,70301100 {
 			status = "okay";
@@ -487,6 +494,12 @@
 		};
 	};
 
+	cpus {
+		cpu@0 {
+			vdd-cpu-supply = <&vdd_cpu>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
Signature · 1 line
2.1.4
maintainer
#1 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Adding LAKML. Jon

Quoted 57 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

---
This has been tested on a tegra124 nyan-big by using the userspace CPUFreq governor with a simple CPU benchmark to measure the time taken for the test to execute.

The tegra124 chromebooks use the same ams,as3722 PMIC as the Jetson TK1 board and hence, this change is based upon that for the Jetson TK1.

 arch/arm/boot/dts/tegra124-nyan.dtsi | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-nyan.dtsi +14 -1
index a9aec23e06f2..40c23a0b7cfc 100644
@@ -159,7 +159,7 @@
 				vin-ldo9-10-supply = <&vdd_5v0_sys>;
 				vin-ldo11-supply = <&vdd_3v3_run>;
 
-				sd0 {
+				vdd_cpu: sd0 {
 					regulator-name = "+VDD_CPU_AP";
 					regulator-min-microvolt = <700000>;
 					regulator-max-microvolt = <1350000>;
@@ -397,6 +397,13 @@
 		non-removable;
 	};
 
+	/* CPU DFLL clock */
+	clock at 0,70110000 {
+		status = "okay";
+		vdd-cpu-supply = <&vdd_cpu>;
+		nvidia,i2c-fs-rate = <400000>;
+	};
+
 	ahub at 0,70300000 {
 		i2s at 0,70301100 {
 			status = "okay";
@@ -487,6 +494,12 @@
 		};
 	};
 
+	cpus {
+		cpu at 0 {
+			vdd-cpu-supply = <&vdd_cpu>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
maintainer
#2 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Quoted 50 lines · Jon Hunter

Adding LAKML. Jon

Quoted 47 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

---
This has been tested on a tegra124 nyan-big by using the userspace CPUFreq governor with a simple CPU benchmark to measure the time taken for the test to execute.

The tegra124 chromebooks use the same ams,as3722 PMIC as the Jetson TK1 board and hence, this change is based upon that for the Jetson TK1.

 arch/arm/boot/dts/tegra124-nyan.dtsi | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-nyan.dtsi +8 -1
index a9aec23e06f2..40c23a0b7cfc 100644
@@ -159,7 +159,7 @@
 				vin-ldo9-10-supply = <&vdd_5v0_sys>;
 				vin-ldo11-supply = <&vdd_3v3_run>;
 
-				sd0 {
+				vdd_cpu: sd0 {
 					regulator-name = "+VDD_CPU_AP";
 					regulator-min-microvolt = <700000>;
 					regulator-max-microvolt = <1350000>;
@@ -397,6 +397,13 @@
 		non-removable;
 	};
 
+	/* CPU DFLL clock */
+	clock at 0,70110000 {
+		status = "okay";
+		vdd-cpu-supply = <&vdd_cpu>;
+		nvidia,i2c-fs-rate = <400000>;
+	};
+
 	ahub at 0,70300000 {
 		i2s at 0,70301100 {
 			status = "okay";
@@ -487,6 +494,12 @@
 		};
 	};
 
Quoted 8 lines

arch/arm/boot/dts/tegra124-nyan.dtsi line 504

Quoted 8 lines
arch/arm/boot/dts/tegra124-nyan.dtsi +6 -0
+	cpus {
+		cpu at 0 {
+			vdd-cpu-supply = <&vdd_cpu>;
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";

Stephen, Thierry,

Are you ok with this change?

Jon

#3 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Quoted 6 lines · Jon Hunter
Quoted 5 lines · Jon Hunter

Adding LAKML. Jon

Quoted 2 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

Ping.

Thanks,

Tomeu

Quoted 62 lines
Quoted 44 lines
Quoted 44 lines

---
This has been tested on a tegra124 nyan-big by using the userspace CPUFreq governor with a simple CPU benchmark to measure the time taken for the test to execute.

The tegra124 chromebooks use the same ams,as3722 PMIC as the Jetson TK1 board and hence, this change is based upon that for the Jetson TK1.

 arch/arm/boot/dts/tegra124-nyan.dtsi | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
arch/arm/boot/dts/tegra124-nyan.dtsi +8 -1
index a9aec23e06f2..40c23a0b7cfc 100644
@@ -159,7 +159,7 @@
                             vin-ldo9-10-supply = <&vdd_5v0_sys>;
                             vin-ldo11-supply = <&vdd_3v3_run>;
 
-                            sd0 {
+                            vdd_cpu: sd0 {
                                     regulator-name = "+VDD_CPU_AP";
                                     regulator-min-microvolt = <700000>;
                                     regulator-max-microvolt = <1350000>;
@@ -397,6 +397,13 @@
             non-removable;
     };
 
+    /* CPU DFLL clock */
+    clock at 0,70110000 {
+            status = "okay";
+            vdd-cpu-supply = <&vdd_cpu>;
+            nvidia,i2c-fs-rate = <400000>;
+    };
+
     ahub at 0,70300000 {
             i2s at 0,70301100 {
                     status = "okay";
@@ -487,6 +494,12 @@
             };
     };
 
Quoted 8 lines

arch/arm/boot/dts/tegra124-nyan.dtsi line 504

Quoted 8 lines
arch/arm/boot/dts/tegra124-nyan.dtsi +6 -0
+    cpus {
+            cpu at 0 {
+                    vdd-cpu-supply = <&vdd_cpu>;
+            };
+    };
+
     gpio-keys {
             compatible = "gpio-keys";

Stephen, Thierry,

Are you ok with this change?

Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Quoted 11 lines · Tomeu Vizoso
Quoted 6 lines · Jon Hunter
Quoted 5 lines · Jon Hunter

Adding LAKML. Jon

Quoted 2 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

Ping.

Thanks,

Sorry that this has gone unnoticed for so long. I've applied it now to the for-4.4/dt branch.

Tomeu, do you want me to add your Tested-by, Reviewed-by or Acked-by before I push this out?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150915/40189def/attachment.sig>

#5 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Quoted 11 lines · Thierry Reding
Quoted 10 lines · Tomeu Vizoso
Quoted 6 lines · Jon Hunter
Quoted 5 lines · Jon Hunter

Adding LAKML. Jon

Quoted 2 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

Ping.

Quoted 7 lines
Quoted 1 line

Thanks,

Sorry that this has gone unnoticed for so long. I've applied it now to the for-4.4/dt branch.

Tomeu, do you want me to add your Tested-by, Reviewed-by or Acked-by before I push this out?

I haven't done proper tests, but I have tested for several weeks a branch containing these changes on a nyan-big and have found no issues.

You can add my Reviewed-by though. Sorry for not having made this clear.

Thanks,

Tomeu

Quoted 1 line

Thierry

maintainer
#6 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Quoted 17 lines · Tomeu Vizoso
Quoted 16 lines · Thierry Reding
Quoted 11 lines · Tomeu Vizoso
Quoted 6 lines · Jon Hunter
Quoted 5 lines · Jon Hunter

Adding LAKML. Jon

Quoted 2 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

Ping.

Thanks,

Sorry that this has gone unnoticed for so long. I've applied it now to the for-4.4/dt branch.

Quoted 8 lines
Quoted 2 lines

Tomeu, do you want me to add your Tested-by, Reviewed-by or Acked-by before I push this out?

I haven't done proper tests, but I have tested for several weeks a branch containing these changes on a nyan-big and have found no issues.

You can add my Reviewed-by though. Sorry for not having made this clear.

I have noticed that system suspend to LP1 is not working on the nyan-big with linux-next and never exits suspend. It appears that this patch is the culprit. I tested cpufreq was changing the frequency as expected but I did not test suspend.

I have tested suspend on the jetson-tk1 with linux-next that also has cpufreq enabled and do not see any problems.

Adding Mikko ... Mikko do you know of any reason why cpufreq could cause problems with suspend? I am guessing it is to do with the different clock used for the CPUs. Any thoughts?

Tomeu, have you tried suspend on a nyan-big with next?

I am testing with "rtcwake -d rtc1 -m mem -s 5".

Thierry, we may need to comment out these changes for 4.3 or revert this patch altogether.

Cheers
Jon

maintainer
#7 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Correcting Mikko's email ...

Quoted 54 lines · Jon Hunter
Quoted 17 lines · Tomeu Vizoso
Quoted 16 lines · Thierry Reding
Quoted 11 lines · Tomeu Vizoso
Quoted 6 lines · Jon Hunter
Quoted 5 lines · Jon Hunter

Adding LAKML. Jon

Quoted 2 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

Ping.

Thanks,

Sorry that this has gone unnoticed for so long. I've applied it now to the for-4.4/dt branch.

Quoted 8 lines
Quoted 2 lines

Tomeu, do you want me to add your Tested-by, Reviewed-by or Acked-by before I push this out?

I haven't done proper tests, but I have tested for several weeks a branch containing these changes on a nyan-big and have found no issues.

You can add my Reviewed-by though. Sorry for not having made this clear.

I have noticed that system suspend to LP1 is not working on the nyan-big with linux-next and never exits suspend. It appears that this patch is the culprit. I tested cpufreq was changing the frequency as expected but I did not test suspend.

I have tested suspend on the jetson-tk1 with linux-next that also has cpufreq enabled and do not see any problems.

Adding Mikko ... Mikko do you know of any reason why cpufreq could cause problems with suspend? I am guessing it is to do with the different clock used for the CPUs. Any thoughts?

Tomeu, have you tried suspend on a nyan-big with next?

I am testing with "rtcwake -d rtc1 -m mem -s 5".

Thierry, we may need to comment out these changes for 4.3 or revert this patch altogether.

Cheers
Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer
#8 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Quoted 35 lines · Jon Hunter

Correcting Mikko's email ...

Quoted 32 lines · Jon Hunter
Quoted 17 lines · Tomeu Vizoso
Quoted 16 lines · Thierry Reding
Quoted 11 lines · Tomeu Vizoso
Quoted 6 lines · Jon Hunter
Quoted 5 lines · Jon Hunter

Adding LAKML. Jon

Quoted 2 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

Ping.

Thanks,

Sorry that this has gone unnoticed for so long. I've applied it now to the for-4.4/dt branch.

Quoted 8 lines
Quoted 2 lines

Tomeu, do you want me to add your Tested-by, Reviewed-by or Acked-by before I push this out?

I haven't done proper tests, but I have tested for several weeks a branch containing these changes on a nyan-big and have found no issues.

You can add my Reviewed-by though. Sorry for not having made this clear.

I have noticed that system suspend to LP1 is not working on the nyan-big with linux-next and never exits suspend. It appears that this patch is the culprit. I tested cpufreq was changing the frequency as expected but I did not test suspend.

By the way, LP2 works fine with this change, it is just when LP1 is enabled (which is the default).

Jon

maintainer
#9 lore raw

PATCH 1/1 ARM: tegra: Enable CPUFreq support for Tegra124 Chromebooks

Quoted 33 lines · Jon Hunter
Quoted 31 lines · Jon Hunter

Correcting Mikko's email ...

Quoted 28 lines · Jon Hunter
Quoted 25 lines · Tomeu Vizoso
Quoted 11 lines · Thierry Reding
Quoted 10 lines · Tomeu Vizoso
Quoted 6 lines · Jon Hunter
Quoted 5 lines · Jon Hunter

Adding LAKML. Jon

Quoted 2 lines · Jon Hunter

Add the device-tree DFLL clock node and CPU regulator phandle for tegra124 chromebooks to enable CPUFreq support on these boards.

Ping.

Quoted 7 lines
Quoted 1 line

Thanks,

Sorry that this has gone unnoticed for so long. I've applied it now to the for-4.4/dt branch.

Tomeu, do you want me to add your Tested-by, Reviewed-by or Acked-by before I push this out?

I haven't done proper tests, but I have tested for several weeks a branch containing these changes on a nyan-big and have found no issues.

You can add my Reviewed-by though. Sorry for not having made this clear.

Quoted 7 lines
Quoted 4 lines
Quoted 4 lines

I have noticed that system suspend to LP1 is not working on the nyan-big with linux-next and never exits suspend. It appears that this patch is the culprit. I tested cpufreq was changing the frequency as expected but I did not test suspend.

By the way, LP2 works fine with this change, it is just when LP1 is enabled (which is the default).

Quick update on this ... it appears that the cause of the lock-up is related to pll_x (default pll that clocks the cpu cluster before switching to the dfll). On the jetson-tk1 the pll_x is running at 696MHz where as on the nyan-big it is running at 2.1GHz. Although the pll is disabled when switching to dfll, having it configured for 2.1GHz on the nyan-big is causing a hang during suspend if the dfll is running at much lower frequencies (>1.5GHz) than the pll_x. So seems like the CPU voltage is too low for the pll_x, however, it should be disabled?!?

If I hack the cpufreq code to set the pll_x to 696MHz after switching to the dfll on the nyan-big then the problem goes away ...

(quoted diff) +0 -0

b/drivers/cpufreq/tegra124-cpufreq.c
index 20bcceb58ccc..a87cef4071e8 100644

drivers/cpufreq/tegra124-cpufreq.c +0 -0
@@ -53,6 +53,10 @@ static int tegra124_cpu_switch_to_dfll(struct

tegra124_cpufreq_priv *priv)

        clk_set_parent(priv->cpu_clk, priv->dfll_clk);

+ ret = clk_set_rate(priv->pllx_clk, 696000000);
+ if (ret)
+ return ret;
+

        return 0;

Need to figure out if the suspend code is touching the pll_x.

Jon