Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2337288rwl; Thu, 6 Apr 2023 08:53:21 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7f1G+HUpIspqo+b9RDn+xsCW5xh5+s2liFGV/ooGNe9m7Z+Lq6DogXn2FnsaeUTU25WQm X-Received: by 2002:a17:90b:3802:b0:233:c301:32b3 with SMTP id mq2-20020a17090b380200b00233c30132b3mr11817192pjb.3.1680796400896; Thu, 06 Apr 2023 08:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680796400; cv=none; d=google.com; s=arc-20160816; b=WplS+ah468irgJ7FpghX9mr6HjMoatnvwl9QG5RQNINd8mafgtvukZIfkhYpsYiqx8 U2ufsxdLTgDx5T6HyThYBLRQYy0ZR5u1DVFtJF8y1rsQqURFMvgm8csbb2+Ts2bCgNVo SHO6Ty1EGZ1UJJERAkzRfujFb89tcPhFDU2sdYQmcj2Gl8dp6FtnBUmtz//QGdVxHrLH Xvw5/9gmBFt9f3v+rWbUa33XTa48/cfeC9oq8Ojv4WHWEJxlq5+eYz+CIzMeke3IxaoD P96PUnagCGksZxolZ4HHfAJocpoCStazzoJ9Zn1srcbDEOCY3cPCj9G4TMSk+VfXnz0I HR3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0vw0nTdNNDBdzuVwl43PcGSuAabOdNNAGw61ZkrRkbk=; b=ToWDzKUR8qAxlmUm9PTM2x7q4biOhF4pmkckz7W6FNwIoV5T6P9z7fdBN6anv5UvbG JHVwpEbN3DFivL4OYuJQ8T6S8gmT5b23jVFOij9XfOYtj53gbdcPFNJOEFXng0ZrzZtm mT42oeLVVtmbOYPdCe7AfxUL1dZkedxsRzLsXEkU3tjyTav6v8ne1TAYlxSiVdfD6aVB f1wImDaG+1iqSBEcAel5tjEKJCfQEW2EVykzZaVRu2YpVTf1kbJlDiweHaFM5F1QqLwQ vNSioGeacHF/mbG8yrcfXJFjk0SFTOs2SzIpAMXlUGgxbM79cmZhLEx6Z7LRArHpnjEV e/2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Dtaox/tA"; 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 em23-20020a17090b015700b0023fc6dc1092si4234684pjb.145.2023.04.06.08.53.06; Thu, 06 Apr 2023 08:53:20 -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="Dtaox/tA"; 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 S237436AbjDFPuf (ORCPT + 99 others); Thu, 6 Apr 2023 11:50:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236597AbjDFPua (ORCPT ); Thu, 6 Apr 2023 11:50:30 -0400 Received: from mail-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2615483E4 for ; Thu, 6 Apr 2023 08:50:28 -0700 (PDT) Received: by mail-il1-x12e.google.com with SMTP id t5so9460960ilu.5 for ; Thu, 06 Apr 2023 08:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1680796227; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0vw0nTdNNDBdzuVwl43PcGSuAabOdNNAGw61ZkrRkbk=; b=Dtaox/tAdrkSpD669sTOy5nmorhEWtnr2dEZhlXAIztSf8/6EGk9IhwTcZdL7c/db2 u6lLo0Y8U87ixfZ8UekNOlIlfm43vhfpljRczsbpKkEj3Mbc67SuOZfWOnjS+GpHflXK KHsDapHN2Z+wChVdC81Qj+SyTaL/1CyjiZFO4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680796227; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0vw0nTdNNDBdzuVwl43PcGSuAabOdNNAGw61ZkrRkbk=; b=jpAFLdu1fmW1QpHjSyHzDIk2tJ+gfxNoiHjCpnWnMdpn91u3bqduHKWQ0sN4tGmqN8 kGQXz2nigA9udTQonJsMamCuu05FWToMe/tANdYGIUy6hyWzxUSyK14Ms71mftZv5oE1 2/rhmAAkrg6dPm1IoPcs4RfyG8jDbfwmJAH1IHK0pNWWnTQgYBAlFUXq3Tn0YqSk+7ur NiEWent+DjwOUg/ZKdB2gpkHSQv60hpRiigagAQX3xrkyne9jNCSICPzEIiAyhuePCuT FmA+7FKmdXr9sSZWwLbZY4pBd1LPz7v23ivTqVvJtaFXkZ//VLmmuaXLbE9YZxcvi5x3 MaEA== X-Gm-Message-State: AAQBX9crblQ5k1oImlt8RUQFCZuADFieKV9X36a8likJKCxbmxs9Zgtk 7uo4+u4sXkOVtrJ1MDPNOXygiwAoX5OScERKEMfjfA== X-Received: by 2002:a05:6e02:1208:b0:325:e737:9d62 with SMTP id a8-20020a056e02120800b00325e7379d62mr6445519ilq.6.1680796227515; Thu, 06 Apr 2023 08:50:27 -0700 (PDT) MIME-Version: 1.0 References: <20230331091145.737305-1-treapking@chromium.org> <20230331091145.737305-9-treapking@chromium.org> <20230406151543.GA3098002-robh@kernel.org> In-Reply-To: <20230406151543.GA3098002-robh@kernel.org> From: Pin-yen Lin Date: Fri, 7 Apr 2023 00:50:16 +0900 Message-ID: Subject: Re: [PATCH v15 08/10] dt-bindings: display: bridge: it6505: Add mode-switch support To: Rob Herring 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 , Xin Ji , Marek Vasut , Hsin-Yi Wang , Thomas Zimmermann , AngeloGioacchino Del Regno , Lyude Paul , devicetree@vger.kernel.org, Stephen Boyd , dri-devel@lists.freedesktop.org, linux-acpi@vger.kernel.org, chrome-platform@lists.linux.dev, =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , Javier Martinez Canillas , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hi Rob, Thanks for the review. On Fri, Apr 7, 2023 at 12:15=E2=80=AFAM Rob Herring wrote= : > > On Fri, Mar 31, 2023 at 05:11:43PM +0800, Pin-yen Lin wrote: > > ITE IT6505 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. > > > > Signed-off-by: Pin-yen Lin > > > > --- > > > > (no changes since v12) > > > > Changes in v12: > > - Fixed the schema of "data-lanes" property for it6505 > > - Reworded the description of the mode-switch property > > > > Changes in v11: > > - Updated the description of the endpoints in the bindings > > - Referenced video-interfaces.yaml instead for the endpoints binding > > - Removed duplicated definitions from inherited schema > > > > Changes in v9: > > - Fixed subject prefix again > > - Changed the naming of the example node for it6505 > > > > Changes in v8: > > - Updated bindings for data-lanes property > > - Fixed 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. > > > > .../bindings/display/bridge/ite,it6505.yaml | 101 +++++++++++++++--- > > 1 file changed, 88 insertions(+), 13 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/display/bridge/ite,it650= 5.yaml b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml > > index c9a882ee6d98..348b02f26041 100644 > > --- a/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml > > +++ b/Documentation/devicetree/bindings/display/bridge/ite,it6505.yaml > > @@ -75,22 +75,49 @@ properties: > > port@1: > > $ref: /schemas/graph.yaml#/$defs/port-base > > unevaluatedProperties: false > > - description: Video port for DP output > > + description: > > + Video port for DP output. Each endpoint connects to a video = output > > + downstream, and the "data-lanes" property is used to describ= e the pin > > + connections. 0, 1, 2, 3 in "data-lanes" maps to TX0, TX1, TX= 2, TX3, > > + respectively. > > > > - properties: > > - endpoint: > > - $ref: /schemas/graph.yaml#/$defs/endpoint-base > > + > > + patternProperties: > > + "^endpoint@[01]$": > > + $ref: /schemas/media/video-interfaces.yaml# > > unevaluatedProperties: false > > > > properties: > > + reg: true > > + > > + remote-endpoint: true > > You don't need to list these 2. > > > + > > data-lanes: > > - minItems: 1 > > - uniqueItems: true > > - items: > > - - enum: [ 0, 1 ] > > - - const: 1 > > - - const: 2 > > - - const: 3 > > + oneOf: > > + - items: > > + - enum: [0, 3] > > Only lane 1 wasn't valid? If so, mention that in the commit message. Tha IT6505 bridge only supports "lane swapping" that reverses the output pins, so only lane 1 or lane 2 is not valid. I'll update this in the commit message as well. > > > + > > + - items: > > + - const: 0 > > + - const: 1 > > + > > + - items: > > + - const: 3 > > + - const: 2 > > + > > + - items: > > + - const: 0 > > + - const: 1 > > + - const: 2 > > + - const: 3 > > Isn't this the default if 'data-lanes' is omitted. I don't think we have a "default" in the IT6505 driver because it currently doesn't have any use case that has all 4 pins described in an output node. The old use case uses an extcon node to describe the output, and a 4-pin connection makes no sense for mode switches. However, we can drop this binding and make it the default when 'data-lanes' is omitted. This will be useful when we migrate the extcon description to the an output port node. > > > + > > + mode-switch: > > + type: boolean > > + description: Serves as Type-C mode switch if present. > > + > > + required: > > + - reg > > + - remote-endpoint > > required can be dropped. > > > > > required: > > - port@0 > > @@ -102,7 +129,6 @@ required: > > - pwr18-supply > > - interrupts > > - reset-gpios > > - - extcon > > - ports > > > > additionalProperties: false > > @@ -139,8 +165,11 @@ examples: > > }; > > > > port@1 { > > + #address-cells =3D <1>; > > + #size-cells =3D <0>; > > reg =3D <1>; > > - it6505_out: endpoint { > > + it6505_out: endpoint@0 { > > + reg =3D <0>; > > remote-endpoint =3D <&dp_in>; > > data-lanes =3D <0 1>; > > }; > > @@ -148,3 +177,49 @@ examples: > > }; > > }; > > }; > > + - | > > + #include > > + > > + i2c { > > Why do we need a whole new example? Just extend the existing example > with new properties/nodes. I added a new example because I don't think extcon and mode switches can co-exist. Should I merge the examples to one anyway? > > Rob I'll address other comments in the next version. Best regards, Pin-yen