From patchwork Fri Apr 28 14:13:29 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Philipp Zabel
X-Patchwork-Id: 9704789
Return-Path:
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id
D2F6E602B7 for ;
Fri, 28 Apr 2017 14:13:39 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C42551FF35
for ;
Fri, 28 Apr 2017 14:13:39 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id B67952863D; Fri, 28 Apr 2017 14:13:39 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI
autolearn=ham version=3.3.1
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E362A1FF35
for ;
Fri, 28 Apr 2017 14:13:38 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1032285AbdD1ONh (ORCPT
);
Fri, 28 Apr 2017 10:13:37 -0400
Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:60407 "EHLO
metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK)
by vger.kernel.org with ESMTP id S1756463AbdD1ONg (ORCPT
);
Fri, 28 Apr 2017 10:13:36 -0400
Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]
helo=dude.pengutronix.de.)
by metis.ext.pengutronix.de with esmtp (Exim 4.84_2)
(envelope-from )
id 1d46eN-0003VX-3g; Fri, 28 Apr 2017 16:13:35 +0200
From: Philipp Zabel
To: linux-media@vger.kernel.org
Cc: devicetree@vger.kernel.org, Steve Longerbeam ,
Peter Rosin , Sakari Ailus ,
Pavel Machek , Rob Herring ,
Mark Rutland ,
Vladimir Zapolskiy ,
kernel@pengutronix.de, Philipp Zabel ,
Sascha Hauer ,
Steve Longerbeam
Subject: [PATCH 1/2] [media] dt-bindings: Add bindings for video-multiplexer
device
Date: Fri, 28 Apr 2017 16:13:29 +0200
Message-Id: <20170428141330.16187-1-p.zabel@pengutronix.de>
X-Mailer: git-send-email 2.11.0
X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7
X-SA-Exim-Mail-From: p.zabel@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);
SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-media@vger.kernel.org
Sender: linux-media-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-media@vger.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
Add bindings documentation for the video multiplexer device.
Signed-off-by: Sascha Hauer
Signed-off-by: Philipp Zabel
Signed-off-by: Steve Longerbeam
---
This has been last sent as part of Steve's i.MX media series. Since the binding
changed, I've dropped Rob's ack.
Changes since https://patchwork.kernel.org/patch/9647951/:
- Replaced re, bit-mask/shift, and gpios properties with a single mux-controls
property, leaving the actual operation of the mux to a separate mux
controller, as described by Peter's mux-controller bindings:
https://patchwork.kernel.org/patch/9695835/
- Shortened 'video-multiplexer' compatible to 'video-mux', aligning with the
other mux bindings.
- Added a comment about the optional ports node and a link to the OF graph
bindings document.
---
.../devicetree/bindings/media/video-mux.txt | 60 ++++++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/video-mux.txt
diff --git a/Documentation/devicetree/bindings/media/video-mux.txt b/Documentation/devicetree/bindings/media/video-mux.txt
new file mode 100644
index 0000000000000..63b9dc913e456
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/video-mux.txt
@@ -0,0 +1,60 @@
+Video Multiplexer
+=================
+
+Video multiplexers allow to select between multiple input ports. Video received
+on the active input port is passed through to the output port. Muxes described
+by this binding are controlled by a multiplexer controller that is described by
+the bindings in Documentation/devicetree/bindings/mux/mux-controller.txt
+
+Required properties:
+- compatible : should be "video-mux"
+- mux-controls : mux controller node to use for operating the mux
+- #address-cells: should be <1>
+- #size-cells: should be <0>
+- port@*: at least three port nodes containing endpoints connecting to the
+ source and sink devices according to of_graph bindings. The last port is
+ the output port, all others are inputs.
+
+Optionally, #address-cells, #size-cells, and port nodes can be grouped under a
+ports node as described in Documentation/devicetree/bindings/graph.txt.
+
+Example:
+
+ mux: mux-controller {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+
+ mux-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ };
+
+ video-mux {
+ compatible = "video-mux";
+ mux-controls = <&mux>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mux_in0: endpoint {
+ remote-endpoint = <&video_source0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mux_in1: endpoint {
+ remote-endpoint = <&video_source1_out>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+
+ mux_out: endpoint {
+ remote-endpoint = <&capture_interface_in>;
+ };
+ };
+ };
+};