linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Javier Martinez Canillas <javier@osg.samsung.com>
Subject: [RFC PATCH 2/3] [media] tvp5150: Add input connectors DT bindings
Date: Wed,  9 Mar 2016 16:09:25 -0300	[thread overview]
Message-ID: <1457550566-5465-3-git-send-email-javier@osg.samsung.com> (raw)
In-Reply-To: <1457550566-5465-1-git-send-email-javier@osg.samsung.com>

The tvp5150 and tvp5151 decoders support different video input source
connections to their AIP1A and AIP1B pins. Either two Composite input
signals or a S-Video (with separate Y and C signals) are supported.

The possible configurations are as follows:

- Analog Composite signal connected to AIP1A
- Analog Composite signal connected to AIP1B
- Analog S-Video Y (luminance) and C (chrominance)
  signals connected to AIP1A and AIP1B respectively.

Since the Composite signals shares the same pins than the S-Video ones,
some devices multiplex the physical connectors so the same connector
can be used for either Composite or a S-Video signal (Y or C). But from
the tvp5150 point of view, there are three different "connections", so
the DT binding models the hardware as three separate connectors instead.

Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---
Hello,

There are still some questions about how the pins / video signals are
going to be represented in DT (if represented at all?). In this case
I chose to not describe that information in DT because the driver is
able to figure out from the connectors what links have to be created
and on which PADs.

But I guess that won't be possible for more complex hardware without
having that information in the DT so that should be discussed as well.

There is also the questions about how the connector bindings will be
extended to support other attributes like color/position/group using
the properties API.

Best regards,
Javier

 .../devicetree/bindings/media/i2c/tvp5150.txt      | 59 ++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/i2c/tvp5150.txt b/Documentation/devicetree/bindings/media/i2c/tvp5150.txt
index 8c0fc1a26bf0..df555650b0b4 100644
--- a/Documentation/devicetree/bindings/media/i2c/tvp5150.txt
+++ b/Documentation/devicetree/bindings/media/i2c/tvp5150.txt
@@ -26,8 +26,46 @@ Required Endpoint Properties for parallel synchronization:
 If none of hsync-active, vsync-active and field-even-active is specified,
 the endpoint is assumed to use embedded BT.656 synchronization.
 
+-Optional nodes:
+- connectors: The list of tvp5150 input connectors available on a given
+  board. The node should contain a child 'port' node for each connector.
+
+  The tvp5150 has support for three possible connectors: 2 Composite and
+  1 S-video. The "reg" property is used to specify which input connector
+  is associated with each 'port', using the following possible values:
+
+  0: Composite0
+  1: Composite1
+  2: S-Video
+
+  The ports should have an endpoint subnode that is linked to a connector
+  node defined in Documentation/devicetree/bindings/display/connector/.
+  The linked connector compatible string should match the connector type.
+
 Example:
 
+composite0: connector@0 {
+	compatible = "composite-video-connector";
+	label = "Composite0";
+
+	port {
+		comp0_out: endpoint {
+			remote-endpoint = <&tvp5150_comp0_in>;
+		};
+	};
+};
+
+svideo: connector@1 {
+	compatible = "composite-video-connector";
+	label = "S-Video";
+
+	port {
+		svideo_out: endpoint {
+			remote-endpoint = <&tvp5150_svideo_in>;
+		};
+	};
+};
+
 &i2c2 {
 	...
 	tvp5150@5c {
@@ -36,6 +74,27 @@ Example:
 		pdn-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>;
 		reset-gpios = <&gpio6 7 GPIO_ACTIVE_LOW>;
 
+		connectors {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			/* Composite0 input */
+			port@0 {
+				reg = <0>;
+				tvp5150_comp0_in: endpoint {
+					remote-endpoint = <&comp0_out>;
+				};
+			};
+
+			/* S-Video input */
+			port@2 {
+				reg = <2>;
+				tvp5150_svideo_in: endpoint {
+					remote-endpoint = <&svideo_out>;
+				};
+			};
+		};
+
 		port {
 			tvp5150_1: endpoint {
 				remote-endpoint = <&ccdc_ep>;
-- 
2.5.0


  parent reply	other threads:[~2016-03-09 19:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 19:09 [RFC PATCH 0/3] [media] tvp515p: Proposal for MC input connector support Javier Martinez Canillas
2016-03-09 19:09 ` [RFC PATCH 1/3] [media] v4l2-mc.h: Add a S-Video C input PAD to demod enum Javier Martinez Canillas
2016-03-18 15:45   ` Hans Verkuil
2016-03-18 17:33     ` Hans Verkuil
2016-03-21 14:40       ` Mauro Carvalho Chehab
2016-03-21 15:05         ` Hans Verkuil
2016-03-21 16:01           ` Hans Verkuil
2016-03-21 17:50             ` Mauro Carvalho Chehab
2016-03-21 18:08               ` Hans Verkuil
2016-03-21 18:23                 ` Mauro Carvalho Chehab
2016-03-21 18:48                   ` Hans Verkuil
2016-03-21 18:24                 ` Javier Martinez Canillas
2016-03-21 18:34                   ` Mauro Carvalho Chehab
2016-03-21 18:38                     ` Javier Martinez Canillas
2016-03-21 18:51                     ` Hans Verkuil
2016-03-21 19:06                   ` Hans Verkuil
2016-03-21 19:20                     ` Javier Martinez Canillas
2016-03-21 19:30                       ` Hans Verkuil
2016-03-21 19:48                         ` Javier Martinez Canillas
2016-03-21 21:15                           ` Mauro Carvalho Chehab
2016-03-22  0:22                             ` Javier Martinez Canillas
2016-03-21 21:20                       ` Mauro Carvalho Chehab
2016-03-22  0:16                         ` Javier Martinez Canillas
2016-03-09 19:09 ` Javier Martinez Canillas [this message]
2016-03-09 19:09 ` [RFC PATCH 3/3] [media] tvp5150: Replace connector support according to DT binding Javier Martinez Canillas
2016-03-18 15:01 ` [RFC PATCH 0/3] [media] tvp515p: Proposal for MC input connector support Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457550566-5465-3-git-send-email-javier@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shuahkh@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).