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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 898F5C43334 for ; Wed, 8 Jun 2022 17:08:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 95D6A1129EF; Wed, 8 Jun 2022 17:08:16 +0000 (UTC) Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by gabe.freedesktop.org (Postfix) with ESMTPS id A46291129EF for ; Wed, 8 Jun 2022 17:08:15 +0000 (UTC) Received: by mail-pf1-x42c.google.com with SMTP id y196so18863747pfb.6 for ; Wed, 08 Jun 2022 10:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WF0RJla2oohMUn0MJv8rKYykIuR4lAmipthSFfnmiVU=; b=ljLJW0sL8NMXgQOt9f+zRCmJO50/PXowFcD4/QA46kqBPGof6uWEKlImxcs74TyV6z ugR7xf1sjKW23f+3OUb+SNoGJLZb/n2XEgdiJ85CN9nWx+EbNzqFJv7V+jBeIY5drPjC DOQsGx5dB3xTghvaIYzNBgRb/ogigexSYAx34= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WF0RJla2oohMUn0MJv8rKYykIuR4lAmipthSFfnmiVU=; b=6k8/n4UW9HywQPJ9zwr/SXxrkgaffHeozmyWzYdoNws81H45K+fuRtpWrcHBVgiB9e ZkRVR2DGdvP6iVVbjhYWKypi0HUUpEAscJx6dCo/cHAuwZaJHXF1LmOqnPMKheS+yqHz z+bfs6oVmZs9RU3wiaPsWo2tTaQI8fp7kvZ5xtbT3ZzLiP8CacCD/LT8KMhGoMtSpc9t JeVUeG0weFpyj6gNzX+DNZ4e+OApbJfEe5I6i58qAoq4jmHDmlUHdaw1+4l+bHnKMfia a60OyUNAJJcAvFvIrs9vJg13OgNBQz0BP6VbXmRv9vMHGjfVduxUvQdpvGzJrS1tOXyZ OpUw== X-Gm-Message-State: AOAM532h6+RKDF23WRY7MxBHD5YD0OV/yLdEZJpwI/4XvaVJR697NhUK cdD4Py7AAZnKxcQg/QPlhFnMTA== X-Google-Smtp-Source: ABdhPJy/e3J9zrHD59CzKJz+zzlVENMog9HQc2BMCmxEhETwD0FomiEyVUlscJH5sJcpsdfkzRRVfw== X-Received: by 2002:a63:f14a:0:b0:3fd:d2aa:6b30 with SMTP id o10-20020a63f14a000000b003fdd2aa6b30mr12839836pgk.348.1654708095078; Wed, 08 Jun 2022 10:08:15 -0700 (PDT) Received: from chromium.org (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id d2-20020a630e02000000b003fa95b940bdsm15361474pgl.88.2022.06.08.10.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 10:08:14 -0700 (PDT) Date: Wed, 8 Jun 2022 17:08:12 +0000 From: Prashant Malani To: Krzysztof Kozlowski Subject: Re: [PATCH 4/7] dt-bindings: drm/bridge: anx7625: Add mode-switch support Message-ID: References: <20220607190131.1647511-1-pmalani@chromium.org> <20220607190131.1647511-5-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: heikki.krogerus@linux.intel.com, Andrzej Hajda , Neil Armstrong , David Airlie , "open list:DRM DRIVERS" , Laurent Pinchart , Krzysztof Kozlowski , Sam Ravnborg , Jernej Skrabec , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Thomas Zimmermann , =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado , Jonas Karlman , swboyd@chromium.org, Pin-Yen Lin , Rob Herring , Maxime Ripard , Hsin-Yi Wang , Xin Ji , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Robert Foss , =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Krzysztof, Thank you for looking at the patch. On Jun 08 11:24, Krzysztof Kozlowski wrote: > On 07/06/2022 21:00, Prashant Malani wrote: > > Analogix 7625 can be used in systems to switch USB Type-C DisplayPort > > alternate mode lane traffic between 2 Type-C ports. > > > > Update the binding to accommodate this usage by introducing a switch > > property. > > > > Signed-off-by: Prashant Malani > > --- > > .../display/bridge/analogix,anx7625.yaml | 56 +++++++++++++++++++ > > 1 file changed, 56 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml > > index 35a48515836e..7e1f655ddfcc 100644 > > --- a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml > > +++ b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml > > @@ -105,6 +105,26 @@ properties: > > - port@0 > > - port@1 > > > > + switches: > > + type: object > > + description: Set of switches controlling DisplayPort traffic on > > + outgoing RX/TX lanes to Type C ports. > > + > > + properties: > > + switch: > > You allow only one switch with such schema, so no need for "switches"... See below comment (summary: we'd like to allow 1 or 2 switches). > > > + $ref: /schemas/usb/typec-switch.yaml# > > + maxItems: 2 > > Are you sure this works? what are you limiting here with maxItems? I > think you wanted patternProperties... Yeah, I might not have used the DT syntax correctly here. What I'm aiming for is: "switches" should can contain 1 or 2 "switch" nodes. 2 is the maximum (limitation of the hardware). > > > + > > + properties: > > + reg: > > + maxItems: 1 > > + > > + required: > > + - reg > > + > > + required: > > + - switch@0 > > This does not match the property. > > You also need unevaluatedProperties:false Ack, will update this in the next version. > > > > + > > required: > > - compatible > > - reg > > @@ -167,5 +187,41 @@ examples: > > }; > > }; > > }; > > + switches { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + switch@0 { > > + compatible = "typec-switch"; > > + reg = <0>; > > + mode-switch; > > + > > + ports { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + port@0 { > > + reg = <0>; > > + anx_typec0: endpoint { > > + remote-endpoint = <&typec_port0>; > > Messed up indentation. Your previous patch should also switch to 4-space > as recommended by schema coding style. Sorry about that, will fix up the indentation in the next version. > > > + }; > > + }; > > + }; > > + }; > > + switch@1 { > > + compatible = "typec-switch"; > > + reg = <1>; > > + mode-switch; > > + > > + ports { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + port@0 { > > + reg = <0>; > > + anx_typec1: endpoint { > > + remote-endpoint = <&typec_port1>; > > Ditto. > > > + }; > > + }; > > + }; > > + }; > > + }; > > }; > > }; > > > Best regards, > Krzysztof 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 7AB6BC43334 for ; Wed, 8 Jun 2022 17:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229798AbiFHRU2 (ORCPT ); Wed, 8 Jun 2022 13:20:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231542AbiFHRUS (ORCPT ); Wed, 8 Jun 2022 13:20:18 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B255B44B979 for ; Wed, 8 Jun 2022 10:08:15 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id u2so18876217pfc.2 for ; Wed, 08 Jun 2022 10:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WF0RJla2oohMUn0MJv8rKYykIuR4lAmipthSFfnmiVU=; b=ljLJW0sL8NMXgQOt9f+zRCmJO50/PXowFcD4/QA46kqBPGof6uWEKlImxcs74TyV6z ugR7xf1sjKW23f+3OUb+SNoGJLZb/n2XEgdiJ85CN9nWx+EbNzqFJv7V+jBeIY5drPjC DOQsGx5dB3xTghvaIYzNBgRb/ogigexSYAx34= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WF0RJla2oohMUn0MJv8rKYykIuR4lAmipthSFfnmiVU=; b=XwFeR7IVOsoiI4qmBXSnD18QvS+49pPj2R7MKviGJgZTi9vA08Nmi4qDBhW6x0jxv6 xVm/s8/3wVMpES8RfvlxV1emz8hAI8rcUrkEXIYfXMwv54hh8y68tQ38H2lTv36ahIGO Lm3d6MtkvxCWELfPsTjPRptvNTckpFYLMU09sPHWtEtq4wd9eV1nYT9FezbRj11wnIZl NWAl6L86zYlFos1g3m+4k0kDfhE5yv+OUqsJ3C7FP37y16TOX/ySKeHzpBQS+bDQmzQI /zf7j3EuN/Igr+6jjmJenxhxlvH+9ga5MvtcFk2Vz+tCLFle9X9nNVDYkOdw37zdCvkE WQkQ== X-Gm-Message-State: AOAM530AHSnZvcSr7Q83iHU2HiqQNumtqNuEbYNMkL+BnKLEhlIx/H0w 67WKRrhi0pxNvVpgq7qQuDguVw== X-Google-Smtp-Source: ABdhPJy/e3J9zrHD59CzKJz+zzlVENMog9HQc2BMCmxEhETwD0FomiEyVUlscJH5sJcpsdfkzRRVfw== X-Received: by 2002:a63:f14a:0:b0:3fd:d2aa:6b30 with SMTP id o10-20020a63f14a000000b003fdd2aa6b30mr12839836pgk.348.1654708095078; Wed, 08 Jun 2022 10:08:15 -0700 (PDT) Received: from chromium.org (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id d2-20020a630e02000000b003fa95b940bdsm15361474pgl.88.2022.06.08.10.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 10:08:14 -0700 (PDT) Date: Wed, 8 Jun 2022 17:08:12 +0000 From: Prashant Malani To: Krzysztof Kozlowski Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, bleung@chromium.org, swboyd@chromium.org, heikki.krogerus@linux.intel.com, Andrzej Hajda , Daniel Vetter , David Airlie , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:DRM DRIVERS" , Greg Kroah-Hartman , Hsin-Yi Wang , Jernej Skrabec , Jonas Karlman , =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= , Krzysztof Kozlowski , Laurent Pinchart , Maxime Ripard , Neil Armstrong , =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado , Pin-Yen Lin , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Xin Ji Subject: Re: [PATCH 4/7] dt-bindings: drm/bridge: anx7625: Add mode-switch support Message-ID: References: <20220607190131.1647511-1-pmalani@chromium.org> <20220607190131.1647511-5-pmalani@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Krzysztof, Thank you for looking at the patch. On Jun 08 11:24, Krzysztof Kozlowski wrote: > On 07/06/2022 21:00, Prashant Malani wrote: > > Analogix 7625 can be used in systems to switch USB Type-C DisplayPort > > alternate mode lane traffic between 2 Type-C ports. > > > > Update the binding to accommodate this usage by introducing a switch > > property. > > > > Signed-off-by: Prashant Malani > > --- > > .../display/bridge/analogix,anx7625.yaml | 56 +++++++++++++++++++ > > 1 file changed, 56 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml > > index 35a48515836e..7e1f655ddfcc 100644 > > --- a/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml > > +++ b/Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml > > @@ -105,6 +105,26 @@ properties: > > - port@0 > > - port@1 > > > > + switches: > > + type: object > > + description: Set of switches controlling DisplayPort traffic on > > + outgoing RX/TX lanes to Type C ports. > > + > > + properties: > > + switch: > > You allow only one switch with such schema, so no need for "switches"... See below comment (summary: we'd like to allow 1 or 2 switches). > > > + $ref: /schemas/usb/typec-switch.yaml# > > + maxItems: 2 > > Are you sure this works? what are you limiting here with maxItems? I > think you wanted patternProperties... Yeah, I might not have used the DT syntax correctly here. What I'm aiming for is: "switches" should can contain 1 or 2 "switch" nodes. 2 is the maximum (limitation of the hardware). > > > + > > + properties: > > + reg: > > + maxItems: 1 > > + > > + required: > > + - reg > > + > > + required: > > + - switch@0 > > This does not match the property. > > You also need unevaluatedProperties:false Ack, will update this in the next version. > > > > + > > required: > > - compatible > > - reg > > @@ -167,5 +187,41 @@ examples: > > }; > > }; > > }; > > + switches { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + switch@0 { > > + compatible = "typec-switch"; > > + reg = <0>; > > + mode-switch; > > + > > + ports { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + port@0 { > > + reg = <0>; > > + anx_typec0: endpoint { > > + remote-endpoint = <&typec_port0>; > > Messed up indentation. Your previous patch should also switch to 4-space > as recommended by schema coding style. Sorry about that, will fix up the indentation in the next version. > > > + }; > > + }; > > + }; > > + }; > > + switch@1 { > > + compatible = "typec-switch"; > > + reg = <1>; > > + mode-switch; > > + > > + ports { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + port@0 { > > + reg = <0>; > > + anx_typec1: endpoint { > > + remote-endpoint = <&typec_port1>; > > Ditto. > > > + }; > > + }; > > + }; > > + }; > > + }; > > }; > > }; > > > Best regards, > Krzysztof