How To set MIPI Clock in IMX8M Nano?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How To set MIPI Clock in IMX8M Nano?

1,087件の閲覧回数
milav_soni
Contributor III

Hello Guys,

I want to set MIPI Clock in imx8m nano Board.

Can you please help me with how I can add frequency to the Device Tree File?

And what is the meaning of "link-frequencies" in the following snapshot?

  ov5640: ov5640_mipi@3c {
                compatible = "ovti,ov5640";
                reg = <0x36>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi_pwn>, <&pinctrl_csi_rst>;
                clocks = <&clk IMX8MN_CLK_CLKO1>;
                clock-names = "xclk";
                assigned-clocks = <&clk IMX8MN_CLK_CLKO1>;
                assigned-clock-parents = <&clk IMX8MN_CLK_24M>;
                assigned-clock-rates = <27000000>;
                csi_id = <0>;
                xclk-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
                reset-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
                mclk = <27000000>;
                mclk_source = <0>;
                mipi_csi;
                status = "okay";
                port {
                        ov5640_ep: endpoint {
                                remote-endpoint = <&mipi1_sensor_ep>;
                                data-lanes = <1 2 3 4>;
                                clocks-lanes = <0>;
                                link-frequencies = /bits/ 64 <496000000>;
                        };
                };
        };
&mipi_csi_1 {
        #address-cells = <1>;
        #size-cells = <0>;
        status = "okay";
        port@0 {
                reg = <0>;
                mipi1_sensor_ep: endpoint {
                        remote-endpoint = <&ov5640_ep>;
                        data-lanes = <4>;
                        link-frequencies = /bits/ 64 <496000000>; //extra
                        csis-hs-settle = <13>; //orig
                        csis-clk-settle = <2>; //orig
                        csis-wclk;
                };
        };
};

 

Following is the imx8mn.dtsi file snapshot.

 mipi_csi_1: csi@32e30000 {
                        compatible = "fsl,imx8mn-mipi-csi";
                        reg = <0x0 0x32e30000 0x0 0x10000>;
                        interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
                        clock-frequency = <333000000>;
                        clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>,
                                 <&clk IMX8MN_CLK_DISP_AXI_ROOT>,
                                 <&clk IMX8MN_CLK_DISP_APB_ROOT>;
                        clock-names = "mipi_clk", "disp_axi", "disp_apb";
                        assigned-clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>;
                        assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>;
                        assigned-clock-rates = <333000000>;
                        bus-width = <4>;
                        csi-gpr = <&mipi2csi_gasket>;
                        power-domains = <&mipi_pd>;
                        resets = <&mipi_csi_resets>;
                        status = "disabled";
                };

 

please help me out with how I can update the MIPI D−PHY Clock Rate?

Thank You

ラベル(1)
0 件の賞賛
3 返答(返信)

1,073件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

What the value of clock do you want to generate?

0 件の賞賛

1,070件の閲覧回数
milav_soni
Contributor III

Hello @Zhiming_Liu 

Thank You for your Reply.

Actually, I want to know what is the meaning of link frequencies in the following section?

  ov5640: ov5640_mipi@3c {
                compatible = "ovti,ov5640";
                reg = <0x36>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_csi_pwn>, <&pinctrl_csi_rst>;
                clocks = <&clk IMX8MN_CLK_CLKO1>;
                clock-names = "xclk";
                assigned-clocks = <&clk IMX8MN_CLK_CLKO1>;
                assigned-clock-parents = <&clk IMX8MN_CLK_24M>;
                assigned-clock-rates = <27000000>;
                csi_id = <0>;
                xclk-gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
                reset-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
                mclk = <27000000>;
                mclk_source = <0>;
                mipi_csi;
                status = "okay";
                port {
                        ov5640_ep: endpoint {
                                remote-endpoint = <&mipi1_sensor_ep>;
                                data-lanes = <1 2 3 4>;
                                clocks-lanes = <0>;
                                link-frequencies = /bits/ 64 <496000000>;  --> What is the menaing of this?
                        };
                };
        };

&mipi_csi_1 {
        #address-cells = <1>;
        #size-cells = <0>;
        status = "okay";
        port@0 {
                reg = <0>;
                mipi1_sensor_ep: endpoint {
                        remote-endpoint = <&ov5640_ep>;
                        data-lanes = <4>;
                        link-frequencies = /bits/ 64 <496000000>; //extra
                        csis-hs-settle = <13>; //orig
                        csis-clk-settle = <2>; //orig
                        csis-wclk;
                };
        };
};

Is link frequencies mean pixel frequency? or else bandwidth?

Another thing I want to know is that, Is my camera MIPI rate and imx8m nano MIPI rate are the same or not?

The camera set the following values,

  1. Pixel clock:- 82.8 Mhz
  2. Data rate per lane:- 206Mpbs/lane
  3. MIPI Clock Rate:- 103 Mhz

Can you please help me out?

Thank You

 

0 件の賞賛

1,059件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

For the meaning of camera dts node, you can find answers in Documentation/devicetree/bindings/media/video-interfaces.txt

 

 Is my camera MIPI rate and imx8m nano MIPI rate are the same or not?

-->Not same but the MIPI  support this rate.

 

0 件の賞賛