Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10467433rwl; Wed, 11 Jan 2023 21:07:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXu8xYFr6DovwLyHBeEJQZllH8Le/DtCXKvTE7BF3sBl7NdRy5QBbr6oIX3+VqfFDeWDhXI4 X-Received: by 2002:a17:906:7747:b0:840:604:1da1 with SMTP id o7-20020a170906774700b0084006041da1mr60963761ejn.61.1673500069760; Wed, 11 Jan 2023 21:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673500069; cv=none; d=google.com; s=arc-20160816; b=zF45iyBxqJvp888UMKD3Bj/y7Ju+oAljiAxMowijLYB4M/13+J85ahNveldU7yfOMf KERoCEkMC3ZHXX+ZLJ4vlGJse/DgdK0/HitiO7tDetj4Euhu4m6ZOCuFqcmy4zI4wBfB 5XzZTmNIG+xq0YpYbqpKzGJh+xzXBwrAKH6rraa0AOXY5g70p5DphHQEUjwIryKJUO6c 5TMLB1GAkh2k8cLSEZ0abj8iwJEaIn4sQ0bS2/HMZvICW80rIWfDmr1MZ7cAK3dQ5sRm RQxIbBSUn9ICWKjhv8O0X9BjIHQXFtd74HehMsuamsx3TNZ1qT6+bWD7/rPP+e63vtPj 3KLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=47snh28HUgMeLpHnJEUn7mW35yDFmysVC3/EfGDSaFw=; b=SZm1LYiCiup7eeJ2A7TglYcygsEE/3zC/1FizFvuOVoxHVma83B824uTns7MLM9XK2 nTRDImf201/aU8/Db6ueCiWNuvsO2zVT7QqdcIhAhalH2rdqZqFN6xuKIQqbAIWEQ6ib cE3cSZiabT49iySXgYnDJFY989ONQoVlgE7NcCEagDwE3kAzJYBd8dYuS+F/hJ3XdOM2 wfXB2E+KN8ZpoH470mFa1BJfV9gTeCyYk7Adr3PzfQ+DpXtt7Fh3H1vWB6bRVcAMm7V/ UvnkwsKhsbGnK8HpeC1drsEF0/RX3H85v1PfejY0RAfXJHWjir3ANSQhjkyKKfI8FV07 hGOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FHj3RRQl; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd20-20020a1709069b9400b0085b4d436b51si5872168ejc.996.2023.01.11.21.07.37; Wed, 11 Jan 2023 21:07:49 -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=@linaro.org header.s=google header.b=FHj3RRQl; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236532AbjALEo4 (ORCPT + 51 others); Wed, 11 Jan 2023 23:44:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236529AbjALEoF (ORCPT ); Wed, 11 Jan 2023 23:44:05 -0500 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EBD11182E for ; Wed, 11 Jan 2023 20:44:00 -0800 (PST) Received: by mail-lf1-x12c.google.com with SMTP id bt23so26673060lfb.5 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=LVvMZ2nE52xfeGXGV9e3n+vueYJ1CiWRxhdhYDuZQT87G9NWKXA+Zswq13YCPOuhG0 SI7ezeVyWX5byaBguDehHrWOL4B6fgx33YIyfK7GjCzNykD2uBewxIR52/n7mkwUatAP kMyQhZOm3lPYFR+CkgUoLvUkUyiu5RhCq+Sp3XO5MpVmX8E4CQsEnEx7j7/O/hCltERz YEtTfMkpUboaMjX7/sMgzCeh97RAdY8lPtP6XUzuIdEwgIwVCGrTj4X7TPpxOScTeLC/ eqfM7fcv+bwq/NIRT0mfdZLQ0MmUuVTWbMt+wxFbkGm+6rhE7KWy8+k20xchjY5ARi5M MgJQ== X-Gm-Message-State: AFqh2koDpfcSICWguhkaL6vDtQQJLb7cT/QxxWl0bC0yKZkiCheZih8k gluvLL8IMEQ6KIty1UVcWWkU9g== 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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