From patchwork Thu Jan 5 13:24:52 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: 39546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp299920wrt; Thu, 5 Jan 2023 05:27:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXvd6R+6c+La0IBkDsr/QU0YqBpqAAuxSxXOAf7gnqYbg84NG/fSOW6AMNdb8c+idQZdxBKD X-Received: by 2002:a05:6402:448e:b0:48e:8971:d28e with SMTP id er14-20020a056402448e00b0048e8971d28emr15565617edb.15.1672925262119; Thu, 05 Jan 2023 05:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672925262; cv=none; d=google.com; s=arc-20160816; b=TfgDGUJfjUC/cGHQIfbqRgSk81K/faGOmjXutD8315nv+i9U3rODvZxpEutGxYGkGv cRMXwmjZtMutFSiCyvkE/eu7f6YMYpUYnDVs/aU+WHBTlX88AIho/ndIe7sa3jjQhq2C fFcv2rwjsh2qjLyHoDV04bc26VyjDbpZG1gNzmLsWzq4uahuqIp/K9mNkReuQpy701T0 PzW+aowJXGPxEHyui1/IogIAQQMigaNYqbmHT5scA2VN4QlMGXVCbsJb7Ih06VIgn13g cR9m71IkdP72jzbWS0mamLJaE9rAOL27Vu9fBO8eoi0y1qQVUWy7a+bxp4jBJOwC/eda qjLw== 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=bqO6o8ZziGkIoOqjoSOzWXc91CpV6gR03ce64pYL0vM=; b=w4dHwTRVypcbVkQjGnyfO7VcXfYfq1lC9PFODMbmopTntg1Z2YK8+9e2ASQBEtyzj3 2CcPi2q2zv7DJEYIFSkNupP0qaYpn+VB7bpUMwyLhMie1ZW4GTanbN94bH2wqMPCySsx xig9gvmQyBisnVmA3TkOds+qEfKbJbJRxoYmwRN6ZQrG2wpeQ+wcIg1+biaKahKX6Hrh ozxKt7YXVRoxoKY20w6gdhXF7wbYAW/XwD3803OLm5vD3Ek4bA0OKH/SlKWitF6Hh39E /IqO2uUtR2outDEdD2vUV1WjBymXVu/HRVpnhuCHesvFwXrH5YPM/rlL4CobCmSYPJeP 281w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YcKvS+Lp; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a056402274b00b0045c93142111si38189606edd.70.2023.01.05.05.27.17; Thu, 05 Jan 2023 05:27:42 -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=YcKvS+Lp; 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 S233956AbjAEN0L (ORCPT + 99 others); Thu, 5 Jan 2023 08:26:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233631AbjAENZe (ORCPT ); Thu, 5 Jan 2023 08:25:34 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EC7A392CD for ; Thu, 5 Jan 2023 05:25:33 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id n65-20020a17090a2cc700b0021bc5ef7a14so2039858pjd.0 for ; Thu, 05 Jan 2023 05:25: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=bqO6o8ZziGkIoOqjoSOzWXc91CpV6gR03ce64pYL0vM=; b=YcKvS+Lp0xVVZn/icmzAmy07hYJkl0Oy97nHOC/lY3pcQt+0deVNdyXj80mprqXVHo JXSuy529B9n57Jgb67pU45VqmzF+xKVFXBvZolr/V07B1wPzMCpQlVQzVvwCyb+HwVXj 5ukmVlTY1j56EYdU2w1gdVCaQfX7rxXJJWMFE= 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=bqO6o8ZziGkIoOqjoSOzWXc91CpV6gR03ce64pYL0vM=; b=0U6zWdyPiZcnIvBOEMmtMTgrOk9KW2qsBHrQ7CdeDqfkngyTL7GiSmClxWqF4X0Wi8 zMGnbxYwAYWNvKhHhoA4t3Ki8SCss7xsj6wa0pyIu/6346657rW3ZJQjts+DUZpw3k96 valLEjs/uAs5Sc9vZ4GKwJnQWRPSzD7JK1mwK19k9VcJEWUtrsUbj7crgFfzUUSPLnDs akZ4BabckIHDHSCfb1dQM4xyZhl/fYITYH4tiVSk7EnnU2YR3vNApkK+LcEgRt3E2mWr SbvT0C/ZaSaS7EFfoR9OxbieXHDALKZ1vl2HuZQqtcGtLJSZCekxYIu/ASaIlIUBC8qi PPbg== X-Gm-Message-State: AFqh2kr32IB5ZECAaF6vBYl+jEt1rZPz8cjLGNhcYWc0DCL9PN0k9BNl 9t59na9J5skRBf7wSRYKbGU6vA== X-Received: by 2002:a17:90b:698:b0:226:9982:70c9 with SMTP id m24-20020a17090b069800b00226998270c9mr10455808pjz.30.1672925132647; Thu, 05 Jan 2023 05:25:32 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:7a61:eb85:2e3:2bd0]) by smtp.gmail.com with ESMTPSA id gk22-20020a17090b119600b00225e670e4c7sm1372682pjb.35.2023.01.05.05.25.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:25: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 , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck Cc: =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Xin Ji , AngeloGioacchino Del Regno , Thomas Zimmermann , Hsin-Yi Wang , linux-kernel@vger.kernel.org, Allen Chen , linux-acpi@vger.kernel.org, Lyude Paul , dri-devel@lists.freedesktop.org, chrome-platform@lists.linux.dev, Pin-yen Lin , Javier Martinez Canillas , Marek Vasut , devicetree@vger.kernel.org, Stephen Boyd Subject: [PATCH v7 4/9] dt-bindings: drm/bridge: anx7625: Add mode-switch support Date: Thu, 5 Jan 2023 21:24:52 +0800 Message-Id: <20230105132457.4125372-5-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230105132457.4125372-1-treapking@chromium.org> References: <20230105132457.4125372-1-treapking@chromium.org> MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754189279618818904?= X-GMAIL-MSGID: =?utf-8?q?1754189279618818904?= Analogix 7625 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. Also include the link to the product brief in the bindings. Signed-off-by: Pin-yen Lin --- 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. .../display/bridge/analogix,anx7625.yaml | 101 +++++++++++++++++- 1 file changed, 98 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml index 4590186c4a0b..536dbe8eaf60 100644 --- a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +++ b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml @@ -12,7 +12,8 @@ maintainers: description: | The ANX7625 is an ultra-low power 4K Mobile HD Transmitter - designed for portable devices. + designed for portable devices. Product brief is available at + https://www.analogix.com/en/system/files/AA-002291-PB-6-ANX7625_ProductBrief.pdf properties: compatible: @@ -112,10 +113,50 @@ properties: data-lanes: true port@1: - $ref: /schemas/graph.yaml#/properties/port + $ref: /schemas/graph.yaml#/$defs/port-base description: Video port for panel or connector. + patternProperties: + "^endpoint@[01]$": + $ref: /schemas/graph.yaml#/$defs/endpoint-base + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + + remote-endpoint: true + + data-lanes: + oneOf: + - minItems: 1 + maxItems: 1 + 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 + required: - port@0 - port@1 @@ -164,8 +205,12 @@ examples: }; mipi2dp_bridge_out: port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; - anx7625_out: endpoint { + anx7625_out: endpoint@0 { + reg = <0>; remote-endpoint = <&panel_in>; }; }; @@ -186,3 +231,53 @@ examples: }; }; }; + - | + i2c3 { + #address-cells = <1>; + #size-cells = <0>; + + encoder@58 { + compatible = "analogix,anx7625"; + reg = <0x58>; + pinctrl-names = "default"; + pinctrl-0 = <&anx7625_dp_pins>; + enable-gpios = <&pio 176 GPIO_ACTIVE_HIGH>; + reset-gpios = <&pio 177 GPIO_ACTIVE_HIGH>; + vdd10-supply = <&pp1100_dpbrdg>; + vdd18-supply = <&pp1800_dpbrdg_dx>; + vdd33-supply = <&pp3300_dpbrdg_dx>; + analogix,audio-enable; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + anx7625_dp_in: endpoint { + bus-type = <7>; + remote-endpoint = <&dpi_out>; + }; + }; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + + reg = <1>; + anx_typec0: endpoint@0 { + reg = <0>; + mode-switch; + data-lanes = <0 1>; + remote-endpoint = <&typec_port0>; + }; + anx_typec1: endpoint@1 { + reg = <1>; + mode-switch; + data-lanes = <2 3>; + remote-endpoint = <&typec_port1>; + }; + }; + }; + }; + };