All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: da850: enable cpufreq in DT mode
@ 2019-03-21 14:10 ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This series adds cpufreq-dt operating points for da850 boards supported
with device tree (da850-lcdk, da850-lego-ev3, da850-evm) and also
includes a fix for the da850-evm boardfile which checks an unset variable
to determine the highest available frequency for cpufreq.

Last patch enables CPUFREQ_DT in davinci_all_defconfig.

Bartosz Golaszewski (2):
  ARM: davinci: fix cpufreq registration on da850-evm
  ARM: dts: da850-evm: enable cpufreq

David Lechner (2):
  ARM: dts: da850: add cpu node and operating points to DT
  ARM: davinci_all_defconfig: Enable CPUFREQ_DT

 arch/arm/boot/dts/da850-evm.dts         | 30 +++++++++++++
 arch/arm/boot/dts/da850-lcdk.dts        | 31 ++++++++++++++
 arch/arm/boot/dts/da850-lego-ev3.dts    | 30 +++++++++++++
 arch/arm/boot/dts/da850.dtsi            | 56 +++++++++++++++++++++++++
 arch/arm/configs/davinci_all_defconfig  |  1 +
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----
 6 files changed, 149 insertions(+), 11 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 0/4] ARM: da850: enable cpufreq in DT mode
@ 2019-03-21 14:10 ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This series adds cpufreq-dt operating points for da850 boards supported
with device tree (da850-lcdk, da850-lego-ev3, da850-evm) and also
includes a fix for the da850-evm boardfile which checks an unset variable
to determine the highest available frequency for cpufreq.

Last patch enables CPUFREQ_DT in davinci_all_defconfig.

Bartosz Golaszewski (2):
  ARM: davinci: fix cpufreq registration on da850-evm
  ARM: dts: da850-evm: enable cpufreq

David Lechner (2):
  ARM: dts: da850: add cpu node and operating points to DT
  ARM: davinci_all_defconfig: Enable CPUFREQ_DT

 arch/arm/boot/dts/da850-evm.dts         | 30 +++++++++++++
 arch/arm/boot/dts/da850-lcdk.dts        | 31 ++++++++++++++
 arch/arm/boot/dts/da850-lego-ev3.dts    | 30 +++++++++++++
 arch/arm/boot/dts/da850.dtsi            | 56 +++++++++++++++++++++++++
 arch/arm/configs/davinci_all_defconfig  |  1 +
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----
 6 files changed, 149 insertions(+), 11 deletions(-)

-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: davinci: fix cpufreq registration on da850-evm
  2019-03-21 14:10 ` Bartosz Golaszewski
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

The system_rev variable is never set on davinci and is always 0, so
we're using the default max operating point of 300MHz. The cvdd supply
is fixed at 1.2V however, so we can go up to 372MHz. Remove the switch
and always set da850_max_speed to 372000.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 1fdc9283a8c5..77d74fb311fa 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1155,17 +1155,7 @@ static struct edma_rsv_info *da850_edma_rsv[2] = {
 #ifdef CONFIG_CPU_FREQ
 static __init int da850_evm_init_cpufreq(void)
 {
-	switch (system_rev & 0xF) {
-	case 3:
-		da850_max_speed = 456000;
-		break;
-	case 2:
-		da850_max_speed = 408000;
-		break;
-	case 1:
-		da850_max_speed = 372000;
-		break;
-	}
+	da850_max_speed = 372000;
 
 	return da850_register_cpufreq("pll0_sysclk3");
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 1/4] ARM: davinci: fix cpufreq registration on da850-evm
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

The system_rev variable is never set on davinci and is always 0, so
we're using the default max operating point of 300MHz. The cvdd supply
is fixed at 1.2V however, so we can go up to 372MHz. Remove the switch
and always set da850_max_speed to 372000.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/mach-davinci/board-da850-evm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 1fdc9283a8c5..77d74fb311fa 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1155,17 +1155,7 @@ static struct edma_rsv_info *da850_edma_rsv[2] = {
 #ifdef CONFIG_CPU_FREQ
 static __init int da850_evm_init_cpufreq(void)
 {
-	switch (system_rev & 0xF) {
-	case 3:
-		da850_max_speed = 456000;
-		break;
-	case 2:
-		da850_max_speed = 408000;
-		break;
-	case 1:
-		da850_max_speed = 372000;
-		break;
-	}
+	da850_max_speed = 372000;
 
 	return da850_register_cpufreq("pll0_sysclk3");
 }
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/4] ARM: dts: da850: add cpu node and operating points to DT
  2019-03-21 14:10 ` Bartosz Golaszewski
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski

From: David Lechner <david@lechnology.com>

This adds a cpu node and operating points to the common da850.dtsi file.

Additionally, a regulator is added to the LEGO EV3 board along with
some board-specific CPU configuration.

Regulators need to be hooked up on other boards to get them working.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/boot/dts/da850-lcdk.dts     | 31 +++++++++++++++
 arch/arm/boot/dts/da850-lego-ev3.dts | 30 +++++++++++++++
 arch/arm/boot/dts/da850.dtsi         | 56 ++++++++++++++++++++++++++++
 3 files changed, 117 insertions(+)

diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
index 26f453dc8370..f29ed9010812 100644
--- a/arch/arm/boot/dts/da850-lcdk.dts
+++ b/arch/arm/boot/dts/da850-lcdk.dts
@@ -155,12 +155,43 @@
 			};
 		};
 	};
+
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1300000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &ref_clk {
 	clock-frequency = <24000000>;
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/* LCDK has a fixed CVDD of 1.3V, so only op points >= 300MHz are valid */
+
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+&opp_375 {
+	status = "okay";
+};
+
+&opp_456 {
+	status = "okay";
+};
+
 &pmx_core {
 	status = "okay";
 
diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
index 66fcadf0ba91..553717f84483 100644
--- a/arch/arm/boot/dts/da850-lego-ev3.dts
+++ b/arch/arm/boot/dts/da850-lego-ev3.dts
@@ -125,6 +125,15 @@
 		amp-supply = <&amp>;
 	};
 
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
 	/*
 	 * This is a 5V current limiting regulator that is shared by USB,
 	 * the sensor (input) ports, the motor (output) ports and the A/DC.
@@ -204,6 +213,27 @@
 	clock-frequency = <24000000>;
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/* since we have a fixed regulator, we can't run at these points */
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+/*
+ * The SoC is actually the 456MHz version, but because of the fixed regulator
+ * This is the fastest we can go.
+ */
+&opp_375 {
+	status = "okay";
+};
+
 &pmx_core {
 	status = "okay";
 
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 559659b399d0..ee61d1253b58 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -20,6 +20,62 @@
 		reg = <0xc0000000 0x0>;
 	};
 
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu: cpu@0 {
+			compatible = "arm,arm926ej-s";
+			device_type = "cpu";
+			reg = <0>;
+			clocks = <&psc0 14>;
+			operating-points-v2 = <&opp_table>;
+		};
+	};
+
+	opp_table: opp-table {
+		compatible = "operating-points-v2";
+
+		opp_100: opp100-100000000 {
+			opp-hz = /bits/ 64 <100000000>;
+			opp-microvolt = <1000000 950000 1050000>;
+		};
+
+		opp_200: opp110-200000000 {
+			opp-hz = /bits/ 64 <200000000>;
+			opp-microvolt = <1100000 1050000 1160000>;
+		};
+
+		opp_300: opp120-300000000 {
+			opp-hz = /bits/ 64 <300000000>;
+			opp-microvolt = <1200000 1140000 1320000>;
+		};
+
+		/*
+		 * Original silicon was 300MHz max, so higher frequencies
+		 * need to be enabled on a per-board basis if the chip is
+		 * capable.
+		 */
+
+		opp_375: opp120-375000000 {
+			status = "disabled";
+			opp-hz = /bits/ 64 <375000000>;
+			opp-microvolt = <1200000 1140000 1320000>;
+		};
+
+		opp_415: opp130-415000000 {
+			status = "disabled";
+			opp-hz = /bits/ 64 <415000000>;
+			opp-microvolt = <1300000 1250000 1350000>;
+		};
+
+		opp_456: opp130-456000000 {
+			status = "disabled";
+			opp-hz = /bits/ 64 <456000000>;
+			opp-microvolt = <1300000 1250000 1350000>;
+		};
+	};
+
 	arm {
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 2/4] ARM: dts: da850: add cpu node and operating points to DT
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski

From: David Lechner <david@lechnology.com>

This adds a cpu node and operating points to the common da850.dtsi file.

Additionally, a regulator is added to the LEGO EV3 board along with
some board-specific CPU configuration.

Regulators need to be hooked up on other boards to get them working.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/boot/dts/da850-lcdk.dts     | 31 +++++++++++++++
 arch/arm/boot/dts/da850-lego-ev3.dts | 30 +++++++++++++++
 arch/arm/boot/dts/da850.dtsi         | 56 ++++++++++++++++++++++++++++
 3 files changed, 117 insertions(+)

diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
index 26f453dc8370..f29ed9010812 100644
--- a/arch/arm/boot/dts/da850-lcdk.dts
+++ b/arch/arm/boot/dts/da850-lcdk.dts
@@ -155,12 +155,43 @@
 			};
 		};
 	};
+
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1300000>;
+		regulator-max-microvolt = <1300000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &ref_clk {
 	clock-frequency = <24000000>;
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/* LCDK has a fixed CVDD of 1.3V, so only op points >= 300MHz are valid */
+
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+&opp_375 {
+	status = "okay";
+};
+
+&opp_456 {
+	status = "okay";
+};
+
 &pmx_core {
 	status = "okay";
 
diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
index 66fcadf0ba91..553717f84483 100644
--- a/arch/arm/boot/dts/da850-lego-ev3.dts
+++ b/arch/arm/boot/dts/da850-lego-ev3.dts
@@ -125,6 +125,15 @@
 		amp-supply = <&amp>;
 	};
 
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
+
 	/*
 	 * This is a 5V current limiting regulator that is shared by USB,
 	 * the sensor (input) ports, the motor (output) ports and the A/DC.
@@ -204,6 +213,27 @@
 	clock-frequency = <24000000>;
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/* since we have a fixed regulator, we can't run at these points */
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+/*
+ * The SoC is actually the 456MHz version, but because of the fixed regulator
+ * This is the fastest we can go.
+ */
+&opp_375 {
+	status = "okay";
+};
+
 &pmx_core {
 	status = "okay";
 
diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
index 559659b399d0..ee61d1253b58 100644
--- a/arch/arm/boot/dts/da850.dtsi
+++ b/arch/arm/boot/dts/da850.dtsi
@@ -20,6 +20,62 @@
 		reg = <0xc0000000 0x0>;
 	};
 
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu: cpu@0 {
+			compatible = "arm,arm926ej-s";
+			device_type = "cpu";
+			reg = <0>;
+			clocks = <&psc0 14>;
+			operating-points-v2 = <&opp_table>;
+		};
+	};
+
+	opp_table: opp-table {
+		compatible = "operating-points-v2";
+
+		opp_100: opp100-100000000 {
+			opp-hz = /bits/ 64 <100000000>;
+			opp-microvolt = <1000000 950000 1050000>;
+		};
+
+		opp_200: opp110-200000000 {
+			opp-hz = /bits/ 64 <200000000>;
+			opp-microvolt = <1100000 1050000 1160000>;
+		};
+
+		opp_300: opp120-300000000 {
+			opp-hz = /bits/ 64 <300000000>;
+			opp-microvolt = <1200000 1140000 1320000>;
+		};
+
+		/*
+		 * Original silicon was 300MHz max, so higher frequencies
+		 * need to be enabled on a per-board basis if the chip is
+		 * capable.
+		 */
+
+		opp_375: opp120-375000000 {
+			status = "disabled";
+			opp-hz = /bits/ 64 <375000000>;
+			opp-microvolt = <1200000 1140000 1320000>;
+		};
+
+		opp_415: opp130-415000000 {
+			status = "disabled";
+			opp-hz = /bits/ 64 <415000000>;
+			opp-microvolt = <1300000 1250000 1350000>;
+		};
+
+		opp_456: opp130-456000000 {
+			status = "disabled";
+			opp-hz = /bits/ 64 <456000000>;
+			opp-microvolt = <1300000 1250000 1350000>;
+		};
+	};
+
 	arm {
 		#address-cells = <1>;
 		#size-cells = <1>;
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
  2019-03-21 14:10 ` Bartosz Golaszewski
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
at 1.2V on this board so disable the lower operating points and enable
the 375MHz opp.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index f04bc3e15332..f63867692da4 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -151,6 +151,15 @@
 			system-clock-frequency = <24576000>;
 		};
 	};
+
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &ecap2 {
@@ -191,6 +200,27 @@
 	};
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/*
+ * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
+ * above 375MHz.
+ */
+
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+&opp_375 {
+	status = "okay";
+};
+
 &sata {
 	status = "okay";
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
at 1.2V on this board so disable the lower operating points and enable
the 375MHz opp.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index f04bc3e15332..f63867692da4 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -151,6 +151,15 @@
 			system-clock-frequency = <24576000>;
 		};
 	};
+
+	cvdd: regulator0 {
+		compatible = "regulator-fixed";
+		regulator-name = "cvdd";
+		regulator-min-microvolt = <1200000>;
+		regulator-max-microvolt = <1200000>;
+		regulator-always-on;
+		regulator-boot-on;
+	};
 };
 
 &ecap2 {
@@ -191,6 +200,27 @@
 	};
 };
 
+&cpu {
+	cpu-supply = <&cvdd>;
+};
+
+/*
+ * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
+ * above 375MHz.
+ */
+
+&opp_100 {
+	status = "disabled";
+};
+
+&opp_200 {
+	status = "disabled";
+};
+
+&opp_375 {
+	status = "okay";
+};
+
 &sata {
 	status = "okay";
 };
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/4] ARM: davinci_all_defconfig: Enable CPUFREQ_DT
  2019-03-21 14:10 ` Bartosz Golaszewski
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski

From: David Lechner <david@lechnology.com>

This sets CONFIG_CPUFREQ_DT=m in davinci_all_defconfig. This is used for
frequency scaling on device tree boards.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/configs/davinci_all_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index 207962a656a2..c3502236132e 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -45,6 +45,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
 CONFIG_CPU_FREQ_GOV_POWERSAVE=m
 CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPUFREQ_DT=m
 CONFIG_CPU_IDLE=y
 CONFIG_NET=y
 CONFIG_PACKET=y
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 4/4] ARM: davinci_all_defconfig: Enable CPUFREQ_DT
@ 2019-03-21 14:10   ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 14:10 UTC (permalink / raw)
  To: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, David Lechner
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski

From: David Lechner <david@lechnology.com>

This sets CONFIG_CPUFREQ_DT=m in davinci_all_defconfig. This is used for
frequency scaling on device tree boards.

Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 arch/arm/configs/davinci_all_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
index 207962a656a2..c3502236132e 100644
--- a/arch/arm/configs/davinci_all_defconfig
+++ b/arch/arm/configs/davinci_all_defconfig
@@ -45,6 +45,7 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
 CONFIG_CPU_FREQ_GOV_POWERSAVE=m
 CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPUFREQ_DT=m
 CONFIG_CPU_IDLE=y
 CONFIG_NET=y
 CONFIG_PACKET=y
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/4] ARM: da850: enable cpufreq in DT mode
  2019-03-21 14:10 ` Bartosz Golaszewski
@ 2019-03-21 15:29   ` David Lechner
  -1 siblings, 0 replies; 24+ messages in thread
From: David Lechner @ 2019-03-21 15:29 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski

On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> This series adds cpufreq-dt operating points for da850 boards supported
> with device tree (da850-lcdk, da850-lego-ev3, da850-evm) and also
> includes a fix for the da850-evm boardfile which checks an unset variable
> to determine the highest available frequency for cpufreq.


I can't find any old threads about this, but I recall that there was a
problem with the USB OHCI controller breaking when switching frequencies.
It didn't happen all of the time, but often enough that it made using
cpufreq unusable for me. Is this still a problem?

Also, a big-picture question. On boards with fixed regulators, what is
the benefit of enabling frequency scaling? The power savings aspect
seems negligible (< 1% in my tests) since the voltage cannot be changed.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/4] ARM: da850: enable cpufreq in DT mode
@ 2019-03-21 15:29   ` David Lechner
  0 siblings, 0 replies; 24+ messages in thread
From: David Lechner @ 2019-03-21 15:29 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski

On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> This series adds cpufreq-dt operating points for da850 boards supported
> with device tree (da850-lcdk, da850-lego-ev3, da850-evm) and also
> includes a fix for the da850-evm boardfile which checks an unset variable
> to determine the highest available frequency for cpufreq.


I can't find any old threads about this, but I recall that there was a
problem with the USB OHCI controller breaking when switching frequencies.
It didn't happen all of the time, but often enough that it made using
cpufreq unusable for me. Is this still a problem?

Also, a big-picture question. On boards with fixed regulators, what is
the benefit of enabling frequency scaling? The power savings aspect
seems negligible (< 1% in my tests) since the voltage cannot be changed.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/4] ARM: da850: enable cpufreq in DT mode
  2019-03-21 15:29   ` David Lechner
@ 2019-03-21 15:40     ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 15:40 UTC (permalink / raw)
  To: David Lechner
  Cc: Sekhar Nori, Kevin Hilman, Rob Herring, Mark Rutland, Linux ARM,
	devicetree, Linux Kernel Mailing List, Bartosz Golaszewski

czw., 21 mar 2019 o 16:29 David Lechner <david@lechnology.com> napisał(a):
>
> On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > This series adds cpufreq-dt operating points for da850 boards supported
> > with device tree (da850-lcdk, da850-lego-ev3, da850-evm) and also
> > includes a fix for the da850-evm boardfile which checks an unset variable
> > to determine the highest available frequency for cpufreq.
>
>
> I can't find any old threads about this, but I recall that there was a
> problem with the USB OHCI controller breaking when switching frequencies.
> It didn't happen all of the time, but often enough that it made using
> cpufreq unusable for me. Is this still a problem?
>

Yes, it's still a problem, but it's bug-compatible with the legacy BSP
from TI (project arago). I've spent some time trying to figure out the
culprit at the time you were working on the clock driver, but
eventually gave up. I think it's some kind of a HW issue. The
controller would simple die after a couple transitions.

Bart

> Also, a big-picture question. On boards with fixed regulators, what is
> the benefit of enabling frequency scaling? The power savings aspect
> seems negligible (< 1% in my tests) since the voltage cannot be changed.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 0/4] ARM: da850: enable cpufreq in DT mode
@ 2019-03-21 15:40     ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 15:40 UTC (permalink / raw)
  To: David Lechner
  Cc: Mark Rutland, devicetree, Kevin Hilman, Sekhar Nori,
	Linux Kernel Mailing List, Bartosz Golaszewski, Rob Herring,
	Linux ARM

czw., 21 mar 2019 o 16:29 David Lechner <david@lechnology.com> napisał(a):
>
> On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > This series adds cpufreq-dt operating points for da850 boards supported
> > with device tree (da850-lcdk, da850-lego-ev3, da850-evm) and also
> > includes a fix for the da850-evm boardfile which checks an unset variable
> > to determine the highest available frequency for cpufreq.
>
>
> I can't find any old threads about this, but I recall that there was a
> problem with the USB OHCI controller breaking when switching frequencies.
> It didn't happen all of the time, but often enough that it made using
> cpufreq unusable for me. Is this still a problem?
>

Yes, it's still a problem, but it's bug-compatible with the legacy BSP
from TI (project arago). I've spent some time trying to figure out the
culprit at the time you were working on the clock driver, but
eventually gave up. I think it's some kind of a HW issue. The
controller would simple die after a couple transitions.

Bart

> Also, a big-picture question. On boards with fixed regulators, what is
> the benefit of enabling frequency scaling? The power savings aspect
> seems negligible (< 1% in my tests) since the voltage cannot be changed.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
  2019-03-21 14:10   ` Bartosz Golaszewski
@ 2019-03-21 15:53     ` David Lechner
  -1 siblings, 0 replies; 24+ messages in thread
From: David Lechner @ 2019-03-21 15:53 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski,
	Adam Ford

On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> at 1.2V on this board so disable the lower operating points and enable
> the 375MHz opp.


The board-da850-evm.c file seems to indicate that this regulator is
variable and comes from the tps65070. This regulator seems to be missing
from the device tree though, even though it has device tree bindings.

Cc: Adam Ford


> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
>   1 file changed, 30 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index f04bc3e15332..f63867692da4 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -151,6 +151,15 @@
>   			system-clock-frequency = <24576000>;
>   		};
>   	};
> +
> +	cvdd: regulator0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "cvdd";
> +		regulator-min-microvolt = <1200000>;
> +		regulator-max-microvolt = <1200000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>   };
>   
>   &ecap2 {
> @@ -191,6 +200,27 @@
>   	};
>   };
>   
> +&cpu {
> +	cpu-supply = <&cvdd>;
> +};
> +
> +/*
> + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> + * above 375MHz.
> + */
> +
> +&opp_100 {
> +	status = "disabled";
> +};
> +
> +&opp_200 {
> +	status = "disabled";
> +};
> +
> +&opp_375 {
> +	status = "okay";
> +};
> +
>   &sata {
>   	status = "okay";
>   };
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
@ 2019-03-21 15:53     ` David Lechner
  0 siblings, 0 replies; 24+ messages in thread
From: David Lechner @ 2019-03-21 15:53 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland
  Cc: devicetree, Adam Ford, linux-kernel, linux-arm-kernel,
	Bartosz Golaszewski

On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> at 1.2V on this board so disable the lower operating points and enable
> the 375MHz opp.


The board-da850-evm.c file seems to indicate that this regulator is
variable and comes from the tps65070. This regulator seems to be missing
from the device tree though, even though it has device tree bindings.

Cc: Adam Ford


> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
>   1 file changed, 30 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> index f04bc3e15332..f63867692da4 100644
> --- a/arch/arm/boot/dts/da850-evm.dts
> +++ b/arch/arm/boot/dts/da850-evm.dts
> @@ -151,6 +151,15 @@
>   			system-clock-frequency = <24576000>;
>   		};
>   	};
> +
> +	cvdd: regulator0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "cvdd";
> +		regulator-min-microvolt = <1200000>;
> +		regulator-max-microvolt = <1200000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>   };
>   
>   &ecap2 {
> @@ -191,6 +200,27 @@
>   	};
>   };
>   
> +&cpu {
> +	cpu-supply = <&cvdd>;
> +};
> +
> +/*
> + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> + * above 375MHz.
> + */
> +
> +&opp_100 {
> +	status = "disabled";
> +};
> +
> +&opp_200 {
> +	status = "disabled";
> +};
> +
> +&opp_375 {
> +	status = "okay";
> +};
> +
>   &sata {
>   	status = "okay";
>   };
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/4] ARM: dts: da850: add cpu node and operating points to DT
  2019-03-21 14:10   ` Bartosz Golaszewski
@ 2019-03-21 15:56     ` David Lechner
  -1 siblings, 0 replies; 24+ messages in thread
From: David Lechner @ 2019-03-21 15:56 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski

On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> From: David Lechner <david@lechnology.com>
> 
> This adds a cpu node and operating points to the common da850.dtsi file.
> 
> Additionally, a regulator is added to the LEGO EV3 board along with
> some board-specific CPU configuration.

Should mention the LCDK board here as well since it is included in this
patch.

> 
> Regulators need to be hooked up on other boards to get them working.
> 
> Signed-off-by: David Lechner <david@lechnology.com>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   arch/arm/boot/dts/da850-lcdk.dts     | 31 +++++++++++++++
>   arch/arm/boot/dts/da850-lego-ev3.dts | 30 +++++++++++++++
>   arch/arm/boot/dts/da850.dtsi         | 56 ++++++++++++++++++++++++++++
>   3 files changed, 117 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
> index 26f453dc8370..f29ed9010812 100644
> --- a/arch/arm/boot/dts/da850-lcdk.dts
> +++ b/arch/arm/boot/dts/da850-lcdk.dts
> @@ -155,12 +155,43 @@
>   			};
>   		};
>   	};
> +
> +	cvdd: regulator0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "cvdd";
> +		regulator-min-microvolt = <1300000>;
> +		regulator-max-microvolt = <1300000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>   };
>   
>   &ref_clk {
>   	clock-frequency = <24000000>;
>   };
>   
> +&cpu {
> +	cpu-supply = <&cvdd>;
> +};
> +
> +/* LCDK has a fixed CVDD of 1.3V, so only op points >= 300MHz are valid */
> +
> +&opp_100 {
> +	status = "disabled";
> +};
> +
> +&opp_200 {
> +	status = "disabled";
> +};
> +
> +&opp_375 {
> +	status = "okay";
> +};
> +
> +&opp_456 {
> +	status = "okay";
> +};
> +
>   &pmx_core {
>   	status = "okay";
>   
> diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
> index 66fcadf0ba91..553717f84483 100644
> --- a/arch/arm/boot/dts/da850-lego-ev3.dts
> +++ b/arch/arm/boot/dts/da850-lego-ev3.dts
> @@ -125,6 +125,15 @@
>   		amp-supply = <&amp>;
>   	};
>   
> +	cvdd: regulator0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "cvdd";
> +		regulator-min-microvolt = <1200000>;
> +		regulator-max-microvolt = <1200000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
>   	/*
>   	 * This is a 5V current limiting regulator that is shared by USB,
>   	 * the sensor (input) ports, the motor (output) ports and the A/DC.
> @@ -204,6 +213,27 @@
>   	clock-frequency = <24000000>;
>   };
>   
> +&cpu {
> +	cpu-supply = <&cvdd>;
> +};
> +
> +/* since we have a fixed regulator, we can't run at these points */
> +&opp_100 {
> +	status = "disabled";
> +};
> +
> +&opp_200 {
> +	status = "disabled";
> +};
> +
> +/*
> + * The SoC is actually the 456MHz version, but because of the fixed regulator
> + * This is the fastest we can go.
> + */
> +&opp_375 {
> +	status = "okay";
> +};
> +
>   &pmx_core {
>   	status = "okay";
>   
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index 559659b399d0..ee61d1253b58 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -20,6 +20,62 @@
>   		reg = <0xc0000000 0x0>;
>   	};
>   
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu: cpu@0 {
> +			compatible = "arm,arm926ej-s";
> +			device_type = "cpu";
> +			reg = <0>;
> +			clocks = <&psc0 14>;
> +			operating-points-v2 = <&opp_table>;
> +		};
> +	};
> +
> +	opp_table: opp-table {
> +		compatible = "operating-points-v2";
> +
> +		opp_100: opp100-100000000 {
> +			opp-hz = /bits/ 64 <100000000>;
> +			opp-microvolt = <1000000 950000 1050000>;
> +		};
> +
> +		opp_200: opp110-200000000 {
> +			opp-hz = /bits/ 64 <200000000>;
> +			opp-microvolt = <1100000 1050000 1160000>;
> +		};
> +
> +		opp_300: opp120-300000000 {
> +			opp-hz = /bits/ 64 <300000000>;
> +			opp-microvolt = <1200000 1140000 1320000>;
> +		};
> +
> +		/*
> +		 * Original silicon was 300MHz max, so higher frequencies
> +		 * need to be enabled on a per-board basis if the chip is
> +		 * capable.
> +		 */
> +
> +		opp_375: opp120-375000000 {
> +			status = "disabled";
> +			opp-hz = /bits/ 64 <375000000>;
> +			opp-microvolt = <1200000 1140000 1320000>;
> +		};
> +
> +		opp_415: opp130-415000000 {
> +			status = "disabled";
> +			opp-hz = /bits/ 64 <415000000>;
> +			opp-microvolt = <1300000 1250000 1350000>;
> +		};

I just made this point (415MHz) up for experimenting with undervolting
before going all the way to 456MHz at 1.2V. I'm not sure if it is
actually useful to anyone else.

> +
> +		opp_456: opp130-456000000 {
> +			status = "disabled";
> +			opp-hz = /bits/ 64 <456000000>;
> +			opp-microvolt = <1300000 1250000 1350000>;
> +		};
> +	};
> +
>   	arm {
>   		#address-cells = <1>;
>   		#size-cells = <1>;
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 2/4] ARM: dts: da850: add cpu node and operating points to DT
@ 2019-03-21 15:56     ` David Lechner
  0 siblings, 0 replies; 24+ messages in thread
From: David Lechner @ 2019-03-21 15:56 UTC (permalink / raw)
  To: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski

On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> From: David Lechner <david@lechnology.com>
> 
> This adds a cpu node and operating points to the common da850.dtsi file.
> 
> Additionally, a regulator is added to the LEGO EV3 board along with
> some board-specific CPU configuration.

Should mention the LCDK board here as well since it is included in this
patch.

> 
> Regulators need to be hooked up on other boards to get them working.
> 
> Signed-off-by: David Lechner <david@lechnology.com>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>   arch/arm/boot/dts/da850-lcdk.dts     | 31 +++++++++++++++
>   arch/arm/boot/dts/da850-lego-ev3.dts | 30 +++++++++++++++
>   arch/arm/boot/dts/da850.dtsi         | 56 ++++++++++++++++++++++++++++
>   3 files changed, 117 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
> index 26f453dc8370..f29ed9010812 100644
> --- a/arch/arm/boot/dts/da850-lcdk.dts
> +++ b/arch/arm/boot/dts/da850-lcdk.dts
> @@ -155,12 +155,43 @@
>   			};
>   		};
>   	};
> +
> +	cvdd: regulator0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "cvdd";
> +		regulator-min-microvolt = <1300000>;
> +		regulator-max-microvolt = <1300000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
>   };
>   
>   &ref_clk {
>   	clock-frequency = <24000000>;
>   };
>   
> +&cpu {
> +	cpu-supply = <&cvdd>;
> +};
> +
> +/* LCDK has a fixed CVDD of 1.3V, so only op points >= 300MHz are valid */
> +
> +&opp_100 {
> +	status = "disabled";
> +};
> +
> +&opp_200 {
> +	status = "disabled";
> +};
> +
> +&opp_375 {
> +	status = "okay";
> +};
> +
> +&opp_456 {
> +	status = "okay";
> +};
> +
>   &pmx_core {
>   	status = "okay";
>   
> diff --git a/arch/arm/boot/dts/da850-lego-ev3.dts b/arch/arm/boot/dts/da850-lego-ev3.dts
> index 66fcadf0ba91..553717f84483 100644
> --- a/arch/arm/boot/dts/da850-lego-ev3.dts
> +++ b/arch/arm/boot/dts/da850-lego-ev3.dts
> @@ -125,6 +125,15 @@
>   		amp-supply = <&amp>;
>   	};
>   
> +	cvdd: regulator0 {
> +		compatible = "regulator-fixed";
> +		regulator-name = "cvdd";
> +		regulator-min-microvolt = <1200000>;
> +		regulator-max-microvolt = <1200000>;
> +		regulator-always-on;
> +		regulator-boot-on;
> +	};
> +
>   	/*
>   	 * This is a 5V current limiting regulator that is shared by USB,
>   	 * the sensor (input) ports, the motor (output) ports and the A/DC.
> @@ -204,6 +213,27 @@
>   	clock-frequency = <24000000>;
>   };
>   
> +&cpu {
> +	cpu-supply = <&cvdd>;
> +};
> +
> +/* since we have a fixed regulator, we can't run at these points */
> +&opp_100 {
> +	status = "disabled";
> +};
> +
> +&opp_200 {
> +	status = "disabled";
> +};
> +
> +/*
> + * The SoC is actually the 456MHz version, but because of the fixed regulator
> + * This is the fastest we can go.
> + */
> +&opp_375 {
> +	status = "okay";
> +};
> +
>   &pmx_core {
>   	status = "okay";
>   
> diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi
> index 559659b399d0..ee61d1253b58 100644
> --- a/arch/arm/boot/dts/da850.dtsi
> +++ b/arch/arm/boot/dts/da850.dtsi
> @@ -20,6 +20,62 @@
>   		reg = <0xc0000000 0x0>;
>   	};
>   
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu: cpu@0 {
> +			compatible = "arm,arm926ej-s";
> +			device_type = "cpu";
> +			reg = <0>;
> +			clocks = <&psc0 14>;
> +			operating-points-v2 = <&opp_table>;
> +		};
> +	};
> +
> +	opp_table: opp-table {
> +		compatible = "operating-points-v2";
> +
> +		opp_100: opp100-100000000 {
> +			opp-hz = /bits/ 64 <100000000>;
> +			opp-microvolt = <1000000 950000 1050000>;
> +		};
> +
> +		opp_200: opp110-200000000 {
> +			opp-hz = /bits/ 64 <200000000>;
> +			opp-microvolt = <1100000 1050000 1160000>;
> +		};
> +
> +		opp_300: opp120-300000000 {
> +			opp-hz = /bits/ 64 <300000000>;
> +			opp-microvolt = <1200000 1140000 1320000>;
> +		};
> +
> +		/*
> +		 * Original silicon was 300MHz max, so higher frequencies
> +		 * need to be enabled on a per-board basis if the chip is
> +		 * capable.
> +		 */
> +
> +		opp_375: opp120-375000000 {
> +			status = "disabled";
> +			opp-hz = /bits/ 64 <375000000>;
> +			opp-microvolt = <1200000 1140000 1320000>;
> +		};
> +
> +		opp_415: opp130-415000000 {
> +			status = "disabled";
> +			opp-hz = /bits/ 64 <415000000>;
> +			opp-microvolt = <1300000 1250000 1350000>;
> +		};

I just made this point (415MHz) up for experimenting with undervolting
before going all the way to 456MHz at 1.2V. I'm not sure if it is
actually useful to anyone else.

> +
> +		opp_456: opp130-456000000 {
> +			status = "disabled";
> +			opp-hz = /bits/ 64 <456000000>;
> +			opp-microvolt = <1300000 1250000 1350000>;
> +		};
> +	};
> +
>   	arm {
>   		#address-cells = <1>;
>   		#size-cells = <1>;
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
  2019-03-21 15:53     ` David Lechner
@ 2019-03-21 16:36       ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 16:36 UTC (permalink / raw)
  To: David Lechner
  Cc: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland, arm-soc, linux-devicetree, LKML, Adam Ford

czw., 21 mar 2019 o 16:53 David Lechner <david@lechnology.com> napisał(a):
>
> On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> > at 1.2V on this board so disable the lower operating points and enable
> > the 375MHz opp.
>
>
> The board-da850-evm.c file seems to indicate that this regulator is
> variable and comes from the tps65070. This regulator seems to be missing
> from the device tree though, even though it has device tree bindings.
>

Oh snap, you're right. I glanced over the 1.2V comment and thought
it's the same as other boards, but actually it specifies: .min_uV =
950000, .max_uV = 1350000, so all the operating points should work on
that one.

Bart

> Cc: Adam Ford
>
>
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > ---
> >   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
> >   1 file changed, 30 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> > index f04bc3e15332..f63867692da4 100644
> > --- a/arch/arm/boot/dts/da850-evm.dts
> > +++ b/arch/arm/boot/dts/da850-evm.dts
> > @@ -151,6 +151,15 @@
> >                       system-clock-frequency = <24576000>;
> >               };
> >       };
> > +
> > +     cvdd: regulator0 {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "cvdd";
> > +             regulator-min-microvolt = <1200000>;
> > +             regulator-max-microvolt = <1200000>;
> > +             regulator-always-on;
> > +             regulator-boot-on;
> > +     };
> >   };
> >
> >   &ecap2 {
> > @@ -191,6 +200,27 @@
> >       };
> >   };
> >
> > +&cpu {
> > +     cpu-supply = <&cvdd>;
> > +};
> > +
> > +/*
> > + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> > + * above 375MHz.
> > + */
> > +
> > +&opp_100 {
> > +     status = "disabled";
> > +};
> > +
> > +&opp_200 {
> > +     status = "disabled";
> > +};
> > +
> > +&opp_375 {
> > +     status = "okay";
> > +};
> > +
> >   &sata {
> >       status = "okay";
> >   };
> >
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
@ 2019-03-21 16:36       ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 16:36 UTC (permalink / raw)
  To: David Lechner
  Cc: Mark Rutland, linux-devicetree, Kevin Hilman,
	Bartosz Golaszewski, Sekhar Nori, LKML, Rob Herring, Adam Ford,
	arm-soc

czw., 21 mar 2019 o 16:53 David Lechner <david@lechnology.com> napisał(a):
>
> On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> >
> > Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> > at 1.2V on this board so disable the lower operating points and enable
> > the 375MHz opp.
>
>
> The board-da850-evm.c file seems to indicate that this regulator is
> variable and comes from the tps65070. This regulator seems to be missing
> from the device tree though, even though it has device tree bindings.
>

Oh snap, you're right. I glanced over the 1.2V comment and thought
it's the same as other boards, but actually it specifies: .min_uV =
950000, .max_uV = 1350000, so all the operating points should work on
that one.

Bart

> Cc: Adam Ford
>
>
> >
> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > ---
> >   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
> >   1 file changed, 30 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> > index f04bc3e15332..f63867692da4 100644
> > --- a/arch/arm/boot/dts/da850-evm.dts
> > +++ b/arch/arm/boot/dts/da850-evm.dts
> > @@ -151,6 +151,15 @@
> >                       system-clock-frequency = <24576000>;
> >               };
> >       };
> > +
> > +     cvdd: regulator0 {
> > +             compatible = "regulator-fixed";
> > +             regulator-name = "cvdd";
> > +             regulator-min-microvolt = <1200000>;
> > +             regulator-max-microvolt = <1200000>;
> > +             regulator-always-on;
> > +             regulator-boot-on;
> > +     };
> >   };
> >
> >   &ecap2 {
> > @@ -191,6 +200,27 @@
> >       };
> >   };
> >
> > +&cpu {
> > +     cpu-supply = <&cvdd>;
> > +};
> > +
> > +/*
> > + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> > + * above 375MHz.
> > + */
> > +
> > +&opp_100 {
> > +     status = "disabled";
> > +};
> > +
> > +&opp_200 {
> > +     status = "disabled";
> > +};
> > +
> > +&opp_375 {
> > +     status = "okay";
> > +};
> > +
> >   &sata {
> >       status = "okay";
> >   };
> >
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
  2019-03-21 16:36       ` Bartosz Golaszewski
@ 2019-03-21 16:43         ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 16:43 UTC (permalink / raw)
  To: David Lechner
  Cc: Bartosz Golaszewski, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland, arm-soc, linux-devicetree, LKML, Adam Ford

czw., 21 mar 2019 o 17:36 Bartosz Golaszewski
<bgolaszewski@baylibre.com> napisał(a):
>
> czw., 21 mar 2019 o 16:53 David Lechner <david@lechnology.com> napisał(a):
> >
> > On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > >
> > > Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> > > at 1.2V on this board so disable the lower operating points and enable
> > > the 375MHz opp.
> >
> >
> > The board-da850-evm.c file seems to indicate that this regulator is
> > variable and comes from the tps65070. This regulator seems to be missing
> > from the device tree though, even though it has device tree bindings.
> >
>
> Oh snap, you're right. I glanced over the 1.2V comment and thought
> it's the same as other boards, but actually it specifies: .min_uV =
> 950000, .max_uV = 1350000, so all the operating points should work on
> that one.
>

It seems this pmic is defined here[1] and a skeleton included here[2]
and then the regulator constraints follow.

Bart

[1] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L224
[2] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L326

> Bart
>
> > Cc: Adam Ford
> >
> >
> > >
> > > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > > ---
> > >   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
> > >   1 file changed, 30 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> > > index f04bc3e15332..f63867692da4 100644
> > > --- a/arch/arm/boot/dts/da850-evm.dts
> > > +++ b/arch/arm/boot/dts/da850-evm.dts
> > > @@ -151,6 +151,15 @@
> > >                       system-clock-frequency = <24576000>;
> > >               };
> > >       };
> > > +
> > > +     cvdd: regulator0 {
> > > +             compatible = "regulator-fixed";
> > > +             regulator-name = "cvdd";
> > > +             regulator-min-microvolt = <1200000>;
> > > +             regulator-max-microvolt = <1200000>;
> > > +             regulator-always-on;
> > > +             regulator-boot-on;
> > > +     };
> > >   };
> > >
> > >   &ecap2 {
> > > @@ -191,6 +200,27 @@
> > >       };
> > >   };
> > >
> > > +&cpu {
> > > +     cpu-supply = <&cvdd>;
> > > +};
> > > +
> > > +/*
> > > + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> > > + * above 375MHz.
> > > + */
> > > +
> > > +&opp_100 {
> > > +     status = "disabled";
> > > +};
> > > +
> > > +&opp_200 {
> > > +     status = "disabled";
> > > +};
> > > +
> > > +&opp_375 {
> > > +     status = "okay";
> > > +};
> > > +
> > >   &sata {
> > >       status = "okay";
> > >   };
> > >
> >

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
@ 2019-03-21 16:43         ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 16:43 UTC (permalink / raw)
  To: David Lechner
  Cc: Mark Rutland, linux-devicetree, Kevin Hilman,
	Bartosz Golaszewski, Sekhar Nori, LKML, Rob Herring, Adam Ford,
	arm-soc

czw., 21 mar 2019 o 17:36 Bartosz Golaszewski
<bgolaszewski@baylibre.com> napisał(a):
>
> czw., 21 mar 2019 o 16:53 David Lechner <david@lechnology.com> napisał(a):
> >
> > On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > >
> > > Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> > > at 1.2V on this board so disable the lower operating points and enable
> > > the 375MHz opp.
> >
> >
> > The board-da850-evm.c file seems to indicate that this regulator is
> > variable and comes from the tps65070. This regulator seems to be missing
> > from the device tree though, even though it has device tree bindings.
> >
>
> Oh snap, you're right. I glanced over the 1.2V comment and thought
> it's the same as other boards, but actually it specifies: .min_uV =
> 950000, .max_uV = 1350000, so all the operating points should work on
> that one.
>

It seems this pmic is defined here[1] and a skeleton included here[2]
and then the regulator constraints follow.

Bart

[1] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L224
[2] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L326

> Bart
>
> > Cc: Adam Ford
> >
> >
> > >
> > > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > > ---
> > >   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
> > >   1 file changed, 30 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> > > index f04bc3e15332..f63867692da4 100644
> > > --- a/arch/arm/boot/dts/da850-evm.dts
> > > +++ b/arch/arm/boot/dts/da850-evm.dts
> > > @@ -151,6 +151,15 @@
> > >                       system-clock-frequency = <24576000>;
> > >               };
> > >       };
> > > +
> > > +     cvdd: regulator0 {
> > > +             compatible = "regulator-fixed";
> > > +             regulator-name = "cvdd";
> > > +             regulator-min-microvolt = <1200000>;
> > > +             regulator-max-microvolt = <1200000>;
> > > +             regulator-always-on;
> > > +             regulator-boot-on;
> > > +     };
> > >   };
> > >
> > >   &ecap2 {
> > > @@ -191,6 +200,27 @@
> > >       };
> > >   };
> > >
> > > +&cpu {
> > > +     cpu-supply = <&cvdd>;
> > > +};
> > > +
> > > +/*
> > > + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> > > + * above 375MHz.
> > > + */
> > > +
> > > +&opp_100 {
> > > +     status = "disabled";
> > > +};
> > > +
> > > +&opp_200 {
> > > +     status = "disabled";
> > > +};
> > > +
> > > +&opp_375 {
> > > +     status = "okay";
> > > +};
> > > +
> > >   &sata {
> > >       status = "okay";
> > >   };
> > >
> >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
  2019-03-21 16:43         ` Bartosz Golaszewski
@ 2019-03-21 17:13           ` Bartosz Golaszewski
  -1 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 17:13 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: David Lechner, Sekhar Nori, Kevin Hilman, Rob Herring,
	Mark Rutland, arm-soc, linux-devicetree, LKML, Adam Ford

czw., 21 mar 2019 o 17:44 Bartosz Golaszewski
<bgolaszewski@baylibre.com> napisał(a):
>
> czw., 21 mar 2019 o 17:36 Bartosz Golaszewski
> <bgolaszewski@baylibre.com> napisał(a):
> >
> > czw., 21 mar 2019 o 16:53 David Lechner <david@lechnology.com> napisał(a):
> > >
> > > On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > > >
> > > > Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> > > > at 1.2V on this board so disable the lower operating points and enable
> > > > the 375MHz opp.
> > >
> > >
> > > The board-da850-evm.c file seems to indicate that this regulator is
> > > variable and comes from the tps65070. This regulator seems to be missing
> > > from the device tree though, even though it has device tree bindings.
> > >
> >
> > Oh snap, you're right. I glanced over the 1.2V comment and thought
> > it's the same as other boards, but actually it specifies: .min_uV =
> > 950000, .max_uV = 1350000, so all the operating points should work on
> > that one.
> >
>
> It seems this pmic is defined here[1] and a skeleton included here[2]
> and then the regulator constraints follow.
>
> Bart
>
> [1] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L224
> [2] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L326
>

Ok I retested and the patch will look like this:

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index f04bc3e15332..a0a1b3dccf37 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -191,6 +191,18 @@
         };
 };

+&cpu {
+        cpu-supply = <&vdcdc3_reg>;
+};
+
+&opp_375 {
+        status = "okay";
+};
+
+&opp_456 {
+        status = "okay";
+};
+
 &sata {
         status = "okay";
 };

I'll resend the whole series tomorrow to not spam Sekhar's mailbox anymore.

Bartosz

> > Bart
> >
> > > Cc: Adam Ford
> > >
> > >
> > > >
> > > > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > > > ---
> > > >   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
> > > >   1 file changed, 30 insertions(+)
> > > >
> > > > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> > > > index f04bc3e15332..f63867692da4 100644
> > > > --- a/arch/arm/boot/dts/da850-evm.dts
> > > > +++ b/arch/arm/boot/dts/da850-evm.dts
> > > > @@ -151,6 +151,15 @@
> > > >                       system-clock-frequency = <24576000>;
> > > >               };
> > > >       };
> > > > +
> > > > +     cvdd: regulator0 {
> > > > +             compatible = "regulator-fixed";
> > > > +             regulator-name = "cvdd";
> > > > +             regulator-min-microvolt = <1200000>;
> > > > +             regulator-max-microvolt = <1200000>;
> > > > +             regulator-always-on;
> > > > +             regulator-boot-on;
> > > > +     };
> > > >   };
> > > >
> > > >   &ecap2 {
> > > > @@ -191,6 +200,27 @@
> > > >       };
> > > >   };
> > > >
> > > > +&cpu {
> > > > +     cpu-supply = <&cvdd>;
> > > > +};
> > > > +
> > > > +/*
> > > > + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> > > > + * above 375MHz.
> > > > + */
> > > > +
> > > > +&opp_100 {
> > > > +     status = "disabled";
> > > > +};
> > > > +
> > > > +&opp_200 {
> > > > +     status = "disabled";
> > > > +};
> > > > +
> > > > +&opp_375 {
> > > > +     status = "okay";
> > > > +};
> > > > +
> > > >   &sata {
> > > >       status = "okay";
> > > >   };
> > > >
> > >

^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq
@ 2019-03-21 17:13           ` Bartosz Golaszewski
  0 siblings, 0 replies; 24+ messages in thread
From: Bartosz Golaszewski @ 2019-03-21 17:13 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Mark Rutland, linux-devicetree, David Lechner, Kevin Hilman,
	Sekhar Nori, LKML, Rob Herring, Adam Ford, arm-soc

czw., 21 mar 2019 o 17:44 Bartosz Golaszewski
<bgolaszewski@baylibre.com> napisał(a):
>
> czw., 21 mar 2019 o 17:36 Bartosz Golaszewski
> <bgolaszewski@baylibre.com> napisał(a):
> >
> > czw., 21 mar 2019 o 16:53 David Lechner <david@lechnology.com> napisał(a):
> > >
> > > On 3/21/19 9:10 AM, Bartosz Golaszewski wrote:
> > > > From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > > >
> > > > Enable cpufreq-dt support for da850-evm. The cvdd regulator is fixed
> > > > at 1.2V on this board so disable the lower operating points and enable
> > > > the 375MHz opp.
> > >
> > >
> > > The board-da850-evm.c file seems to indicate that this regulator is
> > > variable and comes from the tps65070. This regulator seems to be missing
> > > from the device tree though, even though it has device tree bindings.
> > >
> >
> > Oh snap, you're right. I glanced over the 1.2V comment and thought
> > it's the same as other boards, but actually it specifies: .min_uV =
> > 950000, .max_uV = 1350000, so all the operating points should work on
> > that one.
> >
>
> It seems this pmic is defined here[1] and a skeleton included here[2]
> and then the regulator constraints follow.
>
> Bart
>
> [1] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L224
> [2] https://elixir.bootlin.com/linux/latest/source/arch/arm/boot/dts/da850-evm.dts#L326
>

Ok I retested and the patch will look like this:

diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index f04bc3e15332..a0a1b3dccf37 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -191,6 +191,18 @@
         };
 };

+&cpu {
+        cpu-supply = <&vdcdc3_reg>;
+};
+
+&opp_375 {
+        status = "okay";
+};
+
+&opp_456 {
+        status = "okay";
+};
+
 &sata {
         status = "okay";
 };

I'll resend the whole series tomorrow to not spam Sekhar's mailbox anymore.

Bartosz

> > Bart
> >
> > > Cc: Adam Ford
> > >
> > >
> > > >
> > > > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> > > > ---
> > > >   arch/arm/boot/dts/da850-evm.dts | 30 ++++++++++++++++++++++++++++++
> > > >   1 file changed, 30 insertions(+)
> > > >
> > > > diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
> > > > index f04bc3e15332..f63867692da4 100644
> > > > --- a/arch/arm/boot/dts/da850-evm.dts
> > > > +++ b/arch/arm/boot/dts/da850-evm.dts
> > > > @@ -151,6 +151,15 @@
> > > >                       system-clock-frequency = <24576000>;
> > > >               };
> > > >       };
> > > > +
> > > > +     cvdd: regulator0 {
> > > > +             compatible = "regulator-fixed";
> > > > +             regulator-name = "cvdd";
> > > > +             regulator-min-microvolt = <1200000>;
> > > > +             regulator-max-microvolt = <1200000>;
> > > > +             regulator-always-on;
> > > > +             regulator-boot-on;
> > > > +     };
> > > >   };
> > > >
> > > >   &ecap2 {
> > > > @@ -191,6 +200,27 @@
> > > >       };
> > > >   };
> > > >
> > > > +&cpu {
> > > > +     cpu-supply = <&cvdd>;
> > > > +};
> > > > +
> > > > +/*
> > > > + * DA850-EVM has a fixed CVDD of 1.2V - we cannot go below 300MHz or
> > > > + * above 375MHz.
> > > > + */
> > > > +
> > > > +&opp_100 {
> > > > +     status = "disabled";
> > > > +};
> > > > +
> > > > +&opp_200 {
> > > > +     status = "disabled";
> > > > +};
> > > > +
> > > > +&opp_375 {
> > > > +     status = "okay";
> > > > +};
> > > > +
> > > >   &sata {
> > > >       status = "okay";
> > > >   };
> > > >
> > >

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-03-21 17:13 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 14:10 [PATCH 0/4] ARM: da850: enable cpufreq in DT mode Bartosz Golaszewski
2019-03-21 14:10 ` Bartosz Golaszewski
2019-03-21 14:10 ` [PATCH 1/4] ARM: davinci: fix cpufreq registration on da850-evm Bartosz Golaszewski
2019-03-21 14:10   ` Bartosz Golaszewski
2019-03-21 14:10 ` [PATCH 2/4] ARM: dts: da850: add cpu node and operating points to DT Bartosz Golaszewski
2019-03-21 14:10   ` Bartosz Golaszewski
2019-03-21 15:56   ` David Lechner
2019-03-21 15:56     ` David Lechner
2019-03-21 14:10 ` [PATCH 3/4] ARM: dts: da850-evm: enable cpufreq Bartosz Golaszewski
2019-03-21 14:10   ` Bartosz Golaszewski
2019-03-21 15:53   ` David Lechner
2019-03-21 15:53     ` David Lechner
2019-03-21 16:36     ` Bartosz Golaszewski
2019-03-21 16:36       ` Bartosz Golaszewski
2019-03-21 16:43       ` Bartosz Golaszewski
2019-03-21 16:43         ` Bartosz Golaszewski
2019-03-21 17:13         ` Bartosz Golaszewski
2019-03-21 17:13           ` Bartosz Golaszewski
2019-03-21 14:10 ` [PATCH 4/4] ARM: davinci_all_defconfig: Enable CPUFREQ_DT Bartosz Golaszewski
2019-03-21 14:10   ` Bartosz Golaszewski
2019-03-21 15:29 ` [PATCH 0/4] ARM: da850: enable cpufreq in DT mode David Lechner
2019-03-21 15:29   ` David Lechner
2019-03-21 15:40   ` Bartosz Golaszewski
2019-03-21 15:40     ` Bartosz Golaszewski

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.