Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp792484rwl; Fri, 31 Mar 2023 02:23:47 -0700 (PDT) X-Google-Smtp-Source: AKy350ZcuCDYPME7N8eKYptTIYTERRGC8PRB+y/zDktM4M4en9FEtSs50Ntko48I9UeGaGLyY2uz X-Received: by 2002:a17:906:519d:b0:939:5398:768e with SMTP id y29-20020a170906519d00b009395398768emr23430199ejk.7.1680254626760; Fri, 31 Mar 2023 02:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680254626; cv=none; d=google.com; s=arc-20160816; b=QQVHdvMwY4WYvo7eJXKHNmWgqYTff6lW4rB/ZnLsPm2RTdMEux6j8Ee72dzjZa1lGv dlEERoltJIHVWvr8zAB+0THU1kkydMq/hYg9k1OiM0E2gWpAdAcgtRd9mjK/5lhIZrTh G5Jawyg0Rzza2squI+tPwemJryXAP6RqTfLhz0d5ZZWkUvYegtOECozQz7fm/SOn3IZk /M2UMR32H6KbDLtuzvHkup41b41VT2Nz1QJ8cVh21+PBfdbcBVG/iBNzr8Xod6Fo0f3m YupEH5iNC/y0elXtU0tZm/qOlIqjFjEH7oPItcIUmpLtm9CNIiWASr7rGdwIyRN5cH3c dMNw== 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=odHQbP0JGRLY1D6v1rghgM1pSsD0Ag0JRPpechtn0qs=; b=txvjND9T2FiiQDlYF/p5vpMQL+tAsgVCHOdp/FeGDsr9+XBjWVayX2Ez/gSAN4v8Xc mgmmOsdtYPZdPTmS0wGMMsRhz7E7iBdUCrcTzebspp5YqqmJtbdCHXIhXUPmFNcpx4dA smpGCgJLf6kwEDtUABgENFfsMHvckv7A3eChWDW5LlI9cf59AIEb2g2QVLbeZOf06Gtz M/6jMcbX1h6m9jZdf/UOO0ilU92JaUkOcOOobLgVLrAnVnbl1VdWD6MPeQzTRfVTPxc9 jlL4ozQ7iMaQAefnKryMpDUh7PAf3hPlUM5VayvteNbQDndgMCB+l+g2dEE2iEvSG4Q7 Idrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="f/vpRCRc"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qo3-20020a170907212300b00930371d2698si1325585ejb.894.2023.03.31.02.23.21; Fri, 31 Mar 2023 02:23:46 -0700 (PDT) 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="f/vpRCRc"; 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 S232048AbjCaJMz (ORCPT + 99 others); Fri, 31 Mar 2023 05:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbjCaJM3 (ORCPT ); Fri, 31 Mar 2023 05:12:29 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35C411D921 for ; Fri, 31 Mar 2023 02:12:19 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id d13so19858444pjh.0 for ; Fri, 31 Mar 2023 02:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1680253938; 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=odHQbP0JGRLY1D6v1rghgM1pSsD0Ag0JRPpechtn0qs=; b=f/vpRCRcfq+7tak2c5Du9JbZMhxJ0MxOr7IgwXvxSAPLZcXB+R/RZ6/BJFjBK17RP0 SOtVy2APYIY2ChvIp8E3QKWzbZ3rcyu2Q5Z4FYOwrvDcI9mudRxMovgXv6WqqqIu4lr0 zhYY6ElRyZ9tUff37i/4iTyapm7/Lv5oOKqvk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680253938; 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=odHQbP0JGRLY1D6v1rghgM1pSsD0Ag0JRPpechtn0qs=; b=UYpnTaelc8MC3Bmz1U9fKyjDL8ueS1E6hRJ1PPmllfBnS2VcKchxJPsefn3N8i50Qk y9DKSj8N7EmMVwt1vpcCwTH9vddXLIQwhKqzjuwS3q09A1adF3BLq1dWyBBonh6K3aOg Wh2fGCpmOjD+TQNDvyxptBZ/Z+XmEZf+/N069YI0/CqpFP1tlj23KXSZvUxEp0cwkbLj 2wq0ii6Ues7VTh7TuwDaFvUoTeKDU2EaVSmDPCej1AEUuC5P1+Q+FFCoQ8v+3000M23I aHkcb2dNxOKm3RQqdpBthfgOBAEOcdJqzuvD+EPVerzaGO58riMBIqO+7EOW6NcDAk6F Gi6w== X-Gm-Message-State: AAQBX9cjdJfEBmJSg9MV8Uto4ykhx31eFZi6fQY/NJ2iCEtcSiJJnZ0C w+QVZfMWuyEAySYTs+vAY6oX5A== X-Received: by 2002:a05:6a20:4f28:b0:de:9f78:f677 with SMTP id gi40-20020a056a204f2800b000de9f78f677mr21533039pzb.23.1680253938591; Fri, 31 Mar 2023 02:12:18 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:ae9d:db7a:8a71:d458]) by smtp.gmail.com with ESMTPSA id n6-20020a62e506000000b006227c3d5e29sm1360905pff.16.2023.03.31.02.12.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 02:12:18 -0700 (PDT) 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 , Marek Vasut , Hsin-Yi Wang , Thomas Zimmermann , AngeloGioacchino Del Regno , Lyude Paul , devicetree@vger.kernel.org, Stephen Boyd , dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org, chrome-platform@lists.linux.dev, =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , Javier Martinez Canillas , Pin-yen Lin , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Chen-Yu Tsai Subject: [PATCH v15 04/10] dt-bindings: display: bridge: anx7625: Add mode-switch support Date: Fri, 31 Mar 2023 17:11:39 +0800 Message-Id: <20230331091145.737305-5-treapking@chromium.org> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog In-Reply-To: <20230331091145.737305-1-treapking@chromium.org> References: <20230331091145.737305-1-treapking@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=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 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 b42553ac505c..604c7391d74f 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>; + }; + }; + }; + }; + }; -- 2.40.0.348.gf938b09366-goog