Custom camera module bringup on custom i.MX8M nano...

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom camera module bringup on custom i.MX8M nano...

1,391 Views
kippowens
Contributor IV

Hi,

We're trying to bring-up a custom camera package that utilizes the V4L2 and the ISI on the i.MX 8M Nano and I'm running into a couple of issues.  I seem to be hanging when I try to enable the clocks (during kernel boot, via the staging IMX media drivers).  We do not have a display, so I've tried disabling any references to dispmix, but is that going to cause an issue?

Am I missing something obvious?  I didn't see a place to initialize these things, but I don't have much experience with the imx media stack.

Apologies for the ambiguous question, but any guidance would be much appreciated.

Kipp

0 Kudos
8 Replies

1,322 Views
wijiwo3037
Contributor I

Thank you for sharing the suggestions. I hope other users find this as helpful. Please do write us back if you need further assistance. We are here to help! Carrabba’s Happy Hour

0 Kudos

1,363 Views
kippowens
Contributor IV

Thanks @joanxie for the response.  Those are what we've used as our references.  Unfortunately I'm seeing a hang when trying to enable the mipi gclk - seen in this function:

mipi_csis_imx8mn_gclk_enable

 I'm looking into whether we've setup our clock lines correctly, but if you have any insights on this, please let me know.  Thanks!

For reference here are the notable DTS nodes we're using:

&i2c4{
    clock-frequency = <400000>;
    pinctrl-names = "default", "gpio";
    pinctrl-0 = <&pinctrl_i2c4>;
    pinctrl-1 = <&pinctrl_i2c4_gpio>;
    scl-gpios = <&gpio5 20 GPIO_ACTIVE_LOW>;
    sda-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>;
    i2c-scl-rising-time-ns = <168>;
    i2c-scl-falling-time-ns = <4>;
    status = "okay";

    cam_ov9282: cam-ov9282@60 {
        status = "okay";
        reg = <0x60>;
        compatible = "private,ov9282";

        clocks = <&clk IMX8MN_CLK_CLKO1>;
        clock-names = "xvclk";
        assigned-clocks = <&clk IMX8MN_CLK_CLKO1>;
        assigned-clock-parents = <&clk IMX8MN_CLK_24M>;
        assigned-clock-rates = <19200000>;

        csi_id = <0>;
        mipi_csi;

        pinctrl-names = "default", "sleep";
        pinctrl-0 =
            <&pinctrl_csi_pwn>,
            <&pinctrl_csi_rst>;
        pinctrl-1 =
            <&pinctrl_csi_pwn>,
            <&pinctrl_csi_rst>;

        port {
            private_mipi: endpoint {
                data-lanes = <1 2>;
                link-frequencies = /bits/ 64 <400000000>;
                remote-endpoint = <&mipi1_sensor_ep>;
            };
        };
    };
};

...

&mipi_csi_1 {
    #address-cells = <1>;
    #size-cells = <0>;
    status = "okay";
    port@0 {
        reg = <0>;
        mipi1_sensor_ep: endpoint {
            remote-endpoint = <&private_mipi>;
            data-lanes = <2>;
            csis-hs-settle = <13>;
            csis-clk-settle = <2>;
            csis-wclk;
        };
    };
};
0 Kudos

1,348 Views
joanxie
NXP TechSupport
NXP TechSupport

do you mind sharing the logfile and what error messages?

 

0 Kudos

1,334 Views
kippowens
Contributor IV

Hi @joanxie -

It appears that we are hanging in the function: mxc_isi_get_irq_status.  Is there something I'm failing to enable that might be causing this?  Appreciate any insight here.

Thank you!
Kipp

0 Kudos

1,328 Views
kippowens
Contributor IV

Disabling isi_0 gets us past the hang at boot.  Any known issues that may cause a hang in ISI?  Potentially something I'm not configuring correctly?

0 Kudos

1,341 Views
kippowens
Contributor IV

Thanks for the reply, @joanxie.  Unfortunately, it's difficult to give much of a log as it simply hangs at boot-up time.  After instrumenting the various drivers in the staging/media/imx directory - it appears to be hanging during an attempt to enable the mipi clock (during the mipi_csis_probe function in imx8-mipi-csi2-sam.c).  Not 100% sure of that since there are multiple threads running and every boot is a little different, but that's what it looks like.  Any ideas?

0 Kudos

1,257 Views
joanxie
NXP TechSupport
NXP TechSupport

it's hard to comment if you don't share detailed information

 

0 Kudos