From patchwork Tue Feb 21 09:50: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: 59834 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1773963wrn; Tue, 21 Feb 2023 01:53:32 -0800 (PST) X-Google-Smtp-Source: AK7set+hJphg2ESt9FVZklO5xfn+9UBjcG2BoZHTH2EcE4aYPyYERsfeJXzc4a52+z4r0EBin/Ch X-Received: by 2002:a05:6a20:8420:b0:c7:20d8:dc21 with SMTP id c32-20020a056a20842000b000c720d8dc21mr4881222pzd.15.1676973212184; Tue, 21 Feb 2023 01:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676973212; cv=none; d=google.com; s=arc-20160816; b=vtsgPrTEU8cuxMGUSDZv5ZzaH9Gi6uAyDz3gkaQfzraKY8NYe0x1PGlFk2fzO8SnmX bHSv6GU1poQ3eZtIdJt6G8XS0VVm2JYTs/08pR8ripIcNwr2fowQkYCDUQ7X4zN2F92Q mBNZOS+8CGZc/mSI6DoSnNkPjqnLbVRaeE24Qykuay7m8hsLYucZzyG/NCDYNS54UNxH 7WsLua8UYFPvD0xnEjEINFh4PIC5o8JuVh8rUNL03h2IdWWiwZmjcvXSFt+5/lSwPhNo 4BN+mPV+GsJYVLcpu03AFqOEuQ1K5B29ESa+er7G8irUapV2g5Q5qwCVEn8oKnO7XVTL /QWA== 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=o4fVi7HmxcPpWdn3N6vTwqgTV0F5HMpYogidtKQ1pQw=; b=w1OQLeQ87dWMJu8B2GD5yC/hOGkBtSPFc4SG1Y/aIUU7nEiX+I/h4k7EoM5HQ+bDhu xuOmCCnIv+mVjWDD3ofcpY7j3jXPn1kCrXuJrMQjUYIjq4JDAqvgYQ4yME7DZCKXuGGw 08c/azRRMwsG9Y4crm1tQ/qPcjvXURHgqpCM6pdGSS8V3K6/vjSsxW3ZFOJIzX8pexDp lCOR2GOpo9ryRvVnYbkMdORar4czWl35mq+HG6mhjBGy/+ztNfPRGdkPlLoRCycC9NNx S1bnGG1Z4p9WY9ClBTYyGHhaBtOg4XUnm8DKuypMdvt0t5AsbeYC5aHMX0/Km11IjuqE MZ5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nEdFNmWJ; 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 205-20020a6306d6000000b004f1a97a4c9dsi16880577pgg.799.2023.02.21.01.53.19; Tue, 21 Feb 2023 01:53:32 -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=nEdFNmWJ; 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 S234053AbjBUJwH (ORCPT + 99 others); Tue, 21 Feb 2023 04:52:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234075AbjBUJv7 (ORCPT ); Tue, 21 Feb 2023 04:51:59 -0500 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F33425976 for ; Tue, 21 Feb 2023 01:51:40 -0800 (PST) Received: by mail-pj1-x1034.google.com with SMTP id b14-20020a17090a8c8e00b002349579949aso4104472pjo.5 for ; Tue, 21 Feb 2023 01:51:40 -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=o4fVi7HmxcPpWdn3N6vTwqgTV0F5HMpYogidtKQ1pQw=; b=nEdFNmWJzn6Q9xlUxWhqBvT69Y8lHI4lKokI2s96szwpyGG+6CuGzqwGglsZpSgRKy DxyAIB1tnEQBsiVMLxDIHrixTAyhh5761sWCl3d/ubFuP8Pfo3I6RfNjrEYNYeBosVGl Se+8IycDR5zXcM2tqq87BeJYzZMeT+nRbg38U= 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=o4fVi7HmxcPpWdn3N6vTwqgTV0F5HMpYogidtKQ1pQw=; b=EybSVTyaX0CwSrpSU73WLOC4Vz6a0TSQnRNo/7TMYWJFKZIHuX5fxDHe4uESnVwVTY nSJnIPuIpQvIWCA1m9/cIWQEVbLrqtAj4b38TEXowL/1UjtmDiXFbnDlWKAt8a7W/VLB sId3MX2cEJKxM030Y8uESEzoHpPnPeWxp0itBLkWvA/WsdMCA0Lx2T9KJoiPq/55rd6z ht2aZkiuskrbISTzd2sKMILNWAXJoXXYFj4O0wA97dGJmGE1jbuHCTPZYfT5z6ru8XoN KLljdv6RomucxDLnToGABjdwFT7kdn4XfjHjcWzQ2X9yEQcJjBmUPdFStvJQ18m/+7JG 4Jyg== X-Gm-Message-State: AO0yUKXo0xjcBPQCWIqoOk8ibCGAxp4ypApslwcqjt811nQWp26fQrNN vDFBkEhW5pmS1Vs6pV8xSdekrQ== X-Received: by 2002:a05:6a20:8420:b0:c7:20d8:dc21 with SMTP id c32-20020a056a20842000b000c720d8dc21mr4873634pzd.15.1676973099837; Tue, 21 Feb 2023 01:51:39 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:a1f5:f58d:584e:5906]) by smtp.gmail.com with ESMTPSA id t25-20020a656099000000b004eca54eab50sm3524918pgu.28.2023.02.21.01.51.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 01:51:39 -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: Pin-yen Lin , linux-kernel@vger.kernel.org, Hsin-Yi Wang , Marek Vasut , Thomas Zimmermann , dri-devel@lists.freedesktop.org, Xin Ji , Lyude Paul , Allen Chen , devicetree@vger.kernel.org, AngeloGioacchino Del Regno , =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , chrome-platform@lists.linux.dev, Javier Martinez Canillas , linux-acpi@vger.kernel.org, Stephen Boyd , Krzysztof Kozlowski , Chen-Yu Tsai Subject: [PATCH v12 04/10] dt-bindings: display: bridge: anx7625: Add mode-switch support Date: Tue, 21 Feb 2023 17:50:48 +0800 Message-Id: <20230221095054.1868277-5-treapking@chromium.org> X-Mailer: git-send-email 2.39.2.637.g21b0678d19-goog In-Reply-To: <20230221095054.1868277-1-treapking@chromium.org> References: <20230221095054.1868277-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=unavailable 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?1758433862394360175?= X-GMAIL-MSGID: =?utf-8?q?1758433862394360175?= 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 Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno --- Changes in v12: - Removed the 4-lane binding in analogix,anx7625.yaml - Reworded the description for the mode-switch property Changes in v11: - Updated the description of the endpoints - Referenced video-interfaces.yaml instead for the endpoints Changes in v10: - Collected Reviewed-by and Tested-by tags Changes in v9: - Collected Reviewed-by tag Changes in v8: - Updated anx7625 bindings for data-lane property - Fixed the 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. .../display/bridge/analogix,anx7625.yaml | 88 ++++++++++++++++++- 1 file changed, 85 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..a50de536cffd 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,9 +113,40 @@ 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. + Video port for panel or connector. 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 SSRX1, SSTX1, + SSRX2, SSTX2, respectively. + + patternProperties: + "^endpoint@[01]$": + $ref: /schemas/media/video-interfaces.yaml# + properties: + reg: true + + remote-endpoint: true + + data-lanes: + oneOf: + - items: + - enum: [0, 1, 2, 3] + + - items: + - const: 0 + - const: 1 + + - items: + - const: 2 + - const: 3 + + mode-switch: + type: boolean + description: Serves as Type-C mode switch if present. + + required: + - remote-endpoint required: - port@0 @@ -186,3 +218,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>; + }; + }; + }; + }; + };