Received: by 2002:ac8:1418:0:b0:3ab:920c:4c8b with SMTP id k24csp46046qtj; Thu, 12 Jan 2023 15:07:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXtdzJK6I2H9HyUnE6sA7Gm0mDh/wWlzxFl64wEdfuJ/n1qoKkfpyhh7+7NbheULSWOG1+I9 X-Received: by 2002:a17:907:3ad8:b0:85d:3771:18b7 with SMTP id fi24-20020a1709073ad800b0085d377118b7mr6983043ejc.70.1673564847927; Thu, 12 Jan 2023 15:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673564847; cv=none; d=google.com; s=arc-20160816; b=PIH7w0/I+DThY3aTbuvwjo5kJFTVnxVieTH7F7V5y/QHkiKaIHIDzksgPuDYrls8lK UAiLRGqPUNfeBn2Z6BENgDt5PkDyk6Vly2u4fQieXfgfWD9sgvnOkdghGq1JbLmP6J6h XcdUIyIDXz7lJX77OHk+MKnC0FNec5pR2AWNf/ZHJLHLoaQaDPToi0EZp1b/yx1gFlIp TzuxgHv92Dn6fm0dvRoLzbh1ftOXDhb4wIta1zT5xJ1C/QtxgXWNYOkVHXmQnxiW+Et6 R4mZcdOJHyFp8cyUpvMNHZsslM98NyEQRmAKohPHVSoYfcaP9/7CFl2X2N6BpFM0aoKy Vmpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=t/cPKKkBxPoU1OY4XWz1iO+mVmD6CjkMZRhBMNOfgnY=; b=JW3IedvAcXqTKbta6WY/2fM8I4z2Wpd0IeNDz0tB8n1IAd6SsOmOWI2MToeZR5jkXm N/XixXf/whf+hnp563tYzNyr0UDxJBaIJf6eyQLwKR2IqevDnroPcnE2w63U6In0X+Om xMFchFPNjmp+XWPGA1Z13NGw1p1RJg3VobZq0oYdOl2DT5E9BlF/5FsHzlxX/ZNs4qTA ygkJJaEvBos1lt4rCgqq3zNC7LDI+SzrqrJ5ee0Ma0yy1MNx8HJgHFFoexPKs/mh9y71 pt50HHm08RknWF2lVnJ9BmXmF+GnxYRTeF+kfUzYR3XM5sF26kzqvLk6eU1z+kr2xb+3 ZdPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ecH8E+bp; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd9-20020a170907078900b0078de51e1c3dsi16987056ejb.840.2023.01.12.15.07.15; Thu, 12 Jan 2023 15:07:27 -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=@kernel.org header.s=k20201202 header.b=ecH8E+bp; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240552AbjALW5H (ORCPT + 50 others); Thu, 12 Jan 2023 17:57:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240478AbjALW5F (ORCPT ); Thu, 12 Jan 2023 17:57:05 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48D70517DC; Thu, 12 Jan 2023 14:57:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D12F2B8202B; Thu, 12 Jan 2023 22:57:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71884C433A4; Thu, 12 Jan 2023 22:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673564221; bh=XJbAYFtKJrsiJkc3mYwPVbfBQAWFjyHsbxpFxsr7kv4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ecH8E+bpJVchEE2eS/RESQzv4VtE+LZDzau2V9udBRpZBpyqYaQhBR/NhJHiDn/ld VJizL7e0gDVZoxmsirE6EM9GcS36cX0eVzokhEwE5F49OyPgYJ+vFdHnSnAAjUC8Mm xeoR7+TfM7WFMihxTjDQsfrgqumlMhVBC2fen+u6oXvsguYhW5cU6e9aTxG740TaAM ISSUA4KsbAjRLCMOyMpGTfyy0Dz9hmdgW9nKVWJbAJH1MZgAQRkSQMqdkt4ATJPgZd jo4Ibc6RPBRo7yYwPJ0Jbv5muBiGm7QsDTU50WgZdQWto7AkquztEXXWkMTMLFRuo+ Ts2/YwlqbH+zQ== Received: by mail-vk1-f178.google.com with SMTP id q141so6859135vkb.13; Thu, 12 Jan 2023 14:57:01 -0800 (PST) X-Gm-Message-State: AFqh2krUbdLyqEsME/hCCnOAzWbyMZN5P5ZCsP/aK42wkl9QJJC+z0+E JSGp6g/fAG8bY/YG06fiSGfKkN/wr8H43x2Prg== X-Received: by 2002:a05:6122:221e:b0:3da:f920:c0ef with SMTP id bb30-20020a056122221e00b003daf920c0efmr981096vkb.26.1673564220164; Thu, 12 Jan 2023 14:57:00 -0800 (PST) MIME-Version: 1.0 References: <20230112042104.4107253-1-treapking@chromium.org> <20230112042104.4107253-5-treapking@chromium.org> In-Reply-To: <20230112042104.4107253-5-treapking@chromium.org> From: Rob Herring Date: Thu, 12 Jan 2023 16:56:48 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v10 4/9] dt-bindings: display: bridge: anx7625: Add mode-switch support To: Pin-yen Lin Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Krzysztof Kozlowski , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J . Wysocki" , Prashant Malani , Benson Leung , Guenter Roeck , Stephen Boyd , =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , Marek Vasut , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Lyude Paul , chrome-platform@lists.linux.dev, Xin Ji , Thomas Zimmermann , linux-kernel@vger.kernel.org, Allen Chen , linux-acpi@vger.kernel.org, Hsin-Yi Wang , Krzysztof Kozlowski , Chen-Yu Tsai Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Wed, Jan 11, 2023 at 10:21 PM Pin-yen Lin wrote: > > 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 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 | 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 You are using a property from video-interfaces.yaml, so you need to reference that. Needs some description of what each endpoint is. IOW, how each endpoint corresponds to the h/w. > + 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 >