LE10 & TBS 5520SE on RPi4 // updated drivers [SOLVED]

  • Thanks smp . I followed your instructions to the letter

    tbs5520SE not recognised, beyond lsusb seeing it (below)

    (pastekodi and other debug info below)

    I checked the build logs and it looks like your excellent patch is being applied (54.log excerpt below)

    Having followed nvdias above, I wonder if...

    - firmware is correctly installed for tbs5520se ?? I haven't tweaked any firmware

    Any help anyone can give is much appreciated

    For interest - I am actually trying to debug my friends tbs5520SE a few hundred miles away in Scotland so he is not without TV - smile :)

    ______________________

    kernel is shown as aarch64 5.10.52

    54.log

    patching file kernel/power/main.c

    Hunk #1 succeeded at 95 (offset 49 lines).

    [1;32mAPPLY PATCH [1;37m(common - raspberrypi)[0m[0m packages/linux/patches/raspberrypi/linux-tbs5520se.patch

    patching file drivers/media/dvb-frontends/Kconfig

    patching file drivers/media/dvb-frontends/Makefile

    patching file drivers/media/dvb-frontends/si2183.c

    patching file drivers/media/dvb-frontends/si2183.h

    patching file drivers/media/usb/dvb-usb/Kconfig

    Hunk #1 succeeded at 343 (offset 3 lines).

    patching file drivers/media/usb/dvb-usb/Makefile

    patching file drivers/media/usb/dvb-usb/tbs5520se.c

    patching file drivers/media/usb/dvb-usb/tbs5520se.h

    patching file drivers/media/tuners/Kconfig

    patching file drivers/media/tuners/Makefile

    patching file drivers/media/tuners/av201x.c

    patching file drivers/media/tuners/av201x.h

    patching file drivers/media/tuners/av201x_priv.h

    patching file drivers/media/usb/dvb-usb/dvb-usb.h

    patching file drivers/media/dvb-core/dvb_frontend.c

    Hunk #3 succeeded at 2716 (offset -73 lines).

    patching file include/media/dvb_frontend.h

    patching file drivers/media/usb/dvb-usb/dvb-usb-dvb.c

    patching file drivers/media/tuners/si2157.c

    patching file include/uapi/linux/dvb/frontend.h

    [1;33mBUILD[0m linux [1;37m(host)[0m

    [1;35mTOOLCHAIN[0m make (auto-detect)

    pastekodi - http://ix.io/3wXv

    pi4:~ # lsusb

    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

    Bus 001 Device 004: ID 734c:5521 TBS Technologies China

    Bus 001 Device 003: ID 1997:2433 Shenzhen Riitek Technology Co., Ltd wireless mini keyboard with touchpad

    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub

    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    pi4:~ # lspci

    00:00.0 PCI bridge: Broadcom Inc. and subsidiaries Device 2711 (rev 10)

    01:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev 01)

  • Huge thanks to smp and nvdias for helping

    I tweaked the linux.aarch64.conf file as smp suggested, re-compiled and now my scottish friend is up and running with a current matrix LE using tbs5520SE

    Next steps...

    - I'll go back and explore nvdias kernel overlay so I understand it
    - if I get time I'll post up a Noobs guide to compiling LE with what I have learnt (if that is helpful?)

  • [FALSE PROBLEM ---- IGNORE THIS POST]

    well ... drivers are no working anymore.

    I've updated the patch file as the offsets changed (see attach) and it worked for builds compiled with version up to 2nd February 2022.

    After that, tvheadend cannot lock signal.

    dmesg reports errors:

    Code
    si2183 22-0067: err restarting dsp
    si2183 22-0067: err set agc mode
    si2183 22-0067: err set dvb-c mode
    si2183 22-0067: err restarting dsp

    Any help will be greatly appreciated.


    linux-tbs5520se.patch.txt

    Edited once, last by nvdias (February 12, 2022 at 1:28 PM).

  • I assume you are using rpi kernel 5.15.18.

    Looking at the git commit history it looks like this commit was merged to kernel 5.15.17, so you may want to revert it for testing.

  • I assume you are using rpi kernel 5.15.18.

    Looking at the git commit history it looks like this commit was merged to kernel 5.15.17, so you may want to revert it for testing.

    Correct. 5.15.18 it is.

    I will then try swapping the initialization bits for si2157 , recompile and report back.

  • well ...

    reverted the patch .. works.

    placed the patch back and it also works !!!

    if ..... "make clean" and recompile everything

    So, after the changes for 5.15.17 / 5.15.18 I should have rebuild everything.

    my bad.

    sorry.

    everything is working ok.


    smp , thank you for your suggestion it sent me in the correct path.

  • Can you update this for the current kernel please?

  • LibreELEC-Generic.x86_64-10.0.2 (Linux Kernel 5.10.76), could you help to compile drivers for this? Thank you!

    Hi. Sorry. But at the moment I can only maintain compilations for RPi4.

    If you want to yourself for x86_64, just create the compilation environment and toolchain. following official instructions:

    https://wiki.libreelec.tv/development-1/build-basics

    Once you are able to create a LE image, came back here. I will help inject the patches for x86_64.

  • Hi,

    Trying to replicate for RPi2. Its building ok, but TBS5520 is not installing. Shows on lsusb, but not on lsmod.

    Any help appreciated.

    Thanks in advance.

    MNO

    Hi. Sorry. But at the moment I can only maintain compilations for RPi4.

    If you want to yourself for x86_64, just create the compilation environment and toolchain. following official instructions:

    https://wiki.libreelec.tv/development-1/build-basics

    Once you are able to create a LE image, came back here. I will help inject the patches for x86_64.

    Edited once, last by molive (September 26, 2022 at 8:23 PM).

  • Hi,

    Trying to replicate for RPi2. Its building ok, but TBS5520 is not installing. Shows on lsusb, but not on lsmod.

    Any help appreciated.

    Thanks in advance.

    MNO

    Have you adjusted the tbs5520se patches to be applied into rpi2 project / device ?

  • Have you adjusted the tbs5520se patches to be applied into rpi2 project / device ?

    Hi,

    Placed the patch found in post #23 of this thread (dropbox file is offline) in /projects/RPi/patches/linux and /projects/RPi/devices/RPi2/patches/linux.

    Have to edit the patch file for RPi2?

    Thanks.

    Regards,

    MNO

  • The patch was updated for One of the latest kernel versions.

    Please try one of the last links some posts above.

    If not, I will re-upload the patch later.

    Can´'t find any working link for the patch except the one in post #23.

    Would really appreciate if you could re-upload it.

    Thanks in advance.

    Regards,

    MNO

  • The link in post #28 it is working fine:
    https://mega.nz/folder/cbwCARoR#jPgzah63psSCOtrwbt9gnQ

    It points to a folder with compiled drivers for Rpi4.

    I've added the patches files into a zip file and uploaded it into that same folder.

    le-tbs5520se-patches-220927.zip

    The patches are generic for the drivers compilation.

    You need to edit the module activation patch to you project (RPi2 ?) as it expects the RPi4 project.

    Good luck.

    And post your results here.