From patchwork Fri Mar 31 09:11:39 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: 13195596 Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17D8123BC for ; Fri, 31 Mar 2023 09:12:19 +0000 (UTC) Received: by mail-pj1-f66.google.com with SMTP id j13so19845987pjd.1 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=hrxCCYOvEbvR9M88OXYWBg2WZreG2rJ6nT/j9ZLRyYBhrBeGpfEUMc9xrGD9uCl/Fl h8qYqk1yr6mYdGdh3fYUSWieWbz8BEDQ8Rf9ef0CKNjPVyBwEEjV+El7z+7J/oGA3b4J SbtT1N3qbhVfhZ21wvluXkbT4Ctkfzv4/PvGeURMJc2VYPBycMHslSz/1KKmyLeqTeAg gQkuUKbgukjSukO1pCJUsYi3NouKIvi0m3PktWcmz76TGIWd9OTLipJZ2cd7JwwZXAkK /aOAoTKSvOZNr7TjRnlSsxi8ibv3cRJpCbOHI/D3c8mwvBCFV4b7sYBlTMDDG6C2SeYk 3IBA== X-Gm-Message-State: AAQBX9dwUYQY5z26GS7IJCc1KOsD+4U3HlM6xzCrBNfaN7r8xLL/w8Vy Kutd8AYGA7Nmcuauv9Zh76MjQQ== X-Google-Smtp-Source: AKy350YYoeDGKDWki8xOQ14TrR/xMzmnqZqoCASy37MccDHTjeTFjvz9j2MZIz54Mwn75oEKhZ1khA== 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?= =?utf-8?q?=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , 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> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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>; + }; + }; + }; + }; + };