allow core voltage setting

old-commit-hash: 36d7a86579613c19c1265227f3e3a4704ecbeadb
This commit is contained in:
George Hotz
2021-04-22 19:42:20 -07:00
parent 5b31cc281c
commit 59fb5c6a72
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import os
import sys
import time
print("starting at")
@@ -9,9 +10,14 @@ print("volts")
os.system("echo 99e8000.cpr3-ctrl > /sys/devices/soc/spm-regulator-10/regulator/regulator.56/99e8000.cpr3-ctrl-vdd/driver/unbind")
os.system("echo 1 > /sys/kernel/debug/regulator/pm8994_s11/enable")
for i in range(900000, 465000, -10000):
print("setting voltage to",i)
if len(sys.argv) > 1:
i = int(sys.argv[1])
os.system("echo %d %d > /sys/kernel/debug/regulator/pm8994_s11/voltage" % (i,i))
time.sleep(1)
os.system("cat /sys/kernel/debug/regulator/pm8994_s11/voltage")
else:
for i in range(900000, 465000, -10000):
print("setting voltage to",i)
os.system("echo %d %d > /sys/kernel/debug/regulator/pm8994_s11/voltage" % (i,i))
os.system("cat /sys/kernel/debug/regulator/pm8994_s11/voltage")
time.sleep(1)