Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5562f65 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: xilinx: Add Test Pattern Generator driver



The TPG generates multiple static or dynamic test patterns. The driver
currently hardcodes the pattern to the moving box pattern.

Signed-off-by: default avatarChristian Kohn <christian.kohn@xilinx.com>
Signed-off-by: default avatarHyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 40ac9b19
Loading
Loading
Loading
Loading
+71 −0
Original line number Diff line number Diff line
Xilinx Video Test Pattern Generator (TPG)
-----------------------------------------

Required properties:

- compatible: Must contain at least one of

    "xlnx,v-tpg-5.0" (TPG version 5.0)
    "xlnx,v-tpg-6.0" (TPG version 6.0)

  TPG versions backward-compatible with previous versions should list all
  compatible versions in the newer to older order.

- reg: Physical base address and length of the registers set for the device.

- clocks: Reference to the video core clock.

- xlnx,video-format, xlnx,video-width: Video format and width, as defined in
  video.txt.

- port: Video port, using the DT bindings defined in ../video-interfaces.txt.
  The TPG has a single output port numbered 0.

Optional properties:

- xlnx,vtc: A phandle referencing the Video Timing Controller that generates
  video timings for the TPG test patterns.

- timing-gpios: Specifier for a GPIO that controls the timing mux at the TPG
  input. The GPIO active level corresponds to the selection of VTC-generated
  video timings.

The xlnx,vtc and timing-gpios properties are mandatory when the TPG is
synthesized with two ports and forbidden when synthesized with one port.

Example:

	tpg_0: tpg@40050000 {
		compatible = "xlnx,v-tpg-6.0", "xlnx,v-tpg-5.0";
		reg = <0x40050000 0x10000>;
		clocks = <&clkc 15>;

		xlnx,vtc = <&vtc_3>;
		timing-gpios = <&ps7_gpio_0 55 GPIO_ACTIVE_LOW>;

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

			port@0 {
				reg = <0>;

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

				tpg_in: endpoint {
					remote-endpoint = <&adv7611_out>;
				};
			};
			port@1 {
				reg = <1>;

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

				tpg1_out: endpoint {
					remote-endpoint = <&switch_in0>;
				};
			}:
		};
	};
+1 −0
Original line number Diff line number Diff line
@@ -10826,6 +10826,7 @@ T: git git://linuxtv.org/media_tree.git
S:	Supported
F:	Documentation/devicetree/bindings/media/xilinx/
F:	drivers/media/platform/xilinx/
F:	include/uapi/linux/xilinx-v4l2-controls.h

XILLYBUS DRIVER
M:	Eli Billauer <eli.billauer@gmail.com>
+7 −0
Original line number Diff line number Diff line
@@ -7,6 +7,13 @@ config VIDEO_XILINX

if VIDEO_XILINX

config VIDEO_XILINX_TPG
	tristate "Xilinx Video Test Pattern Generator"
	depends on VIDEO_XILINX
	select VIDEO_XILINX_VTC
	---help---
	   Driver for the Xilinx Video Test Pattern Generator

config VIDEO_XILINX_VTC
	tristate "Xilinx Video Timing Controller"
	depends on VIDEO_XILINX
+1 −0
Original line number Diff line number Diff line
xilinx-video-objs += xilinx-dma.o xilinx-vip.o xilinx-vipp.o

obj-$(CONFIG_VIDEO_XILINX) += xilinx-video.o
obj-$(CONFIG_VIDEO_XILINX_TPG) += xilinx-tpg.o
obj-$(CONFIG_VIDEO_XILINX_VTC) += xilinx-vtc.o
+931 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading