Repository navigation
Lock Kryo regulator in BHS mode - #16
Merged
Merged
Conversation
jyoung8607
force-pushed
the
ldo-disable
branch
from
February 28, 2022 23:34
5a12a2f to
414610c
Compare
eFiniLan
added a commit
to eFiniLan/openpilot
that referenced
this pull request
Apr 26, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change appears to rescue some boot-looping devices, with success on three of three devices attempted so far. Affected devices will go into fastboot, but not into recovery or normal startup. In the broken state, the device boots up normally until the point CPR3 attempts to do aging measurements, at which point the device freezes and restarts.
Example broken startup from serial console: 01-bad-leeco-boot-initial-state.log
Example working startup after this patch: 05-bad-leeco-successful-boot-ldo-disable.log
As a quick test to see if this patch will work on an affected device, here is a stripped-down NEOS updater that just flashes a patched boot and recovery kernel: https://github.com/jyoung8607/juice-me
I can't completely describe how this change works, or what its effects might be, but it seems relatively safe to run this way considering the Qualcomm developers themselves ran MSM8996 in BHS mode (block head switch vs LDO low-dropout regulator) during early development.
Looking at
/sys/kernel/debug/kryo-regulator/kryo[01]/mode, it sure looks like both healthy and loop-patched LeEcos are running in BHS mode at comma's locked frequency. I also don't see a major change at the upstream switchmode regulator/sys/kernel/debug/regulator/pm8994_s11/voltage, 725000 vs 730000 microvolts on healthy vs loop-patched. So, except to sneak around the problem at the moment of CPR3 aging measurement, there may be no real change.