Issue
I'm trying to add ADV7282-m support to a linux kernel build with Yocto. However I cannot seem to get it to work. I have gotten the module to load and detect the chip.
The driver completely makes it through the probe
but there is no v4l device created.
The board i'm trying to get it to run on is a VAR-SOM-DUAL, with an IMX6 CPU. I manually added the ADV7282-m (going by examples found with google) to the device tree, but i'm not sure if this is correct because i'm not very familliar with device tree's:
...
v4l2_cap_0 {
compatible = "fsl,imx6q-v4l2-capture";
ipu_id = <0>;
csi_id = <0>;
mclk_source = <0>;
mipi_camera = <1>;
status = "okay";
};
...
adv7182: adv7182@20 {
compatible = "adi,adv7282-m";
pinctrl-names = "default";
reg = <0x20>;
clocks = <&clks 200>;
clock-names = "csi_mclk";
csi_id = <0>;
cvbs = <1>;
mipi_camera = <1>;
mclk = <24000000>;
mclk_source = <0>;
ipu_id = <0>;
status = "okay";
};
...
&mipi_csi {
status = "okay";
ipu_id = <0>;
csi_id = <0>;
v_channel = <1>;
lanes = <1>;
};
...
Looking at the data sheet of the board, and how the ADV is physically connected it seems to be ok.
Then I had a couple of problems when trying to enable the kernel module for the ADV7282-m. When I enable Autoselect ancillary driver
the module is not included in the build. Looking at the documentation it is selected by STA2X11_VIP
however I cannot enable this because it is dependend on VIRT_TO_BUS
, which seems to be deprecated (or not supported for my platform).
When I disable Autoselect ancillary driver
I can manually enable the ADV7180
module (which supports the ADV7282-m). But after compiling the kernel, while loading the module it is missing V4L-symbols and I cannot find what V4L config setting is missing.
What I eventually did is copy the compiled module to my local system, recompiled the kernel with Autoselect ancillary driver
and copy the ADV7180
driver back to load it.
When doing this the module loads correctly and prints:
adv7180 0-0020: chip found @ 0x20 (21a0000.i2c)
and thats it, no v4l device is created and no more errors are shown. To check I added some extra prints to the module code, but it makes it to the final return without a problem.
At the moment I am stuck in finding the solution, could someone maybe point me in right direction? Or maybe even see an error in my configuration?
If more info is needed feel free to ask!
Thanks in advance.
Solution
I got the ADV working. Apparently I completely misunderstood the ADV7180 driver. It only creates the V4L subdevice, which can then be used by a bridge-driver to get the /dev/video0 device. I used the driver given in thisthread and made it work in my linux kernel version. After doing this all worked as expected.
Answered By - rytec