Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp70866iof; Wed, 8 Jun 2022 15:31:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqs7qv8S4T+ftfI2vO1Kc2uo7Ws6OOyF+Wo2RfUtA9IYTRznqfvDKUV81Fa90jvf4TplBI X-Received: by 2002:a17:903:41c6:b0:164:1050:49ac with SMTP id u6-20020a17090341c600b00164105049acmr36486260ple.138.1654727482780; Wed, 08 Jun 2022 15:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654727482; cv=none; d=google.com; s=arc-20160816; b=kmBtiiCsHoYQ8Ly2X5CoyjZIJR9VkCeRRqUKyAtHaElrxkZcgN2/EGfBxY+I4QoswC i/18joU2IothcS2rFHwLBI4IGdBhNpL6wju7Zw9B2Prp5CO9L3qHTYpMitNFlynvFkn4 2l/JoQb7iZ5WffTBcxSNyG0ej92A2DimcNJVrF7s6dtH3lTQBc0Vv/sRXwOJiaVbuRkA z3U3n+V9+skASmwV0wwX3V4Wi8uXsD+kBUhr7uRNDzptlCJyOiJA8sPc5SJg9hcpz5HD oqyazKNA+0LgOLuZxX1QId2D+ZaYioM2yjUHwHrSfQ5EcKvl+krFTP0sahUJw4R10oiv azqg== 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=o/FxEvZvW1gTJxwxNX2DkDyV7vVmddxl0z+6t//DzGw=; b=jSvlm1XSxq0fe/XWAvWUbwQ5pv5izCbE5JBFdCWGnwfqYtGOSwv8XsGB30swofojUH NHcM8tRMtNFBBt6M4ro57CD7z5dxQACneBLkrftvcBrqLJhe1vrr6vw1sA+sp/lWCJet Zrc6o+5sxV5lVMleArumW61pWGqJ28sPSQ5J0U4/7ufpUz4O5cOxDlhGGa7CJCZjwY71 TatWHsFEUg61NRdvph7Lr072ZmbH1wV7OGJxeUI+Bt/NO3ff6dX9eMUe8R00lNbJSYPp l+5hi3uS1iNRwMiDna0x2kOo7h6zOOWFrK4SgxGBzweH1pmESJALfHWfL7xI4jsK4Jcj oBnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GfP2IP4F; 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=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a170902f7d500b00153b2d16507si27180863plw.271.2022.06.08.15.31.10; Wed, 08 Jun 2022 15:31:22 -0700 (PDT) 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=@chromium.org header.s=google header.b=GfP2IP4F; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235317AbiFHV47 (ORCPT + 99 others); Wed, 8 Jun 2022 17:56:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233612AbiFHV44 (ORCPT ); Wed, 8 Jun 2022 17:56:56 -0400 Received: from mail-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85054986E3 for ; Wed, 8 Jun 2022 14:56:54 -0700 (PDT) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-31332df12a6so75393227b3.4 for ; Wed, 08 Jun 2022 14:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o/FxEvZvW1gTJxwxNX2DkDyV7vVmddxl0z+6t//DzGw=; b=GfP2IP4Fat3QQOJUQ1zjmZgkYIDYRLt6vRQO45pbcMcGVtU5pBvQcFY5UvJcGk8abd +JSzoHHE0NFLzvXxIbPCxL7Mld79vHYVn5PIdyGBgg0FkKvkhTDeiTe8VNdYvnRPSjGO KRwPsYoXEKfCPsnJrtFV9ohI5YEFExn5kwhkM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o/FxEvZvW1gTJxwxNX2DkDyV7vVmddxl0z+6t//DzGw=; b=pd6B48ilcRb9gJ8NSLq9QMLDqkBsiCS20vZ+OP7vB7BDXEfkIBbRJQplXIavZL8Ram jnrfhkzw6kiEntgLnl/Z2J6Ouh7TCHX/aXq7pgYJTNtSveiK1pJb3YoihXMYbXUlBFoK xsBjxkIZQalExbidZKEy0iC+/BvYJiNTJlfKQ8es7AuWAGOSsSj7+Vu49lqD5zc7Gz4i ju6hQsw3qTxlbILba1UtDo/MOX3MNOEl361jo1Gc0o/kvYKL2VNQ68aZXn3d+RlRwL/J rObNzN3zQy4BMmejpeHphd0mNlvwt2W7fSCt2vSTpYgePrVk6IajIcSolGrH+zkTbgg8 GWYw== X-Gm-Message-State: AOAM533luKbvAir1cQZU7pBQHhLmmj4chRzk1O/46lN72THTwKtnSw/k BQzRTyVsKNbXcpBQsOokuni9006W3PmTaILf8pdHng== X-Received: by 2002:a81:54c5:0:b0:302:53b8:806b with SMTP id i188-20020a8154c5000000b0030253b8806bmr39710077ywb.432.1654725413771; Wed, 08 Jun 2022 14:56:53 -0700 (PDT) MIME-Version: 1.0 References: <20220607190131.1647511-1-pmalani@chromium.org> <20220607190131.1647511-5-pmalani@chromium.org> In-Reply-To: From: Prashant Malani Date: Wed, 8 Jun 2022 14:56:42 -0700 Message-ID: Subject: Re: [PATCH 4/7] dt-bindings: drm/bridge: anx7625: Add mode-switch support 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 , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , Krzysztof Kozlowski , Laurent Pinchart , Maxime Ripard , Neil Armstrong , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Pin-Yen Lin , Robert Foss , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Xin Ji Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wed, Jun 8, 2022 at 10:08 AM Prashant Malani wrote: > > 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. Actually, could you kindly clarify which of the two needs this? "switches" or "switch" ? I interpreted "switch" as requiring it, but I thought it better to confirm. > > > > > > > > + > > > 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