From patchwork Mon Jun 27 07:48:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Boichat X-Patchwork-Id: 9199985 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 6AD5E60757 for ; Mon, 27 Jun 2016 07:49:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D30C27FA4 for ; Mon, 27 Jun 2016 07:49:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 51CED2807B; Mon, 27 Jun 2016 07:49:38 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02C4027FA4 for ; Mon, 27 Jun 2016 07:49:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A24EF6E236; Mon, 27 Jun 2016 07:49:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF1A889E4C for ; Mon, 27 Jun 2016 07:49:16 +0000 (UTC) Received: by mail-pa0-x231.google.com with SMTP id b13so56813767pat.0 for ; Mon, 27 Jun 2016 00:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tSzKEq4dXCpLQRcb7cDNJcuyc8Mc6H/jByEa8Gfs48s=; b=F9uB1xWV5pklNMwuGocgFUxLBd7ARmh8DNjZDy1ifcsUxFHZnNEHwVWfkevUCqlaRz MSM/3FVdd0lphRJBqKrP4Uf0Iz40tMvFI3nkEInRzlNQe6N/p9FDq1uJycR7VtFjXB2a yfsZMIYue+u41uT4mGimcq3RRENRAkArxjC2g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tSzKEq4dXCpLQRcb7cDNJcuyc8Mc6H/jByEa8Gfs48s=; b=fyaiPljbzWnY+8KFrkLvCH8sCep3KEWhpqRckQJx6JClvaSFejXDKdfNJK2kwUb7Sy cD/lJkKi2ucBJ02pkmQKRZL5Rk2otA9jo7GkZ23m2Ikqa1tqVK+sOPysLCHlYZHmSaGi NNt/eLHQOwuso+BJfqvsMb6vO/dVCdJa+JrIxn4dPEuXZMEMeodoqK2A9b39gWj2WQgn eTEXQGJSGvSkve88fCB9bcNYSxCqtTCBWq+w7W2h5c1O4a7kFe1nzVTfo1CH02jNsjV+ hU+1ks1CKhnOcZSnq88wykbZ7RffrHUmz8pYIiFMAHzcNZOviLqrEtV8/+mnq+d8bqcF iRWQ== X-Gm-Message-State: ALyK8tKZyU5f8RFmDqckpyw4QF7stv2tMu3qc03Nfd1B9eYbQyOfx+b10XN+2wC5cwwTGdeJ X-Received: by 10.66.216.202 with SMTP id os10mr30854668pac.91.1467013755713; Mon, 27 Jun 2016 00:49:15 -0700 (PDT) Received: from drinkcat.tpe.corp.google.com ([172.30.210.53]) by smtp.gmail.com with ESMTPSA id e4sm4613715pfe.69.2016.06.27.00.49.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Jun 2016 00:49:15 -0700 (PDT) From: Nicolas Boichat To: dri-devel@lists.freedesktop.org Subject: [RFC PATCH 4/4] CHROMIUM: devicetree: Add GPIO display mux binding Date: Mon, 27 Jun 2016 15:48:47 +0800 Message-Id: <1467013727-11482-5-git-send-email-drinkcat@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1467013727-11482-1-git-send-email-drinkcat@chromium.org> References: <1467013727-11482-1-git-send-email-drinkcat@chromium.org> Cc: Nicolas Boichat , linux-kernel@vger.kernel.org, marcheu@chromium.org, Russell King , Thierry Reding X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Nicolas Boichat --- .../devicetree/bindings/drm/bridge/gpio-mux.txt | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/drm/bridge/gpio-mux.txt diff --git a/Documentation/devicetree/bindings/drm/bridge/gpio-mux.txt b/Documentation/devicetree/bindings/drm/bridge/gpio-mux.txt new file mode 100644 index 0000000..cce410c --- /dev/null +++ b/Documentation/devicetree/bindings/drm/bridge/gpio-mux.txt @@ -0,0 +1,59 @@ +Generic display mux (1 input, 2 outputs) +---------------------------------------- + +This bindings describes a simple display (e.g. HDMI) mux, that has 2 +inputs, and 1 output. The mux status is controlled by hardware, and +its status is read back using a GPIO. + +Required properties: + + - compatible : "gpio-display-mux" + - detect-gpios : GPIO that indicates the active output + + - Video port for input, using the DT bindings defined in [1]. + - 2 video port for output, using the DT bindings defined in [1]. + The reg value in the endpoints matches the GPIO status: when + GPIO is active, endpoint with reg value <1> is selected,. + +[1]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + + hdmi_mux: hdmi_mux { + compatible = "gpio-display-mux"; + status = "okay"; + detect-gpios = <&pio 36 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_mux_pins>; + ddc-i2c-bus = <&hdmiddc0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { /* input */ + reg = <0>; + + hdmi_mux_in: endpoint { + remote-endpoint = <&hdmi0_out>; + }; + }; + + port@1 { /* output */ + reg = <1>; + + #address-cells = <1>; + #size-cells = <0>; + + hdmi_mux_out_anx: endpoint@0 { + reg = <0>; + remote-endpoint = <&anx7688_in>; + }; + + hdmi_mux_out_hdmi: endpoint@1 { + reg = <1>; + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + };