riscv: dts: spacemit: fix maximum CPU core voltage for K1 boards
Subsystems (4)
cover riscv: dts: spacemit: fix maximum CPU core voltage for K1 boards
The SpacemiT K1 based boards use the SpacemiT P1 PMIC. The buck1 and buck2 voltage regulators supply the CPU core voltage. They are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
This patch series set the maximum regulator voltage to 1.050V instead. There is one patch per board in order to ease backporting to older kernel versions.
Aurelien Jarno (6):
riscv: dts: spacemit: k1-bananapi-f3: fix maximum CPU core voltage
riscv: dts: spacemit: k1-milkv-jupiter: fix maximum CPU core voltage
riscv: dts: spacemit: k1-orangepi-rv2: fix maximum CPU core voltage
riscv: dts: spacemit: k1-musepi-pro: fix maximum CPU core voltage
riscv: dts: spacemit: k1-orangepi-r2s: fix maximum CPU core voltage
riscv: dts: spacemit: k1-bananapi-cm6: fix maximum CPU core voltage
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 4 ++-- arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
2.53.0
PATCH 1/6 riscv: dts: spacemit: k1-bananapi-f3: fix maximum CPU core voltage
On the Banana Pi BPI-F3 board, the buck1 and buck2 voltage regulators, which supply the CPU core voltage, are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
Set the maximum regulator voltage to 1.050V instead.
--- arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +2 -2
@@ -237,14 +237,14 @@ pmic@41 { regulators { buck1_0v9: buck1 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH 1/6] riscv: dts: spacemit: k1-bananapi-f3: fix maximum CPU core voltage
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [Critical] Incomplete fix leaves other K1 boards vulnerable to permanent CPU damage due to dangerous regulator limits.
- [High] buck2 is orphaned from the CPU scaling topology, risking undervoltage crashes or hardware damage. --
--- Patch [1]: [PATCH 1/6] riscv: dts: spacemit: k1-bananapi-f3: fix maximum CPU core voltage --- commit 7fc7f69c1396ecd57da9622a68f4d3d15ff81423
Author: Aurelien Jarno <[email protected]> Date: Wed Jul 29 15:02:18 2026 +0000
riscv: dts: spacemit: k1-bananapi-f3: fix maximum CPU core voltage
This patch lowers the maximum CPU core voltage on the Banana Pi BPI-F3 from 3.45V to 1.050V. This prevents potential permanent CPU damage that could occur if a bug or privileged user requests a voltage above the safe limit.
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts pmic@41 { · line 240
Quoted 10 lines
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +1
-1@@ -237,14 +237,14 @@ pmic@41 { regulators { buck1_0v9: buck1 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>;
[Severity: Critical]
This is a pre-existing issue, but since this patch correctly identifies that setting regulator-max-microvolt to 3.45V for the K1 CPU core regulators can cause permanent physical damage, should this fix also be applied to the other boards using the same K1 SoC?
Looking at the other device trees like k1-milkv-jupiter.dts and k1-orangepi-rv2.dts, they still permit 3.45V on the buck1 and buck2 rails:
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts:
buck1 {
regulator-max-microvolt = <3450000>;arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts:
buck1 {
regulator-max-microvolt = <3450000>;Could this incomplete fix leave these other boards vulnerable to the same hardware damage from an OPP misconfiguration or privileged userspace request?
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts pmic@41 { · line 247
Quoted 8 lines
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +1
-1regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>;
[Severity: High]
This is a pre-existing issue, but since this commit confirms both buck1 and buck2 supply the CPU core voltage, does the current CPU scaling topology properly manage buck2?
In k1-bananapi-f3.dts, all eight CPUs currently point to buck1:
cpu_4: cpu@4 {
...
cpu-supply = <&buck1_0v9>;If buck2 powers cluster 1, will scaling cluster 1 erroneously scale buck1 instead, leaving buck2 at a low boot voltage and causing cluster 1 to crash?
Alternatively, if buck1 and buck2 are physically tied together to share the load, would leaving buck2 unmanaged while scaling buck1 cause severe cross-conduction current between the regulators?
Quoted 3 lines
arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +0
-0regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
PATCH 2/6 riscv: dts: spacemit: k1-milkv-jupiter: fix maximum CPU core voltage
In reply to Aurelien JarnoOn the Milk-V Jupiter board, the buck1 and buck2 voltage regulators, which supply the CPU core voltage, are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
Set the maximum regulator voltage to 1.050V instead.
--- arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts +2 -2
@@ -211,14 +211,14 @@ pmic@41 { regulators { buck1 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH 2/6] riscv: dts: spacemit: k1-milkv-jupiter: fix maximum CPU core voltage
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The unsafe maximum voltage limit (3.45V) for CPU core regulators buck1 and buck2 remains unpatched on several other SpacemiT K1 boards. --
--- Patch [2]: [PATCH 2/6] riscv: dts: spacemit: k1-milkv-jupiter: fix maximum CPU core voltage --- commit 2f0408a9b68518bed697666281e9fbe48abb583b
Author: Aurelien Jarno <[email protected]>
Subject: riscv: dts: spacemit: k1-milkv-jupiter: fix maximum CPU core voltage
This commit lowers the maximum regulator voltage for buck1 and buck2 on the Milk-V Jupiter board from 3.45V to 1.050V. This prevents potential permanent CPU damage from accidental overvoltage requests.
Quoted 8 lines
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts +0
-0@@ -211,14 +211,14 @@ pmic@41 { regulators { buck1 { regulator-min-microvolt = <500000>;
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts pmic@41 { · line 221
Quoted 10 lines
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts +2
-2- regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>;
[Severity: High]
This is a pre-existing issue, but this commit only fixes the maximum voltage for the Milk-V Jupiter board. Does this same CPU core overvoltage risk exist on the other SpacemiT K1 boards?
The unsafe regulator-max-microvolt = <3450000> limit for buck1 and buck2 is still present in several other device trees that share the same SoC and PMIC layout:
- arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi
- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts
- arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts
- arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
Should these boards also have their limits updated to 1050000 to prevent potential CPU damage from kernel misconfigurations or a privileged userspace writing to the regulator sysfs interface?
Quoted 3 lines
arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts +0
-0regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
PATCH 3/6 riscv: dts: spacemit: k1-orangepi-rv2: fix maximum CPU core voltage
In reply to Aurelien JarnoOn the OrangePi RV2 board, the buck1 and buck2 voltage regulators, which supply the CPU core voltage, are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
Set the maximum regulator voltage to 1.050V instead.
--- arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts +2 -2
@@ -164,14 +164,14 @@ pmic@41 { regulators { buck1 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
2.53.0
PATCH 4/6 riscv: dts: spacemit: k1-musepi-pro: fix maximum CPU core voltage
In reply to Aurelien JarnoOn the MusePi Pro board, the buck1 and buck2 voltage regulators, which supply the CPU core voltage, are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
Set the maximum regulator voltage to 1.050V instead.
--- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts +2 -2
@@ -180,14 +180,14 @@ pmic@41 { regulators { buck1 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
2.53.0
PATCH 5/6 riscv: dts: spacemit: k1-orangepi-r2s: fix maximum CPU core voltage
In reply to Aurelien JarnoOn the OrangePi R2S board, the buck1 and buck2 voltage regulators, which supply the CPU core voltage, are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
Set the maximum regulator voltage to 1.050V instead.
--- arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts +2 -2
@@ -134,14 +134,14 @@ pmic@41 { regulators { buck1 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
2.53.0
[email protected]
AI reviewRe: [PATCH 5/6] riscv: dts: spacemit: k1-orangepi-r2s: fix maximum CPU core voltage
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The CPU core voltage limit in the Banana Pi CM6 devicetree remains at a dangerously high 3.45V, risking permanent hardware damage. --
--- Patch [5]: [PATCH 5/6] riscv: dts: spacemit: k1-orangepi-r2s: fix maximum CPU core voltage --- commit e89342d2210b8ee4353584159b6747437181135a
Author: Aurelien Jarno <[email protected]>
Subject: riscv: dts: spacemit: k1-orangepi-r2s: fix maximum CPU core voltage
This commit lowers the maximum output voltage of the buck1 and buck2 regulators on the OrangePi R2S board from 3.45V to 1.050V. This prevents potential permanent CPU damage from misconfigurations or privileged userspace requests.
Quoted 4 lines
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts +0
-0
[ ... ]
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts pmic@41 { · line 147
Quoted 7 lines
arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts +1
-1buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; };
[Severity: High]
This is a pre-existing issue, but I noticed the Banana Pi CM6 devicetree appears to retain the same 3.45V maximum voltage limit for its CPU core regulators.
Should arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi also be updated to prevent similar hardware damage risks?
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi:
buck1 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3450000>;
regulator-ramp-delay = <5000>;
regulator-always-on;
};
buck2 {
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <3450000>;Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
PATCH 6/6 riscv: dts: spacemit: k1-bananapi-cm6: fix maximum CPU core voltage
In reply to Aurelien JarnoOn the Banana Pi BPI-CM6 module, the buck1 and buck2 voltage regulators, which supply the CPU core voltage, are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
Set the maximum regulator voltage to 1.050V instead.
--- arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi +2 -2
@@ -114,14 +114,14 @@ pmic@41 { regulators { buck1 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; }; buck2 { regulator-min-microvolt = <500000>; - regulator-max-microvolt = <3450000>; + regulator-max-microvolt = <1050000>; regulator-ramp-delay = <5000>; regulator-always-on; };
Signature · 1 line
2.53.0
Quoted 19 lines · Aurelien Jarno
The SpacemiT K1 based boards use the SpacemiT P1 PMIC. The buck1 and buck2 voltage regulators supply the CPU core voltage. They are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
This patch series set the maximum regulator voltage to 1.050V instead. There is one patch per board in order to ease backporting to older kernel versions.
Aurelien Jarno (6):
riscv: dts: spacemit: k1-bananapi-f3: fix maximum CPU core voltage
riscv: dts: spacemit: k1-milkv-jupiter: fix maximum CPU core voltage
riscv: dts: spacemit: k1-orangepi-rv2: fix maximum CPU core voltage
riscv: dts: spacemit: k1-musepi-pro: fix maximum CPU core voltage
riscv: dts: spacemit: k1-orangepi-r2s: fix maximum CPU core voltage
riscv: dts: spacemit: k1-bananapi-cm6: fix maximum CPU core voltage
Quoted 8 lines
arch/riscv/boot/dts/spacemit/k1-bananapi-cm6.dtsi | 4 ++-- arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-musepi-pro.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-orangepi-r2s.dts | 4 ++-- arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
Yixun Lan (dlan)
Quoted 8 lines · Aurelien Jarno
The SpacemiT K1 based boards use the SpacemiT P1 PMIC. The buck1 and buck2 voltage regulators supply the CPU core voltage. They are configured with a maximum output voltage of 3.45V, while the highest operating point requires only 1.050V. This means that a kernel bug, OPP misconfiguration, or privileged userspace could request a voltage above the safe operating limit, causing possible permanent CPU damage.
[...]
Applied, thanks!
[1/6] riscv: dts: spacemit: k1-bananapi-f3: fix maximum CPU core voltage
https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=b496282ee4ad07311a13489e15b74fb7078d9a01 [2/6] riscv: dts: spacemit: k1-milkv-jupiter: fix maximum CPU core voltage https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=56a77ddae794ca0516fc146f6e59bb8cdf4fd9d2 [3/6] riscv: dts: spacemit: k1-orangepi-rv2: fix maximum CPU core voltage https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=ae0c38f0a24f95c8759b6b0eaaa5a0d36a7c6af2 [4/6] riscv: dts: spacemit: k1-musepi-pro: fix maximum CPU core voltage https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=f045253a03589b2616332560b4120e584342a987 [5/6] riscv: dts: spacemit: k1-orangepi-r2s: fix maximum CPU core voltage https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=d66267c35032c46c18b675601d03c80239bcd913 [6/6] riscv: dts: spacemit: k1-bananapi-cm6: fix maximum CPU core voltage https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=a65e9b73b0f0f33078b63f039b3ff64af051a11f
Best regards,
Signature · 1 line
Yixun Lan <[email protected]>