imx6q-sabrelite (bdsl) dtb i2c

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

imx6q-sabrelite (bdsl) dtb i2c

1,308 Views
shlomiperlman
Contributor II

HI,

im trying to register an i2c camera sensor and when i set the device in the dtb like this:

gc0309: gc0309@21 {

        compatible = "fsl,gc0309";

        reg = <0x21>;

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_gc0309>;

        clocks = <&clks 147>;

        clock-names = "csi_mclk";

        ipu_id = <1>;

        csi_id = <0>;

        mclk = <24000000>;

        mclk_source = <0>;

        clock-frequency = <100000>;

    };

the device doesnt send i2c ACK.

if i don’t register the device then i can use the linux i2cset tool and get an ACK (successfully talk to the device).

also i'm setting :

pinctrl_gc0309: pinctrl_gc0309 {

            fsl,pins = <           

                MX6QDL_PAD_CSI0_DATA_EN__GPIO5_IO20     0x00000000     /* P3 - should always be 0 - enable gc0309 camera sensor on I2C1*/

                MX6QDL_PAD_SD1_DAT0__GPIO1_IO16         0x000b0     /* disable gc0309 camera sensor LED on I2C1.*/

                MX6QDL_PAD_GPIO_8__GPIO1_IO08         0x000b0     /*R5 - turn to 0(reset) -> turn to 1(normal)*/

            >;

        };

I need to know how to select the ipu and csi properly, where is the clocks' list defined (currently 147 based on ov5642) and how to access these gpio's from the driver after they are initialized?

(as if to pull the reset up and down).

thanks !

Labels (3)
Tags (3)
0 Kudos
Reply
2 Replies

980 Views
igorpadykov
NXP Employee
NXP Employee

Hi shlomi

one can check i2c pinctlr settings, like pinctrl_i2c2_ov5642:

linux-imx6/imx6qdl-sabrelite.dtsi at boundary-imx_3.14.28_1.0.0_ga · boundarydevices/linux-imx6 · Gi...

main steps for camera integration are given in attached Porting Guide Chapter 7

Supporting the i.MX 6Dual/6Quad/6Solo/6DualLite Camera Sensor with CSI

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

980 Views
shlomiperlman
Contributor II

Hi,

thanks for the answer, it helped.

what i dont see is the read from /dev/video0 or the rgb lines in any of the references.

does the ioctl of the v4l2_int_device read automatically from /dev/video0 or should I open the dev from the driver myself to get the input?

is there an example of how to bind them (the rgb pins) in the dtb to the camera driver ? (is it necessary?)

thanks,

0 Kudos
Reply