PMIC ADC and Thermals

In this short post, I’ll share what I learned setting up ADC (analog-digital converter, used for measuring temp and voltage) and Thermal Monitor (notify kernel when stuff gets hot). Setup From what I can gather this applies to QCom SoCs/PMICs, so keep that in mind before you fry your non-QCom device. SoCs have a few… Continue reading PMIC ADC and Thermals

Regulators (SPMI/SMD)

Overview Regulators are responsible for providing power to various components. It is the last essential piece of the puzzle for early mainlining, that will lay the groundwork for the rest of the port. NOTE: These instructions apply for SPMI/SMD regulators, I haven’t researched in depth the other combinations (newer higher end chips user RPMH in… Continue reading Regulators (SPMI/SMD)

UFS phy driver

Overview UFS stands for Universal Flash Storage, and is a replacement (or enhancement) over SD protocol for storage. The hardware is present for 2-3 years in phones now but most likely lacks any actual storage attached, so it wasn’t really necessary to concern oneself with UFS for mainlining up until recently. It contains a core… Continue reading UFS phy driver

RPM power domains (rpmpd)

Overview On downstream power domains and regular regulators are somewhat mixed together (like this). On mainline, power domains go in one place and regulators in another, because it turns out, they are completely different beasts. I can’t really explain what the difference is, but power domains are like a cooktop you can configure from 0… Continue reading RPM power domains (rpmpd)

Running stock kernel on PostmarketOS

Why are we doing this? In last post we finished by testing our newly build stock kernel. We used stock Android userspace, which is not ideal, because when we start actual mainlining the userspace will be PostmarketOS, so it would be good if we had some indication that the userspace was OK (so we’re not… Continue reading Running stock kernel on PostmarketOS

Building stock kernel

The next step in mainlining is to build the original/stock/downstream kernel. We’ll use it as a reference point and to extract additional details when the need arises. The stock kernel’s source is provided by the manufacturer, so building it should be relatively easy. Overview This shouldn’t be complicated, here is the battle plan: find and… Continue reading Building stock kernel

Rooting device and extracting data

Disclaimer Performing the actions in this (and following) posts might damage your device. Do it at your own risk on a device that you own. You’ll also likely lose warranty, if the device is still covered. You have been warned. Less destructive attempts It might be weird to some, but I have actually never had… Continue reading Rooting device and extracting data