Linux 6.12, upstream device tree for a311d outdated?

I am currently trying to update my Gentoo installation’s kernel to 6.12, and am wondering about some discrepancies between the device tree file (meson-g12b-bananapi-cm4-mnt-reform2.dts) from the MNT Reform Debian repo, and the file that is available as part of the upstream kernel 6.12, as there are some notable differences:

  • The upstream version of meson-g12b-bananapi-cm4-mnt-reform2.dts does not have the section about the spi-gpio (and the lpc11u24) at all.
    • Without this section, communication with the system controller (and therefore stuff like poweroff on shutdown) does not work.
  • The upstream version of meson-g12b-bananapi-cm4-mnt-reform2.dts lists the sound chip (wm8960) and the real-time-clock (pcf8523) as connected via i2c2, while the version from the debian repo lists them connected to i2c3.
    • The correct value is, afaict, i2c3.
  • Burst mode for the eDP bridge is not enabled upstream.

The history of the file in the MNT Reform Debian repo shows that those changes were all added after the initial commit. So, can it be that an outdated version of this file has been upstreamed?

Interesting find! I am wondering whether this might have something to do with the issue I have with the TRRS microphone in on the A311D: No input device selectable for wired headset plugged into TRRS port - #13 by doctorhoo

But I suspect that the wrong value (i2c3 vs i2c2) would make the entire sound chip non-functional?

Sound in general works for me, so I could verify the correct value on my system. How do I get this from the current device tree? I am not really sure how to read what dtc dumps at me..

With the upstream device tree, the sound card is not detected at all, so ther also is no audio output.

I have never really tried to actually read the output of a decompiled binary device tree or of the /proc/device-tree folder. It sounds pretty difficult to do, given that it will not use any alias names… However, looking at my working setup (dtc -I fs /proc/device-tree), I see the devices in question (rtc, audio codec) hooked up to i2c@1c000, which I assume is what uses the i2c3 alias in the dts file.

Regarding the microphone: I too never managed to get audio-in working, but since I am not on the official Debian image, I “just” blamed my ALSA configuration. Furthermore, I figured out that what I really wanted, namely the line-in port, is not wired up to any external connector, so I would have to solder a plug to the mainboard to get it working… So, I just gave up on this and bought a USB sound card.

1 Like

Just to clarify: Were you already using the A311D when trying to get the audio input working?

Thank you for bringing this up. Instead shipping a near-copy of upstream dts, reform-debian-packages should ship a patch against the upstream dts. This is now proposed here: linux: patch meson-g12b-bananapi-cm4-mnt-reform2.dts instead of overwriting (!94) · Merge requests · Reform / reform-debian-packages · GitLab