Using BT.656 input

Hello.
I want to capture interlaced 720x576 video via BT.656 input on Apalis imx6 + Apalis Evaluation Board. BSP 6.
I’ve already compiled my own kernel and wanted to start with the adv7180-adv7280 driver as an example, but I can’t find the source code for these drivers in the toradex_ti-linux-6.1.y branch.

Can someone give me a quick guide to creating such a driver or share an example of such a driver?

Thanks.

Hi @SVL ,

can you share me the output of tdx-info on your module?
Getting Device Information with Tdx-Info | Toradex Developer Center

The latest kernel for Apalis iMX6 is based on mainline Linux Kernel 6.1.xx as you can refer here Embedded Linux Release Matrix | Toradex Developer Center.

Please note that the Apalis iMX6 has moved to the upstream kernel (as of today v6.1.55) as you can see here Build Linux Kernel from Source Code | Toradex Developer Center. You can find the source code of the driver here: adv7180.c « i2c « media « drivers - kernel/git/torvalds/linux.git - Linux kernel source tree. The branch you were pointing out (toradex_ti-linux-6.1.y branch) was meant for TI SoC based SoM.
The driver is also compatible for ADV7280 as you can read from the device tree bindings here. See the code snippet below:

properties:
  compatible:
    items:
      - enum:
          - adi,adv7180
          - adi,adv7180cp
          - adi,adv7180st
          - adi,adv7182
          - adi,adv7280
          - adi,adv7280-m
          - adi,adv7281
          - adi,adv7281-m
          - adi,adv7281-ma
          - adi,adv7282
          - adi,adv7282-m

Let me know if this helped you further.

Hi.

root@apalis-imx6-11274726:~# tdx-info

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.1.71-6.5.0-testbuild+git.38fb82ecd144 #4 SMP Fri Jan 26 09:55:03 CET 2024
Kernel command line:      enable_wait_mode=off vmalloc=400M root=PARTUUID=0e2d22cf-02 ro rootwait fec_mac=00:14:2d:ac:09:e6 consoleblank=0 no_console_suspend=1 console=tty1 console=ttymxc0,115200n8 mxc_hdmi.only_cea=1 fbmem=32M
Distro name:              NAME="TDX Wayland with XWayland Upstream"
Distro version:           VERSION_ID=6.5.0-devel-20240118094319-build.0
Distro variant:           -
Hostname:                 apalis-imx6-11274726
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board
Toradex version:          0028 V1.1D
Serial number:            11274726
Processor arch:           armv7l
------------------------------------------------------------


root@apalis-imx6-11274726:~# tdx-info -dt

 Device tree
 ------------------------------------------------------------
 Device tree enabled:      imx6q-apalis-eval.dtb
 Compatible string:        toradex,apalis_imx6q-evaltoradex,apalis_imx6qfsl,imx6q
 Device trees available:
                           imx6q-apalis-eval.dtb
                          imx6q-apalis-ixora-v1.1.dtb
                           imx6q-apalis-ixora-v1.2.dtb
                           imx6q-apalis-ixora.dtb
 ------------------------------------------------------------
 
 Device tree overlays
 ------------------------------------------------------------
 Overlays enabled:         fdt_overlays=apalis-imx6_panel-cap-touch-10inch_overlay.dtbo
 Overlays available:
                           apalis-imx6_adv7280_overlay.dtbo
                           apalis-imx6_hdmi_overlay.dtbo
                           apalis-imx6_ov5640-v11a_overlay.dtbo
                           apalis-imx6_ov5640_overlay.dtbo
                           apalis-imx6_panel-cap-touch-10inch_overlay.dtbo
                           apalis-imx6_panel-cap-touch-7inch_overlay.dtbo
                           apalis-imx6_panel-edt-5.7inch_overlay.dtbo
                           apalis-imx6_panel-edt-7inch_overlay.dtbo
                           apalis-imx6_panel-res-touch-7inch_overlay.dtbo
                           apalis-imx6_spi1_spidev_overlay.dtbo
                           apalis-imx6_spi2_spidev_overlay.dtbo
                           apalis-imx6_tc358743_overlay.dtbo
                           apalis-imx6_vga-640x480_overlay.dtbo
 ------------------------------------------------------------

Thank you. It seems that my mistake is that I used a downstream kernel. OK, I need time to do some research.
I will let you know if I have any more problems or questions.
Thanks.