From nobody Mon Sep 15 04:13:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1343BC46467 for ; Mon, 16 Jan 2023 11:08:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230339AbjAPLI5 (ORCPT ); Mon, 16 Jan 2023 06:08:57 -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-Google-Smtp-Source: AMrXdXuq+XEkjBV2F0TfS2QJ0JI1gIcLgpsZ1zLbf+nvAZJ8IJOaPuaSO88JzGD+CnIl2ceode0kfw== 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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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-m= ux.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 prob= ing + $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 =3D "gpio-display-mux"; + detect-gpios =3D <&pio 36 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&hdmi_mux_pins>; + ddc-i2c-bus =3D <&hdmiddc0>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { /* input */ + reg =3D <0>; + + hdmi_mux_in: endpoint { + remote-endpoint =3D <&hdmi0_out>; + }; + }; + + port@1 { /* output */ + reg =3D <1>; + + #address-cells =3D <1>; + #size-cells =3D <0>; + + hdmi_mux_out_anx: endpoint@0 { + reg =3D <0>; + remote-endpoint =3D <&dp_bridge_in>; + }; + + hdmi_mux_out_hdmi: endpoint@1 { + reg =3D <1>; + remote-endpoint =3D <&hdmi_connector_in>; + }; + }; + }; + }; --=20 2.39.0.314.g84b9a713c41-goog