Re: Configure video PAL decoder into media pipeline

From: Michael Nazzareno Trimarchi
Date: Sat Dec 08 2018 - 12:07:22 EST


Hi

Down you have my tentative of connection

I need to hack a bit to have tuner registered. I'm using imx-media

On Sat, Dec 8, 2018 at 12:48 PM Michael Nazzareno Trimarchi
<michael@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi
>
> On Fri, Dec 7, 2018 at 1:11 PM Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
> >
> > On 12/07/2018 12:51 PM, Jagan Teki wrote:
> > > Hi,
> > >
> > > We have some unconventional setup for parallel CSI design where analog
> > > input data is converted into to digital composite using PAL decoder
> > > and it feed to adv7180, camera sensor.
> > >
> > > Analog input => Video PAL Decoder => ADV7180 => IPU-CSI0
> >
> > Just PAL? No NTSC support?
> >
> For now does not matter. I have registere the TUNER that support it
> but seems that media-ctl is not suppose to work with the MEDIA_ENT_F_TUNER
>
> Is this correct?
>
> > >
> > > The PAL decoder is I2C based, tda9885 chip. We setup it up via dt
> > > bindings and the chip is
> > > detected fine.
> > >
> > > But we need to know, is this to be part of media control subdev
> > > pipeline? so-that we can configure pads, links like what we do on
> > > conventional pipeline or it should not to be part of media pipeline?
> >
> > Yes, I would say it should be part of the pipeline.
> >
>
> Ok I have created a draft patch to add the adv some new endpoint but
> is sufficient to declare tuner type in media control?
>
> Michael
>
> > >
> > > Please advise for best possible way to fit this into the design.
> > >
> > > Another observation is since the IPU has more than one sink, source
> > > pads, we source or sink the other components on the pipeline but look
> > > like the same thing seems not possible with adv7180 since if has only
> > > one pad. If it has only one pad sourcing to adv7180 from tda9885 seems
> > > not possible, If I'm not mistaken.
> >
> > Correct, in all cases where the adv7180 is used it is directly connected
> > to the video input connector on a board.
> >
> > So to support this the adv7180 driver should be modified to add an input pad
> > so you can connect the decoder. It will be needed at some point anyway once
> > we add support for connector entities.
> >
> > Regards,
> >
> > Hans
> >
> > >
> > > I tried to look for similar design in mainline, but I couldn't find
> > > it. is there any design similar to this in mainline?
> > >
> > > Please let us know if anyone has any suggestions on this.
> > >

[ 3.379129] imx-media: ipu1_vdic:2 -> ipu1_ic_prp:0
[ 3.384262] imx-media: ipu2_vdic:2 -> ipu2_ic_prp:0
[ 3.389217] imx-media: ipu1_ic_prp:1 -> ipu1_ic_prpenc:0
[ 3.394616] imx-media: ipu1_ic_prp:2 -> ipu1_ic_prpvf:0
[ 3.399867] imx-media: ipu2_ic_prp:1 -> ipu2_ic_prpenc:0
[ 3.405289] imx-media: ipu2_ic_prp:2 -> ipu2_ic_prpvf:0
[ 3.410552] imx-media: ipu1_csi0:1 -> ipu1_ic_prp:0
[ 3.415502] imx-media: ipu1_csi0:1 -> ipu1_vdic:0
[ 3.420305] imx-media: ipu1_csi0_mux:5 -> ipu1_csi0:0
[ 3.425427] imx-media: ipu1_csi1:1 -> ipu1_ic_prp:0
[ 3.430328] imx-media: ipu1_csi1:1 -> ipu1_vdic:0
[ 3.435142] imx-media: ipu1_csi1_mux:5 -> ipu1_csi1:0
[ 3.440321] imx-media: adv7180 2-0020:1 -> ipu1_csi0_mux:4

with
tuner: tuner@43 {
compatible = "tuner";
reg = <0x43>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_tuner>;

ports {
#address-cells = <1>;
#size-cells = <0>;
port@1 {
reg = <1>;

tuner_in: endpoint {
remote-endpoint = <&tuner_out>;
};
};
};
};

adv7180: camera@20 {
compatible = "adi,adv7180";
reg = <0x20>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_adv7180>;
powerdown-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; /* PDEC_PWRDN */

ports {
#address-cells = <1>;
#size-cells = <0>;

port@1 {
reg = <1>;

adv7180_to_ipu1_csi0_mux: endpoint {
remote-endpoint =
<&ipu1_csi0_mux_from_parallel_sensor>;
bus-width = <8>;
};
};

port@0 {
reg = <0>;

tuner_out: endpoint {
remote-endpoint = <&tuner_in>;
};
};
};
};

Any help is appreciate

Michael

> > > Jagan.
> > >
> >
>
>
> --