Update H700 opp values
Subsystems (2)
PATCH 1/1 Update H700 opp values
My H700 (RG35XX-H, RG40XX-V and RG CubeXX) devices are very unstable, especially with some OPPs.
Crashes were fairly easy to reproduce with any dynamic cpufreq governor and some load on CPU, usually in matter of minutes.
Crashes manifested randomly as simply hanging or various kernel oops
Manufacturer (Anbernic) is using more conservative mircrovolt values, so let's use these.
While using performance gov seems stables at 1.5Ghz, it still crashes using a dynamic gov (even with Andre reparenting patch), so let's drop it for now, like manufacturer does.
--- .../dts/allwinner/sun50i-h616-cpu-opp.dtsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +9 -10
@@ -50,24 +50,21 @@ opp-1008000000 { opp-microvolt-speed2 = <950000>; opp-microvolt-speed3 = <950000>; opp-microvolt-speed4 = <1020000>; - opp-microvolt-speed5 = <900000>; + opp-microvolt-speed5 = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; }; opp-1032000000 { opp-hz = /bits/ 64 <1032000000>; - opp-microvolt = <900000>; + opp-microvolt = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x20>; }; opp-1104000000 { opp-hz = /bits/ 64 <1104000000>; - opp-microvolt-speed0 = <1000000>; - opp-microvolt-speed2 = <1000000>; - opp-microvolt-speed3 = <1000000>; - opp-microvolt-speed5 = <950000>; + opp-microvolt = <1000000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };
@@ -79,7 +76,7 @@ opp-1200000000 { opp-microvolt-speed2 = <1050000>; opp-microvolt-speed3 = <1050000>; opp-microvolt-speed4 = <1100000>; - opp-microvolt-speed5 = <1020000>; + opp-microvolt-speed5 = <1050000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; };
@@ -93,7 +90,10 @@ opp-1320000000 { opp-1416000000 { opp-hz = /bits/ 64 <1416000000>; - opp-microvolt = <1100000>; + opp-microvolt-speed0 = <1100000>; + opp-microvolt-speed2 = <1100000>; + opp-microvolt-speed3 = <1100000>; + opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };
@@ -102,9 +102,8 @@ opp-1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt-speed1 = <1100000>; opp-microvolt-speed3 = <1100000>; - opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ - opp-supported-hw = <0x2a>; + opp-supported-hw = <0x0a>; }; }; };
Signature · 1 line
2.46.1
Hi Philippe,
thanks for taking care of sending a patch!
You would need prefixes on the subject line to point to the right subsystem. A "git log path/to/changed_file" would give you the prefix of previous patches, for you to copy from. In this case it would be:
arm64: dts: allwinner: h616: update H700 OPP values
Quoted 6 lines · Philippe Simons
My H700 (RG35XX-H, RG40XX-V and RG CubeXX) devices are very unstable, especially with some OPPs.
Crashes were fairly easy to reproduce with any dynamic cpufreq governor and some load on CPU, usually in matter of minutes.
Crashes manifested randomly as simply hanging or various kernel oops
Quoted 7 lines
Manufacturer (Anbernic) is using more conservative mircrovolt values, so let's use these.
While using performance gov seems stables at 1.5Ghz, it still crashes using a dynamic gov (even with Andre reparenting patch), so let's drop it for now, like manufacturer does.Signed-off-by Philippe Simons <[email protected]
The change itself looks alright, bumping the OPP voltages by 50mV looks reasonable, and is a no-brainer if it stops the issues you have seen.
The loss of the 1.5GHz top OPP is a bummer, but stability comes definitely first, otherwise we will just fail faster ;-)
I would like to hear opinions from Ryan and Chris (both CC:ed). Did you see similar issues with say the ondemand governor?
The patch itself looks correct, so for that:
Cheers,
Andre
Quoted 68 lines
--- .../dts/allwinner/sun50i-h616-cpu-opp.dtsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +9
-10@@ -50,24 +50,21 @@ opp-1008000000 { opp-microvolt-speed2 = <950000>; opp-microvolt-speed3 = <950000>; opp-microvolt-speed4 = <1020000>; - opp-microvolt-speed5 = <900000>; + opp-microvolt-speed5 = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; }; opp-1032000000 { opp-hz = /bits/ 64 <1032000000>; - opp-microvolt = <900000>; + opp-microvolt = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x20>; }; opp-1104000000 { opp-hz = /bits/ 64 <1104000000>; - opp-microvolt-speed0 = <1000000>; - opp-microvolt-speed2 = <1000000>; - opp-microvolt-speed3 = <1000000>; - opp-microvolt-speed5 = <950000>; + opp-microvolt = <1000000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -79,7 +76,7 @@ opp-1200000000 { opp-microvolt-speed2 = <1050000>; opp-microvolt-speed3 = <1050000>; opp-microvolt-speed4 = <1100000>; - opp-microvolt-speed5 = <1020000>; + opp-microvolt-speed5 = <1050000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; };@@ -93,7 +90,10 @@ opp-1320000000 { opp-1416000000 { opp-hz = /bits/ 64 <1416000000>; - opp-microvolt = <1100000>; + opp-microvolt-speed0 = <1100000>; + opp-microvolt-speed2 = <1100000>; + opp-microvolt-speed3 = <1100000>; + opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -102,9 +102,8 @@ opp-1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt-speed1 = <1100000>; opp-microvolt-speed3 = <1100000>; - opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ - opp-supported-hw = <0x2a>; + opp-supported-hw = <0x0a>; }; }; };
Quoted 23 lines · Philippe Simons
My H700 (RG35XX-H, RG40XX-V and RG CubeXX) devices are very unstable, especially with some OPPs.
Crashes were fairly easy to reproduce with any dynamic cpufreq governor and some load on CPU, usually in matter of minutes.
Crashes manifested randomly as simply hanging or various kernel oopsManufacturer (Anbernic) is using more conservative mircrovolt values, so let's use these.
While using performance gov seems stables at 1.5Ghz, it still crashes using a dynamic gov (even with Andre reparenting patch), so let's drop it for now, like manufacturer does.Signed-off-by Philippe Simons <[email protected]--- .../dts/allwinner/sun50i-h616-cpu-opp.dtsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +0
-0
arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi opp-1008000000 { · line 53
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +1
-1@@ -50,24 +50,21 @@ opp-1008000000 { opp-microvolt-speed2 = <950000>; opp-microvolt-speed3 = <950000>; opp-microvolt-speed4 = <1020000>; - opp-microvolt-speed5 = <900000>; + opp-microvolt-speed5 = <950000>;
It seems that you are encountering the issues on this particular binning. Could you mention that in the commit message?
It's not very obvious that H700 == a particular speed bin of H616.
ChenYu
Quoted 57 lines
arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +8
-10clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; }; opp-1032000000 { opp-hz = /bits/ 64 <1032000000>; - opp-microvolt = <900000>; + opp-microvolt = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x20>; }; opp-1104000000 { opp-hz = /bits/ 64 <1104000000>; - opp-microvolt-speed0 = <1000000>; - opp-microvolt-speed2 = <1000000>; - opp-microvolt-speed3 = <1000000>; - opp-microvolt-speed5 = <950000>; + opp-microvolt = <1000000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -79,7 +76,7 @@ opp-1200000000 { opp-microvolt-speed2 = <1050000>; opp-microvolt-speed3 = <1050000>; opp-microvolt-speed4 = <1100000>; - opp-microvolt-speed5 = <1020000>; + opp-microvolt-speed5 = <1050000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; };@@ -93,7 +90,10 @@ opp-1320000000 { opp-1416000000 { opp-hz = /bits/ 64 <1416000000>; - opp-microvolt = <1100000>; + opp-microvolt-speed0 = <1100000>; + opp-microvolt-speed2 = <1100000>; + opp-microvolt-speed3 = <1100000>; + opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -102,9 +102,8 @@ opp-1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt-speed1 = <1100000>; opp-microvolt-speed3 = <1100000>; - opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ - opp-supported-hw = <0x2a>; + opp-supported-hw = <0x0a>; }; }; }; --2.46.1
It seems I was looking at the correct source of instabilities, but not with the correct solution.
incorrect cpu voltages were indeed causing the crashes but only because the cpu regulator was missing the property regulator-ramp-delay. The patch can be discarded, I'll post a new that adds the missing properties on the regulators.
Philippe
Quoted 96 lines · Chen-Yu Tsai
Quoted 23 lines · Philippe Simons
My H700 (RG35XX-H, RG40XX-V and RG CubeXX) devices are very unstable, especially with some OPPs.
Crashes were fairly easy to reproduce with any dynamic cpufreq governor and some load on CPU, usually in matter of minutes.
Crashes manifested randomly as simply hanging or various kernel oopsManufacturer (Anbernic) is using more conservative mircrovolt values, so let's use these.
While using performance gov seems stables at 1.5Ghz, it still crashes using a dynamic gov (even with Andre reparenting patch), so let's drop it for now, like manufacturer does.Signed-off-by Philippe Simons <[email protected]--- .../dts/allwinner/sun50i-h616-cpu-opp.dtsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +0
-0arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi opp-1008000000 { · line 53
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +1
-1@@ -50,24 +50,21 @@ opp-1008000000 { opp-microvolt-speed2 = <950000>; opp-microvolt-speed3 = <950000>; opp-microvolt-speed4 = <1020000>; - opp-microvolt-speed5 = <900000>; + opp-microvolt-speed5 = <950000>;It seems that you are encountering the issues on this particular binning. Could you mention that in the commit message?
It's not very obvious that H700 == a particular speed bin of H616.
ChenYu
Quoted 57 lines
arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +8
-10clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; }; opp-1032000000 { opp-hz = /bits/ 64 <1032000000>; - opp-microvolt = <900000>; + opp-microvolt = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x20>; }; opp-1104000000 { opp-hz = /bits/ 64 <1104000000>; - opp-microvolt-speed0 = <1000000>; - opp-microvolt-speed2 = <1000000>; - opp-microvolt-speed3 = <1000000>; - opp-microvolt-speed5 = <950000>; + opp-microvolt = <1000000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -79,7 +76,7 @@ opp-1200000000 { opp-microvolt-speed2 = <1050000>; opp-microvolt-speed3 = <1050000>; opp-microvolt-speed4 = <1100000>; - opp-microvolt-speed5 = <1020000>; + opp-microvolt-speed5 = <1050000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; };@@ -93,7 +90,10 @@ opp-1320000000 { opp-1416000000 { opp-hz = /bits/ 64 <1416000000>; - opp-microvolt = <1100000>; + opp-microvolt-speed0 = <1100000>; + opp-microvolt-speed2 = <1100000>; + opp-microvolt-speed3 = <1100000>; + opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -102,9 +102,8 @@ opp-1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt-speed1 = <1100000>; opp-microvolt-speed3 = <1100000>; - opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ - opp-supported-hw = <0x2a>; + opp-supported-hw = <0x0a>; }; }; }; --2.46.1
Chris Morgan
Tested-byQuoted 32 lines · Andre Przywara
Hi Philippe,
thanks for taking care of sending a patch!
You would need prefixes on the subject line to point to the right subsystem. A "git log path/to/changed_file" would give you the prefix of previous patches, for you to copy from. In this case it would be:
arm64: dts: allwinner: h616: update H700 OPP valuesQuoted 6 lines · Philippe Simons
My H700 (RG35XX-H, RG40XX-V and RG CubeXX) devices are very unstable, especially with some OPPs.
Crashes were fairly easy to reproduce with any dynamic cpufreq governor and some load on CPU, usually in matter of minutes.
Crashes manifested randomly as simply hanging or various kernel oopsQuoted 7 lines
Manufacturer (Anbernic) is using more conservative mircrovolt values, so let's use these.
While using performance gov seems stables at 1.5Ghz, it still crashes using a dynamic gov (even with Andre reparenting patch), so let's drop it for now, like manufacturer does.Signed-off-by Philippe Simons <[email protected]The change itself looks alright, bumping the OPP voltages by 50mV looks reasonable, and is a no-brainer if it stops the issues you have seen.
The loss of the 1.5GHz top OPP is a bummer, but stability comes definitely first, otherwise we will just fail faster ;-)
I would like to hear opinions from Ryan and Chris (both CC:ed). Did you see similar issues with say the ondemand governor?
Quoted 6 lines
The patch itself looks correct, so for that:
Reviewed-by Andre Przywara <[email protected]>Cheers,
Andre
Issues I've seen with the crashes seem to have been resolved with this
series here: https://lore.kernel.org/all/CADomA4-xTcPyFcX_qCYJwoi7y5vfYmzOfF9iO5MKgEzZdpbJCQ@mail.gmail.com/
That said, I've tested these changes too and noticed no issues with it. It didn't fix any of the issues I've observed but didn't appear to cause any new ones either. I'll add my tested-by since I don't see any new issues it introduces. I've been running them for the past week while I attempt to solve a new regression for the AXP717 in 6.13-rc1.
Quoted 66 lines
Quoted 66 lines
--- .../dts/allwinner/sun50i-h616-cpu-opp.dtsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi +9
-10@@ -50,24 +50,21 @@ opp-1008000000 { opp-microvolt-speed2 = <950000>; opp-microvolt-speed3 = <950000>; opp-microvolt-speed4 = <1020000>; - opp-microvolt-speed5 = <900000>; + opp-microvolt-speed5 = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; }; opp-1032000000 { opp-hz = /bits/ 64 <1032000000>; - opp-microvolt = <900000>; + opp-microvolt = <950000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x20>; }; opp-1104000000 { opp-hz = /bits/ 64 <1104000000>; - opp-microvolt-speed0 = <1000000>; - opp-microvolt-speed2 = <1000000>; - opp-microvolt-speed3 = <1000000>; - opp-microvolt-speed5 = <950000>; + opp-microvolt = <1000000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -79,7 +76,7 @@ opp-1200000000 { opp-microvolt-speed2 = <1050000>; opp-microvolt-speed3 = <1050000>; opp-microvolt-speed4 = <1100000>; - opp-microvolt-speed5 = <1020000>; + opp-microvolt-speed5 = <1050000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x3f>; };@@ -93,7 +90,10 @@ opp-1320000000 { opp-1416000000 { opp-hz = /bits/ 64 <1416000000>; - opp-microvolt = <1100000>; + opp-microvolt-speed0 = <1100000>; + opp-microvolt-speed2 = <1100000>; + opp-microvolt-speed3 = <1100000>; + opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ opp-supported-hw = <0x2d>; };@@ -102,9 +102,8 @@ opp-1512000000 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt-speed1 = <1100000>; opp-microvolt-speed3 = <1100000>; - opp-microvolt-speed5 = <1160000>; clock-latency-ns = <244144>; /* 8 32k periods */ - opp-supported-hw = <0x2a>; + opp-supported-hw = <0x0a>; }; }; };