Hi all,
I have modified ov5640_mipi.c to support my camera sensor, ov4188. I2C communication works fine to read/write sensor register or control power, etc,..
In .dtsi file:
ipu_id = <0>;
csi_id = <1>;
v_channel = <0>;
lanes = <4>;
Linux kernel 3.10.53
However, MIPI_CSI_PHY_STATE is always 0x2f0 and when querying frame, it returns
"ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0"
I tried all dphy clock range in Debug steps for customer MIPI sensor.docx ( https://community.freescale.com/docs/DOC-94312#comment-29669 ), but no help. I also adjust PLL settings of the camera sensor to attain a good clock range as the Debug document, but it's still not correct.
After that, I found ov5640 datasheet to calculate mipi clk. It's 56Mhz, not 849Mhz.
Register address value
0x3037 0x13
0x3036 0x38
0x3035 0x14
0x3108 0x01
So, I am very curious about how to calculate ov5640 output clk to map 0x00000014 to csi2 as the following line:
mipi_csi2_write(info, 0x00000014, CSI2_PHY_TST_CTRL1);//ov5640 output clk
Can anyone show me how to calculate mipi dphy clk correctly? And what's problem with mipi_phy_state?
Thank you very much!!!
P/S:
Please see attach file for OV5640 PLL diagram
MIPI_CSI_PHY_STATE
yes, also search how to calculate Register 3035, 3036 for ov5640 camera.
step 1) camera should be send RGB888 direct to mem
step 2) camera should be sende RGB with 10bit/Color direct to Memory with convert 3x10bit into 32bit Memory
regards
Johann
Hi Johann,
Thank you very much for your interest!
I am not clear with your meaning when you mention "also search how to calculate Register 3035, 3036 for ov5640 camera". I listed register values of those in previous post.
Register address value
0x3037 0x13
0x3036 0x38
0x3035 0x14
0x3108 0x01
Do you know why 0x00000014, corresponding to 800-850 Mhz, is CSI2_PHY_TST_CTRL1?
Best regards,
An.
Hello nguyen,
Thanks for helping.
we are testing different fps, Resolution, 8/10bit, ...
and after change on of this parameter, 3035, 3036 must be configured.
But with which values ?
Is there a formula for this ?
What we need is a picture in our memory with RGB with 10bit/Color in VGA resolution.
it can be, that we Need the next better resolution.
Memory Format:
a) every color have 10bit and 6 empty bits. (1 RGB Pixel have 6Bytes)
b) one Pixel in a 4Byte value with R10 G10 B10 and 2 empty bits.
I've read that the ImageConverter in the IPU does not Support 10bit/value, so i thing the best way is write
the needed value from sensor direct into memory.
Regards
Johann
Johann,
I am stuck with similar case, so that I made this post. Let's look for some answer from others.
Best regards,
An.