cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
adw10000
Participant
Participant
483 Views
Registered: ‎07-13-2019

v4l2 driver initialization fail (TPG and Framebuffer write)

Hello. I'm currently doing TPG and Framebuffer things with ZCU102 on 2020.2 tool version and I just similarly copied block design of MPSoC TRD6 about TPG part.

I wanna use TPG and Framebuffer in my linux and it's not working well.

The following is result of my initialization failure.

 

root@xilinx-zcu102-2020_2:~# dmesg | grep frmbuf
[ 3.454574] xilinx-frmbuf 80010000.v_frmbuf_wr: failed to get ap_clk (-517)
[ 4.225268] xilinx-frmbuf 80010000.v_frmbuf_wr: Xilinx AXI frmbuf DMA_DEV_TO_MEM
[ 4.232706] xilinx-frmbuf 80010000.v_frmbuf_wr: Xilinx AXI FrameBuffer Engine Driver Probed!!
root@xilinx-zcu102-2020_2:~# dmesg | grep tpg
[ 3.580954] xilinx-video amba_pl@0:vcap_v_tpg_0: /amba_pl@0/vcap_v_tpg_0/ports/port@0 initialization failed
[ 3.590317] xilinx-video amba_pl@0:vcap_v_tpg_0: DMA initialization failed
[ 3.598501] xilinx-tpg 80020000.v_tpg: invalid format in DT
[ 3.602689] xilinx-tpg: probe of 80020000.v_tpg failed with error -22
[ 6.070711] xilinx-video amba_pl@0:vcap_v_tpg_0: device registered

 

And when I type the following command, 'media-ctl -p -d /dev/media0', there is no /dev/media0 and 'Failed to enumerate /dev/media0 (-2)' result came out.

 

I uploaded my DT file(MyDesign.txt) and the following is TRD DT file(my reference design)

 

#include <dt-bindings/media/xilinx-vip.h>

&amba {

clkwiz: clock-generator@a0030000 {
reg = <0x0 0xa0030000 0x0 0x10000>;
compatible = "xlnx,clocking-wizard";
#clock-cells = <1>;
speed-grade = <2>;
clock-names = "clk_in1", "s_axi_aclk";
clocks = <&zynqmp_clk 71>, <&axi_lite_clk>;
clock-output-names = "clk_out1", "clk_out2", "clk_out3",
"clk_out4", "clk_out5", "clk_out6",
"clk_out7";
};

vtc_1: vtc@a3c20000 {
compatible = "xlnx,v-tc-6.1";
reg = <0x0 0xa3c20000 0x0 0x10000>;
clock-names = "clk", "s_axi_aclk";
clocks = <&clkwiz 0>, <&axi_lite_clk>;
xlnx,generator;
};

tpg_1: tpg@b0030000 {
compatible = "xlnx,v-tpg-7.0";
reg = <0x0 0xb0030000 0x0 0x10000>;
clock-names = "ap_clk";
clocks = <&axi_stream_clk>;
xlnx,ppc = <2>;
xlnx,vtc = <&vtc_1>;
reset-gpios = <&gpio 79 1>;
xlnx,max-width = <3840>;
xlnx,max-height = <2160>;
xlnx,s-axi-ctrl-addr-width = <8>;
xlnx,s-axi-ctrl-data-width = <32>;

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
xlnx,video-format = <XVIP_VF_YUV_422>;
xlnx,video-width = <8>;

tpg_out: endpoint {
remote-endpoint = <&vcap_tpg_in>;
};
};
};
};

fb_wr_tpg: fb_wr@b0050000 {
compatible = "xlnx,axi-frmbuf-wr-v2.1";
reg = <0x0 0xb0050000 0x0 0x10000>;
#dma-cells = <1>;
clock-names = "ap_clk";
clocks = <&axi_stream_clk>;
interrupt-names = "interrupt";
interrupt-parent = <&axi_intc>;
interrupts = <0 2>;
xlnx,vid-formats = "yuyv", "uyvy", "y8";
reset-gpios = <&gpio 81 1>;
xlnx,dma-addr-width = <32>;
xlnx,pixels-per-clock = <2>;
xlnx,max-width = <3840>;
xlnx,max-height = <2160>;
xlnx,dma-align = <16>;
xlnx,s-axi-ctrl-addr-width = <0x7>;
xlnx,s-axi-ctrl-data-width = <0x20>;
xlnx,video-width = <8>;
};

vcap_tpg {
compatible = "xlnx,video";
dmas = <&fb_wr_tpg 0>;
dma-names = "port0";

ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
direction = "input";
vcap_tpg_in: endpoint {
remote-endpoint = <&tpg_out>;
};
};
};
};
};

 

Thank you for your reply in advance. 

Tags (2)
block design.png
0 Kudos
3 Replies
adw10000
Participant
Participant
407 Views
Registered: ‎07-13-2019

Hi. I solved this issue by using petalinux & vivado 2020.1 and manually add system-user.dtsi by myself.

Thanks!

0 Kudos
YiZhang
Visitor
Visitor
163 Views
Registered: ‎05-16-2021

Hello,my design and issues are  similar to yours ,could you tell me what u have modified in your system-user.dtsi.

I have solved "[ 3.598501] xilinx-tpg 80020000.v_tpg: invalid format in DT [ 3.602689] xilinx-tpg: probe of 80020000.v_tpg failed with error -22" by change xlnx,video-format =<12> to xlnx,video-format =<2>,but I still have this issue "[ 3.580954] xilinx-video amba_pl@0:vcap_v_tpg_0: /amba_pl@0/vcap_v_tpg_0/ports/port@0 initialization failed [ 3.590317] xilinx-video amba_pl@0:vcap_v_tpg_0: DMA initialization failed"

This is my system-user.dtsi:

&v_tpg_0{

tpg_portsv_tpg0:ports{

#address-cells = <1>;

#size-cells = <0>;

tpg_port1v_tpg_0:port@1{

reg=<1>;

xlnx,video-format =<2>;

xlnx,video-width =<8>;

tpg_outv_tpg_0:endpoint{

remote-endpoint = <&v_frmbuf_wr_0v_tpg_0>;

};

};

tpg_portsv_tpg0:ports{

#address-cells = <1>;

#size-cells = <0>;

tpg_port0v_tpg_0:port@0{

reg=<0>;

xlnx,video-format =<2>;

xlnx,video-width =<8>;

};

};

};

Tags (2)
0 Kudos
JITHINS
Visitor
Visitor
74 Views
Registered: ‎07-01-2020

Hi,

Facing same issues as yours @adw10000 . How you solved it? Please share your system_user.dtsi. It will be helpful for others coming after you.

Thanks

0 Kudos