linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: meson-g12b-odroid-n2*: Add support for overclocking Hardkernel ODROID-N2 boards.
@ 2024-02-22  8:25 Adam Green
  2024-02-22  9:37 ` Jerome Brunet
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Green @ 2024-02-22  8:25 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel
  Cc: greena88

Hardkernel actively supports overclocking these boards in their own
documentation. (https://wiki.odroid.com/odroid-n2/hardware/overclocking)

This aligns the SoC opps with those in the board vendors bsp source.

Signed-off-by: Adam Green <greena88@gmail.com>
---
 .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 25 +++++++++++++++++++
 .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 17 +++++++++++++
 .../dts/amlogic/meson-g12b-odroid-n2l.dts     | 25 +++++++++++++++++++
 3 files changed, 67 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
index ce1198ad34e4..1731d542a00c 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
@@ -15,6 +15,31 @@ / {
 	model = "Hardkernel ODROID-N2Plus";
 };
 
+&cpu_opp_table_0 {
+	opp-1908000000 {
+		opp-hz = /bits/ 64 <1908000000>;
+		opp-microvolt = <1030000>;
+	};
+	opp-2016000000 {
+		opp-hz = /bits/ 64 <2016000000>;
+		opp-microvolt = <1040000>;
+		turbo-mode;
+	};
+};
+
+&cpub_opp_table_1 {
+	opp-2304000000 {
+		opp-hz = /bits/ 64 <2304000000>;
+		opp-microvolt = <1030000>;
+		turbo-mode;
+	};
+	opp-2400000000 {
+		opp-hz = /bits/ 64 <2400000000>;
+		opp-microvolt = <1040000>;
+		turbo-mode;
+	};
+};
+
 &vddcpu_a {
 	regulator-min-microvolt = <680000>;
 	regulator-max-microvolt = <1040000>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
index a198a91259ec..0c71e8bc0124 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
@@ -13,3 +13,20 @@ / {
 	compatible = "hardkernel,odroid-n2", "amlogic,s922x", "amlogic,g12b";
 	model = "Hardkernel ODROID-N2";
 };
+
+&cpu_opp_table_0 {
+	opp-1992000000 {
+		turbo-mode;
+	};
+};
+
+&cpub_opp_table_1 {
+	opp-1908000000 {
+		turbo-mode;
+	};
+	opp-2004000000 {
+		opp-hz = /bits/ 64 <2004000000>;
+		opp-microvolt = <1022000>;
+		turbo-mode;
+	};
+};
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts
index e26f3e3258e1..b16a69d0cad6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts
@@ -97,6 +97,31 @@ codec {
 	};
 };
 
+&cpu_opp_table_0 {
+	opp-1908000000 {
+		opp-hz = /bits/ 64 <1908000000>;
+		opp-microvolt = <1030000>;
+	};
+	opp-2016000000 {
+		opp-hz = /bits/ 64 <2016000000>;
+		opp-microvolt = <1040000>;
+		turbo-mode;
+	};
+};
+
+&cpub_opp_table_1 {
+	opp-2304000000 {
+		opp-hz = /bits/ 64 <2304000000>;
+		opp-microvolt = <1030000>;
+		turbo-mode;
+	};
+	opp-2400000000 {
+		opp-hz = /bits/ 64 <2400000000>;
+		opp-microvolt = <1040000>;
+		turbo-mode;
+	};
+};
+
 &eth_phy {
 	status = "disabled";
 };
-- 
2.34.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] 3+ messages in thread

* Re: [PATCH] arm64: dts: meson-g12b-odroid-n2*: Add support for overclocking Hardkernel ODROID-N2 boards.
  2024-02-22  8:25 [PATCH] arm64: dts: meson-g12b-odroid-n2*: Add support for overclocking Hardkernel ODROID-N2 boards Adam Green
@ 2024-02-22  9:37 ` Jerome Brunet
  2024-02-22 10:17   ` Adam Green
  0 siblings, 1 reply; 3+ messages in thread
From: Jerome Brunet @ 2024-02-22  9:37 UTC (permalink / raw)
  To: Adam Green
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
	Kevin Hilman, Jerome Brunet, Martin Blumenstingl, devicetree,
	linux-arm-kernel, linux-amlogic, linux-kernel


On Thu 22 Feb 2024 at 08:25, Adam Green <greena88@gmail.com> wrote:

> Hardkernel actively supports overclocking these boards in their own
> documentation. (https://wiki.odroid.com/odroid-n2/hardware/overclocking)
>
> This aligns the SoC opps with those in the board vendors bsp source.

Patch title is too long - checkpatch.pl should have given a you warning
for this.

Not sure it is wise support overclocking directly in mainline, not by
default at least. Maybe as an overlay ? even this I'm not too sure.

>
> Signed-off-by: Adam Green <greena88@gmail.com>
> ---
>  .../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 25 +++++++++++++++++++
>  .../boot/dts/amlogic/meson-g12b-odroid-n2.dts | 17 +++++++++++++
>  .../dts/amlogic/meson-g12b-odroid-n2l.dts     | 25 +++++++++++++++++++
>  3 files changed, 67 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> index ce1198ad34e4..1731d542a00c 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
> @@ -15,6 +15,31 @@ / {
>  	model = "Hardkernel ODROID-N2Plus";
>  };
>  
> +&cpu_opp_table_0 {
> +	opp-1908000000 {
> +		opp-hz = /bits/ 64 <1908000000>;
> +		opp-microvolt = <1030000>;
> +	};
> +	opp-2016000000 {
> +		opp-hz = /bits/ 64 <2016000000>;
> +		opp-microvolt = <1040000>;
> +		turbo-mode;
> +	};
> +};
> +
> +&cpub_opp_table_1 {
> +	opp-2304000000 {
> +		opp-hz = /bits/ 64 <2304000000>;
> +		opp-microvolt = <1030000>;
> +		turbo-mode;
> +	};
> +	opp-2400000000 {
> +		opp-hz = /bits/ 64 <2400000000>;
> +		opp-microvolt = <1040000>;
> +		turbo-mode;
> +	};
> +};
> +
>  &vddcpu_a {
>  	regulator-min-microvolt = <680000>;
>  	regulator-max-microvolt = <1040000>;
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> index a198a91259ec..0c71e8bc0124 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts
> @@ -13,3 +13,20 @@ / {
>  	compatible = "hardkernel,odroid-n2", "amlogic,s922x", "amlogic,g12b";
>  	model = "Hardkernel ODROID-N2";
>  };
> +
> +&cpu_opp_table_0 {
> +	opp-1992000000 {
> +		turbo-mode;
> +	};
> +};
> +
> +&cpub_opp_table_1 {
> +	opp-1908000000 {
> +		turbo-mode;
> +	};
> +	opp-2004000000 {
> +		opp-hz = /bits/ 64 <2004000000>;
> +		opp-microvolt = <1022000>;
> +		turbo-mode;
> +	};
> +};
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts
> index e26f3e3258e1..b16a69d0cad6 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2l.dts
> @@ -97,6 +97,31 @@ codec {
>  	};
>  };
>  
> +&cpu_opp_table_0 {
> +	opp-1908000000 {
> +		opp-hz = /bits/ 64 <1908000000>;
> +		opp-microvolt = <1030000>;
> +	};
> +	opp-2016000000 {
> +		opp-hz = /bits/ 64 <2016000000>;
> +		opp-microvolt = <1040000>;
> +		turbo-mode;
> +	};
> +};
> +
> +&cpub_opp_table_1 {
> +	opp-2304000000 {
> +		opp-hz = /bits/ 64 <2304000000>;
> +		opp-microvolt = <1030000>;
> +		turbo-mode;
> +	};
> +	opp-2400000000 {
> +		opp-hz = /bits/ 64 <2400000000>;
> +		opp-microvolt = <1040000>;
> +		turbo-mode;
> +	};
> +};
> +
>  &eth_phy {
>  	status = "disabled";
>  };


-- 
Jerome

_______________________________________________
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] 3+ messages in thread

* Re: [PATCH] arm64: dts: meson-g12b-odroid-n2*: Add support for overclocking Hardkernel ODROID-N2 boards.
  2024-02-22  9:37 ` Jerome Brunet
@ 2024-02-22 10:17   ` Adam Green
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Green @ 2024-02-22 10:17 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Neil Armstrong,
	Kevin Hilman, Martin Blumenstingl, devicetree, linux-arm-kernel,
	linux-amlogic, linux-kernel

On 22/02/2024 09:37, Jerome Brunet wrote:
> Patch title is too long - checkpatch.pl should have given a you warning
> for this.
> 
> Not sure it is wise support overclocking directly in mainline, not by
> default at least. Maybe as an overlay ? even this I'm not too sure.

Hi Jerome,

Appologies for this but checkpatch did not raise any issues re the
length of the commit message.

Overclocking is not enabled by default due to the turbo-mode bit
being set, it still requires the user to issue the following
command to activate.

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

It's also worth noting that regulator voltages have not been
upped to achieve this.

Lastly if the HK wiki is to be believed then the N2 (non-plus) is 
already overclocked in mainline.

Best regards,

Adam

_______________________________________________
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] 3+ messages in thread

end of thread, other threads:[~2024-02-22 10:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22  8:25 [PATCH] arm64: dts: meson-g12b-odroid-n2*: Add support for overclocking Hardkernel ODROID-N2 boards Adam Green
2024-02-22  9:37 ` Jerome Brunet
2024-02-22 10:17   ` Adam Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).