Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3063679rwb; Mon, 16 Jan 2023 03:16:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXuW8aRbrp8vPIAznLf46U18612Pya4XkgpwbNabQqpq6iBXY5cSRqegY4XEW2hS5DWPoflU X-Received: by 2002:a05:6a20:bb15:b0:b6:3708:7be7 with SMTP id fc21-20020a056a20bb1500b000b637087be7mr21963544pzb.34.1673867811239; Mon, 16 Jan 2023 03:16:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673867811; cv=none; d=google.com; s=arc-20160816; b=ZdvGjtT38dfDMbSggXaaJK3krntzh/wjFseTtV57z7rzVkaJGks06rXAQRcRQp7CUj tF0QTjFw6OrWE6EEfn+bWoSUOeQLl22wmeWthaBnCc8+jacwzbO8iy0VOFP5JvuLmZtx QSDcIvcgr7nWxTg3Yc6grYOT6g04mtA5TbnxIEmq9wxj9iBkrKWXOYTudI8WdxzH4Qd1 geiXkhFS2osgd50gD1KNj8aO22UQ71oN80AtZBpjmgBouNT9B8VaSepelxAZFAIXfZ92 VDaW0rvuIDF4ykjv8EJGjJONfWyvSB/gjZ7EGS/SiXcmO2y/XUUY+SGaVJdC0VLAe30X OhfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=erd07UtB/CaRm8VAcdFsHqz5BD6J0Uh9OeVqXzbjdoQ=; b=naOUlmAd01eQ5UAV/RuM4vLbxhMEtkhKo5pJIFA/Waz+LNNmuMTC9kTAt984+kT4U6 Ojxg7H23JLSKczLATn6Jpz637OHvMsd24aTmufjBt+BJ5dSDC5HqyfxDVi0Py07Osrnf mu5trT0TFqOE5kg6Klt7KzAQUjUjODsLFVj6HscFcMwbeV+XKWstxilD4Udp9d661p4H bkKgnxklb1ghcswztJuQOGEd4gdfND1ypzhBGS+2is7oK7OAELfAbiiX7ApWL25GHlzT BtJKHtL72pufcvPoWC3UNAhxyCG9mLSaMKrzMzPv078UdAcai3Gc8bkW+k9yj1dPqudi JK7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="We2Nv/y1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u184-20020a6385c1000000b004c7b4bdd560si7242397pgd.821.2023.01.16.03.16.45; Mon, 16 Jan 2023 03:16:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="We2Nv/y1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229572AbjAPLIy (ORCPT + 51 others); Mon, 16 Jan 2023 06:08:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230388AbjAPLIf (ORCPT ); Mon, 16 Jan 2023 06:08:35 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6FEB6A6B for ; Mon, 16 Jan 2023 03:08:33 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id d3so29967733plr.10 for ; Mon, 16 Jan 2023 03:08:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=erd07UtB/CaRm8VAcdFsHqz5BD6J0Uh9OeVqXzbjdoQ=; b=We2Nv/y1kzqc22WfmseNr651ji5otvZ5dRPvn3MVPNPxzpwrQiX8W+CbgI2ggX9eDN IijlPSbDLYgdw5rtt9RXJBREJfk1JaJPpcsMiAJs64NhTr3NWbbEKKxwQuyGlX/o9Fdq fcw9jaQWUy0ODz/rFTdFyBZmd2/ZmmvcU/43E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=erd07UtB/CaRm8VAcdFsHqz5BD6J0Uh9OeVqXzbjdoQ=; b=EMPX6jvz2vhAooMdhb0EKegq7hSUdHjUQ4brTt9WJ/awXVf/Xepx/1r3NWeGGZiI5x T2QLybEUCXrln8Cn59OvToABm5XFnTh3NEbmJWCimP92MAcyGcLbJkpWZIJA0TUJvFw3 GnNBk3sMT8qbuHgGKp+amb6rMk2bh6+1QjBY2+fT+KDTd43uZTw2omHXgyPMld90RJh2 Vy1YtBo/FFOsf4OGLS6T9HBPDOX+HNmzPnG18uNTCCGvAugR7yf4qiEP8lt1p5kIBKdy /ycBvXKERkTJzXjilCw3mqJEBNkZFdk1f9dMS0fy86Y8FZuS54uhqZbIyqLBr8DjM2kV iQgA== X-Gm-Message-State: AFqh2kogCY1Fukoen70tOgQxb3NjUWdwTaDYioNzP+fEG/SV5qF8Kisd /3ZBSHEaLEZLmmsc9Qq6xgfKEQ== X-Received: by 2002:a17:90b:4ccf:b0:229:a39:2ad8 with SMTP id nd15-20020a17090b4ccf00b002290a392ad8mr14437596pjb.37.1673867313326; Mon, 16 Jan 2023 03:08:33 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:a3f3:9ba9:fe36:fbcb]) by smtp.gmail.com with ESMTPSA id i8-20020a17090a138800b00226369149cesm17993686pja.21.2023.01.16.03.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 03:08:32 -0800 (PST) From: Pin-yen Lin To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski Cc: Nicolas Boichat , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Hsin-Yi Wang , dri-devel@lists.freedesktop.org, Pin-yen Lin Subject: [PATCH v2 1/2] dt-bindings: display: bridge: Add GPIO display mux binding Date: Mon, 16 Jan 2023 19:08:19 +0800 Message-Id: <20230116110820.2615650-2-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230116110820.2615650-1-treapking@chromium.org> References: <20230116110820.2615650-1-treapking@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Boichat Add bindings for Generic GPIO mux driver. Signed-off-by: Nicolas Boichat Signed-off-by: Pin-yen Lin --- Changes in v2: - Referenced existing dt-binding schemas from graph.yaml - Added ddc-i2c-bus into the bindings .../bindings/display/bridge/gpio-mux.yaml | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/bridge/gpio-mux.yaml diff --git a/Documentation/devicetree/bindings/display/bridge/gpio-mux.yaml b/Documentation/devicetree/bindings/display/bridge/gpio-mux.yaml new file mode 100644 index 000000000000..da29ba078f05 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/gpio-mux.yaml @@ -0,0 +1,95 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/gpio-mux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Generic display mux (1 input, 2 outputs) + +maintainers: + - Nicolas Boichat + +description: | + This bindings describes a simple display (e.g. HDMI) mux, that has 1 + input, and 2 outputs. The mux status is controlled by hardware, and + its status is read back using a GPIO. + +properties: + compatible: + const: gpio-display-mux + + detect-gpios: + maxItems: 1 + description: GPIO that indicates the active output + + ddc-i2c-bus: + description: phandle link to the I2C controller used for DDC EDID probing + $ref: /schemas/types.yaml#/definitions/phandle + + ports: + $ref: /schemas/graph.yaml#/properties/ports + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: | + Video port for input. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: | + 2 video ports for output. + The reg value in the endpoints matches the GPIO status: when + GPIO is asserted, endpoint with reg value <1> is selected. + + required: + - port@0 + - port@1 + +required: + - compatible + - detect-gpios + - ports + +unevaluatedProperties: false + +examples: + - | + #include + hdmi_mux: hdmi_mux { + compatible = "gpio-display-mux"; + 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 = <&dp_bridge_in>; + }; + + hdmi_mux_out_hdmi: endpoint@1 { + reg = <1>; + remote-endpoint = <&hdmi_connector_in>; + }; + }; + }; + }; -- 2.39.0.314.g84b9a713c41-goog