From patchwork Fri Feb 3 12:35:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 9554051 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 705BD602B7 for ; Fri, 3 Feb 2017 12:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 616592823D for ; Fri, 3 Feb 2017 12:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55F402847D; Fri, 3 Feb 2017 12:35:33 +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, T_TVD_MIME_EPI autolearn=unavailable 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 DDD632823D for ; Fri, 3 Feb 2017 12:35:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752651AbdBCMfN (ORCPT ); Fri, 3 Feb 2017 07:35:13 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:34932 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272AbdBCMfM (ORCPT ); Fri, 3 Feb 2017 07:35:12 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 81D5181727; Fri, 3 Feb 2017 13:35:09 +0100 (CET) Date: Fri, 3 Feb 2017 13:35:08 +0100 From: Pavel Machek To: Sakari Ailus , robh+dt@kernel.org, devicetree@vger.kernel.org Cc: ivo.g.dimitrov.75@gmail.com, sre@kernel.org, pali.rohar@gmail.com, linux-media@vger.kernel.org, galak@codeaurora.org, mchehab@osg.samsung.com, linux-kernel@vger.kernel.org Subject: [PATCH] devicetree: Add video bus switch Message-ID: <20170203123508.GA10286@amd> References: <20161023200355.GA5391@amd> <20161119232943.GF13965@valkosipuli.retiisi.org.uk> <20161214122451.GB27011@amd> <20161222100104.GA30917@amd> <20161222133938.GA30259@amd> <20161224152031.GA8420@amd> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161224152031.GA8420@amd> User-Agent: Mutt/1.5.23 (2014-03-12) 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 N900 contains front and back camera, with a switch between the two. This adds support for the switch component, and it is now possible to select between front and back cameras during runtime. This adds documentation for the devicetree binding. Signed-off-by: Sebastian Reichel Signed-off-by: Ivaylo Dimitrov Signed-off-by: Pavel Machek diff --git a/Documentation/devicetree/bindings/media/video-bus-switch.txt b/Documentation/devicetree/bindings/media/video-bus-switch.txt new file mode 100644 index 0000000..1b9f8e0 --- /dev/null +++ b/Documentation/devicetree/bindings/media/video-bus-switch.txt @@ -0,0 +1,63 @@ +Video Bus Switch Binding +======================== + +This is a binding for a gpio controlled switch for camera interfaces. Such a +device is used on some embedded devices to connect two cameras to the same +interface of a image signal processor. + +Required properties +=================== + +compatible : must contain "video-bus-switch" +switch-gpios : GPIO specifier for the gpio, which can toggle the + selected camera. The GPIO should be configured, so + that a disabled GPIO means, that the first port is + selected. + +Required Port nodes +=================== + +More documentation on these bindings is available in +video-interfaces.txt in the same directory. + +reg : The interface: + 0 - port for image signal processor + 1 - port for first camera sensor + 2 - port for second camera sensor + +Example +======= + +video-bus-switch { + compatible = "video-bus-switch" + switch-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + csi_switch_in: endpoint { + remote-endpoint = <&csi_isp>; + }; + }; + + port@1 { + reg = <1>; + + csi_switch_out1: endpoint { + remote-endpoint = <&csi_cam1>; + }; + }; + + port@2 { + reg = <2>; + + csi_switch_out2: endpoint { + remote-endpoint = <&csi_cam2>; + }; + }; + }; +};