All of lore.kernel.org
 help / color / mirror / Atom feed
* IMX6 Media dev node not created
@ 2018-04-05 12:30 Ibtsam Ul-Haq
  2018-04-05 13:31 ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Ibtsam Ul-Haq @ 2018-04-05 12:30 UTC (permalink / raw)
  To: linux-media

Greetings everyone,

I'm running Linux 4.14.31 on an IMX6 QuadPlus based Phytec board
(PCM-058). I have connected an mt9p031 sensor to ipu1_csi0. The
problem is that I am not seeing the /dev/media0 node.

I have already read the fix mentioned in a previous discussion:

https://www.spinics.net/lists/linux-media/msg121965.html

and that does not seem to be the problem in my case as I do get the
"ipu1_csi0_mux" registered. Running a grep on dmesg I get:

[    3.235383] imx-media: Registered subdev ipu1_vdic
[    3.241134] imx-media: Registered subdev ipu2_vdic
[    3.246830] imx-media: Registered subdev ipu1_ic_prp
[    3.252115] imx-media: Registered subdev ipu1_ic_prpenc
[    3.266991] imx-media: Registered subdev ipu1_ic_prpvf
[    3.280228] imx-media: Registered subdev ipu2_ic_prp
[    3.285580] imx-media: Registered subdev ipu2_ic_prpenc
[    3.299335] imx-media: Registered subdev ipu2_ic_prpvf
[    3.350034] imx-media: Registered subdev ipu1_csi0
[    3.363017] imx-media: Registered subdev ipu1_csi1
[    3.375523] imx-media: Registered subdev ipu2_csi0
[    3.388615] imx-media: Registered subdev ipu2_csi1
[    3.560351] imx-media: Registered subdev ipu1_csi0_mux
[    3.566151] imx-media: Registered subdev ipu2_csi1_mux
[   10.525497] imx-media: Registered subdev mt9p031 0-0048
[   10.530816] imx-media capture-subsystem: Entity type for entity
mt9p031 0-0048 was not initialized!
[   10.569201] mt9p031 0-0048: MT9P031 detected at address 0x48
[   10.582895] imx-media: Registered subdev mt9p031 0-005d
[   10.588335] imx-media capture-subsystem: Entity type for entity
mt9p031 0-005d was not initialized!
[   10.618795] mt9p031 0-005d: MT9P031 not detected, wrong version 0xfffffffa

Also my config does appear to have the required options activated;
running "zcat /proc/config.gz | egrep 'VIDEO_MUX|MUX_MMIO|VIDEO_IMX'"
I get:

# CONFIG_MDIO_BUS_MUX_MMIOREG is not set
CONFIG_VIDEO_MUX=y
CONFIG_VIDEO_IMX_VDOA=m
CONFIG_VIDEO_IMX_MEDIA=y
CONFIG_VIDEO_IMX_CSI=y
CONFIG_MUX_MMIO=y

I would really appreciate if anyone could help me trying to find out
what went wrong and why the /dev/media0 node is not showing up.

Many thanks and best regards,
Ibtsam Haq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: IMX6 Media dev node not created
  2018-04-05 12:30 IMX6 Media dev node not created Ibtsam Ul-Haq
@ 2018-04-05 13:31 ` Fabio Estevam
  2018-04-05 14:24   ` Ibtsam Ul-Haq
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2018-04-05 13:31 UTC (permalink / raw)
  To: Ibtsam Ul-Haq, Steve Longerbeam, Philipp Zabel; +Cc: linux-media

Hi Ibtsam,

[Adding Steve and Philipp in case they can provide some suggestions]

On Thu, Apr 5, 2018 at 9:30 AM, Ibtsam Ul-Haq <ibtsam.haq.0x01@gmail.com> wrote:
> Greetings everyone,
>
> I'm running Linux 4.14.31 on an IMX6 QuadPlus based Phytec board
> (PCM-058). I have connected an mt9p031 sensor to ipu1_csi0. The
> problem is that I am not seeing the /dev/media0 node.

Can you share your dts?

> I have already read the fix mentioned in a previous discussion:
>
> https://www.spinics.net/lists/linux-media/msg121965.html
>
> and that does not seem to be the problem in my case as I do get the
> "ipu1_csi0_mux" registered. Running a grep on dmesg I get:
>
> [    3.235383] imx-media: Registered subdev ipu1_vdic
> [    3.241134] imx-media: Registered subdev ipu2_vdic
> [    3.246830] imx-media: Registered subdev ipu1_ic_prp
> [    3.252115] imx-media: Registered subdev ipu1_ic_prpenc
> [    3.266991] imx-media: Registered subdev ipu1_ic_prpvf
> [    3.280228] imx-media: Registered subdev ipu2_ic_prp
> [    3.285580] imx-media: Registered subdev ipu2_ic_prpenc
> [    3.299335] imx-media: Registered subdev ipu2_ic_prpvf
> [    3.350034] imx-media: Registered subdev ipu1_csi0
> [    3.363017] imx-media: Registered subdev ipu1_csi1
> [    3.375523] imx-media: Registered subdev ipu2_csi0
> [    3.388615] imx-media: Registered subdev ipu2_csi1
> [    3.560351] imx-media: Registered subdev ipu1_csi0_mux
> [    3.566151] imx-media: Registered subdev ipu2_csi1_mux
> [   10.525497] imx-media: Registered subdev mt9p031 0-0048
> [   10.530816] imx-media capture-subsystem: Entity type for entity
> mt9p031 0-0048 was not initialized!
> [   10.569201] mt9p031 0-0048: MT9P031 detected at address 0x48
> [   10.582895] imx-media: Registered subdev mt9p031 0-005d
> [   10.588335] imx-media capture-subsystem: Entity type for entity
> mt9p031 0-005d was not initialized!
> [   10.618795] mt9p031 0-005d: MT9P031 not detected, wrong version 0xfffffffa

Why do you have the camera in two I2C addresses: 0x48 and 0x5d?

> Also my config does appear to have the required options activated;
> running "zcat /proc/config.gz | egrep 'VIDEO_MUX|MUX_MMIO|VIDEO_IMX'"
> I get:
>
> # CONFIG_MDIO_BUS_MUX_MMIOREG is not set
> CONFIG_VIDEO_MUX=y
> CONFIG_VIDEO_IMX_VDOA=m
> CONFIG_VIDEO_IMX_MEDIA=y
> CONFIG_VIDEO_IMX_CSI=y
> CONFIG_MUX_MMIO=y
>
> I would really appreciate if anyone could help me trying to find out
> what went wrong and why the /dev/media0 node is not showing up.
>
> Many thanks and best regards,
> Ibtsam Haq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: IMX6 Media dev node not created
  2018-04-05 13:31 ` Fabio Estevam
@ 2018-04-05 14:24   ` Ibtsam Ul-Haq
  2018-04-05 14:36     ` Philipp Zabel
  0 siblings, 1 reply; 6+ messages in thread
From: Ibtsam Ul-Haq @ 2018-04-05 14:24 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Steve Longerbeam, Philipp Zabel, linux-media

Hi Fabio,

Thanks for your reply.

On Thu, Apr 5, 2018 at 3:31 PM, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Ibtsam,
>
> [Adding Steve and Philipp in case they can provide some suggestions]
>
> On Thu, Apr 5, 2018 at 9:30 AM, Ibtsam Ul-Haq <ibtsam.haq.0x01@gmail.com> wrote:
>> Greetings everyone,
>>
>> I'm running Linux 4.14.31 on an IMX6 QuadPlus based Phytec board
>> (PCM-058). I have connected an mt9p031 sensor to ipu1_csi0. The
>> problem is that I am not seeing the /dev/media0 node.
>
> Can you share your dts?
>

Certainly. The dts provided by the board manufacturer was meant to
work with their own kernel, I tried to modify it to work with the
mainline kernel.

The sensor related nodes are:

&i2c1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_i2c1>;
    clock-frequency = <100000>;
    status = "okay";

    mt9p031_0: cam0@48 {
        compatible = "aptina,mt9p031";
        reg = <0x48>;
        status = "okay";
        vdd-supply = <&reg_cam2v8>;
        vdd_io-supply = <&reg_cam2v8>;
        vaa-supply = <&reg_cam2v8>;

        clocks = <&sensor_camclk>;

        port {
            mt9p031_ep0: endpoint {
                input-clock-frequency = <27000000>;
                pixel-clock-frequency = <54000000>;
                pclk-sample = <1>;
                remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
            };
        };
    };

    mt9p031_1: cam1@5d {
        compatible = "aptina,mt9p031";
        reg = <0x5d>;
        status = "okay";
        vdd-supply = <&reg_cam2v8>;
        vdd_io-supply = <&reg_cam2v8>;
        vaa-supply = <&reg_cam2v8>;

        clocks = <&sensor_camclk>;

        port {
            mt9p031_ep1: endpoint {
                input-clock-frequency = <27000000>;
                pixel-clock-frequency = <54000000>;
                bus-width = <12>;
                pclk-sample = <1>;
                remote-endpoint = <&ipu2_csi1_mux_from_parallel_sensor>;
            };
        };
    };
};


And the IPU related stuff:

&ipu1_csi0_from_ipu1_csi0_mux {
    bus-width = <8>;
    data-shift = <12>; /* Lines 19:12 used */
    hsync-active = <1>;
    vsync-active = <1>;
};

&ipu1_csi0_mux_from_parallel_sensor {
    remote-endpoint = <&mt9p031_ep0>;
};

&ipu1_csi0 {
    pinctrl-names = "default";
    pinctrl-0 = <
        &pinctrl_sensor_cam0_data
        &pinctrl_sensor_cam0_ctrl
    >;
};

&ipu2_csi1_from_ipu2_csi1_mux {
    bus-width = <8>;
    data-shift = <12>; /* Lines 19:12 used */
    hsync-active = <1>;
    vsync-active = <1>;
};

&ipu2_csi1_mux_from_parallel_sensor {
    remote-endpoint = <&mt9p031_ep1>;
};

&ipu2_csi1 {
    pinctrl-names = "default";
    pinctrl-0 = <
        &pinctrl_sensor_cam1_data
        &pinctrl_sensor_cam1_ctrl
    >;
};


>> I have already read the fix mentioned in a previous discussion:
>>
>> https://www.spinics.net/lists/linux-media/msg121965.html
>>
>> and that does not seem to be the problem in my case as I do get the
>> "ipu1_csi0_mux" registered. Running a grep on dmesg I get:
>>
>> [    3.235383] imx-media: Registered subdev ipu1_vdic
>> [    3.241134] imx-media: Registered subdev ipu2_vdic
>> [    3.246830] imx-media: Registered subdev ipu1_ic_prp
>> [    3.252115] imx-media: Registered subdev ipu1_ic_prpenc
>> [    3.266991] imx-media: Registered subdev ipu1_ic_prpvf
>> [    3.280228] imx-media: Registered subdev ipu2_ic_prp
>> [    3.285580] imx-media: Registered subdev ipu2_ic_prpenc
>> [    3.299335] imx-media: Registered subdev ipu2_ic_prpvf
>> [    3.350034] imx-media: Registered subdev ipu1_csi0
>> [    3.363017] imx-media: Registered subdev ipu1_csi1
>> [    3.375523] imx-media: Registered subdev ipu2_csi0
>> [    3.388615] imx-media: Registered subdev ipu2_csi1
>> [    3.560351] imx-media: Registered subdev ipu1_csi0_mux
>> [    3.566151] imx-media: Registered subdev ipu2_csi1_mux
>> [   10.525497] imx-media: Registered subdev mt9p031 0-0048
>> [   10.530816] imx-media capture-subsystem: Entity type for entity
>> mt9p031 0-0048 was not initialized!
>> [   10.569201] mt9p031 0-0048: MT9P031 detected at address 0x48
>> [   10.582895] imx-media: Registered subdev mt9p031 0-005d
>> [   10.588335] imx-media capture-subsystem: Entity type for entity
>> mt9p031 0-005d was not initialized!
>> [   10.618795] mt9p031 0-005d: MT9P031 not detected, wrong version 0xfffffffa
>
> Why do you have the camera in two I2C addresses: 0x48 and 0x5d?
>

I intend to use two cameras simultaneously. In my current setup
however only one camera is physically connected.


>> Also my config does appear to have the required options activated;
>> running "zcat /proc/config.gz | egrep 'VIDEO_MUX|MUX_MMIO|VIDEO_IMX'"
>> I get:
>>
>> # CONFIG_MDIO_BUS_MUX_MMIOREG is not set
>> CONFIG_VIDEO_MUX=y
>> CONFIG_VIDEO_IMX_VDOA=m
>> CONFIG_VIDEO_IMX_MEDIA=y
>> CONFIG_VIDEO_IMX_CSI=y
>> CONFIG_MUX_MMIO=y
>>
>> I would really appreciate if anyone could help me trying to find out
>> what went wrong and why the /dev/media0 node is not showing up.
>>
>> Many thanks and best regards,
>> Ibtsam Haq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: IMX6 Media dev node not created
  2018-04-05 14:24   ` Ibtsam Ul-Haq
@ 2018-04-05 14:36     ` Philipp Zabel
  2018-04-05 14:52       ` Ibtsam Ul-Haq
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp Zabel @ 2018-04-05 14:36 UTC (permalink / raw)
  To: Ibtsam Ul-Haq, Fabio Estevam; +Cc: Steve Longerbeam, linux-media

Hi Ibtsam,

On Thu, 2018-04-05 at 16:24 +0200, Ibtsam Ul-Haq wrote:
> Hi Fabio,
> 
> Thanks for your reply.
> 
> On Thu, Apr 5, 2018 at 3:31 PM, Fabio Estevam <festevam@gmail.com> wrote:
> > Hi Ibtsam,
> > 
> > [Adding Steve and Philipp in case they can provide some suggestions]
> > 
> > On Thu, Apr 5, 2018 at 9:30 AM, Ibtsam Ul-Haq <ibtsam.haq.0x01@gmail.com> wrote:
> > > Greetings everyone,
> > > 
> > > I'm running Linux 4.14.31 on an IMX6 QuadPlus based Phytec board
> > > (PCM-058). I have connected an mt9p031 sensor to ipu1_csi0. The
> > > problem is that I am not seeing the /dev/media0 node.
> > 
> > Can you share your dts?
> > 
> 
> Certainly. The dts provided by the board manufacturer was meant to
> work with their own kernel, I tried to modify it to work with the
> mainline kernel.
> 
> The sensor related nodes are:
> 
[...]
>     mt9p031_1: cam1@5d {
>         compatible = "aptina,mt9p031";
>         reg = <0x5d>;
>         status = "okay";
[...]
> I intend to use two cameras simultaneously. In my current setup
> however only one camera is physically connected.

Try disabling this camera as long as it is not present, otherwise the
imx-media driver will wait forever for it to appear before creating
/dev/media0.

regards
Philipp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: IMX6 Media dev node not created
  2018-04-05 14:36     ` Philipp Zabel
@ 2018-04-05 14:52       ` Ibtsam Ul-Haq
  2018-04-05 15:01         ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Ibtsam Ul-Haq @ 2018-04-05 14:52 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Fabio Estevam, Steve Longerbeam, linux-media

On Thu, Apr 5, 2018 at 4:36 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Hi Ibtsam,
>
> On Thu, 2018-04-05 at 16:24 +0200, Ibtsam Ul-Haq wrote:
>> Hi Fabio,
>>
>> Thanks for your reply.
>>
>> On Thu, Apr 5, 2018 at 3:31 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> > Hi Ibtsam,
>> >
>> > [Adding Steve and Philipp in case they can provide some suggestions]
>> >
>> > On Thu, Apr 5, 2018 at 9:30 AM, Ibtsam Ul-Haq <ibtsam.haq.0x01@gmail.com> wrote:
>> > > Greetings everyone,
>> > >
>> > > I'm running Linux 4.14.31 on an IMX6 QuadPlus based Phytec board
>> > > (PCM-058). I have connected an mt9p031 sensor to ipu1_csi0. The
>> > > problem is that I am not seeing the /dev/media0 node.
>> >
>> > Can you share your dts?
>> >
>>
>> Certainly. The dts provided by the board manufacturer was meant to
>> work with their own kernel, I tried to modify it to work with the
>> mainline kernel.
>>
>> The sensor related nodes are:
>>
> [...]
>>     mt9p031_1: cam1@5d {
>>         compatible = "aptina,mt9p031";
>>         reg = <0x5d>;
>>         status = "okay";
> [...]
>> I intend to use two cameras simultaneously. In my current setup
>> however only one camera is physically connected.
>
> Try disabling this camera as long as it is not present, otherwise the
> imx-media driver will wait forever for it to appear before creating
> /dev/media0.
>

That worked like a charm! Thanks a lot guys, I would have never thought of that!

> regards
> Philipp


Best regards,
Ibtsam Haq

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: IMX6 Media dev node not created
  2018-04-05 14:52       ` Ibtsam Ul-Haq
@ 2018-04-05 15:01         ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2018-04-05 15:01 UTC (permalink / raw)
  To: Ibtsam Ul-Haq; +Cc: Philipp Zabel, Steve Longerbeam, linux-media

Hi Ibtsam,

On Thu, Apr 5, 2018 at 11:52 AM, Ibtsam Ul-Haq
<ibtsam.haq.0x01@gmail.com> wrote:

> That worked like a charm! Thanks a lot guys, I would have never thought of that!

Excellent!

If you have a chance, please submit the the dts patch that enables the
camera to the linux-arm-kernel mailing list for review and inclusion
to the mainline kernel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-05 15:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-05 12:30 IMX6 Media dev node not created Ibtsam Ul-Haq
2018-04-05 13:31 ` Fabio Estevam
2018-04-05 14:24   ` Ibtsam Ul-Haq
2018-04-05 14:36     ` Philipp Zabel
2018-04-05 14:52       ` Ibtsam Ul-Haq
2018-04-05 15:01         ` Fabio Estevam

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.