Bringing up OV5645

Hi,

I am trying to bring up ov5645 in db820c board. My device tree entries for ov5645 are as follows:

    cci@a0c000 { 
            status = "ok";

            camera_board@3c {
                    compatible = "ovti,ov5645";
                    reg = <0x3c>;
                    enable-gpios = <&msmgpio 130 GPIO_ACTIVE_HIGH>;
                    reset-gpios = <&msmgpio 23 GPIO_ACTIVE_LOW>;
                    pinctrl-names = "default";
                    pinctrl-0 = <&camera_primary_default>;

                    clocks = <&mmcc CAMSS_MCLK1_CLK>;
                    clock-names = "xclk";
                    clock-frequency = <24000000>;

                    vdddo-supply = <&camera_vdddo_1v8>;
                    vdda-supply = <&camera_vdda_2v8>;
                    vddd-supply = <&camera_vddd_1v5>;

                    status = "ok";

                    port {
                            ov5645_2_ep: endpoint {
                                    clock-lanes = <1>;
                                    data-lanes = <0 2>;
                                    remote-endpoint = <&csiphy0_ep>;
                            };
                    };
            };

    };

camera_primary_default: camera_primary_default {
            mux_rst {
                    function = "gpio";
                    pins = "gpio23";
            };
            config_rst {
                    pins = "gpio23";
                    drive-strength = <16>;
                    bias-disable;
            };

            mux_mclk1 {
                    function = "cam_mclk";
                    pins = "gpio14";
            };

            config_mclk1 {
                    pins = "gpio14";
                    drive-strength = <16>;
                    bias-disable;
            };
            mux_enable {
                    function = "gpio";
                    pins = "gpio130";
            };
            config_enable {
                    pins = "gpio130";
                    drive-strength = <2>;
                    bias-pull-down;
                    output-high;
            };
    };

I am getting the following error during probe function:

[ 198.142180] i2c-qcom-cci a0c000.cci: master 1 queue 0 timeout
[ 198.144198] i2c-qcom-cci a0c000.cci: cci i2c xfer error -110
[ 198.150156] ov5645 6-003c: ov5645_write_reg_to: write reg error -110 on addr 0x3c: reg=0x3100, val=0x78
[ 198.150169] ov5645 6-003c: could not change i2c address
[ 198.150206] ov5645 6-003c: could not power up OV5645
[ 198.154873] ov5645: probe of 6-003c failed with error -110

The camera is connected to CCI1. Can anyone please help me in fixing this issue? @Loic @architt @ljking @anon91830841

Thanks,
Sakthi

Hi Sakthi,
Could you try changing the device tree to:
camera_board@3b {
compatible = “ovti,ov5645”;
reg = <0x3b>;

I only suggest this because I am using a custom board and this is what my device tree shows.
Thanks,
Kim