CAM0_MCLK0/1 camera clock enable in jetson TX2

i wan to give mclk0 or mclk1 to one of my camera but i am not getting this clock when i am probing it.
how i can enable these mclock0 and mclk1.


Any help will be appriciated

Define the mclk in your sensor driver and device tree, the mclk should be enabled during the drive probe().

i am getting mclk0(exterperiph1) of 24MHZ on my ov2735 sensor but its amplitude is not 1.8 volt and then i2c is not working,it doesnot get acknowledgment from slave but when i am giving external clock of 24MHZ to mclk0 line to the sensor my i2c is working and slave address is detected.

how i can resolve this,any help will be appreciated.

Does the ov2735 implement the xxx_power_get() function like ov5693?

A i am using TX2 EVK so i am using ov5693 sensor code as a base for ov2735 and changing the things,i am using same csi lane,power and reset pin on evk same as ov5693.
so this xxx_power_get() is already there and this function is passing also i am using same clock as ov5693 using(exterperiph1)

what could be the issue.

Remove the camera_common_mclk_disable(s_data) function call from the driver and probe the clock to confirm the output clock in the right status.

out put clock means you are saying mipi clock or mclk0,we are probing mclk0 but getting same behavior after disabling camera_common_mclk_disable function.
we are getting 24mHZ clock but its amplitude is not proper or same as we checked with ov5693.

can you please tell what could be the issue.

Do you mean you probe the mclk0 get 24 mHz but the sensor still not ack?

I am saying if i am giving 24MHZ from externel clock to ov2735 sensor directly,it is detected on i2c bus and my probe got success but when we are using ov2735 clock that is exteriph1(24MZ) i am able to see 24MHZ clock on oscillsocope but its amplitude is not proper and my device is not detected on i2c bus and probe got failed.

could you please help me on this

OK, that tell the mclk0 was config as well as the device tree define.
You I have no idea why your sensor can’t working with internal clock but external clock.
May need HW guide to check.

is any other configuration required for mclk0 or it will work as it is.
if i use mclk1 instead of mclk0,will it work.

i was using another sensor on tx2 with mclk1,it is working fine.

I can’t tell, but there’s no problem report from others user. BTW can you try mclk0 for the sensor working with mclk1.

i was running v4l2 utility to capture frame from my sensor,i am not able to understand the issue.
v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=BG10 --stream-mmap --stream-count=500 -d /dev/video0 --stream-to=ov2735.raw

getting error:
[ 64.862778] tegra-vi4 PXL_SOF syncpt timeout! err = -11
[ 64.862781] tegra-vi4 tegra_channel_error_recovery: attempting to reset the capture channel
[ 65.074865] tegra-vi4 PXL_SOF syncpt timeout! err = -11
[ 65.074868] tegra-vi4 tegra_channel_error_recovery: attempting to reset the capture channel
[ 65.286912] tegra-vi4 PXL_SOF syncpt timeout! err = -11

when i trace these in kernel,i got below messages

kworker/4:0-36 [004] … 103.117994: rtos_queue_peek_from_isr_failed: tstamp:3500119660 queue:0x0b4b4500
kworker/4:0-36 [004] … 103.285929: rtos_queue_peek_from_isr_failed: tstamp:3505119652 queue:0x0b4b4500
kworker/4:0-36 [004] … 103.457884: rtos_queue_peek_from_isr_failed: tstamp:3510119646 queue:0x0b4b4500
kworker/4:0-36 [004] … 103.625840: rtos_queue_peek_from_isr_failed: tstamp:3515119640 queue:0x0b4b4500
kworker/4:0-36 [004] … 103.737795: rtos_queue_peek_from_isr_failed: tstamp:3520119634 queue:0x0b4b4500
kworker/4:0-36 [004] … 103.905766: rtos_queue_peek_from_isr_failed: tstamp:3525119626 queue:0x0b4b4500
kworker/4:0-36 [004] … 104.073730: rtos_queue_peek_from_isr_failed: tstamp:3530119618 queue:0x0b4b4500

could you please help me on this.

MCLK0 is 1.8v supplied. How did you measure the voltage level of output MCLK0? Is there any load when measuring? Can you share the signal waveform of MCLK0?

The trace log tell NVCSI/VI didn’t receive any validate data from the MIPI bus.
You may need to probe the MIPI signal to make sure the sensor output data as MIPI spec.

we are able to see data on mipi data line but but we are not getting anything on mipi clk line,we checked with oscilloscope ,how we can debug it.

is camera framework also come picture in to this or register setting?

No, the MIPI clock is output from the sensor. It’s could be sensor not configure well or HW problem.

so you are saying we should check sensor mipi clock register setting?
i checked all the sensor register it is writing and reading properly.

Please have consult with the sensor vendor if can get help on this.

i am not able to clock on mipi lane,what could be the reason,does it related to device tree.