01 > ȸҰ

 
작성일 : 18-09-17 20:15
am5728 video capture dtb file
 글쓴이 : 이로직…
조회 : 4,180  
Amritpreet Singh93
I will have only 1 driver to control the FPGA over SPI. Even if i make it a V4L2 subdevice based driver, how can i use it for multiple input ports

You will have to write one driver that should be able to register three v4l2 sub-device.

You can subscribe to linux-media mailing and also watch #v4l IRC channel and may get plenty of help there for your specific need.

Amritpreet Singh93
And what should i add to device tree?

Device tree entry should like below -

&spi1 {

status = "okay";

clock-frequency = ;

fpga_spi_drv@XX {

compatible = "xxxxxx";

reg = ;

reset-gpios = <&xx>;

oscen-gpios = <&yy>;

powerdown-gpios = <& >;

bufen-gpios = <&>;

camen-gpios = <&>;

port1 {

cam1: endpoint {

remote-endpoint = <&vin4a>;

hsync-active = <1>;

vsync-active = <1>;

pclk-sample = <0>;

input-clock-freq = ;

pixel-clock-freq = ;

};

};

Port2 {

Cam2: endpoint {

remote-endpoint = <&vin5a>;

hsync-active = <1>;

vsync-active = <1>;

pclk-sample = <0>;

input-clock-freq = ;

pixel-clock-freq = ;

};

};

Port3 {

Cam3: endpoint {

remote-endpoint = <&vin6a>;

hsync-active = <1>;

vsync-active = <1>;

pclk-sample = <0>;

input-clock-freq = ;

pixel-clock-freq = ;

};

};

};

&vin4a {

status = "okay";

endpoint {

slave-mode;

remote-endpoint = <&cam1>;

};

};

&vin5a {

status = "okay";

endpoint {

slave-mode;

remote-endpoint = <&cam2>;

};

};

&vin6a {

status = "okay";

endpoint {

slave-mode;

remote-endpoint = <&cam3>;

};

};

&vip2 {

status = "okay";

};

&vip3 {

status = "okay";

};