From patchwork Mon Jan 9 08:40:56 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: 640729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB192C678DF for ; Mon, 9 Jan 2023 08:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236505AbjAIImE (ORCPT ); Mon, 9 Jan 2023 03:42:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236572AbjAIIlg (ORCPT ); Mon, 9 Jan 2023 03:41:36 -0500 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4713185 for ; Mon, 9 Jan 2023 00:41:34 -0800 (PST) Received: by mail-pj1-x1029.google.com with SMTP id dw9so6594882pjb.5 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=65OJtYBHluha1ViNUsrfde6djVfvdHt9ro4pabclToGVrcvl7v+bKljj1sCiMGXwI8 Yaic/hvgYQmjawq37Oan/pXF/T5ZWGO5pXbLLOltXCyS43uhxIbYqBcHCstvTEsc0bwO ARDRc9uOIo1W9yKbxY34X4nzTX159VJNyl+BMc519NdILr2xPGsRvdFDQ7P2LYautSod kpOO+naqC51bCThx3NmidTqPJHsBQ/Xp2f4HkQmUgZQeInFVg9gU1ZJS2/f3j7TJ/HqE G9eD9FrdcGslaev08DONVrg6ucHAGFdTe7Ou4wURR8fT1wBaiNsoqT7p5KMV1kmoWhSc FFrA== X-Gm-Message-State: AFqh2krTdzrBT92zLESrP9ZvHs9svwdRI25seT1hIoa1z31QCUQe43sq jhDh08Axjv0DdRng13cdZzlKmQ== X-Google-Smtp-Source: AMrXdXvcj26euWsalNrtvjApakz2042ePK/aTd6O3VtpJMyLN/+G+hHtsBf8z2h/tlnZMVcUw1ifzQ== 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_F_=2E_R_=2E_A_=2E_Prado?= , 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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: AngeloGioacchino Del Regno --- 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>; + }; + }; + }; + }; + };