From patchwork Fri Mar 3 14:33:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 13158859 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14587C678D4 for ; Fri, 3 Mar 2023 14:34:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35C3A10E631; Fri, 3 Mar 2023 14:34:46 +0000 (UTC) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by gabe.freedesktop.org (Postfix) with ESMTPS id 40C5410E631 for ; Fri, 3 Mar 2023 14:34:44 +0000 (UTC) Received: by mail-pf1-x430.google.com with SMTP id fa28so1648531pfb.12 for ; Fri, 03 Mar 2023 06:34:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1677854084; 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=AAOm2avLExkSHfB3zx/OvN27ORzgTjqu+RJWbbW2LWI=; b=AocFUd2SY/HrWTmclxbUJGkmX0+jyLBWuhqdc7+LUm7Yrfi157GhV0+YBdMNjyG6gM WEwGklMofmt2ndd6Xy4H/00vPdikaxLPCd8VifY3OfpMnNnEojegPquhjMh0Up9QSCpm 3bvNcTwBlp0JVmyBLeA9OGHJplrjwTSwxoZHI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677854084; 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=AAOm2avLExkSHfB3zx/OvN27ORzgTjqu+RJWbbW2LWI=; b=7W0Yd4aniH+WMc9f1Oil3thCZkeyH0JIIPQk2tDVZl7OMhrGiucdzDlWKy5+PCRrrv 2/7Y/eijvvffSuTdkjMYxjdhDIkokbCpZ+aOI19YGkHvRtLrchf+dpRaauCpvrX85li9 GKYqI9OUo1adc+3iVgs1UzoYyuD4gh4+q7f3lmeGK4grqZlQEW+y/grjA/+wJMxMq9QO gJFXj5L/tQFWgnMffMzz6IJiQRxIUw2kS8NBougPSTMZsqCUZFkFaTYvErOJXsq1O8hr 1c1ToTsmwK4H2eSvDxwDRWMT8JiPZe4rbD1b5q7aPiVoBCxv5KOBj658wUNGmb7eZNwE JuAA== X-Gm-Message-State: AO0yUKWV4IpVKybNaaHp/Y5XOOsJ8q3d2AOYlq+SE6oc2v+EdqCdPoJQ KQdlVHlPjQ9Ufp45bslj8rBxew== X-Google-Smtp-Source: AK7set93sDmIu6jE7CtCYjsjLEY7KbA8jRQz1kDPvkbZnav57ECMtqtY4nFLZH/+LSN8eewLd0fuxA== X-Received: by 2002:a62:7955:0:b0:5a9:b3a3:c8d8 with SMTP id u82-20020a627955000000b005a9b3a3c8d8mr2495440pfc.0.1677854083695; Fri, 03 Mar 2023 06:34:43 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:55e5:8423:31ee:83dd]) by smtp.gmail.com with ESMTPSA id c18-20020aa781d2000000b005a8b4dcd21asm1767214pfn.15.2023.03.03.06.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 06:34:43 -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 Subject: [PATCH v13 08/10] dt-bindings: display: bridge: it6505: Add mode-switch support Date: Fri, 3 Mar 2023 22:33:48 +0800 Message-Id: <20230303143350.815623-9-treapking@chromium.org> X-Mailer: git-send-email 2.40.0.rc0.216.gc4246ad0f0-goog In-Reply-To: <20230303143350.815623-1-treapking@chromium.org> References: <20230303143350.815623-1-treapking@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marek Vasut , chrome-platform@lists.linux.dev, linux-acpi@vger.kernel.org, =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , devicetree@vger.kernel.org, Allen Chen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Pin-yen Lin , Thomas Zimmermann , Hsin-Yi Wang , Stephen Boyd , Xin Ji , AngeloGioacchino Del Regno Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- (no changes since v12) Changes in v12: - Fixed the schema of "data-lanes" property for it6505 - Reworded the description of the mode-switch property Changes in v11: - Updated the description of the endpoints in the bindings - Referenced video-interfaces.yaml instead for the endpoints binding - Removed duplicated definitions from inherited schema Changes in v9: - Fixed subject prefix again - Changed the naming of the example node for it6505 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 | 101 +++++++++++++++--- 1 file changed, 88 insertions(+), 13 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml index c9a882ee6d98..348b02f26041 100644 --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml @@ -75,22 +75,49 @@ properties: port@1: $ref: /schemas/graph.yaml#/$defs/port-base unevaluatedProperties: false - description: Video port for DP output + description: + Video port for DP output. Each endpoint connects to a video output + downstream, and the "data-lanes" property is used to describe the pin + connections. 0, 1, 2, 3 in "data-lanes" maps to TX0, TX1, TX2, TX3, + respectively. - properties: - endpoint: - $ref: /schemas/graph.yaml#/$defs/endpoint-base + + patternProperties: + "^endpoint@[01]$": + $ref: /schemas/media/video-interfaces.yaml# unevaluatedProperties: false properties: + reg: true + + remote-endpoint: true + data-lanes: - minItems: 1 - uniqueItems: true - items: - - enum: [ 0, 1 ] - - const: 1 - - const: 2 - - const: 3 + oneOf: + - items: + - enum: [0, 3] + + - items: + - const: 0 + - const: 1 + + - items: + - const: 3 + - const: 2 + + - items: + - const: 0 + - const: 1 + - const: 2 + - const: 3 + + mode-switch: + type: boolean + description: Serves as Type-C mode switch if present. + + required: + - reg + - remote-endpoint required: - port@0 @@ -102,7 +129,6 @@ required: - pwr18-supply - interrupts - reset-gpios - - extcon - ports additionalProperties: false @@ -139,8 +165,11 @@ examples: }; port@1 { + #address-cells = <1>; + #size-cells = <0>; reg = <1>; - it6505_out: endpoint { + it6505_out: endpoint@0 { + reg = <0>; remote-endpoint = <&dp_in>; data-lanes = <0 1>; }; @@ -148,3 +177,49 @@ examples: }; }; }; + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + dp-bridge@5c { + compatible = "ite,it6505"; + interrupts = <8 IRQ_TYPE_LEVEL_LOW 8 0>; + reg = <0x5c>; + pinctrl-names = "default"; + pinctrl-0 = <&it6505_pins>; + ovdd-supply = <&mt6366_vsim2_reg>; + pwr18-supply = <&pp1800_dpbrdg_dx>; + reset-gpios = <&pio 177 0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 { + reg = <0>; + it6505_dpi_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + ite_typec0: endpoint@0 { + reg = <0>; + mode-switch; + data-lanes = <0 1>; + remote-endpoint = <&typec_port0>; + }; + ite_typec1: endpoint@1 { + reg = <1>; + mode-switch; + data-lanes = <3 2>; + remote-endpoint = <&typec_port1>; + }; + }; + }; + }; + };