All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jack Mitchell <ml@embed.me.uk>
To: Marek Vasut <marex@denx.de>, Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-media@vger.kernel.org,
	Steve Longerbeam <steve_longerbeam@mentor.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Gary Bisson <gary.bisson@boundarydevices.com>,
	kernel@pengutronix.de, Sascha Hauer <s.hauer@pengutronix.de>,
	Marc Kleine-Budde <mkl@pengutronix.de>
Subject: Re: [PATCH v2 08/21] [media] imx: Add i.MX IPUv3 capture driver
Date: Wed, 26 Oct 2016 12:29:44 +0100	[thread overview]
Message-ID: <ba71dd6d-9000-e52d-a7ba-00608e31a7fd@embed.me.uk> (raw)
In-Reply-To: <9550fc48-8bbd-181a-c6d5-5403c7088ac0@denx.de>

Hi Marek,

On 19/10/16 20:25, Marek Vasut wrote:
> On 10/19/2016 06:22 PM, Jack Mitchell wrote:
>> Hi Philipp,
>>
>> On 17/10/16 13:12, Philipp Zabel wrote:
>>> Hi Jack,
>>>
>>> Am Montag, den 17.10.2016, 12:32 +0100 schrieb Jack Mitchell:
>>>> Hi Philipp,
>>>>
>>>> I'm looking at how I would enable a parallel greyscale camera using this
>>>> set of drivers and am a little bit confused. Do you have an example
>>>> somewhere of a devicetree with an input node.
>>>
>>> In your board device tree it should look somewhat like this:
>>>
>>> &i2c1 {
>>>     sensor@48 {
>>>         compatible = "aptina,mt9v032m";
>>>         /* ... */
>>>
>>>         port {
>>>             cam_out: endpoint {
>>>                 remote-endpoint = <&csi_in>;
>>>             }
>>>         };
>>>     };
>>> };
>>>
>>> /*
>>>  * This is the input port node corresponding to the 'CSI0' pad group,
>>>  * not necessarily the CSI0 port of IPU1 or IPU2. On i.MX6Q it's port@1
>>>  * of the mipi_ipu1_mux, on i.MX6DL it's port@4 of the ipu_csi0_mux,
>>>  * the csi0 label is added in patch 13/21.
>>>  */
>>> &csi0 {
>>>     #address-cells = <1>;
>>>     #size-cells = <0>;
>>>
>>>     csi_in: endpoint@0 {
>>>         bus-width = <8>;
>>>         data-shift = <12>;
>>>         hsync-active = <1>;
>>>         vsync-active = <1>;
>>>         pclk-sample = <1>;
>>>         remote-endpoint = <&cam_out>;
>>>     };
>>> };
>>>
>>>>  I also have a further note below:
>>> [...]
>>>>> +    if (raw && priv->smfc) {
>>>>
>>
>> Thank you, I think I have something which is kind of right.
>>
>> (Apologies in advance for the formatting)
>>
>> diff --git a/arch/arm/boot/dts/imx6q-sabrelite.dts
>> b/arch/arm/boot/dts/imx6q-sabrelite.dts
>> index 66d10d8..90e6b92 100644
>> --- a/arch/arm/boot/dts/imx6q-sabrelite.dts
>> +++ b/arch/arm/boot/dts/imx6q-sabrelite.dts
>> @@ -52,3 +52,62 @@
>>  &sata {
>>      status = "okay";
>>  };
>> +
>> +&i2c2 {
>> +    sensor@10 {
>> +        compatible = "onsemi,ar0135";
>> +        reg = <0x10>;
>> +
>> +        pinctrl-names = "default";
>> +        pinctrl-0 = <&pinctrl_ar0135>;
>> +
>> +        reset-gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>;
>> +
>> +        clocks = <&clks IMX6QDL_CLK_CKO2>;
>> +        clock-names = "xclk";
>> +
>> +        xclk = <24000000>;
>> +
>> +        port {
>> +            parallel_camera_output: endpoint {
>> +                remote-endpoint = <&csi_in_from_parallel_camera>;
>> +            };
>> +        };
>> +    };
>> +};
>> +
>> +&csi0 {
>> +    csi_in_from_parallel_camera: endpoint@0 {
>> +        bus-width = <8>;
>> +        data-shift = <12>;
>> +        hsync-active = <1>;
>> +        vsync-active = <1>;
>> +        pclk-sample = <1>;
>> +        remote-endpoint = <&parallel_camera_output>;
>> +    };
>> +};
>> +
>> +&iomuxc {
>> +
>> +        imx6q-sabrelite {
>> +
>> +        pinctrl_ar0135: ar0135grp {
>> +            fsl,pins = <
>> +                MX6QDL_PAD_GPIO_6__GPIO1_IO06   0x80000000
>> +                MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12    0x80000000
>> +                MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13    0x80000000
>> +                MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14    0x80000000
>> +                MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15    0x80000000
>> +                MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16    0x80000000
>> +                MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17    0x80000000
>> +                MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18    0x80000000
>> +                MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19    0x80000000
>> +                MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x80000000
>> +                MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC      0x80000000
>> +                MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC     0x80000000
>> +                MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x80000000
>> +            >;
>> +        };
>> +    };
>> +};
>>
>>
>> However, I can't seem to link the entities together properly, am I
>> missing something obvious?
>>
>> root@vicon:~# media-ctl -p
>> Media controller API version 0.1.0
>>
>> Media device information
>> ------------------------
>> driver          imx-media
>> model           i.MX IPUv3
>> serial
>> bus info
>> hw revision     0x0
>> driver version  0.0.0
>>
>> Device topology
>> - entity 1: IPU0 CSI0 (2 pads, 1 link)
>>             type V4L2 subdev subtype Unknown flags 0
>>     pad0: Sink
>>     pad1: Source
>>         -> "imx-ipuv3-capture.0":0 [ENABLED]
>>
>> - entity 4: imx-ipuv3-capture.0 (1 pad, 1 link)
>>             type Node subtype V4L flags 0
>>             device node name /dev/video0
>>     pad0: Sink
>>         <- "IPU0 CSI0":1 [ENABLED]
>>
>> - entity 10: IPU0 CSI1 (2 pads, 1 link)
>>              type V4L2 subdev subtype Unknown flags 0
>>     pad0: Sink
>>     pad1: Source
>>         -> "imx-ipuv3-capture.1":0 [ENABLED]
>>
>> - entity 13: imx-ipuv3-capture.1 (1 pad, 1 link)
>>              type Node subtype V4L flags 0
>>              device node name /dev/video1
>>     pad0: Sink
>>         <- "IPU0 CSI1":1 [ENABLED]
>>
>> - entity 19: IPU1 CSI0 (2 pads, 1 link)
>>              type V4L2 subdev subtype Unknown flags 0
>>     pad0: Sink
>>     pad1: Source
>>         -> "imx-ipuv3-capture.0":0 [ENABLED]
>>
>> - entity 22: imx-ipuv3-capture.0 (1 pad, 1 link)
>>              type Node subtype V4L flags 0
>>              device node name /dev/video2
>>     pad0: Sink
>>         <- "IPU1 CSI0":1 [ENABLED]
>>
>> - entity 28: IPU1 CSI1 (2 pads, 1 link)
>>              type V4L2 subdev subtype Unknown flags 0
>>     pad0: Sink
>>     pad1: Source
>>         -> "imx-ipuv3-capture.1":0 [ENABLED]
>>
>> - entity 31: imx-ipuv3-capture.1 (1 pad, 1 link)
>>              type Node subtype V4L flags 0
>>              device node name /dev/video3
>>     pad0: Sink
>>         <- "IPU1 CSI1":1 [ENABLED]
>>
>> - entity 37: mipi_ipu1_mux (3 pads, 0 link)
>>              type V4L2 subdev subtype Unknown flags 0
>>     pad0: Sink
>>     pad1: Sink
>>     pad2: Source
>>
>> - entity 41: mipi_ipu2_mux (3 pads, 0 link)
>>              type V4L2 subdev subtype Unknown flags 0
>>     pad0: Sink
>>     pad1: Sink
>>     pad2: Source
>>
>> - entity 45: ar0135 1-0010 (1 pad, 0 link)
>>              type V4L2 subdev subtype Unknown flags 0
>>     pad0: Source
>>
>>
>>
>>
>> root@imx6:~# media-ctl -v --links '"ar01351-0010":0->"mipi_ipu1_mux":0[1]'
>>
>> Opening media device /dev/media0
>> Enumerating entities
>> Found 11 entities
>> Enumerating pads and links
>> No link between "ar0135 1-0010":0 and "mipi_ipu1_mux":0
>> media_parse_setup_link: Unable to parse link
>>
>>  "ar0135 1-0010":0->"mipi_ipu1_mux":0[1]
>>                                      ^
>> Unable to parse link: Invalid argument (22)
>>
>> If you have something in the works with a camera example then just tell
>> me to be patient and I'll wait for a v3 ;)
>
> Check whether you have something along these lines in your camera driver
> in the probe() function:
>
>         priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>         priv->subdev.dev = &client->dev;
>         priv->pad.flags = MEDIA_PAD_FL_SOURCE;
>
>         ret = media_entity_init(&priv->subdev.entity, 1, &priv->pad, 0);
>         if (ret < 0) {
>                 v4l2_clk_put(priv->clk);
>                 return ret;
>         }
>
>         ret = v4l2_async_register_subdev(&priv->subdev);
>         if (ret < 0) {
>                 v4l2_clk_put(priv->clk);
>                 return ret;
>         }
>

Yes, I have stripped the driver down to do nothing[1] apart from probe, 
and allow me to try to link the pipeline together. I still have no luck.

- entity 1: IPU0 CSI0 (2 pads, 1 link)
             type V4L2 subdev subtype Unknown flags 0
         pad0: Sink
         pad1: Source
                 -> "imx-ipuv3-capture.0":0 [ENABLED]

- entity 45: ar0135 1-0010 (1 pad, 0 link)
              type V4L2 subdev subtype Unknown flags 0
         pad0: Source


root@sabrelite:~# media-ctl -v --links '"ar0135 1-0010":0->"IPU0 CSI0":0[1]'
Opening media device /dev/media0
Enumerating entities
Found 11 entities
Enumerating pads and links
No link between "ar0135 1-0010":0 and "IPU0 CSI0":0
media_parse_setup_link: Unable to parse link

  "ar0135 1-0010":0->"IPU0 CSI0":0[1]
                                  ^
Unable to parse link: Invalid argument (22)

It's possible I'm attempting to go about this the wrong way, the whole 
v4l2 subsystem is a bit of a maze.

Cheers,
Jack.

[1] http://pastebin.com/EXZKq4jZ

  reply	other threads:[~2016-10-26 11:29 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 17:34 [PATCH v2 00/21] Basic i.MX IPUv3 capture support Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 01/21] [media] v4l2-async: move code out of v4l2_async_notifier_register into v4l2_async_test_nofity_all Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 02/21] [media] v4l2-async: allow subdevices to add further subdevices to the notifier waiting list Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 03/21] [media] v4l: of: add v4l2_of_subdev_registered Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 04/21] [media] v4l2-async: add new subdevices to the tail of subdev_list Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 05/21] [media] imx: Add i.MX SoC wide media device driver Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 06/21] [media] imx: Add IPUv3 media common code Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 07/21] [media] imx-ipu: Add i.MX IPUv3 CSI subdevice driver Philipp Zabel
2016-11-08  7:18   ` Ying Liu
2016-10-14 17:34 ` [PATCH v2 08/21] [media] imx: Add i.MX IPUv3 capture driver Philipp Zabel
2016-10-17 11:32   ` Jack Mitchell
2016-10-17 11:35     ` Marek Vasut
2016-10-17 11:40       ` Jack Mitchell
2016-10-17 12:12     ` Philipp Zabel
2016-10-19 16:22       ` Jack Mitchell
2016-10-19 19:25         ` Marek Vasut
2016-10-26 11:29           ` Jack Mitchell [this message]
2016-11-08  7:21   ` Ying Liu
2016-10-14 17:34 ` [PATCH v2 09/21] [media] platform: add video-multiplexer subdevice driver Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 10/21] [media] imx: Add i.MX MIPI CSI-2 " Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 11/21] [media] tc358743: put lanes in STOP state before starting streaming Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 12/21] ARM: dts: imx6qdl: Add capture-subsystem node Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 13/21] ARM: dts: imx6qdl: Add mipi_ipu1/2 multiplexers, mipi_csi, and their connections Philipp Zabel
2016-11-08  8:23   ` Ying Liu
2016-10-14 17:34 ` [PATCH v2 14/21] ARM: dts: imx6qdl: Add MIPI CSI-2 D-PHY compatible and clocks Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 15/21] ARM: dts: nitrogen6x: Add dtsi for BD_HDMI_MIPI HDMI to MIPI CSI-2 receiver board Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 16/21] gpu: ipuv3: add ipu_csi_set_downsize Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 17/21] [media] imx-ipuv3-csi: support downsizing Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 18/21] [media] add mux and video interface bridge entity functions Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 19/21] [media] video-multiplexer: set entity function to mux Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 20/21] [media] imx: Set i.MX MIPI CSI-2 entity function to bridge Philipp Zabel
2016-10-14 17:34 ` [PATCH v2 21/21] [media] tc358743: set entity function to video interface bridge Philipp Zabel
2016-10-17 10:18 ` [PATCH v2 00/21] Basic i.MX IPUv3 capture support Gary Bisson
2016-10-17 12:41   ` Philipp Zabel
2016-10-19 21:30 ` Sakari Ailus
     [not found]   ` <CAH-u=807nRYzza0kTfOMv1AiWazk6FGJyz6W5_bYw7v9nOrccA@mail.gmail.com>
2016-12-29 15:10     ` Jean-Michel Hautbois
2016-12-29 20:51     ` Robert Schwebel
2016-12-30 19:06       ` Marek Vasut
2016-12-30 20:26         ` Steve Longerbeam
2017-01-02 13:51           ` Jean-Michel Hautbois
2017-01-02 14:45             ` Hans Verkuil
2017-01-02 14:59               ` Jean-Michel Hautbois
2017-01-02 19:19                 ` Fabio Estevam
2017-01-02 19:20                 ` Steve Longerbeam
2017-01-02 17:04               ` Fabio Estevam
2017-01-02 19:17               ` Steve Longerbeam
2017-01-09 19:43           ` Philipp Zabel
2017-01-10  0:15             ` Steve Longerbeam
2017-01-10 23:52               ` Steve Longerbeam
2017-01-11  9:12                 ` Jean-Michel Hautbois
2017-01-11 12:10                 ` Philipp Zabel
2017-01-12 23:22                   ` Steve Longerbeam
2017-01-12 23:43                     ` Steve Longerbeam
2017-01-13  2:22                       ` Steve Longerbeam
2017-01-13 11:18                         ` Philipp Zabel
2017-01-13 11:04                     ` Philipp Zabel
2017-01-13 11:05                     ` Philipp Zabel
2017-01-14 20:26                       ` Steve Longerbeam
2017-01-16 11:49                         ` Philipp Zabel
2017-01-11 12:11               ` Philipp Zabel
2017-01-24 18:11             ` Philipp Zabel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ba71dd6d-9000-e52d-a7ba-00608e31a7fd@embed.me.uk \
    --to=ml@embed.me.uk \
    --cc=gary.bisson@boundarydevices.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@pengutronix.de \
    --cc=linux-media@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=mkl@pengutronix.de \
    --cc=p.zabel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=steve_longerbeam@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.