From mboxrd@z Thu Jan 1 00:00:00 1970 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 AA85BC54EBC for ; Thu, 12 Jan 2023 04:44:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236448AbjALEox (ORCPT ); Wed, 11 Jan 2023 23:44:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236478AbjALEoE (ORCPT ); Wed, 11 Jan 2023 23:44:04 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB7D1182C for ; Wed, 11 Jan 2023 20:44:00 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id bp15so26694645lfb.13 for ; Wed, 11 Jan 2023 20:44:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=47snh28HUgMeLpHnJEUn7mW35yDFmysVC3/EfGDSaFw=; b=FHj3RRQlxzRQ1jEHAj2YFjjXRA471fiEFh+jaDRSQpCh1xmUA06YNqqdzHjBhc3jeo Mit7tYsx0JA03iLuhmwzzDPZEWRGi0szBQKVZ0ZVTsHhsu1K+gOyQERsdWn4146K6r3j 1mHIpeenGeotbEheoEvsM3yDbgWAiJI8pkHYDll5bUxlJvduib4vW3DYNKtasGFq4NGC MIxRh07BoK6T9Q/kwpGeRgh/fSLR69JxBbOksHhaSSiqk5HUOH26HqmY3LzhocWYdDGJ qrF52xPvPrvta2wYtAZ4PMXZCkbHoxvSsCiI02I9daYma3kVR06NVgZ3M5IUoJsddvid nd6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=47snh28HUgMeLpHnJEUn7mW35yDFmysVC3/EfGDSaFw=; b=5TJzIrs3fu6+JKErQjL2RSrF4CuZjJeVWoYrvyCuYY55D43ymJy5Te+/FR0aHkhhF+ kHyN97Z0YnO6tDFr0zd1b4Lk/UXXmxXs43yRpWLp7z4BaPXdu4o5FYC8oL7TxU23mO80 1P3r90Gw7fwgzh9ylxN9ddUHIHW7po1Rpz/ZYufXSwJbdAwl/0p5YTZVZhgZ0egztGXT t+9xpmWa/h4zXx9Nmtrwj4nxiuKEJsY0PEIRya0iOCLq9N2ibPYzybKA2baN0VXtfNFn OXs3ljhFUzp2JTri4YudsbC3EbSYjipZGgqXsc1fdQYfNJh/gDRxlGx5DepLwKj7o5YA KpNw== X-Gm-Message-State: AFqh2kojcMdU1MmlGH8u+XzU+IGJyj3wZZN3hKLG9TcUZCv8KUkP5IDp H9r7kMqH+2TN0fmJC2bfd0Cg6w== X-Google-Smtp-Source: AMrXdXuJYXA78PDxN6LQrEjY5+RRXTU8k7U/8eiSXPtUiMUSIRDxU8f/h/SbFey4SBXSNGQmTG8wrA== X-Received: by 2002:ac2:5308:0:b0:4cc:a041:2ba2 with SMTP id c8-20020ac25308000000b004cca0412ba2mr234557lfh.24.1673498638802; Wed, 11 Jan 2023 20:43:58 -0800 (PST) Received: from ?IPV6:2001:14ba:a085:4d00::8a5? (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id s11-20020a056512314b00b004b592043413sm3077777lfi.12.2023.01.11.20.43.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Jan 2023 20:43:58 -0800 (PST) Message-ID: Date: Thu, 12 Jan 2023 06:43:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v10 4/9] dt-bindings: display: bridge: anx7625: Add mode-switch support Content-Language: en-GB To: Pin-yen Lin , 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: Marek Vasut , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, =?UTF-8?Q?N=c3=adcolas_F_=2e_R_=2e_A_=2e_Prado?= , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, Hsin-Yi Wang , Javier Martinez Canillas , dri-devel@lists.freedesktop.org, Stephen Boyd , Krzysztof Kozlowski , Thomas Zimmermann , Allen Chen , Xin Ji , Chen-Yu Tsai , AngeloGioacchino Del Regno References: <20230112042104.4107253-1-treapking@chromium.org> <20230112042104.4107253-5-treapking@chromium.org> From: Dmitry Baryshkov In-Reply-To: <20230112042104.4107253-5-treapking@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 12/01/2023 06:20, 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 > + unevaluatedProperties: false > + > + properties: > + reg: > + maxItems: 1 Please remove duplicates to the graph.yaml. You have several of them here. > + > + 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 { But why? It's perfectly fine from the graph perspective to omit the index if there is jus a single endpoint. > + 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>; > + }; > + }; > + }; > + }; > + }; -- With best wishes Dmitry