cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
814 Views
Registered: ‎10-08-2013

Mem 2 Mem VPSS-CSC Composite device wiki example issue

Hello,

I did test the Mem 2 Mem without any Sub-device device  example and it worked fine, now I'm trying to test the Mem 2 Mem VPSS-CSC Composite device version with a sub device but unfortunately it doesn't work, it is quite simple example and I'm not sure what I've got wrong....

I'm using petalinux 2019.1, and the DT files are:

pl.dtsi

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Tue Sep 10 08:36:41 2019
 */


/ {
	amba_pl: amba_pl@0 {
		#address-cells = <2>;
		#size-cells = <2>;
		compatible = "simple-bus";
		ranges ;
		psu_ctrl_ipi: PERIPHERAL@ff380000 {
			compatible = "xlnx,PERIPHERAL-1.0";
			reg = <0x0 0xff380000 0x0 0x80000>;
		};
		psu_message_buffers: PERIPHERAL@ff990000 {
			compatible = "xlnx,PERIPHERAL-1.0";
			reg = <0x0 0xff990000 0x0 0x10000>;
		};
		v_frmbuf_rd_0: v_frmbuf_rd@a0000000 {
			#dma-cells = <1>;
			clock-names = "ap_clk";
			clocks = <&misc_clk_0>;
			compatible = "xlnx,v-frmbuf-rd-2.1", "xlnx,axi-frmbuf-rd-v2.1";
			interrupt-names = "interrupt";
			interrupt-parent = <&gic>;
			interrupts = <0 89 4>;
			reg = <0x0 0xa0000000 0x0 0x10000>;
			reset-gpios = <&gpio 78 1>;
			xlnx,dma-addr-width = <32>;
			xlnx,dma-align = <16>;
			xlnx,max-height = <2160>;
			xlnx,max-width = <3840>;
			xlnx,pixels-per-clock = <2>;
			xlnx,s-axi-ctrl-addr-width = <0x7>;
			xlnx,s-axi-ctrl-data-width = <0x20>;
			xlnx,vid-formats = "rgb888", "xbgr8888", "xrgb8888", "bgr888", "uyvy", "y8", "vuy888", "xvuy8888", "yuyv", "nv12", "nv16";
			xlnx,video-width = <8>;
		};
		misc_clk_0: misc_clk_0 {
			#clock-cells = <0>;
			clock-frequency = <299997000>;
			compatible = "fixed-clock";
		};
		v_frmbuf_wr_0: v_frmbuf_wr@a0010000 {
			#dma-cells = <1>;
			clock-names = "ap_clk";
			clocks = <&misc_clk_0>;
			compatible = "xlnx,v-frmbuf-wr-2.1", "xlnx,axi-frmbuf-wr-v2.1";
			interrupt-names = "interrupt";
			interrupt-parent = <&gic>;
			interrupts = <0 90 4>;
			reg = <0x0 0xa0010000 0x0 0x10000>;
			reset-gpios = <&gpio 79 1>;
			xlnx,dma-addr-width = <32>;
			xlnx,dma-align = <16>;
			xlnx,max-height = <2160>;
			xlnx,max-width = <3840>;
			xlnx,pixels-per-clock = <2>;
			xlnx,s-axi-ctrl-addr-width = <0x7>;
			xlnx,s-axi-ctrl-data-width = <0x20>;
			xlnx,vid-formats = "rgb888", "bgr888", "xbgr8888", "xrgb8888", "uyvy", "y8", "vuy888", "xvuy8888", "yuyv", "nv12", "nv16";
			xlnx,video-width = <8>;
		};
		v_proc_ss_0: v_proc_ss@a0100000 {
			clock-names = "aclk";
			clocks = <&misc_clk_0>;
			compatible = "xlnx,v-proc-ss-2.1", "xlnx,vpss-csc", "xlnx,v-vpss-csc";
			reg = <0x0 0xa0100000 0x0 0x100000>;
			reset-gpios = <&gpio 80 1>;
			xlnx,colorspace-support = <0>;
			xlnx,csc-enable-window = "false";
			xlnx,max-height = <2160>;
			xlnx,max-width = <3840>;
			xlnx,num-video-components = <3>;
			xlnx,samples-per-clk = <2>;
			xlnx,topology = <3>;
			xlnx,use-uram = <0>;
			xlnx,video-width = <8>;
		};
	};
};


system-user.dtsi

/include/ "system-conf.dtsi"
/ {

 video_m2m {
         compatible = "xlnx,mem2mem";
         dmas = <&v_frmbuf_rd_0 0>, <&v_frmbuf_wr_0 0>;
         dma-names = "tx", "rx";
         ports {
                 #address-cells = <1>;
                 #size-cells = <0>;
                 port@0 {
                         reg = <0>;
                         direction = "input";
 
                         wb_in: endpoint {
                                 remote-endpoint = <&csc_out>;
                         };
                 };
 
                 port@1 {
                         reg = <1>;
                         direction = "output";
 
                         rb_out: endpoint {
                                 remote-endpoint = <&csc_in>;
                         };
 
                 };
         };
 
 };

};

&v_proc_ss_0 {
         ports {
                 #address-cells = <1>;
                 #size-cells = <0>;
                 port@0 {
                         reg = <0>;
                         xlnx,video-format = <2>;
                         xlnx,video-width = <8>;
 
                         csc_in: endpoint {
                                 remote-endpoint = <&rb_out>;
                         };
                 };
                 port@1 {
                         reg = <1>;
                         xlnx,video-format = <2>;
                         xlnx,video-width = <8>;
 
                         csc_out: endpoint {
                                 remote-endpoint = <&wb_in>;
                         };
                 };
         };
 };

&gem3 {
	status = "okay";
	local-mac-address = [00 0a 35 00 02 90];
	phy-mode = "rgmii-id";
	phy-handle = <&phy0>;
	phy0: phy@0 {
		reg = <0x0>;
		ti,rx-internal-delay = <0x5>;
		ti,tx-internal-delay = <0x5>;
		ti,fifo-depth = <0x1>;
	};
};



&i2c1 {
	status = "okay";
	clock-frequency = <400000>;

	i2cswitch@70 { /* U7 on UZ3EG SOM, U8 on UZ7EV SOM */
		compatible = "nxp,pca9542";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x70>;
		i2c@0 { /* i2c mw 70 0 1 */
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;
			/* Ethernet MAC ID EEPROM */
			mac_eeprom@51 { /* U5 on UZ3EG IOCC and U7 on the UZ7EV EVCC */
				compatible = "at,24c08";
				reg = <0x51>;
			};
			/* CLOCK2 CONFIG EEPROM */
			clock_eeprom@52 { /* U5 on the UZ7EV EVCC */
				compatible = "at,24c08";
				reg = <0x52>;
			};
		};
	};
};

&qspi {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";
	is-dual = <1>; /* Set for dual-parallel QSPI config */
	num-cs = <2>;
	xlnx,fb-clk = <0x1>;
	flash0: flash@0 {
        /* The Flash described below doesn't match our board ("micron,n25qu256a"), but is needed */
        /* so the Flash MTD partitions are correctly identified in /proc/mtd */
		compatible = "micron,m25p80"; /* 32MB */
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0x0>;
		spi-tx-bus-width = <1>;
		spi-rx-bus-width = <4>; /* FIXME also DUAL configuration possible */
		spi-max-frequency = <108000000>; /* Set to 108000000 Based on DC1 spec */
	};
};

/* SD0 eMMC, 8-bit wide data bus */
&sdhci0 {
	status = "okay";
	bus-width = <8>;
	max-frequency = <50000000>;
};

/* SD1 with level shifter */
&sdhci1 {
	status = "okay";
	max-frequency = <50000000>;
	no-1-8-v;	/* for 1.0 silicon */
	disable-wp;
};

/* ULPI SMSC USB3320 */
&usb0 {
	status = "okay";
};

&dwc3_0 {
	status = "okay";
	dr_mode = "host";
	phy-names = "usb3-phy";
    snps,usb3_lpm_capable;
    phys = <&lane2 4 0 2 52000000>;
};

The problem is that no media device is created:

 

# media-ctl -p
Failed to enumerate /dev/media0 (-2)

 

The vpss csc IP seems to be probed and loaded ok:

[ 6.355762] xlnx,csc-bridge a0100000.v_proc_ss: Xilinx VPSS CSC DRM experimental driver probed


And the mem2mem boot messages are:

[ 5.749340] xilinx-mem2mem video_m2m: DMA initialization failed
[ 15.441023] xilinx-mem2mem video_m2m: mem2mem device registered
[ 16.038786] xilinx-mem2mem video_m2m: Created instance 00000000bc7bcc3e, m2m_ctx: 0000000030141914

 

# v4l2-ctl --all
[  356.973848] xilinx-mem2mem video_m2m: Created instance ffffffc8740d5418, m2m_ctx: ffffffc8753f6800
Driver Info (not using libv4l2):
        Driver name   : xilinx-mem2mem
        Card type     : xilinx-mem2mem
        Bus info      : xilinx-mem2mem
        Driver version: 4.14.0
        Capabilities  : 0x84204000
                Video Memory-to-Memory Multiplanar
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps   : 0x04204000
                Video Memory-to-Memory Multiplanar
                Streaming
                Extended Pix Format
Priority: 2
Format Video Capture Multiplanar:
        Width/Height      : 1920/1080
        Pixel Format      : 'NV12'
        Field             : None
        Number of planes  : 0
        Flags             :
        Colorspace        : Default
        Transfer Function : Default
        YCbCr Encoding    : Default
        Quantization      : Default
Format Video Output Multiplanar:
        Width/Height      : 0/0
        Pixel Format      : ''
        Field             : Any
        Number of planes  : 0
        Flags             :
        Colorspace        : Default
        Transfer Function : Default
        YCbCr Encoding    : Default
        Quantization      : Default

 

I've also attached the boot log file.

Any ideas/clues what I've got wrong with this? 

Thanks in advance

 

0 Kudos
2 Replies
Highlighted
Visitor
Visitor
492 Views
Registered: ‎11-20-2018

Hi Jlesquer

As you said for testing Mem 2 Mem without any Sub-device device  example and it worked fine. I'm testing this case on ZCU104, I have issue when run command

$ v4l2-ctl --all
-sh: v4l2-ctl: command not found

Let me known about this issues, how to add v4l2 component

0 Kudos
Highlighted
Participant
Participant
430 Views
Registered: ‎09-11-2018

Did you come to any solution with this? I'm trying to do the same using 2019.2 and have the same boot messages as you and no media device is created..

cheers

0 Kudos