From patchwork Sat Feb 4 13:30:35 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: 52771 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1352562wrn; Sat, 4 Feb 2023 05:33:09 -0800 (PST) X-Google-Smtp-Source: AK7set9AQRx0LYsdojQmcCasL08Nbj0qN9EzCd/+O1PPZvs/kAOG0wBNAScpIsGJEsw2OuGmlmTp X-Received: by 2002:a17:90b:3910:b0:22c:64f3:facd with SMTP id ob16-20020a17090b391000b0022c64f3facdmr13921698pjb.21.1675517589070; Sat, 04 Feb 2023 05:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675517589; cv=none; d=google.com; s=arc-20160816; b=iu71EPjikKuEN//ZcTDMExjm7qPx/487nZoZ08aKPOZkV65S8H9JKYyeP8s6FP3WZ6 HpxcHNHtJ9vlyR8CylKyYq8Z0W5PXtuB/BsiupqG+pXCVvmor0LcHiF05W0afu+LA2wu TdeS3aVZ3D84tdUk8cPMdRp/OgpPMqECboBcNBnd86YDBqFbcVjP26NyBlLLuPV010ri g9SQ7MGH6+c77iModb0YbfpG1wxXQrARbKIwM2XXn16KzDsSJm26vsZDHU2clz/QjmI+ VcZnigZwXNsXDWYSh2Un7cC01+fEKIUbHHEDkx07+ji7IzoDAaszR3F16ltUiY6eDX9t Nt6A== 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=VFozqAO7y27WSMX10PmbGe+zEkg2ZSj3A7g8bFlTPI8=; b=vc8cCZp8h4RIQhyqtaHm3Mt+ctIzgtq6K44yrO25aEoA07oy7a3kXlY681CX9h6fjO vgX9d62Oved3KAbv3iNFN7mSldkwsIwtlXZncYitznPpRl2B4g1X1oY/Dc7ZoAPHoH1L xzoN/iA+JLJ08ckaXd7avpliQoIAYJH34QY0Pa0g62mEJdgxU7JSuL1Y0C+rSk1j5uhh sqJLXRmnb5i2fIO9eVKSFHlcKBfW4JJ3xYVGxa+mq0+/0uZDv/lJNW2XtS8AI2pxff71 80KelIEKHMVjZvjeUUUQKnfdutbH7m/FVrY/ifaemOqgeOxC+GPjCHiZES6jXWaUvfCL o1Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ExdVtGh0; 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 ot15-20020a17090b3b4f00b0022dae6bb6d6si7278446pjb.4.2023.02.04.05.32.57; Sat, 04 Feb 2023 05:33:09 -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=ExdVtGh0; 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 S233747AbjBDNbn (ORCPT + 99 others); Sat, 4 Feb 2023 08:31:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233722AbjBDNbX (ORCPT ); Sat, 4 Feb 2023 08:31:23 -0500 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00920367E3 for ; Sat, 4 Feb 2023 05:31:16 -0800 (PST) Received: by mail-pj1-x1043.google.com with SMTP id on9-20020a17090b1d0900b002300a96b358so7369041pjb.1 for ; Sat, 04 Feb 2023 05:31:16 -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=VFozqAO7y27WSMX10PmbGe+zEkg2ZSj3A7g8bFlTPI8=; b=ExdVtGh0PEiFMJQdufiU2ArXz+vVi3h660myAJbH5fks21pEn6zhkHbndMIyQFmdmq t/+PHLvjgEtjKq5UGf/PVDxBu8UoufdrjcZqy75MGNxhz/D5ZX7VtSZPIHFSvmH8OeGW aX8Tpz769on+ITPQx70eVu/fJifPknu2Xevsc= 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=VFozqAO7y27WSMX10PmbGe+zEkg2ZSj3A7g8bFlTPI8=; b=KDFa8I3QDmozVko9JeSw0nS6oXsl+cREht6GQJHtjIvRKT1UArpnClgxH/xiJjpAAI tMInhI3uzMjh5WPRPxjwZFNsgRQD9uFj28FsMcbroy1ZgZ1a9t/m/2aJ38KDs3WBbHWn JXl7BjpcVtg7vte03bKqZCQJQJjLUSGBJXGkQyLIw8d+ogmGncuGlRwQpPSYIfN1RMpo TwK0wydyFy4sGcRTA9cc8VbzeFFZN2q/qXxY3KpJBmqFWDN2Vx72JMIGuRsXyqSoaI26 xGw3odGIblpdPasPu+ASgNMi0M5WXkOshkKdZMFMcdaF4CPVsuzs0/1Vt1VHwOEbZEoR l11Q== X-Gm-Message-State: AO0yUKVJRHYjWcMS7wRMWvwPYthyq4wH3JU2f4ybjfjXAHrZEsAsvAR8 VZaFTvulAi3WBJHdRGrt7QdjUA== X-Received: by 2002:a05:6a20:9589:b0:bf:7ae0:5f97 with SMTP id iu9-20020a056a20958900b000bf7ae05f97mr11329759pzb.21.1675517476426; Sat, 04 Feb 2023 05:31:16 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:c1ad:2bdc:7b5a:72e3]) by smtp.gmail.com with ESMTPSA id 144-20020a621596000000b00593ce7ebbaasm3655639pfv.184.2023.02.04.05.31.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Feb 2023 05:31:16 -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: linux-kernel@vger.kernel.org, =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_P?= =?utf-8?q?rado?= , Hsin-Yi Wang , devicetree@vger.kernel.org, Pin-yen Lin , Allen Chen , Lyude Paul , linux-acpi@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , Xin Ji , Stephen Boyd , AngeloGioacchino Del Regno , Thomas Zimmermann , Javier Martinez Canillas , chrome-platform@lists.linux.dev, Krzysztof Kozlowski , Chen-Yu Tsai Subject: [PATCH v11 4/9] dt-bindings: display: bridge: anx7625: Add mode-switch support Date: Sat, 4 Feb 2023 21:30:35 +0800 Message-Id: <20230204133040.1236799-5-treapking@chromium.org> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog In-Reply-To: <20230204133040.1236799-1-treapking@chromium.org> References: <20230204133040.1236799-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?1756907531450417385?= X-GMAIL-MSGID: =?utf-8?q?1756907531450417385?= 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 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 | 94 ++++++++++++++++++- 1 file changed, 91 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..f287e8e0602f 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,46 @@ 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 + + - 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: + - remote-endpoint required: - port@0 @@ -186,3 +224,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>; + }; + }; + }; + }; + };