cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
530 Views
Registered: ‎09-06-2019

Video Mixer remote endpoint device tree confusion

I'm having difficulty understanding where to set my remote endpoint for the video mixer. Currently we have a pipe such that we have video data that is captured and stored in memory and we wish to stream it out using an analog interface. We have a separate video encoder (ADV7393) on the I2C bus connected to the output of the axis-video out block. 

tx_video.PNG

Here is the generated device tree node:

 

		v_mix_0: v_mix@a0010000 {
			clock-names = "ap_clk";
			clocks = <&zynqmp_clk 72>;
			compatible = "xlnx,v-mix-4.0", "xlnx,mixer-3.0", "xlnx,mixer-4.0";
			interrupt-names = "interrupt";
			interrupt-parent = <&gic>;
			interrupts = <0 107 4>;
			reg = <0x0 0xa0010000 0x0 0x10000>;
			reset-gpios = <&gpio 78 1>;
			xlnx,bpc = <8>;
			xlnx,dma-addr-width = <64>;
			xlnx,num-layers = <3>;
			xlnx,ppc = <1>;
			crtc_mixer_port: port@0 {
				reg = <0>;
				mixer_crtc: endpoint {
/* what is the endpoint?? */ }; }; xx_mix_master: layer_0 { xlnx,layer-id = <0>; xlnx,layer-max-height = <2160>; xlnx,layer-max-width = <3840>; xlnx,layer-primary ; }; xx_mix_overlay_1: layer_1 { xlnx,layer-alpha ; xlnx,layer-id = <1>; xlnx,layer-max-width = <1920>; xlnx,layer-scale ; xlnx,vformat = "NV12"; }; xx_mix_overlay_2: layer_2 { xlnx,layer-alpha ; xlnx,layer-id = <2>; xlnx,layer-max-width = <1920>; xlnx,layer-scale ; xlnx,vformat = "NV12"; }; xx_mix_logo: logo { xlnx,layer-id = <3>; xlnx,logo-height = <64>; xlnx,logo-width = <64>; }; };

I am not clear if I need to add a port to the ADV7393 device tree node under the I2C node specifiying that there is a path from the mixer to the ADV7393 or is this even required? I'm not able to actually find any documentation describing the device tree binding for this particular chip. Has anyone found it? Since I can't find the required parameters for the ADV7393 device tree I am unsure if adding a port to the node is even valid. 

Here is what I was thinking:

&i2c1 {	    
	compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";
	status = "okay"; 
	
	...
	
	adv7393: adv7393@42 {
		compatible = "adi,adv7393";
		reset-gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
		reg = <0x2a>;
		power-domains = <&zynqmp_firmware 38>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			port@0 {
				reg = <0>;
				adv7393_in: endpoint {
					remote-endpoint = <&mixer_crtc>;
				};
			};
		};
	};
	...
};

 

 

Thanks!

 

tx_video.PNG
0 Kudos
1 Reply
Highlighted
Moderator
Moderator
448 Views
Registered: ‎04-24-2017

Hi @badFITimage ,

Each endpoint should contain a 'remote-endpoint' phandle property that points to the corresponding endpoint in the port of the remote device. A 'remote-endpoint' sub-node that points to the endpoint in the port of the crtc/dma-engine device node. CRTC drivers scan all endpoints attached to a port, locate their attached CRTCs, and generate the DRM mask of CRTCs which may be attached to this encoder.

crtc_mixer_port: port@0 {
	reg = <0>;
	mixer_crtc: endpoint {
                remote-endpoint = <&adv7393_in>;               
	};
};

Yes adv7393 drivers doesn't have any binding docs you need to contact Analog Devices on this one to upstream a binding doc.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------