Skip to content

Lock Kryo regulator in BHS mode - #16

Merged
adeebshihadeh merged 1 commit into
commaai:masterfrom
jyoung8607:ldo-disable
Mar 26, 2022
Merged

adeebshihadeh merged 1 commit into
commaai:masterfrom
jyoung8607:ldo-disable

Conversation

@jyoung8607

@jyoung8607 jyoung8607 commented Feb 28, 2022 •

Copy link
Copy Markdown
Contributor

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.

@jyoung8607 jyoung8607 changed the title Lock Kryo regulator in BSM mode Lock Kryo regulator in BHS mode Feb 28, 2022
@adeebshihadeh
adeebshihadeh merged commit faf6b69 into commaai:master Mar 26, 2022
@jyoung8607
jyoung8607 deleted the ldo-disable branch March 26, 2022 03:26
eFiniLan added a commit to eFiniLan/openpilot that referenced this pull request Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants