2021–05–22: PinePhone kernel
news
There are a bunch of new notable things in my kernel since the last update
2 months ago. I've added some patches from others:
- Patches from Samuel that implement automatic shutdown of CPU cores when idle
(so called cpuidle).
- Samuel's automatic DRAM downclocking patches.
- I've created a patch that disables touchscreen controller during system
sleep reducing power consumption by about 40mW in sleep (and by 130mW when
touching the screen in sleep)
- Lradc wakeup is now disabled by default (lowers the power consumption in
suspend)
- Improved support for sound over HDMI thanks to patches from Jernej
- Samuel's time travel avoidance fix https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210515021439.55316-1-samuel@sholland.org/
. This fixes occasional stalls and system hangs.
And I also continue to tune up and improve my and other drivers:
- My kernel used to force the 500mA input current limit on boot, during
anx7688 driver probe. This was removed, so if you boot the phone with 1.5A dumb
charger connected, it should charge at 1.5A without the need to re-connect the
charger.
- I've added suspend/resume support to anx7688 driver, which fixed some issues
caused by this driver ignoring the suspend/resume cycle previously.
- I've patched the wifi driver Makefile so that it wifi driver no longer
prevents dynticks from working. („NOHZ tick-stop error: Non-RCU local softirq
work is pending, handler #08!!!“)
- I've reverted my patches that added fine tuned OCV based capacity reporting
based on table in DT. PMIC is not reporting OCV correctly so it's not possible
to calculate capacity from OCV voltage in the driver. This fixes battery
capacity reporting. No more wild jumps in reported capacity based on load or
when plugging in the charger.
- I've patched up the kernel so that boot works with fw_devlink=on which is
the default in Linux 5.13
- I've fixed headset button handling and jack/mic plug in/plug out detection.
It should be much more reliable now. (less spurious key presses on plug-in or
when releasing a key) Fix is currenlty only in my 5.13 branch until it gets
tested by more people.
I've also done more power draw measurements a few weeks ago (that's where
the before/after pictures linked above are from), and pinephone's power
consumption in suspend is now around 60mW with modem off. Modem usually adds
another 10–15mW. So with 11Wh battery, that means around 6 day standby, if
that's all you do with the phone. :)
Overall 5.12 and 5.13 in my tree should be working quite well at this time!
Samuel's time travel fix („clocksource/arm_arch_timer: Improve Allwinner A64
timer workaround“) seem to have solved the last stability issues I had with
some of the pinephones I have access to. Things look pretty bright!
There are still some HDMI issues some people keep reporting, that manifest
themselves by anx7688 firmware not getting past „DP status = 0×03“ (it
should go from 0 all the way to 6 normally). When this happens it's caused by
HDMI controller inside the SoC using incorrect clock frequency, and anx7688
fails to acquire the HDMI signal from the SoC. It should be easy to fix, but
I have trouble reproducing it with my kernel and userspace, so I can't
identify the root of the problem, yet.
I've also worked on musb DMA support, and I got quite far (my current work
is here https://megous.com/git/linux/log/?h=musb-sunxi-dma-wip).
It seems that DMA controller works (I can see DMA completion interrupts getting
triggered), but integration of DMA driver with mainline musb driver is a bit
complicated, and the only documentation is the existing BSP code. Musb seemingly
has nice abstraction for supporting various DMA drivers, until you look closer
and realize that musb core has many code paths that change how things are done
based on what DMA driver is used. So in the end the interface between musb core
and DMA drivers is quite messy. :(