meson-gxl-s905d-phicomm-n1.dtb in Linux 5.0 won’t boot

After diffing the working dtb and the failing one (meson-gxl-s905d-phicomm-n1.dtb from compiling the kernel by hand), the issue was found to be the incorrectly high max-frequency specified in meson-gx-p23x-q20x.dtsi: mmc@7400 (i.e. &sd_emmc_c).

Turns out that this is a long standing issue, I can’t even figure out since when it had been existing. At least dtb in Linux 4.19 / Linux 4.20 were all non-working ones. (There’s even no dtb for Phicomm N1 before Linux 5.0. People used meson-gxl-s905d-p230.dtb for Phicomm N1 back then. The two dtbs are largely the same.)

The issue was also metioned in ODROID’s forum

meson-gxl-s905d-p230.dtb in Armbian 5.67 does not suffer from this though, they applied their own patch. (I also noticed that 150balbes’ dtb contains some other patches for audio. But as I’m using the box headlessly, I didn’t check that in more detail.)

Here is the diff (of the decompiled dtb):

There’s actually another caveat, though. meson-gxl-s905d-phicomm-n1.dtb from Linux 5.0 causes irq #35 being kept fired (leading to high “load average” in top, around 1.0). I suspect it’s yet another wrong IRQ type but I’m not sure and could not find any references yet.

Anyway, I applied the following patch to mitigate this by changing the IRQL type from IRQ_TYPE_LEVEL_LOW to IRQ_TYPE_LEVEL_HIGH:

yangxuan8282 ‘s patch also addressed this issue, but in a different way. His patch seems to use the same configuration as meson-gxbb-vega-s95.dtsi for Phicomm N1, by removing interrupts option from dtb completely. This (seems to) results in using polling for interrupts, as shown in dmesg:

I’m gonna sort out the patches I’m using for a headless N1 box (with other old patches you can find in the older posts), and will post them as patches upon the kernel source tree (instead of the decompiled dtbs) at a later time. Update: The patches I’m using are here.

Glad to see Linux 5.0 on my N1 box:

Here is the dtb with the patch above (as well as some other minor patches, but noticeably not the patch of removing frame buffer, so that it’s reasonably debuggable.). But be noted that I’m using the box headlessly, and do not have the condition to see if the video / audio works correctly.

2 thoughts on “meson-gxl-s905d-phicomm-n1.dtb in Linux 5.0 won’t boot”

  1. Hi Carrot, is it possible to compile latest mainline kernel such as kernel 5.4 for N1 box with your patches? Thanks!

    1. TBH I’m not sure about this. I’ve been sticking with 5.1 kernel for a while. You can try it out yourself though.

Leave a Reply to Jacky Cancel reply

Your email address will not be published.