Subject: [bug#77090] Patch to add linux-libre mnt/reform variant

From: Vagrant Cascadian <[email-masked]>
Date: Tue, 18 Mar 2025 10:49:34 -0700

On 2025-03-18, pelzflorian (Florian Pelz) wrote:
> Well; I tested linux-libre-arm64-mnt-reform on my Orange Pi 5 Plus
> with Armbian’s U-Boot; as expected your kernel runs as good/bad as
> linux-libre-arm64-generic there.  Of course is a different machine,
> but it does use RK3588.

Interesting! I think all the rk3588 specific patches are actually
indirectly from collabora's work on rk3588; a quick glance at some of
the patch names makes it clear they are not actually all mnt/reform
specific. I suspect with each kernel version those patches will be
fewer.

I am most interested in the rk3588 patches, which is the largest current
patchset, but the imx8mq, imx8mp, ls1028a and meson-g12b are other
variants produced by mnt/reform, and require fewer patches to
upstream. I have no idea how many of each are out there in the wild, and
I suspect new ones are focused on rk3588, largely because it outperforms
all the others. There is also a RISC-V core option.

A comparison of all the current module options:

  https://mntre.com/modularity.html

> Orange Pi still has flaky Ethernet despite patches.  You described it
> as flaky as well, though.  Ethernet works on some boots, as before.
> Maybe the patches you put in do help on the MNT Reform, though.

The kernal patches alone are not sufficient, the workaround for
mnt/reform rk3588 requires a newer libgpiod than present in guix
currently:

  https://source.mnt.re/reform/reform-tools/-/blob/main/bin/reform-hw-setup?ref_type=heads#L57

Maybe that or something similar would also works on the Orange PI 5
Plus?

> USB3 is still broken.  I do not own a MIPI DSI phone/tablet display,
> apparently laptop display for MNT Reform, which should work, I guess,
> with appropriate device tree settings, which I guess your patches do
> for MNT Reform.  Perhaps also your kernel patches.

Right. I hope, anyways. I have not specifically tested USB-3 devices,
but definitely USB-2 and maybe USB-1...

> As far as I understand, HDMI on Orange Pi 5 Plus would require the
> blob
> <https://web.git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rockchip/dptx.bin>.
> It seems likely that the MNT Reform RK3588 uses the CPU’s HDMI for
> external displays as well, maybe, don’t know.

It does not mention it on the modularity page listed above (only the DDR
issues), so what I need to do is boot it and try out HDMI output with
linux-libre and not firmware installed and see... :)

> I have not reviewed the suitability nor license of patches.  Is it the
> same license as that of the project to which each patch had been sent?

Ah, good reminder, I did a sloppy job with the license field of
reform-debian-packages. Most of the patches have clearly defined
SPDX-License-Identifier fields:

+    ;; FSFAP GPL-2.0 GPL-2.0+ GPL-2.0-only (GPL-2.0-only OR BSD-2-Clause)
+    ;; GPL-2.0-only OR BSD-2-Clause (GPL-2.0 OR BSD-2-Clause) GPL-2.0-or-later
+    ;; GPL-2.0 or MIT (GPL-2.0+ OR MIT) (GPL-3.0 OR BSD-2-Clause) MIT

Obviously all the GPL-2 and GPL-3 permutations are good, and the others
look good to my eye as well:

https://spdx.org/licenses/FSFAP.html
https://spdx.org/licenses/MIT.html
https://spdx.org/licenses/BSD-2-Clause.html

> I have not run guix style nor lint

Oh, but I probably should try those... good reminder!

> and do not want to judge the Scheme code style.

I am begging for a little bit of judgement here, but if you are not game
at the moment hopefully someone else can. :)

Thanks for taking the kernel for a spin and leaving some good comments!

live well,
  vagrant