AnsweredAssumed Answered

ov5640 driver not showing up in logs

Question asked by Asma Alekar on Sep 17, 2019
Latest reply on Sep 17, 2019 by Wigros Sun

Hello Everyone,

 

I am trying to interface our custom board based on imx6ul with ov5640 camera sensor. I have updated device tree according to the schematics, but I dont see in logs ov5640 driver is probed at all(i have add debug code in ov5640.c(drivers/media/i2c/ov5640.c) 

 

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

pca9535_0:gpio@20 {
compatible = "nxp,pca9535";
gpio-controller;
#gpio-cells = <2>;
reg = <0x20>;

/*interrupt-parent = <&gpio1>;
interrupts = <1 8>; //TODO - if its correct , temporaroly added to not break device tree*/
interrupt-controller;
#interrupt-cells = <2>;

gpio-line-names = "MSR_POWER_EN", "n_RS232_SHDN", "ENET_POWER_EN", "ESP32_EN",
"CAMERA_PWDN", "CAMERA_PS_EN", "n_ESP32_BOOT_EN", "PRINTER_DETECT_POWER_EN",
"n_CHARGER_EN", "CHARGER_OTG", "CHARGER_INT", "CHARGER_STAT",
"DOCK_CHARGE_PRES", "LCD_DET", "UART_RS232_POS_CTS", "n_RS232_EN";
status = "okay";
};

pca9535_1:gpio@21 {
compatible = "nxp,pca9535";
gpio-controller;
#gpio-cells = <2>;
reg = <0x21>;
interrupt-controller;
#interrupt-cells = <2>;

gpio-line-names = "SCI_CLKDIV2", "SCI_CLKDIV1", "n_TOUCH_RESET", "5V_DISABLE",
"n_ENET_PWDN", "n_LED_STAT_ORN", "GAUGE_GP_OUT", "n_LED_STAT_GRN",
"n_ENET_RESET", "V_USB_OUT_EN", "n_MSR_RESET", "DC_IN_PRES",
"BATT_DET", "n_CAMERA_RESET", "BL_BOOST_EN", "SCI_1V8_EN";
status = "okay";
};

bq27421: fuel-gauge@55 {
compatible = "ti,bq27421";
reg = <0x55>;
};
pmic: pfuze100@8 {
compatible = "fsl,pfuze100";
reg = <0x8>;

regulators {

vgen2_reg: vgen2 {
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <1550000>;
};

vgen3_reg: vgen3 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};

vgen4_reg: vgen4 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
};
};


ov5640: ov5640@3c {
compatible = "ovti,ov5640";
reg = <0x78>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi1>;
clocks = <&clks IMX6UL_CLK_CSI>;
clock-names = "csi_mclk";
//pwn-gpios = <&pca9535_0 4 1>;
//rst-gpios = <&pca9535_1 5 0>;
csi_id = <0>;
mclk = <24000000>;
mclk_source = <0>;
DOVDD-supply = <&vgen4_reg>; /* 1.8v */
AVDD-supply = <&vgen3_reg>; /* 2.8v rev C board is VGEN3 rev B board is VGEN5 */
DVDD-supply = <&vgen2_reg>; /* 1.5v*/
status = "okay";
port {
ov5640_ep: endpoint {
remote-endpoint = <&csi1_ep>;
bus-width = <10>;
data-shift = <0>; /* lines 9:2 are used */
hsync-active = <0>;
vsync-active = <0>;
pclk-sample = <1>;
};
};
};

};

 

&csi {
status = "okay";

port {
csi1_ep: endpoint {
remote-endpoint = <&ov5640_ep>;
};
};
};

 

 

pinctrl_csi1: csi1grp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO06__CSI_MCLK 0x1b088
MX6UL_PAD_CSI_PIXCLK__CSI_PIXCLK 0x1b088
MX6UL_PAD_GPIO1_IO08__CSI_VSYNC 0x1b088
MX6UL_PAD_GPIO1_IO09__CSI_HSYNC 0x1b088
MX6UL_PAD_LCD_DATA17__CSI_DATA00 0x1b088
MX6UL_PAD_LCD_DATA16__CSI_DATA01 0x1b088
MX6UL_PAD_UART1_TX_DATA__CSI_DATA02 0x1b088
MX6UL_PAD_UART1_RX_DATA__CSI_DATA03 0x1b088
MX6UL_PAD_UART1_CTS_B__CSI_DATA04 0x1b088
MX6UL_PAD_UART1_RTS_B__CSI_DATA05 0x1b088
MX6UL_PAD_UART2_TX_DATA__CSI_DATA06 0x1b088
MX6UL_PAD_UART2_RX_DATA__CSI_DATA07 0x1b088
MX6UL_PAD_UART2_CTS_B__CSI_DATA08 0x1b088
MX6UL_PAD_UART2_RTS_B__CSI_DATA09 0x1b088
>;
};

 

my schematics is as shown below

 

 

i dont see ov5640.c as well as csi driver getting probed(i have added debug code in both of them. I have enabled csi.

please find attatched dts and log file.

 

Any help would be really helpful.

Attachments

Outcomes