Hi Sunxi maintainers and members,
Now that required drivers are merged we can contibute on DVFS
support for Allwinner H6.
This serie is based on Yangtao Li serie[0] and Ondřej Jirman work[1].
Most of the OPP tables are taken from original vendor kernel[2].
Plus there are new CPU frequencies at 1.6GHz, 1.7GHz and 1.8GHz.
I wrote a simple script to randomly set a frequency during
a random time[3]. This script is quite stressfull and set some high
frequency without checking temperature. This can result on behavior
that whould not occurs with the real cpufreq framework.
As Maxime point out I also tested with cpufreq-ljt-stress-test
(found here https://github.com/ssvb/cpuburn-arm).
This script doesn't trigger any issue.
I also test that that offlining CPU0 and doing DVFS on other CPUs
works. As CPU regulator is only set for CPU0.
The GPU devfreq was drop as the regulator is still not properly
drive by panfrost driver[4].
I will re-introduce it later.
Ondřej Jirman has an Orange Pi 3, Jernej has a PineH64 and a Tanix
TX6 boards and I have a Beelink GS1 board so I have enable these
boards. But CPU Devfreq is really touchy has it depends on:
board design, SoC speed_grade and environement which can affect
thermal cooling and have different behavior for different user.
If people can test this serie and give feedback, I will try to
introduce this in LibreElec tree, so LE community can test it.
Thanks,
Clément
0: https://patchwork.kernel.org/cover/10815117/
1: https://megous.com/git/linux/log/?h=ths-5.7
2: https://github.com/orangepi-xunlong/OrangePiH6_Linux4_9/blob/master/arch/arm64/boot/dts/sunxi/sun50iw6p1.dtsi#L345-L517
3: https://gist.github.com/clementperon/55a055dae3f13bbd14fb39c0069fe2e2
4: https://patchwork.kernel.org/patch/11486893/
Changes since v2 (thanks to Maxime Ripard):
- Change Orange Pi boards to Orange Pi 3
- Change soc speed nvmem node name
- Fix device tree warnings
- Drop GPU opp tables
Changes since v1 (thanks to Ondřej Jirman):
- Remove Polling thermal
- Add Orange Pi boards
- Remove minimal voltage change for Beelink GS1
- Add ramp-deplay for GPU and CPU regulators
- Push to thermal point to 85°C (Allwinner set them to 100°C and 115°C)
- Added 1.6GHz and 1.7GHz to OPP table.
Clément Péron (6):
arm64: configs: Enable sun50i cpufreq nvmem
arm64: dts: allwinner: h6: Enable CPU opp tables for Beelink GS1
arm64: dts: allwinner: h6: Enable CPU opp tables for Orange Pi 3
arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6
arm64: dts: allwinner: Sort Pine H64 device-tree nodes
arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Pine H64
Ondrej Jirman (1):
arm64: dts: allwinner: h6: Add CPU Operating Performance Points table
.../dts/allwinner/sun50i-h6-beelink-gs1.dts | 9 +-
.../boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi | 121 ++++++++++++++++++
.../dts/allwinner/sun50i-h6-orangepi-3.dts | 3 +
.../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 41 +++---
.../dts/allwinner/sun50i-h6-tanix-tx6.dts | 13 ++
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 4 +
arch/arm64/configs/defconfig | 1 +
7 files changed, 174 insertions(+), 18 deletions(-)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-cpu-opp.dtsi
--
2.20.1
Pine H64 device-tree have some nodes not properly sorted.
Fix this.
Signed-off-by: Clément Péron <[email protected]>
---
.../boot/dts/allwinner/sun50i-h6-pine-h64.dts | 34 +++++++++----------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
index b0642d841933..63a785b534e1 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts
@@ -80,6 +80,18 @@
};
};
+&de {
+ status = "okay";
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci3 {
+ status = "okay";
+};
+
&emac {
pinctrl-names = "default";
pinctrl-0 = <&ext_rgmii_pins>;
@@ -91,17 +103,6 @@
status = "okay";
};
-&mdio {
- ext_rgmii_phy: ethernet-phy@1 {
- compatible = "ethernet-phy-ieee802.3-c22";
- reg = <1>;
- };
-};
-
-&de {
- status = "okay";
-};
-
&gpu {
mali-supply = <®_dcdcc>;
status = "okay";
@@ -117,12 +118,11 @@
};
};
-&ehci0 {
- status = "okay";
-};
-
-&ehci3 {
- status = "okay";
+&mdio {
+ ext_rgmii_phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
};
&mmc0 {
--
2.20.1
Hi,
On Sun, Apr 19, 2020 at 03:50:04PM +0200, Clément Péron wrote:
> Now that required drivers are merged we can contibute on DVFS
> support for Allwinner H6.
>
> This serie is based on Yangtao Li serie[0] and Ondřej Jirman work[1].
>
> Most of the OPP tables are taken from original vendor kernel[2].
> Plus there are new CPU frequencies at 1.6GHz, 1.7GHz and 1.8GHz.
>
> I wrote a simple script to randomly set a frequency during
> a random time[3]. This script is quite stressfull and set some high
> frequency without checking temperature. This can result on behavior
> that whould not occurs with the real cpufreq framework.
> As Maxime point out I also tested with cpufreq-ljt-stress-test
> (found here https://github.com/ssvb/cpuburn-arm).
> This script doesn't trigger any issue.
> I also test that that offlining CPU0 and doing DVFS on other CPUs
> works. As CPU regulator is only set for CPU0.
>
> The GPU devfreq was drop as the regulator is still not properly
> drive by panfrost driver[4].
> I will re-introduce it later.
>
> Ondřej Jirman has an Orange Pi 3, Jernej has a PineH64 and a Tanix
> TX6 boards and I have a Beelink GS1 board so I have enable these
> boards. But CPU Devfreq is really touchy has it depends on:
> board design, SoC speed_grade and environement which can affect
> thermal cooling and have different behavior for different user.
>
> If people can test this serie and give feedback, I will try to
> introduce this in LibreElec tree, so LE community can test it.
Applied all of them, thanks!
Maxime
Hello Clément,
On Sun, Apr 19, 2020 at 03:50:04PM +0200, Clément Péron wrote:
> Hi Sunxi maintainers and members,
>
> Now that required drivers are merged we can contibute on DVFS
> support for Allwinner H6.
>
[ snip ]
>
> Changes since v2 (thanks to Maxime Ripard):
> - Change Orange Pi boards to Orange Pi 3
> - Change soc speed nvmem node name
> - Fix device tree warnings
> - Drop GPU opp tables
Looks like you may have also inadverently dropped the second patch from v2
series that implemented CPU thermal trip points.
> Changes since v1 (thanks to Ondřej Jirman):
> - Remove Polling thermal
> - Add Orange Pi boards
> - Remove minimal voltage change for Beelink GS1
> - Add ramp-deplay for GPU and CPU regulators
> - Push to thermal point to 85°C (Allwinner set them to 100°C and 115°C)
> - Added 1.6GHz and 1.7GHz to OPP table.
>
> Clément Péron (6):
> arm64: configs: Enable sun50i cpufreq nvmem
> arm64: dts: allwinner: h6: Enable CPU opp tables for Beelink GS1
> arm64: dts: allwinner: h6: Enable CPU opp tables for Orange Pi 3
> arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6
> arm64: dts: allwinner: Sort Pine H64 device-tree nodes
> arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Pine H64
You may also want to fix title of this patch to drop the GPU reference.
thank you and regards,
o.
> Ondrej Jirman (1):
> arm64: dts: allwinner: h6: Add CPU Operating Performance Points table
On Mon, Apr 20, 2020 at 11:48:01AM +0200, megous hlavni wrote:
> Hello Clément,
>
> On Sun, Apr 19, 2020 at 03:50:04PM +0200, Clément Péron wrote:
> > Hi Sunxi maintainers and members,
> >
> > Now that required drivers are merged we can contibute on DVFS
> > support for Allwinner H6.
> >
>
> [ snip ]
>
> >
> > Changes since v2 (thanks to Maxime Ripard):
> > - Change Orange Pi boards to Orange Pi 3
> > - Change soc speed nvmem node name
> > - Fix device tree warnings
> > - Drop GPU opp tables
>
> Looks like you may have also inadverently dropped the second patch from v2
> series that implemented CPU thermal trip points.
Also it looks like the patch 1 from v2 implementing the clock properties
is missing from v3, and I don't see it being already applied anywhere.
Without that cpufreq doesn't work.
Also, thermal trip points need to be in the opp.dtsi to avoid dtc warnings
during build.
https://megous.com/git/linux/commit/?h=ths-5.7&id=cacefd7decf5ae0ce42ab4d48a13a58552929ebd
regards,
o.
> > Changes since v1 (thanks to Ondřej Jirman):
> > - Remove Polling thermal
> > - Add Orange Pi boards
> > - Remove minimal voltage change for Beelink GS1
> > - Add ramp-deplay for GPU and CPU regulators
> > - Push to thermal point to 85°C (Allwinner set them to 100°C and 115°C)
> > - Added 1.6GHz and 1.7GHz to OPP table.
> >
> > Clément Péron (6):
> > arm64: configs: Enable sun50i cpufreq nvmem
> > arm64: dts: allwinner: h6: Enable CPU opp tables for Beelink GS1
> > arm64: dts: allwinner: h6: Enable CPU opp tables for Orange Pi 3
> > arm64: dts: allwinner: h6: Enable CPU opp tables for Tanix TX6
> > arm64: dts: allwinner: Sort Pine H64 device-tree nodes
> > arm64: dts: allwinner: h6: Enable CPU and GPU opp tables for Pine H64
>
> You may also want to fix title of this patch to drop the GPU reference.
>
> thank you and regards,
> o.
>
> > Ondrej Jirman (1):
> > arm64: dts: allwinner: h6: Add CPU Operating Performance Points table
Hi Maxime,
On Mon, Apr 20, 2020 at 10:45:47AM +0200, Maxime Ripard wrote:
> Hi,
>
> On Sun, Apr 19, 2020 at 03:50:04PM +0200, Clément Péron wrote:
> > Now that required drivers are merged we can contibute on DVFS
> > support for Allwinner H6.
> >
> > This serie is based on Yangtao Li serie[0] and Ondřej Jirman work[1].
> >
> > Most of the OPP tables are taken from original vendor kernel[2].
> > Plus there are new CPU frequencies at 1.6GHz, 1.7GHz and 1.8GHz.
> >
> > I wrote a simple script to randomly set a frequency during
> > a random time[3]. This script is quite stressfull and set some high
> > frequency without checking temperature. This can result on behavior
> > that whould not occurs with the real cpufreq framework.
> > As Maxime point out I also tested with cpufreq-ljt-stress-test
> > (found here https://github.com/ssvb/cpuburn-arm).
> > This script doesn't trigger any issue.
> > I also test that that offlining CPU0 and doing DVFS on other CPUs
> > works. As CPU regulator is only set for CPU0.
> >
> > The GPU devfreq was drop as the regulator is still not properly
> > drive by panfrost driver[4].
> > I will re-introduce it later.
> >
> > Ondřej Jirman has an Orange Pi 3, Jernej has a PineH64 and a Tanix
> > TX6 boards and I have a Beelink GS1 board so I have enable these
> > boards. But CPU Devfreq is really touchy has it depends on:
> > board design, SoC speed_grade and environement which can affect
> > thermal cooling and have different behavior for different user.
> >
> > If people can test this serie and give feedback, I will try to
> > introduce this in LibreElec tree, so LE community can test it.
>
> Applied all of them, thanks!
Please also apply "[PATCH v2 1/7] arm64: dts: allwinner: h6: Add
clock to CPU cores" from the v2 series, otherwise cpufreq will
not work.
I can also send a missing patch adding the trip points, and cpu
as a cooling device, that I linked in my other reply to this patch
series afterwards, if Clément wants.
regards,
o.
> Maxime
Hi Ondrej, Maxime,
On Mon, 20 Apr 2020 at 12:39, Ondřej Jirman <[email protected]> wrote:
>
> Hi Maxime,
>
> On Mon, Apr 20, 2020 at 10:45:47AM +0200, Maxime Ripard wrote:
> > Hi,
> >
> > On Sun, Apr 19, 2020 at 03:50:04PM +0200, Clément Péron wrote:
> > > Now that required drivers are merged we can contibute on DVFS
> > > support for Allwinner H6.
> > >
> > > This serie is based on Yangtao Li serie[0] and Ondřej Jirman work[1].
> > >
> > > Most of the OPP tables are taken from original vendor kernel[2].
> > > Plus there are new CPU frequencies at 1.6GHz, 1.7GHz and 1.8GHz.
> > >
> > > I wrote a simple script to randomly set a frequency during
> > > a random time[3]. This script is quite stressfull and set some high
> > > frequency without checking temperature. This can result on behavior
> > > that whould not occurs with the real cpufreq framework.
> > > As Maxime point out I also tested with cpufreq-ljt-stress-test
> > > (found here https://github.com/ssvb/cpuburn-arm).
> > > This script doesn't trigger any issue.
> > > I also test that that offlining CPU0 and doing DVFS on other CPUs
> > > works. As CPU regulator is only set for CPU0.
> > >
> > > The GPU devfreq was drop as the regulator is still not properly
> > > drive by panfrost driver[4].
> > > I will re-introduce it later.
> > >
> > > Ondřej Jirman has an Orange Pi 3, Jernej has a PineH64 and a Tanix
> > > TX6 boards and I have a Beelink GS1 board so I have enable these
> > > boards. But CPU Devfreq is really touchy has it depends on:
> > > board design, SoC speed_grade and environement which can affect
> > > thermal cooling and have different behavior for different user.
> > >
> > > If people can test this serie and give feedback, I will try to
> > > introduce this in LibreElec tree, so LE community can test it.
> >
> > Applied all of them, thanks!
>
> Please also apply "[PATCH v2 1/7] arm64: dts: allwinner: h6: Add
> clock to CPU cores" from the v2 series, otherwise cpufreq will
> not work.
>
> I can also send a missing patch adding the trip points, and cpu
> as a cooling device, that I linked in my other reply to this patch
> series afterwards, if Clément wants.
Indeed I have sent using the following cmd : "git send-email --to=XXXX HEAD~7"
from the previous version.
I should had do Instead: "git send-email --to=XXXX next/master "
Sorry for that :(
Clément
>
> regards,
> o.
>
> > Maxime
>
>
On Mon, Apr 20, 2020 at 02:36:32PM +0200, Clément Péron wrote:
> Hi Ondrej, Maxime,
>
> On Mon, 20 Apr 2020 at 12:39, Ondřej Jirman <[email protected]> wrote:
> >
> > Hi Maxime,
> >
> > On Mon, Apr 20, 2020 at 10:45:47AM +0200, Maxime Ripard wrote:
> > > Hi,
> > >
> > > On Sun, Apr 19, 2020 at 03:50:04PM +0200, Clément Péron wrote:
> > > > Now that required drivers are merged we can contibute on DVFS
> > > > support for Allwinner H6.
> > > >
> > > > This serie is based on Yangtao Li serie[0] and Ondřej Jirman work[1].
> > > >
> > > > Most of the OPP tables are taken from original vendor kernel[2].
> > > > Plus there are new CPU frequencies at 1.6GHz, 1.7GHz and 1.8GHz.
> > > >
> > > > I wrote a simple script to randomly set a frequency during
> > > > a random time[3]. This script is quite stressfull and set some high
> > > > frequency without checking temperature. This can result on behavior
> > > > that whould not occurs with the real cpufreq framework.
> > > > As Maxime point out I also tested with cpufreq-ljt-stress-test
> > > > (found here https://github.com/ssvb/cpuburn-arm).
> > > > This script doesn't trigger any issue.
> > > > I also test that that offlining CPU0 and doing DVFS on other CPUs
> > > > works. As CPU regulator is only set for CPU0.
> > > >
> > > > The GPU devfreq was drop as the regulator is still not properly
> > > > drive by panfrost driver[4].
> > > > I will re-introduce it later.
> > > >
> > > > Ondřej Jirman has an Orange Pi 3, Jernej has a PineH64 and a Tanix
> > > > TX6 boards and I have a Beelink GS1 board so I have enable these
> > > > boards. But CPU Devfreq is really touchy has it depends on:
> > > > board design, SoC speed_grade and environement which can affect
> > > > thermal cooling and have different behavior for different user.
> > > >
> > > > If people can test this serie and give feedback, I will try to
> > > > introduce this in LibreElec tree, so LE community can test it.
> > >
> > > Applied all of them, thanks!
> >
> > Please also apply "[PATCH v2 1/7] arm64: dts: allwinner: h6: Add
> > clock to CPU cores" from the v2 series, otherwise cpufreq will
> > not work.
> >
> > I can also send a missing patch adding the trip points, and cpu
> > as a cooling device, that I linked in my other reply to this patch
> > series afterwards, if Clément wants.
>
> Indeed I have sent using the following cmd : "git send-email --to=XXXX HEAD~7"
> from the previous version.
>
> I should had do Instead: "git send-email --to=XXXX next/master "
>
> Sorry for that :(
I haven't pushed anything yet, can you resend the proper branch?
Thanks!
Maxime
Hi Maxime
On Mon, 20 Apr 2020 at 14:47, Maxime Ripard <[email protected]> wrote:
>
> On Mon, Apr 20, 2020 at 02:36:32PM +0200, Clément Péron wrote:
> > Hi Ondrej, Maxime,
> >
> > On Mon, 20 Apr 2020 at 12:39, Ondřej Jirman <[email protected]> wrote:
> > >
> > > Hi Maxime,
> > >
> > > On Mon, Apr 20, 2020 at 10:45:47AM +0200, Maxime Ripard wrote:
> > > > Hi,
> > > >
> > > > On Sun, Apr 19, 2020 at 03:50:04PM +0200, Clément Péron wrote:
> > > > > Now that required drivers are merged we can contibute on DVFS
> > > > > support for Allwinner H6.
> > > > >
> > > > > This serie is based on Yangtao Li serie[0] and Ondřej Jirman work[1].
> > > > >
> > > > > Most of the OPP tables are taken from original vendor kernel[2].
> > > > > Plus there are new CPU frequencies at 1.6GHz, 1.7GHz and 1.8GHz.
> > > > >
> > > > > I wrote a simple script to randomly set a frequency during
> > > > > a random time[3]. This script is quite stressfull and set some high
> > > > > frequency without checking temperature. This can result on behavior
> > > > > that whould not occurs with the real cpufreq framework.
> > > > > As Maxime point out I also tested with cpufreq-ljt-stress-test
> > > > > (found here https://github.com/ssvb/cpuburn-arm).
> > > > > This script doesn't trigger any issue.
> > > > > I also test that that offlining CPU0 and doing DVFS on other CPUs
> > > > > works. As CPU regulator is only set for CPU0.
> > > > >
> > > > > The GPU devfreq was drop as the regulator is still not properly
> > > > > drive by panfrost driver[4].
> > > > > I will re-introduce it later.
> > > > >
> > > > > Ondřej Jirman has an Orange Pi 3, Jernej has a PineH64 and a Tanix
> > > > > TX6 boards and I have a Beelink GS1 board so I have enable these
> > > > > boards. But CPU Devfreq is really touchy has it depends on:
> > > > > board design, SoC speed_grade and environement which can affect
> > > > > thermal cooling and have different behavior for different user.
> > > > >
> > > > > If people can test this serie and give feedback, I will try to
> > > > > introduce this in LibreElec tree, so LE community can test it.
> > > >
> > > > Applied all of them, thanks!
> > >
> > > Please also apply "[PATCH v2 1/7] arm64: dts: allwinner: h6: Add
> > > clock to CPU cores" from the v2 series, otherwise cpufreq will
> > > not work.
> > >
> > > I can also send a missing patch adding the trip points, and cpu
> > > as a cooling device, that I linked in my other reply to this patch
> > > series afterwards, if Clément wants.
> >
> > Indeed I have sent using the following cmd : "git send-email --to=XXXX HEAD~7"
> > from the previous version.
> >
> > I should had do Instead: "git send-email --to=XXXX next/master "
> >
> > Sorry for that :(
>
> I haven't pushed anything yet, can you resend the proper branch?
Yes, I will,
Thanks!
>
> Thanks!
> Maxime