Skip to contentSkip to conversation

arm64: dts: mediatek: mt8192-asurada: Add ramp-delay for MT6315 regulators

PATCH Applied Chen-Yu Tsai 3 participants 7 messages Oct 30 – Nov 19

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm64: dts: mediatek: mt8192-asurada: Add ramp-delay for MT6315 regulators

On Asurada, the MT6315 buck regulators (Vbcpu, Vlcpu, and Vgpu) are missing the regulator-ramp-delay property. Without the slew rate specified, voltage increases may not have settled before switching CPU or GPU to higher operating points, risking undervoltage crashes.

Add regulator-ramp-delay properties matching the slew rates configured by firmware, with values provided by MediaTek: 8000 uV/us for Vbcpu, and 4500 uV/us for Vlcpu and Vgpu.

Fixes 3183cb62b033 ("arm64: dts: mediatek: asurada: Add SPMI regulators")

---
Patch created with LLM. Values were translated from raw register values by MediaTek.

---
 arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +3 -0
index d1993b80f9ce..43286241cd22 100644
@@ -1812,6 +1812,7 @@ mt6315_6_vbuck1: vbuck1 {
 				regulator-min-microvolt = <400000>;
 				regulator-max-microvolt = <1193750>;
 				regulator-enable-ramp-delay = <256>;
+				regulator-ramp-delay = <8000>;
 				regulator-allowed-modes = <0 1 2>;
 				regulator-always-on;
 			};
@@ -1821,6 +1822,7 @@ mt6315_6_vbuck3: vbuck3 {
 				regulator-min-microvolt = <400000>;
 				regulator-max-microvolt = <1193750>;
 				regulator-enable-ramp-delay = <256>;
+				regulator-ramp-delay = <4500>;
 				regulator-allowed-modes = <0 1 2>;
 				regulator-always-on;
 			};
@@ -1841,6 +1843,7 @@ mt6315_7_vbuck1: vbuck1 {
 				regulator-min-microvolt = <400000>;
 				regulator-max-microvolt = <800000>;
 				regulator-enable-ramp-delay = <256>;
+				regulator-ramp-delay = <4500>;
 				regulator-allowed-modes = <0 1 2>;
 				regulator-coupled-with = <&mt6359_vsram_others_ldo_reg>;
 				regulator-coupled-max-spread = <10000>;
Signature · 1 line
2.56.0.317.g454f8302e1-goog
#1 lore raw

PATCH 2/3 arm64: dts: mediatek: mt8195-cherry: Fix ramp-delay for Vgpu

On Cherry, the MT6315 PMIC at USID 0x7 powering Vgpu has its slew rate configured by firmware to 4500 uV/us, rather than the 6250 uV/us currently specified in the device tree.

Since regulator-ramp-delay is specified in uV/us, specifying a higher slew rate than what the PMIC actually uses results in an underestimated voltage ramp time, risking GPU undervoltage when switching to higher operating points.

Update regulator-ramp-delay on mt6315_7_vbuck1 to 4500 to match the configured slew rate provided by MediaTek. (Vbcpu on USID 0x6 is configured to 6250 uV/us and needs no change.)

Fixes 260c04d425eb ("arm64: dts: mediatek: cherry: Enable MT6315 regulators on SPMI bus")

---
Patch created with LLM. Values were translated from raw register values by MediaTek.

---
 arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +1 -1
index f23a0c7aa87e..81628d8a4b0e 100644
@@ -1596,7 +1596,7 @@ mt6315_7_vbuck1: vbuck1 {
 				regulator-min-microvolt = <400000>;
 				regulator-max-microvolt = <1193750>;
 				regulator-enable-ramp-delay = <256>;
-				regulator-ramp-delay = <6250>;
+				regulator-ramp-delay = <4500>;
 				regulator-allowed-modes = <0 1 2>;
 			};
 		};
Signature · 1 line
2.56.0.317.g454f8302e1-goog
#2 lore raw

PATCH 3/3 arm64: dts: mediatek: mt8186-corsola-voltorb: Add MT6319 ramp-delay

In reply to Chen-Yu Tsai

On Voltorb and Squirtle, the MT6319 buck1 regulator supplying the big CPU cluster is missing the regulator-ramp-delay property. Without the slew rate specified, voltage increases may not have settled before switching the big CPU cluster to higher operating points, risking undervoltage crashes.

Firmware configures the MT6319 slew rate on these designs to 6250 uV/us, with the value provided by MediaTek. Add regulator-ramp-delay = <6250> to mt6319_buck1.

Fixes 321ad586e607 ("arm64: dts: mediatek: Add MT8186 Voltorb Chromebooks")

---
Patch created with LLM. Values were translated from raw register values by MediaTek.

---
 arch/arm64/boot/dts/mediatek/mt8186-corsola-voltorb.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/mediatek/mt8186-corsola-voltorb.dtsi +1 -0
index 0250b4eeadd4..2ec343f49da3 100644
@@ -84,6 +84,7 @@ mt6319_buck1: vbuck1 {
 					regulator-min-microvolt = <600000>;
 					regulator-max-microvolt = <1193750>;
 					regulator-enable-ramp-delay = <256>;
+					regulator-ramp-delay = <6250>;
 					regulator-allowed-modes = <0 1 2>;
 					regulator-always-on;
 			};
Signature · 1 line
2.56.0.317.g454f8302e1-goog
#3 lore raw
In reply to Chen-Yu Tsai
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] arm64: dts: mediatek: swapped regulator-ramp-delay for Vbcpu and Vlcpu --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: mediatek: swapped regulator-ramp-delay for Vbcpu and Vlcpu --

commit 810dcac6146b830cb56f853c88e0887dc012ef9d
Author: Chen-Yu Tsai <[email protected]>

arm64: dts: mediatek: mt8192-asurada: Add ramp-delay for MT6315 regulators

This commit adds regulator-ramp-delay properties for the MT6315 buck regulators (Vbcpu, Vlcpu, and Vgpu) on Asurada to ensure voltage increases settle before switching CPU or GPU to higher operating points.

Quoted 13 lines
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +1 -0
index 40d34b16dc807..68d84fc55767b 100644
@@ -1500,6 +1500,7 @@ mt6315_6_vbuck1: vbuck1 {
 				regulator-min-microvolt = <400000>;
 				regulator-max-microvolt = <1193750>;
 				regulator-enable-ramp-delay = <256>;
+				regulator-ramp-delay = <4500>;
 				regulator-allowed-modes = <0 1 2>;
 				regulator-always-on;
 			};

arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi mt6315_6_vbuck3: vbuck3 { · line 1513

Quoted 4 lines
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +1 -0
@@ -1509,6 +1510,7 @@ mt6315_6_vbuck3: vbuck3 {
 				regulator-min-microvolt = <400000>;
 				regulator-max-microvolt = <1193750>;
 				regulator-enable-ramp-delay = <256>;
+				regulator-ramp-delay = <8000>;

[Severity: High]
Are the regulator-ramp-delay values for mt6315_6_vbuck1 and mt6315_6_vbuck3 swapped here?

The commit message states that the slew rates are 8000 uV/us for Vbcpu, and 4500 uV/us for Vlcpu and Vgpu. However, in mt8192-asurada.dtsi, mt6315_6_vbuck1 is Vbcpu and mt6315_6_vbuck3 is Vlcpu:

	mt6315_6_vbuck1: vbuck1 {
		regulator-name = "Vbcpu";
		...
		regulator-ramp-delay = <4500>;
		...
	};

	mt6315_6_vbuck3: vbuck3 {
		regulator-name = "Vlcpu";
		...
		regulator-ramp-delay = <8000>;
		...
	};

Because mt6315_volt_range_ops does not implement .set_ramp_delay, _regulator_set_voltage_time() uses constraints->ramp_delay directly to compute the settling wait time during cpufreq DVFS transitions. Assigning 8000 to Vlcpu when its hardware slew rate is 4500 uV/us causes the regulator core to wait for less than the required voltage ramp time before scaling the little CPU cluster frequency up, while waiting longer than needed on Vbcpu.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#4 lore raw
Quoted 23 lines · On Fri, Oct 30, 2026 at 6:41 PM <[email protected]> wrote:

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] arm64: dts: mediatek: swapped regulator-ramp-delay for Vbcpu and Vlcpu --

commit 810dcac6146b830cb56f853c88e0887dc012ef9d
Author: Chen-Yu Tsai <[email protected]>

arm64: dts: mediatek: mt8192-asurada: Add ramp-delay for MT6315 regulators

This commit adds regulator-ramp-delay properties for the MT6315 buck regulators (Vbcpu, Vlcpu, and Vgpu) on Asurada to ensure voltage increases settle before switching CPU or GPU to higher operating points.

Quoted 9 lines
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +1 -0
index 40d34b16dc807..68d84fc55767b 100644
@@ -1500,6 +1500,7 @@ mt6315_6_vbuck1: vbuck1 {
                              regulator-min-microvolt = <400000>;
                              regulator-max-microvolt = <1193750>;
                              regulator-enable-ramp-delay = <256>;
+                             regulator-ramp-delay = <4500>;
Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi mt6315_6_vbuck3: vbuck3 { · line 1513

Quoted 8 lines
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +1 -0
                              regulator-allowed-modes = <0 1 2>;
                              regulator-always-on;
                      };
@@ -1509,6 +1510,7 @@ mt6315_6_vbuck3: vbuck3 {
                              regulator-min-microvolt = <400000>;
                              regulator-max-microvolt = <1193750>;
                              regulator-enable-ramp-delay = <256>;
+                             regulator-ramp-delay = <8000>;

It seems like Sashiko applied the patch incorrectly. I see why that is
possible: the .dtsi file gives the same default values for all the regulators.

Quoted 31 lines

[Severity: High]
Are the regulator-ramp-delay values for mt6315_6_vbuck1 and mt6315_6_vbuck3 swapped here?

The commit message states that the slew rates are 8000 uV/us for Vbcpu, and 4500 uV/us for Vlcpu and Vgpu. However, in mt8192-asurada.dtsi, mt6315_6_vbuck1 is Vbcpu and mt6315_6_vbuck3 is Vlcpu:

        mt6315_6_vbuck1: vbuck1 {
                regulator-name = "Vbcpu";
                ...
                regulator-ramp-delay = <4500>;
                ...
        };

        mt6315_6_vbuck3: vbuck3 {
                regulator-name = "Vlcpu";
                ...
                regulator-ramp-delay = <8000>;
                ...
        };

Because mt6315_volt_range_ops does not implement .set_ramp_delay, _regulator_set_voltage_time() uses constraints->ramp_delay directly to compute the settling wait time during cpufreq DVFS transitions. Assigning 8000 to Vlcpu when its hardware slew rate is 4500 uV/us causes the regulator core to wait for less than the required voltage ramp time before scaling the little CPU cluster frequency up, while waiting longer than needed on Vbcpu.

--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1

maintainer Applied
#5 lore raw
In reply to Chen-Yu Tsai
Quoted 10 lines · Chen-Yu Tsai

On Asurada, the MT6315 buck regulators (Vbcpu, Vlcpu, and Vgpu) are missing the regulator-ramp-delay property. Without the slew rate specified, voltage increases may not have settled before switching CPU or GPU to higher operating points, risking undervoltage crashes.

Add regulator-ramp-delay properties matching the slew rates configured by firmware, with values provided by MediaTek: 8000 uV/us for Vbcpu, and 4500 uV/us for Vlcpu and Vgpu.

[...]

Applied to v7.4-next/dts64, thanks!

[1/3] arm64: dts: mediatek: mt8192-asurada: Add ramp-delay for MT6315 regulators

      commit: 9c9f83e3368d27d1e0ba55827a171ebf551c3d0c
[2/3] arm64: dts: mediatek: mt8195-cherry: Fix ramp-delay for Vgpu
      commit: 04560888cde5fd8adc325a6ce47466f80b8c668f
[3/3] arm64: dts: mediatek: mt8186-corsola-voltorb: Add MT6319 ramp-delay
      commit: 929638df9f3b36665efd60ac71f1eed4ba36a0a5

Cheers,
Angelo

#6 lore raw
Quoted 11 lines · AngeloGioacchino Del Regno
Quoted 9 lines · Chen-Yu Tsai

On Asurada, the MT6315 buck regulators (Vbcpu, Vlcpu, and Vgpu) are missing the regulator-ramp-delay property. Without the slew rate specified, voltage increases may not have settled before switching CPU or GPU to higher operating points, risking undervoltage crashes.

Add regulator-ramp-delay properties matching the slew rates configured by firmware, with values provided by MediaTek: 8000 uV/us for Vbcpu, and 4500 uV/us for Vlcpu and Vgpu.

Quoted 6 lines
Quoted 1 line

[...]

Applied to v7.4-next/dts64, thanks!

[1/3] arm64: dts: mediatek: mt8192-asurada: Add ramp-delay for MT6315 regulators

      commit: 9c9f83e3368d27d1e0ba55827a171ebf551c3d0c

It looks like commit 9c9f83e3368d27d1e0ba55827a171ebf551c3d0c ("arm64: dts:
mediatek: mt8192-asurada: Add ramp-delay for MT6315 regulators") ended up with the regulator-ramp-delay values for Vbcpu and Vlcpu swapped:

- mt6315_6_vbuck1 (Vbcpu) got regulator-ramp-delay = <4500> (should be 8000)
- mt6315_6_vbuck3 (Vlcpu) got regulator-ramp-delay = <8000> (should be 4500)

Do you want me to send a followup patch to swap them around, or do you want to handle it and fix it up directly in your tree?

Thanks,
ChenYu

Quoted 9 lines

[2/3] arm64: dts: mediatek: mt8195-cherry: Fix ramp-delay for Vgpu

      commit: 04560888cde5fd8adc325a6ce47466f80b8c668f
[3/3] arm64: dts: mediatek: mt8186-corsola-voltorb: Add MT6319 ramp-delay
      commit: 929638df9f3b36665efd60ac71f1eed4ba36a0a5

Cheers,
Angelo