From patchwork Fri Mar 3 14:33:44 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: 63948 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp443007wrd; Fri, 3 Mar 2023 06:37:26 -0800 (PST) X-Google-Smtp-Source: AK7set/F36poyv/167ZGR89XSN+vTgGUAIhJVVBvhz2QAq1a84J2IE54bqVPfgLqtZ1TXzFxZdsd X-Received: by 2002:a05:6a21:338d:b0:cb:c4de:a20 with SMTP id yy13-20020a056a21338d00b000cbc4de0a20mr2918123pzb.55.1677854245877; Fri, 03 Mar 2023 06:37:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677854245; cv=none; d=google.com; s=arc-20160816; b=IpSfYe53hNsDDB+7uz09G+Ap/1hoQrS6Orxo4I3/J4k4sr8mB0ZPdQmH6tLAIjAxul NFaoH7zPeOgqjc83b0Uc906pq2CsWh0E7i+cu/Ko45ZyZHRPF0BWg7m4uO3EGOcT3Thx 6Vqb9OiOe30Mt7e1jX8AfE9UvU2ioke6/dmmdEcrrnjOdOc3N8eA3aT4cnQsPmTLcZRi GtZsHXdSoSvodVWStmPsgg305z4Rmd/8FY8UGFosCGyE73JZ8BHk/omi4a9JMjqLURwc alFnscGB12qgBYqDplMUHxrRMqeayR9Q9Qdu6R2k0ACg00m2PL559RVhvcu0YXNYVykw +3Qg== 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=PNqMvcSR7fV+nG4ZpLQQUo4Z8GgUt8riFBleH8/sH1g=; b=HjkfEFSUDOJ9tyXFRiYbxYY6ihLKHm4y7u+LU7W3j071UZvI+rYGajyy/MXPkVLZ1k 9al2cQ6KpacSwUyT5V9lhU0tHjiaR11RYifp/vp/+pQV2KyavkPIIybx/UGJWF5L/FQd hO7HbPa3oPVprZ9FcSnjepbNUnL5fgzbkE01ehdS4i1ZofV8h+ezVZhUfppP1Kc3bzZe DqNg75eV8KEmevb0O13h0JvyffPkXBpDtqDZoE1BhRBDaKTXr0evAXBNjcyKmmvRh82I U+mVwHgQWI7Lmcs+lBWLv9U1xvmvwJba6VoRN/eP+KTVi6FAAvtzQ56/cFhmyZokd2Ji dPkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="nWCY+/r+"; 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 j186-20020a638bc3000000b00502ecc2b3d9si2192182pge.831.2023.03.03.06.37.08; Fri, 03 Mar 2023 06:37:25 -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="nWCY+/r+"; 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 S231340AbjCCOez (ORCPT + 99 others); Fri, 3 Mar 2023 09:34:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231345AbjCCOed (ORCPT ); Fri, 3 Mar 2023 09:34:33 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1742C17152 for ; Fri, 3 Mar 2023 06:34:22 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id me6-20020a17090b17c600b0023816b0c7ceso6335663pjb.2 for ; Fri, 03 Mar 2023 06:34:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1677854062; 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=PNqMvcSR7fV+nG4ZpLQQUo4Z8GgUt8riFBleH8/sH1g=; b=nWCY+/r+PntjVztOGkJni/Ez3spDswwLiOFy1qRlJrK83UNi106FOIFCL1li20iWty sa1izZWEFHMZvo8002X0asfckemO5ECxdEfk9nNP4WMyneD1BTHUw6X9Yol7M4gZsJyb EPAGGlg8Mj1ZICR8ALvx2fyf4FL33lMcdrMYE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677854062; 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=PNqMvcSR7fV+nG4ZpLQQUo4Z8GgUt8riFBleH8/sH1g=; b=f3/+TBIbhh767lL9ae3/Ab3qqH2MhVqlCnI3UsxLgnNJWYP+DCJDcN8rLya0moThby cY8K8Un8EwiIGnkEvbJe+OTheCEwzbcwVrBvBczcmTNQZXVp0MQVC/GCPOcgF6qGW4cY X7VZD2hKajK/FD46GOkmrK9soWOvRMM06Q3WK0qRj3K9ULrju1qlm0LnAGMjNdsvrcPY jFCGOWpoX1LCeZ5EiVo7gT7PBzXBuHzT939z7JspPGWZSDSUI0Pecddw5hNqfDGZFImi EzV257IIxOPxrsfvwKm8ERDerXkyEFdR0WjEdKmsfjE361NYD5FGQtFJ2FuCYq14EXfU TVoQ== X-Gm-Message-State: AO0yUKUkhIdZ5FVaD2qmudTDsSCHDwTFo5zlQVCffrdMglLU48kRmWxf nfsQcjQgBnpL+qefki3kWGS4gQ== X-Received: by 2002:a05:6a20:918a:b0:c7:249:cd8c with SMTP id v10-20020a056a20918a00b000c70249cd8cmr2040436pzd.5.1677854062290; Fri, 03 Mar 2023 06:34:22 -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.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 06:34:22 -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: Xin Ji , Javier Martinez Canillas , Lyude Paul , linux-kernel@vger.kernel.org, Pin-yen Lin , AngeloGioacchino Del Regno , chrome-platform@lists.linux.dev, =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_P?= =?utf-8?q?rado?= , Marek Vasut , Hsin-Yi Wang , devicetree@vger.kernel.org, Allen Chen , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Stephen Boyd , linux-acpi@vger.kernel.org, Krzysztof Kozlowski , Chen-Yu Tsai Subject: [PATCH v13 04/10] dt-bindings: display: bridge: anx7625: Add mode-switch support Date: Fri, 3 Mar 2023 22:33:44 +0800 Message-Id: <20230303143350.815623-5-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-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?1759357693268346429?= X-GMAIL-MSGID: =?utf-8?q?1759357693268346429?= 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 --- (no changes since v12) 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>; + }; + }; + }; + }; + };