megi's PinePhone Development Log RSS

+972

2021–10–21: Pinephone Pro – levinboot payload selection

I've extended Levinboot with support for chosing which payload to boot based on status of volume keys. Levinboot will also report which payload was booted using LED color. Ordering of payloads is based on physical location of volume keys, thus:

Here's a little demo:

With this setup it's easy to quickly try new kernel changes without any worry, and without having to swap uSD cards or open the phone ever again. The feeback cycle from code change to a booted kernel can be as fast as 10s, which makes for very pleasant development experience.

5.15 kernel fixed

I've managed to identify the cause for boot hangs on 5.15 kernel. The hang happens in of_platform_default_populate when processing the newly added debug@fe610000 (arm coresight) DT nodes (specifically the ones for the big ARM cores).

Precise reason is unknown to me, but I can live without the coresight support, so I commented those nodes out, and the 5.15 kernel now boots fine.

This allowed me to start playing with camera sensors support. I tried to add as much necessary support for the cameras as possible, and found a few issues in the process:

I've pushed my changes to my kernel tree to various branches. I've added DT changes that should match the hardware, but for some reason cameras don't work yet and will need more debugging.

I've also found out that SD card power supply was wrongly defined in the DT. Interestingly a lot of regulators in the phone are enabled automatically by chaining output of one regulator to the enable pin of the dependent regulator. This was the case with SD card regulator, too.