Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5896123rwl; Mon, 9 Jan 2023 01:03:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXtfyhnOe6TewU0D7P7WFMAXGBJAMUuIo4qchUFhhKISHSsoSd8PKmHU2OQON96tc/Mkg0f5 X-Received: by 2002:a17:907:bb8b:b0:84d:1f41:1177 with SMTP id xo11-20020a170907bb8b00b0084d1f411177mr9152887ejc.68.1673254988343; Mon, 09 Jan 2023 01:03:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673254988; cv=none; d=google.com; s=arc-20160816; b=fCZTPILVY1WyPE/0peig3DXoLw6qrkHoFvWibDBUHKtTaZNAJY5d9ieq52zfqzGPR9 +cqckUrFzAMPzWvsau9m1IDAyP5ggnEA5gXunGjsec9L3+q70NNzML7cFOoElcASARUC zZDZ5b11oAeUKzVp5dqmPJyCHotCbK3N1vPZGzPg8czJm6/VA9SXkROG3yohh7USiLge eWZ8DSwf7+/A4Wrb6NPqeAqhkV/MewtKh1hhLxVgmBCedMt+iKxOyiOZrzeQUnpes8xG 6cdQ56okj40xZm40gtGkBRvwmAuaUlR9oC5WUGbPo6MduGRMBXueEOY/27CclRfDFAFJ S5Nw== 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=uFna20PE/rUI5Sa235iAp8jicT42E0rT4PHfQbUtaJI=; b=fLQ4x7GxxSfidw88WGByrrLoGjd4lO8FWQkBCZvfEZIij0QSBD/6Sxi+h4uD0w2mrW NjnYqhuqC0LO5yFMAcFqr4nyEeIA3c/0P1hEHtYLnWe2sZRFxhkDOWcHAQfcxjo4Az17 SDBU4um+leOcmBJhFksxOCOdnIgFgDq/U1m7L0LR3jE2R++UqIlRCZd1c3vny/G1h3b1 HLdswYm3BeBZWSiyFsK1U4j7e4cFBne9ZTZNTGc/MNdHzYBSU5pg5QhpSleHA8SI7S0O 896tY9HiK4vGJ0P6Es2QaVmDNrG020Q1UeDkiKTtOalXo2Lb7DQlkZRTGc9L21II4jfN OYUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cm6y7q7u; 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 dd19-20020a1709069b9300b0080a15fe49bfsi9075047ejc.896.2023.01.09.01.02.55; Mon, 09 Jan 2023 01:03:08 -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=cm6y7q7u; 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 S236747AbjAIImh (ORCPT + 54 others); Mon, 9 Jan 2023 03:42:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236561AbjAIIlf (ORCPT ); Mon, 9 Jan 2023 03:41:35 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78E2E12D0C for ; Mon, 9 Jan 2023 00:41:34 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id bj3so4808331pjb.0 for ; Mon, 09 Jan 2023 00:41:34 -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=uFna20PE/rUI5Sa235iAp8jicT42E0rT4PHfQbUtaJI=; b=cm6y7q7u9np/MZYXb2MEmb48faYX6GC0kteLBUccy2PRS8Jqm3/tVO8lZ3eR8WubYU iV+LNINQIp8PmR01ivK1RMX5M556u9QT1QKXTk8alQa6fRbBqIsv4B1wxvzDoRIAoxrS bPJ6xSlK4NNpC4MIFtMnhj0r1iL/9gupnkO5A= 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=uFna20PE/rUI5Sa235iAp8jicT42E0rT4PHfQbUtaJI=; b=3SqiFTdFm3WxR3MS2diKquebk3E79jwpG1qKsZ9dZuvdcTxmourjvbErgEm0GPNOmB y8TXE9hSXdxuykTOYvrD8rAFTMhVxTpBPbwiprxFqTDO3L+aMmKWi2jk2RFaDK8WdIUd UuCYP/piONzjY5v0kybRxHXjEcrWF/xaykqjgOGZnG0B5wcnc8NWVKuAdA8Q2WYO4zyp r+TTRmqLrhCgU0S1BAR7Pcwq6D1fUtGrvbaMeYED7h+N5i6+4Gm4d7ZANcSUxUwBfczD tkjgExV+2+bUPZk6zzxbAlepsARN6OVh5Yx6349zbRoYlPjSOJa3wpuY24MHa1IHOQ01 JijQ== X-Gm-Message-State: AFqh2krO8stW1xe0h/G+otFjvkNm3BHPAm+oGoaIrmzjOCzvOS1tK2MN F8gy4F9CH6neTu6gg84nYlO9pQ== X-Received: by 2002:a17:903:292:b0:188:bd82:2b7c with SMTP id j18-20020a170903029200b00188bd822b7cmr42034236plr.5.1673253694181; Mon, 09 Jan 2023 00:41:34 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:801:a736:715:9a15]) by smtp.gmail.com with ESMTPSA id c14-20020a170902d48e00b00186acb14c4asm5568119plg.67.2023.01.09.00.41.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 00:41:33 -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: Hsin-Yi Wang , Pin-yen Lin , dri-devel@lists.freedesktop.org, Marek Vasut , Stephen Boyd , AngeloGioacchino Del Regno , Xin Ji , linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, chrome-platform@lists.linux.dev, Thomas Zimmermann , Allen Chen , Javier Martinez Canillas , Lyude Paul , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= , linux-kernel@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v9 4/9] dt-bindings: display: bridge: anx7625: Add mode-switch support Date: Mon, 9 Jan 2023 16:40:56 +0800 Message-Id: <20230109084101.265664-5-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230109084101.265664-1-treapking@chromium.org> References: <20230109084101.265664-1-treapking@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 --- 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 | 99 ++++++++++++++++++- 1 file changed, 96 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..b49a350c40e3 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,48 @@ 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: + - 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 +203,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 +229,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.39.0.314.g84b9a713c41-goog