UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
583 Views
Registered: ‎11-26-2018

Missing /dev/media0 with hdmi rx driver

Hi,

I've configured petalinux to use the hdmi rx subsystem and the driver "it's working", if I use the command:

cat /sys/devices/platform/amba_pl@0/a0010000.v_hdmi_rx_ss/hdmi_info

I get the following output:

  Stream Info
 -------------
        Color Format:     RGB
        Color Depth:      8
        Pixels Per Clock: 4
        Mode:             Progressive
        Frame Rate:       30Hz
        Resolution:       4096x2160@30Hz
        Pixel Clock:      297000000

  Stream Timing
 ----------------

        HSYNC Timing: hav=4096, hfp=88, hsw=88(hsp=1), hbp=128, htot=4400
        VSYNC Timing: vav=2160, vfp=08, vsw=10(vsp=1), vbp=072, vtot=2250


Rx Info
--------
Mode: HDMI
VIC : 100
Scrambled: 0

Audio
------
Format   : Unknown
Channels : 2
ACR CTS  : 0
ACR N    : 0


Link quality
------------
Link quality channel 0 : excellent (0)
Link quality channel 1 : excellent (0)
Link quality channel 2 : excellent (0)

 So the hdmi it's working, but If I try with:

media-ctl -p -d /dev/media0

I get this error:

Failed to enumerate /dev/media0 (-2)

Checking in /dev/ I can't find media0 and video0.

I think it's a configuration problem, but I can't find what I'm missing. 

0 Kudos
6 Replies
Contributor
Contributor
527 Views
Registered: ‎06-18-2015

Re: Missing /dev/media0 with hdmi rx driver

You have failing Media Device creation. Could you share your device-tree files?

0 Kudos
Contributor
Contributor
523 Views
Registered: ‎11-26-2018

Re: Missing /dev/media0 with hdmi rx driver

This is the pl.dtsi

/*
 * CAUTION: This file is automatically generated by Xilinx.
 * Version:  
 * Today is: Thu Jul  4 07:34:54 2019
 */


/ {
	amba_pl: amba_pl@0 {
		#address-cells = <2>;
		#size-cells = <2>;
		compatible = "simple-bus";
		ranges ;
		H26x_vcu: vcu@a0100000 {
			#address-cells = <2>;
			#clock-cells = <1>;
			#size-cells = <2>;
			clock-names = "pll_ref", "aclk", "vcu_core_enc", "vcu_core_dec", "vcu_mcu_enc", "vcu_mcu_dec";
			clocks = <&misc_clk_0>, <&zynqmp_clk 71>, <&H26x_vcu 1>, <&H26x_vcu 2>, <&H26x_vcu 3>, <&H26x_vcu 4>;
			compatible = "xlnx,vcu-1.2", "xlnx,vcu";
			interrupt-names = "vcu_host_interrupt";
			interrupt-parent = <&gic>;
			interrupts = <0 92 4>;
			ranges ;
			reg = <0x0 0xa0140000 0x0 0x1000>, <0x0 0xa0141000 0x0 0x1000>;
			reg-names = "vcu_slcr", "logicore";
			reset-gpios = <&gpio 79 0>;
			encoder: al5e@a0100000 {
				compatible = "al,al5e-1.2", "al,al5e";
				interrupt-parent = <&gic>;
				interrupts = <0 92 4>;
				reg = <0x0 0xa0100000 0x0 0x10000>;
			};
			decoder: al5d@a0120000 {
				compatible = "al,al5d-1.2", "al,al5d";
				interrupt-parent = <&gic>;
				interrupts = <0 92 4>;
				reg = <0x0 0xa0120000 0x0 0x10000>;
			};
		};
		misc_clk_0: misc_clk_0 {
			#clock-cells = <0>;
			clock-frequency = <33000179>;
			compatible = "fixed-clock";
		};
		HDMI_v_hdmi_rx_ss_0: v_hdmi_rx_ss@a0010000 {
			clock-names = "s_axi_cpu_aclk", "link_clk", "s_axis_audio_aclk", "video_clk", "s_axis_video_aclk";
			clocks = <&misc_clk_1>, <&misc_clk_2>, <&misc_clk_1>, <&misc_clk_3>, <&misc_clk_1>;
			compatible = "xlnx,v-hdmi-rx-ss-3.1", "xlnx,v-hdmi-rx-ss-3.1";
			interrupt-names = "irq";
			interrupt-parent = <&gic>;
			interrupts = <0 90 4>;
			reg = <0x0 0xa0010000 0x0 0x10000>;
			xlnx,edid-ram-size = <0x100>;
			xlnx,input-pixels-per-clock = <4>;
			xlnx,max-bits-per-component = <8>;
			hdmirx_ports: ports {
				#address-cells = <1>;
				#size-cells = <0>;
			};
		};
		misc_clk_1: misc_clk_1 {
			#clock-cells = <0>;
			clock-frequency = <148501562>;
			compatible = "fixed-clock";
		};
		misc_clk_2: misc_clk_2 {
			#clock-cells = <0>;
			clock-frequency = <148500000>;
			compatible = "fixed-clock";
		};
		misc_clk_3: misc_clk_3 {
			#clock-cells = <0>;
			clock-frequency = <297000000>;
			compatible = "fixed-clock";
		};
		HDMI_vid_phy_controller_0: vid_phy_controller@a0030000 {
			clock-names = "mgtrefclk1_pad_p_in", "mgtrefclk1_pad_n_in", "vid_phy_rx_axi4s_aclk", "vid_phy_sb_aclk", "vid_phy_axi4lite_aclk", "drpclk";
			clocks = <&misc_clk_4>, <&misc_clk_4>, <&misc_clk_2>, <&misc_clk_1>, <&misc_clk_1>, <&misc_clk_1>;
			compatible = "xlnx,vid-phy-controller-2.2", "xlnx,vid-phy-controller-2.1";
			interrupt-names = "irq";
			interrupt-parent = <&gic>;
			interrupts = <0 91 4>;
			reg = <0x0 0xa0030000 0x0 0x10000>;
			xlnx,hdmi-fast-switch = <1>;
			xlnx,input-pixels-per-clock = <4>;
			xlnx,nidru = <0>;
			xlnx,nidru-refclk-sel = <5>;
			xlnx,rx-no-of-channels = <3>;
			xlnx,rx-pll-selection = <0>;
			xlnx,rx-protocol = <1>;
			xlnx,rx-refclk-sel = <1>;
			xlnx,transceiver-type = <5>;
			xlnx,transceiver-width = <4>;
			xlnx,tx-buffer-bypass = <1>;
			xlnx,tx-no-of-channels = <3>;
			xlnx,tx-pll-selection = <6>;
			xlnx,tx-protocol = <3>;
			xlnx,tx-refclk-sel = <0>;
			vphy_lane0: vphy_lane@0 {
				#phy-cells = <4>;
			};
			vphy_lane1: vphy_lane@1 {
				#phy-cells = <4>;
			};
			vphy_lane2: vphy_lane@2 {
				#phy-cells = <4>;
			};
			vphy_lane3: vphy_lane@3 {
				#phy-cells = <4>;
			};
		};
		misc_clk_4: misc_clk_4 {
			#clock-cells = <0>;
			clock-frequency = <100000000>;
			compatible = "fixed-clock";
		};
		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>;
		};
		stream_ddr: v_frmbuf_wr@a0020000 {
			#dma-cells = <1>;
			clock-names = "ap_clk";
			clocks = <&zynqmp_clk 71>;
			compatible = "xlnx,v-frmbuf-wr-2.1", "xlnx,axi-frmbuf-wr-v2.1";
			interrupt-names = "interrupt";
			interrupt-parent = <&gic>;
			interrupts = <0 89 4>;
			reg = <0x0 0xa0020000 0x0 0x10000>;
			reset-gpios = <&gpio 78 1>;
			xlnx,dma-addr-width = <32>;
			xlnx,dma-align = <32>;
			xlnx,max-height = <2160>;
			xlnx,max-width = <4096>;
			xlnx,pixels-per-clock = <4>;
			xlnx,s-axi-ctrl-addr-width = <0x7>;
			xlnx,s-axi-ctrl-data-width = <0x20>;
			xlnx,vid-formats = "yuyv", "nv12", "nv16";
			xlnx,video-width = <8>;
		};
		v_tpg: v_tpg@a0000000 {
			clock-names = "ap_clk";
			clocks = <&misc_clk_1>;
			compatible = "xlnx,v-tpg-8.0", "xlnx,v-tpg-7.0";
			reg = <0x0 0xa0000000 0x0 0x10000>;
			xlnx,max-height = <2160>;
			xlnx,max-width = <4096>;
			xlnx,ppc = <4>;
			xlnx,s-axi-ctrl-addr-width = <8>;
			xlnx,s-axi-ctrl-data-width = <32>;
		};
	};
};

And this is my system-user.dtsi (in this file I've added the phys and phy-names)

/ {
	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		reserved: buffer@0 {
			compatible = "shared-dma-pool";
			reusable;
			reg = <0x0 0x0E000000 0x0 0x1F400000>;
		};
	};
	reserved-video-driver@0 {
		compatible = "xlnx,reserved-memory";
		memory-region = <&reserved>;
		interrupt-parent = <&gic>;
		interrupts = <0 89 4>;
	};

};

&HDMI_v_hdmi_rx_ss_0{
	status = "okay";
	phy-names = "hdmi-phy0", "hdmi-phy1", "hdmi-phy2";
	phys = <&vphy_lane0 0 1 1 0>, <&vphy_lane1 0 1 1 0>, <&vphy_lane2 0 1 1 0>;

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

			hdmi_rxss_out: endpoint {
				remote-endpoint = <&v_tpg>;
			};
		};
	};
};

&v_tpg {
	status = "okay";
	compatible = "xlnx,v-tpg-8.0", "xlnx,v-tpg-5.0";
	reg = <0x0 0xa0000000 0x0 0x10000>;
	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 = <0>;
			xlnx,video-width = <8>;
			tpg_out: endpoint {
				remote-endpoint = <&stream_ddr>;
			};
		};
	};
}; 

  

0 Kudos
Contributor
Contributor
496 Views
Registered: ‎06-18-2015

Re: Missing /dev/media0 with hdmi rx driver

It looks like you are missing the Xilinx V4L2 driver device tree entry. Please see; https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841767/Xilinx+V4L2+driver

Also make sure the DT reflects your video pipeline correctly; Video Phy -> hdmi_rx_ss -> tpg -> ddr3 ?

0 Kudos
Contributor
Contributor
480 Views
Registered: ‎11-26-2018

Re: Missing /dev/media0 with hdmi rx driver

So in this case I need to create an entry for the hdmi inside the system-user file. If I'm correct, I have to add a entry with a port (as input) and remote-endpoint to HDMI_v_hdmi_rx_ss_0 or I have to create the entire pipeline?

 

&amba_pl {
	axi_video_cap {
		compatible = "xlnx,axi-video";
	  
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
	  
			port@0 {
				reg = <0>;
				direction = "input";
				vcap_in0: endpoint {
					remote-endpoint = <&HDMI_v_hdmi_rx_ss_0>;
				};
			};
		};
	};
};

The video pipeline is Video phy -> hdmi_rx_ss -> tpg -> frm_wr -> ddr3.

 

0 Kudos
Contributor
Contributor
453 Views
Registered: ‎06-18-2015

Re: Missing /dev/media0 with hdmi rx driver

You should add an entry for the 'vcap' to the system-user.dtsi. However I am not sure about the 'compatible = "xlnx,axi-video"' part from the web page.

Below is hdmi dtsi file of  zcu104-rv-ss trd design. In this example 'scaler' is connected to the wr_framebuffer at PL. 

Best Regards.

Mustafa

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

&amba {
	hdmi_rxss: hdmi_rxss@a1000000 {
		compatible = "xlnx,v-hdmi-rx-ss-3.1";
		reg = <0x0 0xa1000000 0x0 0x10000>;
		reg-names = "hdmi-rxss";
		interrupts = <2 2>;
		interrupt-parent = <&axi_intc>;
		interrupt-names = "hdmirx";
		clocks = <&axi_lite_clk>, <&axi_stream_clk>;
		clock-names = "axi-lite", "video";
		phys = <&vphy_lane0 0 1 1 0>, <&vphy_lane1 0 1 1 0>, <&vphy_lane2 0 1 1 0>;
		phy-names = "hdmi-phy0", "hdmi-phy1", "hdmi-phy2";
		xlnx,input-pixels-per-clock = <2>;
		xlnx,edid-ram-size = <0x100>;

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

			port@0 {
				reg = <0>;

				xlnx,video-format = <XVIP_VF_RBG>;
				xlnx,video-width = <8>;

				hdmi_rxss_out: endpoint {
					remote-endpoint = <&scaler_2_in>;
				};
			};
		};
	};

	scaler_2: scaler@b0100000 {
		compatible = "xlnx,v-vpss-scaler";
		reg = <0x0 0xb0100000 0x0 0x40000>;
		clocks = <&axi_stream_clk>;
		xlnx,num-hori-taps = <8>;
		xlnx,num-vert-taps = <8>;
		xlnx,pix-per-clk = <2>;
		reset-gpios = <&gpio 87 1>;
		xlnx,max-width = <3840>;
		xlnx,max-height = <2160>;

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

			port@0 {
				reg = <0>;

				xlnx,video-format = <XVIP_VF_RBG>;
				xlnx,video-width = <8>;

				scaler_2_in: endpoint {
					remote-endpoint = <&hdmi_rxss_out>;
				};
			};
			port@1 {
				reg = <1>;

				xlnx,video-format = <XVIP_VF_YUV_422>;
				xlnx,video-width = <8>;

				scaler_2_out: endpoint {
					remote-endpoint = <&vcap_hdmi_in>;
				};
			};
		};
	};

	fb_wr_hdmirx: fb_wr@b0070000 {
		compatible = "xlnx,axi-frmbuf-wr-v2.1";
		reg = <0x0 0xb0070000 0x0 0x10000>;
		#dma-cells = <1>;
		interrupt-parent = <&axi_intc>;
		interrupts = <1 2>;
#ifdef DESIGN_BASE_TRD
		xlnx,vid-formats = "yuyv", "uyvy", "y8";
#endif
#ifdef DESIGN_RV_SS
		xlnx,vid-formats = "yuyv", "uyvy", "y8", "rgb888";
#endif
		reset-gpios = <&gpio 88 1>;
		xlnx,dma-addr-width = <32>;
		xlnx,pixels-per-clock = <2>;
		xlnx,max-width = <3840>;
		xlnx,max-height = <2160>;
	};

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

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

			port@0 {
				reg = <0>;
				direction = "input";
				vcap_hdmi_in: endpoint {
					remote-endpoint = <&scaler_2_out>;
				};
			};
		};
	};
};
0 Kudos
Contributor
Contributor
177 Views
Registered: ‎05-09-2018

Re: Missing /dev/media0 with hdmi rx driver

what was your final solution? what solved your issue?

0 Kudos