How to configure camera related gpio's in dts file

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to configure camera related gpio's in dts file

ソリューションへジャンプ
2,334件の閲覧回数
bandarulavanya
Contributor V

Hi All,

I am using my custom board which is similar to sabresd board in want to configure the below given gpio's in dts file if any one knows can you please help me.

NOTE: kernel version is 3.14

(1,12) -- pwn-gpio (output high)

(1,13) -- rst-gpio (output high)

(1,7) -- camera enable (it should be "output high" )

I given like this

ov1062x: ov1062x@30 {

                compatible = "ovti,ov1062x";

                reg = <0x30>;

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_ipu1_2>;

                clocks = <&clks IMX6QDL_CLK_CKO>;

                clock-names = "csi_mclk";

                DOVDD-supply = <&vgen4_reg>; /* 1.8v */

                AVDD-supply = <&vgen3_reg>;  /* 2.8v, on rev C board is VGEN3,

                                             /*   on rev B board is VGEN5 */

                DVDD-supply = <&vgen2_reg>;  /* 1.5v*/

                pwn-gpios = <&gpio1 12 1>; 

                rst-gpios = <&gpio1 13 1>; 

                enable-gpios = <&gpio1 7 1>;

                csi_id = <0>;

                mclk = <24000000>;

                mclk_source = <0>;

        };

In other place where and all i need to give to work  my camera properly.

And one more issue i am facing, whenever i am inserting mxc_v4l2_capture.ko it is giving

ERROR:V4l2 Slave not found!

But i inserted my driver before inserting mxc_v4l2_capture.ko

Can any one please hep me to sort it out , Thanks in advance.

Thanks & Regards,

Lavanya

ラベル(6)
0 件の賞賛
返信
1 解決策
1,707件の閲覧回数
bandarulavanya
Contributor V

Hi igorpadykov ,

Thank you i2c SDA line problem is there the camera board to Main board DVP cable is not working properly so we replaced that,

Now i can able to capture the video.

Thanks & Regards,

Lavanya

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,707件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

"camera ov5640 is not found" may mean that

there is no i2c communication with camera.

One can debug probe() function and check signals

with oscilloscope.

Best regards

igor

1,708件の閲覧回数
bandarulavanya
Contributor V

Hi igorpadykov ,

Thank you i2c SDA line problem is there the camera board to Main board DVP cable is not working properly so we replaced that,

Now i can able to capture the video.

Thanks & Regards,

Lavanya

0 件の賞賛
返信
1,707件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Bandaru

one can look at example in imx6qdl-sabresd.dtsi :

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/arch/arm/boot/dts/imx6qdl-sabresd.d...

        pwn-gpios = <&gpio1 16 1>;   /* active low: SD1_DAT0 */

        rst-gpios = <&gpio1 17 0>;   /* active high: SD1_DAT1 */

check how these pins are parsed and add any other control gpio, if necessary using sources

linux/drivers/media/platform/mxc/capture/ov5640.c

Best regards

igor

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

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

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

0 件の賞賛
返信
1,707件の閲覧回数
bandarulavanya
Contributor V

Hi igorpadykov,

If i give like this dts file can i see these pins in /sys/kernel/debug/gpio

pwn-gpios = <&gpio1 16 1>;   /* active low: SD1_DAT0 */

        rst-gpios = <&gpio1 17 0>;   /* active high: SD1_DAT1 */ 

Thanks & Regards,

Lavanya

0 件の賞賛
返信
1,707件の閲覧回数
bandarulavanya
Contributor V

Hi igorpadykov,

Now my PWDN and RST pins are configured properly.

But i am not getting any clock in CSI_MCLK or PCLK.

When i probed i can able to get MCLK and RST and PWDN  are proper but in dmesg it is giving like below

12 pwn_pin

13 reset_pin

-2046695040 csi_mclk

24000000 mclk

0 mclk_source

0 csi_id

ov5640_read_reg:write reg error:reg=300a

camera ov5640 is not found

My dts Configurations are below

  ov564x: ov564x@3c {

                compatible = "ovti,ov564x";

                reg = <0x3c>;

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_ipu1_2>;

                clocks = <&clks IMX6QDL_CLK_CKO>;

                clock-names = "csi_mclk";

                DOVDD-supply = <&vgen4_reg>; /* 1.8v */

                AVDD-supply = <&vgen3_reg>;  /* 2.8v, on rev C board is VGEN3,

                                                on rev B board is VGEN5 */

                DVDD-supply = <&vgen2_reg>;  /* 1.5v*/

                /*pwn-gpios = <&gpio1 16 1>;    active low: SD1_DAT0

                rst-gpios = <&gpio1 17 0>;    active high: SD1_DAT1  */ //using for wifi in FS_WCAM

                pwn-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;   /* FS_WCAM active high: SD2_DAT3 */

                rst-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;   /* FS_WCAM active low: SD2_DAT2 */

                csi_id = <0>;

                mclk = <24000000>;

                mclk_source = <0>;

        };

pinctrl_ipu1_2: ipu1grp-2 { /* parallel camera */

                        fsl,pins = <

                                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_DATA_EN__IPU1_CSI0_DATA_EN 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_SD2_DAT2__GPIO1_IO13            0x80000000

                                MX6QDL_PAD_SD2_DAT3__GPIO1_IO12            0x80000000

                        >;

                };

Kindly Help me how can i solve this issue.

0 件の賞賛
返信