I'm working to port a IMX290 sensor to iMX6 (Sabrelite) board.
I have all the i²c up and running but having problem with the mipi clock. The sensor want a 37.125MHz clock, but when I probe the clock I only get 33MHz on the wire.
Is this a limitation with iMX6 or why can't i get a faster clock? I've been trying to generate a 100MHz one too, but still get 33.
24 and 22MHz give correct clock.
Any suggestions?
Hi Andreas
max. allowable module frequencies are described in
Table 18-4. System Clock Frequency Values i.MX6DQ Reference Manual
http://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf
In your case you should analyze source parent of used mipi clock, if limitation
comes from source and increase it if possible. Sabrelite linux may differ from
nxp official linux releases so better to apply to boundary devices support.
Just for reference attached Linux Manual, one can check Chapter 40
MIPI - Camera Serial Interface Host Controller.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I got an answer back over mail from boundarydevices. And they said that because the pwm-clock is 66MHz, I can only get 33, 22, 11 and so on out of the clock.
So how do I write a device tree configuration that uses another clock? I can't find any examples. And how do I know which clock can be used? periph2 clock has rate of 528MHz, and 528/7 is close enough to 37.125 for my sensor.
But how would this dts-file look and is it possible to use that clock?
528/14 of course...
Hi Andreas
these questions are addressed by linux common clock framework documentation
https://www.kernel.org/doc/Documentation/clk.txt
https://elinux.org/images/b/b8/Elc2013_Clement.pdf
mipi clock sources can be found in Figure 18-2. Clock Tree i.MX6Q Reference Manual
Best regards
igor
I'm sorry, but I still can't understand how to do this.
And I'm not familiar enough with the iMX6 processor to decipher Fig 18-2.
Currently I have:
mipi_mclk: mipi_mclk {
compatible = "pwm-clock";
#clock-cells = <0>;
clock-frequency = <37125000>;
clock-output-names = "mipi_mclk";
pwms = <&pwm3 0 27>; /* 1 / 27 ns = 37,125 MHz */
};
How would I do to base this clock on something else than pwm3? I guess I cant have the first line, as it'll no longer be a pwm clock, and the last line will neither be possible for the same reason.
I would be super happy if someone could point me in the right direction. I can't find any documentation with examples on how to do this.
such dts record as below is not used in nxp official bsps, it was developed by boundary devices for its bsps:
mipi_mclk: mipi_mclk {
compatible = "pwm-clock"
linux-imx6/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
so suggest to apply to boundary devices support for assistance
dts folder of offical nxp bsp:
dts\boot\arm\arch - linux-imx - i.MX Linux kernel
Difference between nxp "official" bsps and bsps developed by third parties is described on:
difference between Yocto Community BSP and Freescale BSP Release
[meta-freescale] Preferred kernel for mx7 machine
FSL Community BSP Release Notes 2.4 documentation
support policy is described on below link as follows:
Best regards
igor