I’ve been writing a software tool, which I call rk2aw, to fix all these issues for good on several Rockchip SoCs, including RK3399, RK3566 and RK3588. It allows you to have multiple bootloaders in SPI NOR flash, it reverses boot order so that microSD card is tried first if present, it adds a single button/LED UI which is realizable on almost every Rockchip SBC in uniform way, and it adds some device specific improvements like preventing boot when powerup happens due to USB power insertion, and not a power button press.
Yes, I already saw that description of the rk2aw features. Presumably, rk2aw detects the power-ups caused by plugging in a USB charger and simply turns the device off. I don’t see what else rk2aw could do, because it acts as a pre-boot loader, so to speak, by adjusting the boot-related Rockchip BROM functions.
However, I don’t think that’s the best way to handle charger-initiated power-ups, simply because virtually all smartphones and tablets, old or modern, turn on automatically when a charger is plugged into them and then go into their charge-only modes. That’s why the PinePhone’s AXP803 PMIC, for example, actually behaves that way – it was designed to be used in mobile devices.
Just a brief update… Although I unfortunately haven’t recovered fully yet, I’ve managed to get very close to having almost a dozen of Linux kernel and U-Boot patches submitted upstream. I’m pretty sure that the patches will be accepted, and despite them not being PinePhone-related, they should help a lot when the time comes for submitting more complex PinePhone patches upstream.
I’ve been active as a contributor to Manjaro ARM for a while, by contributing to various packages, then the things took a slightly different turn on my side, after which I unfortunately had some impactful health issues, and now I’m back by contributing various patches to upstream projects.
Update, January 26, 2024: Unfortunately, I’ve been sick again, this time for about a month. I’ve contracted some really nasty kind of flu that has found its way into my lungs, causing a real mess. I’m still recovering.
I’m happy to report that a few of my Linux kernel patches have been accepted upstream, with quite detailed and informative patch descriptions, especially when it comes to the descriptions of the RK356x and Pinebook Pro patches:
config: really keep value-internal whitespace verbatim (this patch fixes a 15-year-old bug in the way Git parses configuration option values found in configuration files, so this bugfix touches virtually every execution of any Git utility; as a result, soon everyone will execute some of my code whenever they run any Git command, which I find rather neat)
More U-Boot patches are on their way to the U-Boot mailing list, and there are already more Git patches awaiting merging on the mailing list. I’ll keep updating this post as more patches become accepted upstream.
I’ve been also quite active with reviewing other people’s patches on the mailing lists, which is another great way to contribute and learn at the same time.
There’s one particularly interesting patch series on the linux-rockchip mailing list that I’ve been participating to, which improves the upstream support for the Rockchip RK3588(s) SoC. That patch series should sprout into another patch series with some really interesting new upstream kernel features, leading to measurable performance and power consumption improvements on multiple Rockchip SoCs (emphasis added only to prevent tl;dr mode from kicking in, this is a rather long paragraph). Though, making all that happen, which includes getting the patches accepted upstream, will inevitably be a rather massive undertaking, both for the implementation of the patches, and for their evaluation and testing; for example, just measuring the achieved power savings accurately will be challenging.
The above-mentioned future patches will also require help from the community, in form of comprehensive stress testing, which is probably going to be a requirement for getting the whole thing upstreamed. I’ll describe it all here later, after I send some more details to the linux-rockchip mailing list.
I’'m happy to report that a few more of my Linux kernel patches have been accepted upstream, as listed below, while a few more Linux kernel patches are currently under review or on their way to the mailing lists:
There’s also one more small U-Boot patch that has been accepted upstream, while a few more substantial U-Boot patches are on their way to the mailing list:
Last, but not least, some of my new Git patches have been accepted upstream (as I mentioned already, getting patches accepted by Git is very, very, VERY hard and requires a lot of skill, time, patience and effort):
I’'m happy to report that a few more of my Linux kernel patches have been accepted upstream, as listed below, while a few more Linux kernel patches are currently under review or on their way to the mailing lists:
True, but don’t worry, resolving the CPUIDLE issue hasn’t been forgotten. In fact, getting the required CPUIDLE patches accepted upstream requires me to become established as a known upstream contributor first, simply because the nature of those patches is inevitably going to be rather extensive and a bit controversial. Moreover, getting any TF-A patches accepted upstream isn’t easy at all, and it only gets harder with patches that introduce new concepts.
On the upside, in the meantime I’ve spotted a couple more of the, so to speak, future consumers of the new concept that the CPUIDLE patches will introduce. That should help with getting those patches accepted upstream.
Speaking of becoming established, we’ll also need people established as known testers of the upstream patches, to get the CPUIDLE and other planned PinePhone patches accepted upstream. With that in mind, I wonder if you’d be willing to test some PinePhone-related U-Boot patches that I’ll submit upstream rather soon, and send your test results with your Tested-by tags to the U-Boot mailing list?
Of course, everyone is more than welcome to test those and other patches, and to send their test results to the mailing lists. Patch reviews are also welcome.
UPDATE: I’'m happy to report that a few more of my Linux kernel patches have been accepted upstream, as listed below, while a few more Linux kernel patches are currently under review or on their way to the mailing lists:
drm/panfrost: Mark simple_ondemand governor as softdep (this patch and the patch right above resolve longstanding issues that the Panfrost and Lima drivers have had with the devfreq scheduler and initial ramdisks; these two patches will also be propagated into the long-term kernel versions)
I’'m happy to report that a few more of my Linux kernel patches have been accepted upstream, as listed below, while a few more Linux kernel patches are currently under review or on their way to the mailing lists:
I’'m happy to report that one more of my Linux kernel patches has been accepted upstream, as listed below, while a few more Linux kernel patches are currently under review or on their way to the mailing lists: