From nobody Fri Apr 10 04:50:45 2026 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 AA7ADC64981 for ; Sat, 7 Jan 2023 10:25:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237030AbjAGKZO (ORCPT ); Sat, 7 Jan 2023 05:25:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237047AbjAGKYD (ORCPT ); Sat, 7 Jan 2023 05:24:03 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 882D68BF10 for ; Sat, 7 Jan 2023 02:23:24 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id h7-20020a17090aa88700b00225f3e4c992so7798099pjq.1 for ; Sat, 07 Jan 2023 02:23:24 -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=E/gEsNzrA/Lgz87FE9mqz10fVZbIVU9EcG3Z05y5ydc=; b=hgJ4Os7WpWJlgsWbuHlRB+V1rpk6UR3Ooai1oGDOzAmDlcIxpZkdNr6BfuRg4w3+Ky kVI13jd0BVccpwZryw4DlNHjafFmMB0iseorC/ChPfyew6rewv28/dY2jcAIi8DlroQN hKKXr4hrQiBgNHZAPwC6D/0DXBvy5vsodNVfA= 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=E/gEsNzrA/Lgz87FE9mqz10fVZbIVU9EcG3Z05y5ydc=; b=ROiK1gyZrQBdOj3QnSqkfxzaxqI+c3O7e8me/PcSLPNdk7uW44OjUVW44yMFTg9VHE QwHnnJzL0DuotksMSDUwuO0BIJBPIw6iEZx56bU0SzXB+4lLKv+OCoRTeDl61Gk/FTc6 X4wb0JTzbzvK0dB3LcUQ9JeugkHrIdXdMWwZo1padjlpddSPjf26rMM2A1as61U5funW vku6BSM3rFn858uQ7mvz0cOfywOD3Un6sRDaTbCcp00/IX2Z2jKlOgyMNz6oCS0o5s07 XoBcX7Ho/MOJIXKfepxZS8JLN6p+Tyk+ZHthMb8BZ1m7hefG9cqcDmQ7EQtEKXwjLYz+ mHeg== X-Gm-Message-State: AFqh2kqqCv2dC8TCW9KsnYY4w3PWkucy3QJrN5mkpkT+Fh4KF70G/DwV kc9TJVm6IgYekgzEt/jXPBzTRQ== X-Google-Smtp-Source: AMrXdXtnzbo8Q1fSxaMt5B/cMkNwiuw6W8IQGXbJSIiVN5t5UXvJHEUogVVEhrR3fRaghBEGjRsbMA== X-Received: by 2002:a17:902:ec89:b0:186:b063:32e with SMTP id x9-20020a170902ec8900b00186b063032emr85775181plg.62.1673087003925; Sat, 07 Jan 2023 02:23:23 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:180d:95e8:f4:84fb]) by smtp.gmail.com with ESMTPSA id b1-20020a170903228100b001892af9472esm2366362plh.261.2023.01.07.02.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Jan 2023 02:23:23 -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 , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck Cc: Thomas Zimmermann , dri-devel@lists.freedesktop.org, Lyude Paul , Javier Martinez Canillas , linux-kernel@vger.kernel.org, Xin Ji , Pin-yen Lin , AngeloGioacchino Del Regno , Allen Chen , Hsin-Yi Wang , chrome-platform@lists.linux.dev, =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , devicetree@vger.kernel.org, Marek Vasut , linux-acpi@vger.kernel.org, Stephen Boyd Subject: [PATCH v8 7/9] dt/bindings: display: bridge: it6505: Add mode-switch support Date: Sat, 7 Jan 2023 18:22:29 +0800 Message-Id: <20230107102231.23682-8-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230107102231.23682-1-treapking@chromium.org> References: <20230107102231.23682-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" ITE IT6505 can be used in systems to switch the DP traffic between two downstreams, which can be USB Type-C DisplayPort alternate mode lane or regular DisplayPort output ports. Update the binding to accommodate this usage by introducing a data-lanes and a mode-switch property on endpoints. Signed-off-by: Pin-yen Lin --- Changes in v8: - Updated bindings for data-lanes property - Fixed subject prefix Changes in v7: - Fixed issues reported by dt_binding_check. - Updated the schema and the example dts for data-lanes. - Changed to generic naming for the example dts node. Changes in v6: - Remove switches node and use endpoints and data-lanes property to describe the connections. .../bindings/display/bridge/ite,it6505.yaml | 93 ++++++++++++++++--- 1 file changed, 82 insertions(+), 11 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6505.ya= ml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml index b16a9d9127dd..8d56654634a8 100644 --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml @@ -77,20 +77,43 @@ properties: unevaluatedProperties: false description: Video port for DP output =20 - properties: - endpoint: + patternProperties: + "^endpoint@[01]$": $ref: /schemas/graph.yaml#/$defs/endpoint-base unevaluatedProperties: false =20 properties: + reg: + maxItems: 1 + + remote-endpoint: true + data-lanes: - minItems: 1 - uniqueItems: true - items: - - enum: [ 0, 1 ] - - const: 1 - - const: 2 - - const: 3 + oneOf: + - items: + - enum: [0, 1, 2, 3] + + - items: + - const: 0 + - const: 1 + + - items: + - const: 2 + - const: 3 + + - items: + - const: 0 + - const: 1 + - const: 2 + - const: 3 + + mode-switch: + type: boolean + description: Register this node as a Type-C mode switch or= not. + + required: + - reg + - remote-endpoint =20 required: - port@0 @@ -102,7 +125,6 @@ required: - pwr18-supply - interrupts - reset-gpios - - extcon - ports =20 additionalProperties: false @@ -139,8 +161,11 @@ examples: }; =20 port@1 { + #address-cells =3D <1>; + #size-cells =3D <0>; reg =3D <1>; - it6505_out: endpoint { + it6505_out: endpoint@0 { + reg =3D <0>; remote-endpoint =3D <&dp_in>; data-lanes =3D <0 1>; }; @@ -148,3 +173,49 @@ examples: }; }; }; + - | + #include + + i2c3 { + #address-cells =3D <1>; + #size-cells =3D <0>; + + dp-bridge@5c { + compatible =3D "ite,it6505"; + interrupts =3D <8 IRQ_TYPE_LEVEL_LOW 8 0>; + reg =3D <0x5c>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&it6505_pins>; + ovdd-supply =3D <&mt6366_vsim2_reg>; + pwr18-supply =3D <&pp1800_dpbrdg_dx>; + reset-gpios =3D <&pio 177 0>; + + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + port@0 { + reg =3D <0>; + it6505_dpi_in: endpoint { + remote-endpoint =3D <&dpi_out>; + }; + }; + port@1 { + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <1>; + ite_typec0: endpoint@0 { + reg =3D <0>; + mode-switch; + data-lanes =3D <0 1>; + remote-endpoint =3D <&typec_port0>; + }; + ite_typec1: endpoint@1 { + reg =3D <1>; + mode-switch; + data-lanes =3D <2 3>; + remote-endpoint =3D <&typec_port1>; + }; + }; + }; + }; + }; --=20 2.39.0.314.g84b9a713c41-goog