Add support for sony cxd2880 tuner to kernel for official RPI DVB tv hat

  • I bought recently an official RPI TV hat and installed Libreelec 12 nightly along with tvheadend 4.1 server and client. Added dtoverlay=rpi-tv and gmem=128. Did the localhost:9981 setup wizard but it doesn't find any tuner.

    Dmesg returns: "cdx2880_attach: chip id invalid". It seems the Sony cxd2880 tv tuner driver is not in the nightly kernel. Could you please add it to the nightly build?. It used to be in earlier versions. I installed latest Raspberry Pi OS 32-bit stable and I have the same problem.

    It's available here: https://github.com/torvalds/linux…ontends/cxd2880

    Code
    [   11.026954] dvbdev: DVB: registering new adapter (CXD2880)
    [   11.042537] brcmfmac: F1 signature read @0x18000000=0x15264345
    [   11.098387] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
    [   11.099534] usbcore: registered new interface driver brcmfmac
    [   11.192689] cxd2880: cxd2880_attach: chip id invalid.
    [   11.192727] cxd2880_spi: cxd2880_spi_probe: cxd2880_attach failed

    Edited once, last by wyup (June 27, 2023 at 8:23 PM).

  • This sounds a lot like you have a connection issue, a hardware problem or some configuration issue, especially as it's also failing on RPi OS.

    I did a quick test on RPi4 with latest LE12 build and it detected the TV hat just fine - without adding anything to config.txt (it's plug-and-play)

    Code
    LibreELEC:~ # dmesg | grep -i cx
    [   14.786410] dvbdev: DVB: registering new adapter (CXD2880)
    [   14.834939] cxd2880: cxd2880_attach: CXD2880 driver version: Ver 1.4.1 - 1.0.5
    [   14.834957] cxd2880 spi0.0: DVB: registering adapter 0 frontend 0 (Sony CXD2880)...
    [   14.835403] cxd2880_spi: cxd2880_spi_probe: Sony CXD2880 has successfully attached.

    so long,

    Hias

  • Strange.. if I set config.txt to defaults with latest 12 build, "cxd2880" or "dvb" don't even appear in dmesg.

    I have another audio hat, but I make sure it's not sharing tv hat GPIO pins.

    There are occurrences of this in other forums: one user bought a new hat and another did a "soldering of a new GPIO header" to a Zero W:

    https://forums.raspberrypi.com/viewtopic.php?t=232037 (soldered GPIO header)

    https://dietpi.com/forum/t/tv-hat…-properly/14998 (bought a new hat)

    Does it mean that the culprit was a faulty GPIO header? My tv hat comes with a detachable header. Some pin was slightly bent while plugging in and out, but I corrected it with tweezers and the header plugs in fine. I also tried to plug the tv hat in reverse on the upper side of the board the first time until I realized it was on the other. I don't think I need to solder anything, do I?

    Can you help if that is related to me?

    Edited once, last by wyup (June 28, 2023 at 12:59 PM).

  • Test with just the TV hat installed, if you have another (audio) hat installed, it'll easy to create a clash (eg on the HAT EEPROM / autodetect pins) and something won't work.

    Bent pins, damaged header or TV hat hardware are all possibilities - and from the linked threads it seemed replacing the HAT solved the issues.

    If you have a RPi2/3/4 you just need to plug in the TV hat, no need for soldering, and it will just work, both on LE and RPiOS.

    so long,

    Hias