Hi Alexander, On 2022-01-16 11:14, Alexander Stein wrote: > Hi Stefan, > > Am Samstag, 15. Januar 2022, 14:28:01 CET schrieb Stefan Agner: >> That assumption turned out to be wrong: I used our mainline based U-Boot >> 2021.10 instead of the Arch Linux ARM U-Boot, and HDMI CEC continued to >> work. > > Does the mainstream U-Boot work out of the box? Or does it require some > additional configuration? > Yes mainline U-Boot works out of the box. Building it is somewhat involved since it requires extra firmwares (there are build instructions in the source tree in board/amlogic/w400/README.odroid-n2). You need to add a boot script to your boot partition. I used the script part of the uboot-odroid-n2-mainline package as inspiration [1]. It needs some adjustments as it seems to try to boot from the root file system directly (and my setup used the FAT/ext4 setup still). We carry a single patch which improved reliability booting from eMMC, see [2]. >> I then moved to 5.15.13 as well to rule out any kernel changes. But >> still, in our configuration HDMI CEC did not work. I ended up diffing >> configuration, and noticed that we are using built-in CONFIG_CEC_CORE >> whereas Arch Linux uses it as a module. To build CONFIG_CEC_CORE as a >> module I had to change some other configuration from built-in to module, >> namely: >> >> - CONFIG_CEC_CORE=m >> - CONFIG_DRM_DW_HDMI=m >> - CONFIG_DRM_MESON=m >> - CONFIG_DRM_MESON_DW_HDMI=m >> >> With that change, HDMI CEC started to work in my builds too! >> >> With that change, it also works on Linux 5.10. >> >> I guess there is some ordering issue or something which makes it fail >> when those drivers are built-in? Note that I did not change >> CONFIG_CEC_MESON_G12A_AO, that driver was already a module before. > > You need all 4 options above to be modules? Or is it maybe enough to set > CONFIG_DRM_DW_HDMI_CEC=m? This should make CONFIG_CEC_CORE=m as well, while > the other modules are built-in. In our builds I disabled CONFIG_DRM_DW_HDMI_CEC entirely actually. It seems that CONFIG_DRM_DW_HDMI is tied to CEC_CORE through this dependency: config DRM_DW_HDMI ... select CEC_CORE if CEC_NOTIFIER > I suspect at some point a -EPROBE_DEFER is missing. > > Just FYI: Arch Linux aarch64 kernel config currently lacks some drivers for > HDMI audio. See [1]. Thanks for the link, just checked, it seems our kernel configuration covers those. -- Stefan > > Best regards, > Alexander > > [1] https://github.com/archlinuxarm/PKGBUILDs/pull/1864 [1] https://github.com/archlinuxarm/PKGBUILDs/blob/master/alarm/uboot-odroid-c2-mainline/boot.txt [2] https://github.com/home-assistant/operating-system/blob/rel-7/buildroot-external/board/hardkernel/patches/uboot/0001-HACK-mmc-meson-gx-limit-to-24MHz.patch