cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Meghuiyer25
Contributor
Contributor
728 Views
Registered: ‎04-18-2021

MIPI CS2 + Video Frame Buffer: Device Tree pl.dtsi generated with no port definitions

Hello folks, Software v2020.1 Hardware: Zedboard + FMC + PCAM for Port A 

I am trying to get an example setup running with the MIPI CSI 2 RX subsystem connected to the Video Frame Buffer to read it. 

See the following diagram 

Meghuiyer25_2-1621520997359.png

As I export the hardware to Vitis to create the device tree files, the pl.dtsi is generated as shown below. It can be seen that in mipi_csi2_rx_subsystem_0 the ports entry is not created. 

What I would expect are entries like:

csiss_ports: ports {
#address-cells = <1>;
#size-cells = <0>;
csiss_port0: port@0 {
/* Fill cfa-pattern=rggb for raw data types, other fields video-format and video-width user needs to fill */
reg = <0>;
xlnx,cfa-pattern = "rggb";
xlnx,video-format = <12>;
xlnx,video-width = <8>;
csiss_out: endpoint {
remote-endpoint = <&demosaic_in>;
};
};
csiss_port1: port@1 {
/* Fill cfa-pattern=rggb for raw data types, other fields video-format,video-width user needs to fill */
/* User need to add something like remote-endpoint=<&out> under the node csiss_in:endpoint */
reg = <1>;
xlnx,cfa-pattern = "rggb";;
xlnx,video-format = <12>;
xlnx,video-width = <8>;
csiss_in: endpoint {
};
};
};
};


demosaic_ports: ports {
#address-cells = <1>;
#size-cells = <0>;
demosaic_port0: port@0 {
/* For cfa-pattern=rggb user needs to fill as per BAYER format */
reg = <0>;
xlnx,cfa-pattern = "rggb";
xlnx,video-width = <8>;
demosaic_in: endpoint {
remote-endpoint = <&csiss_out>;

};

};

};

};

 

Hello folks, Software v2020.1 Hardware: Zedboard + FMC + PCAM for Port A 

I am trying to get an example setup running with the MIPI CSI 2 RX subsystem connected to the Video Frame Buffer to read it. 

See the following diagram 

 

 

 

As I export the hardware to Vitis to create the device tree files, the pl.dtsi is generated as shown below. It can be seen that in mipi_csi2_rx_subsystem_0 the ports entry is  not created.

What I would expect are entries like:

csiss_ports: ports {
#address-cells = <1>;
#size-cells = <0>;
csiss_port0: port@0 {
/* Fill cfa-pattern=rggb for raw data types, other fields video-format and video-width user needs to fill */
reg = <0>;
xlnx,cfa-pattern = "rggb";
xlnx,video-format = <12>;
xlnx,video-width = <8>;
csiss_out: endpoint {
remote-endpoint = <&demosaic_in>;
};
};
csiss_port1: port@1 {
/* Fill cfa-pattern=rggb for raw data types, other fields video-format,video-width user needs to fill */
/* User need to add something like remote-endpoint=<&out> under the node csiss_in:endpoint */
reg = <1>;
xlnx,cfa-pattern = "rggb";;
xlnx,video-format = <12>;
xlnx,video-width = <8>;
csiss_in: endpoint {
};
};
};
};


demosaic_ports: ports {
#address-cells = <1>;
#size-cells = <0>;
demosaic_port0: port@0 {
/* For cfa-pattern=rggb user needs to fill as per BAYER format */
reg = <0>;
xlnx,cfa-pattern = "rggb";
xlnx,video-width = <8>;
demosaic_in: endpoint {
remote-endpoint = <&csiss_out>;

};

};

};

};

 

What I have 

mipi_csi2_rx_subsyst_0: mipi_csi2_rx_subsystem@43c40000 {
            clock-names = "lite_aclk", "dphy_clk_200M", "video_aclk";
            clocks = <&misc_clk_0>, <&misc_clk_1>, <&misc_clk_0>;
            compatible = "xlnx,mipi-csi2-rx-subsystem-5.0";
            interrupt-names = "csirxss_csi_irq";
            interrupt-parent = <&intc>;
            interrupts = <0 29 4>;
            reg = <0x43c40000 0x1000>;
            xlnx,axis-tdata-width = <32>;
            xlnx,cal-mode = "NONE";
            xlnx,clk-io-swap = "false";
            xlnx,clk-lane-io-position = <0x0>;
            xlnx,clk-lp-io-swap = "false";
            xlnx,csi-en-activelanes = "true";
            xlnx,csi-en-crc = "true";
            xlnx,csi-filter-userdatatype = "false";
            xlnx,csi-opt1-regs = "false";
            xlnx,csi-pxl-format = "RAW10";
            xlnx,csi2rx-dbg = <0x0>;
            xlnx,data-lane0-io-position = <0x2>;
            xlnx,data-lane1-io-position = <0x4>;
            xlnx,data-lane2-io-position = <0x6>;
            xlnx,data-lane3-io-position = <0x8>;
            xlnx,dl0-io-swap = "false";
            xlnx,dl0-lp-io-swap = "false";
            xlnx,dl1-io-swap = "false";
            xlnx,dl1-lp-io-swap = "false";
            xlnx,dl2-io-swap = "false";
            xlnx,dl2-lp-io-swap = "false";
            xlnx,dl3-io-swap = "false";
            xlnx,dl3-lp-io-swap = "false";
            xlnx,dphy-lanes = <0x2>;
            xlnx,dphy-mode = "SLAVE";
            xlnx,en-active-lanes ;
            xlnx,en-bg0-pin0 = "false";
            xlnx,en-bg0-pin6 = "false";
            xlnx,en-bg1-pin0 = "false";
            xlnx,en-bg1-pin6 = "false";
            xlnx,en-bg2-pin0 = "false";
            xlnx,en-bg2-pin6 = "false";
            xlnx,en-bg3-pin0 = "false";
            xlnx,en-bg3-pin6 = "false";
            xlnx,en-clk300m = "false";
            xlnx,en-cnts-byte-clk = "false";
            xlnx,en-csi-v2-0 = "false";
            xlnx,en-exdesigns = "false";
            xlnx,en-timeout-regs = "false";
            xlnx,en-vcx = "false";
            xlnx,esc-timeout = <0x6400>;
            xlnx,exdes-board = "ZCU102";
            xlnx,exdes-config = "MIPI_Video_Pipe_Camera_to_Display";
            xlnx,exdes-fmc = "LI-IMX274MIPI-FMC V1.0 Single Sensor";
            xlnx,fifo-rd-en-control = "true";
            xlnx,hs-line-rate = <0x118>;
            xlnx,hs-settle-ns = <0xaa>;
            xlnx,hs-timeout = <0x10005>;
            xlnx,idly-tap = <0x1>;
            xlnx,init = <0x186a0>;
            xlnx,is-7series = "true";
            xlnx,is-versal = "false";
            xlnx,lprx-disable-extport = <0x0>;
            xlnx,max-lanes = <2>;
            xlnx,mipi-slv-int = <0x0>;
            xlnx,ooc-vid-clk = "6.666";
            xlnx,ppc = <1>;
            xlnx,rcve-alt-deskew-seq = "false";
            xlnx,rcve-deskew-seq = "false";
            xlnx,share-idlyctrl = "false";
            xlnx,stretch-line-rate = <0xdac>;
            xlnx,vc = <4>;
            xlnx,vfb ;
        };
        misc_clk_1: misc_clk_1 {
            #clock-cells = <0>;
            clock-frequency = <200000000>;
            compatible = "fixed-clock";
        };
        v_demosaic_0: v_demosaic@43c00000 {
            clock-names = "ap_clk";
            clocks = <&misc_clk_0>;
            compatible = "xlnx,v-demosaic-1.0", "xlnx,v-demosaic";
            interrupt-names = "interrupt";
            interrupt-parent = <&intc>;
            interrupts = <0 30 4>;
            reg = <0x43c00000 0x10000>;
            xlnx,s-axi-ctrl-addr-width = <0x6>;
            xlnx,s-axi-ctrl-data-width = <0x20>;
        };

 

11 Replies
watari
Teacher
Teacher
687 Views
Registered: ‎06-16-2013

Hi @Meghuiyer25 

 

Did you make sure the following AR ?

 

https://www.xilinx.com/support/answers/75674.html

 

Best regards,

0 Kudos
Meghuiyer25
Contributor
Contributor
626 Views
Registered: ‎04-18-2021

hello @watari 

 

Screenshot from 2021-05-21 14-48-59.png

After adding the patch and https://www.xilinx.com/support/answers/76392.html patch from this record. I still have same issue.

0 Kudos
watari
Teacher
Teacher
566 Views
Registered: ‎06-16-2013

Hi @Meghuiyer25 

 

Would you share the followings to clarify my understanding ?

 

- related dts file which you got.

- fully boot log message

- clock frequency and source for AXI4 Stream on ex. demosic.

 

Best regards,

0 Kudos
hokim
Scholar
Scholar
542 Views
Registered: ‎10-21-2015

Hi

Your device tree is not complete: there is no DT node for image sensor(ov5640) and endpoint connections are incomplete

You should complete your device tree by referring to https://www.xilinx.com/Attachment/75268%20-%20Device-Tree%20changes%20and%20Patches%20required.pdf#page=11

You might need to patch ov5640 driver

https://forums.xilinx.com/t5/Video-and-Audio/petalinux-2020-2-ov5640-doesn-t-work/m-p/1183255#M35848

0 Kudos
Meghuiyer25
Contributor
Contributor
489 Views
Registered: ‎04-18-2021

 hi @hokim Thank you for the patch. I am using v2020.1 can I still use them? Before in v2019.1 I used to use a patch for pcam camera. 

 

-> You should complete your device tree by referring to https://www.xilinx.com/Attachment/75268%20-%20Device-Tree%20changes%20and%20Patches%20required.pdf#page=11

In our case, we are mainly concerned for grabbing the frames in the sd card. is it necessary to include an audio block for frame write? we have an issue ( https://forums.xilinx.com/t5/Video-and-Audio/Petalinux-boot-freezes-while-booting/m-p/1241153/emcs_t/S2h8ZW1haWx8bWVudGlvbl9zdWJzY3JpcHRpb258S09ORlAzSUpJMFo5NkV8MTI0MTE1M3xBVF9NRU5USU9OU3xoSw#M38279  ) while saving the frames. Do you think it is because the node not complete in our device tree? 

0 Kudos
hokim
Scholar
Scholar
458 Views
Registered: ‎10-21-2015

Hi

My patch can be applied to 2020.1

See MIPI CSI-Rx Pipeline  starting from page 11

Incomplete device tree for video pipeline doesn't make /dev/mediaX

 

0 Kudos
Meghuiyer25
Contributor
Contributor
416 Views
Registered: ‎04-18-2021

thank you for the patch, 
Could you please highlight the incompleteness of the device-tree? I have not really understaood what is missing. My pipeline is 

Meghuiyer25_0-1621954110245.png

 

Tags (1)
0 Kudos
Meghuiyer25
Contributor
Contributor
396 Views
Registered: ‎04-18-2021

Hi @watari 
- related dts file which you got. ( pl attached )

- fully boot log message ( putty log )

- I/P clock frequency 100MHz and source for AXI4 Stream on ex. demosic.- 150MHz

0 Kudos
hokim
Scholar
Scholar
379 Views
Registered: ‎10-21-2015

Hi 

Your figure is good

But your devicetree is not consistent with your figure

Where are the DT nodes of ov5640 and vcap?

0 Kudos
Meghuiyer25
Contributor
Contributor
367 Views
Registered: ‎04-18-2021

hi @hokimhere is my device treee

please check. 

0 Kudos
Meghuiyer25
Contributor
Contributor
278 Views
Registered: ‎04-18-2021

hi @hokim 
did you get sometime to have a look on the device-tree?

0 Kudos