Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3373320iog; Mon, 27 Jun 2022 14:49:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vUAW6VhJwpVbhEie812W6y48eLcNjo5zr+vXsXH4hAmNQaTJqk18s7GR24VUz2i1oFmURq X-Received: by 2002:a17:903:286:b0:16a:1590:bffd with SMTP id j6-20020a170903028600b0016a1590bffdmr1424051plr.47.1656366598589; Mon, 27 Jun 2022 14:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656366598; cv=none; d=google.com; s=arc-20160816; b=Rg00XkqJet2d8/ctnRDmbmD3N1Q/v2gBxLVnL5jDTPEXk2Dzok2In9jqHQQXxilfHS hXe3DfdzzUiIzdFlxfmz02+xiwKAYPINCBhSTj0ovkAIET02oVlaSvLGeFd0JKkefBXu RDr8Kg/IvvSJe9FltL/5L555RvcbfrHs4e6wKBE2/M8AYFwdKLG2XsWVhUdQctz0MeTq LK/27CN11EB73RhiNzmecMnVb3YEG3StCk7zWnjNdWAw20JOwX472+XRXQWs2f1liNMm dmLKmSrDpzkVn17xrPsUiQrPDZsmfjgZePs+PsyxKOQlOrdR2qZnKeMha6u9Df9w157I /1kQ== 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=zVVDV7APfU9r2RLbdKg5/cTGtWPknd1MSe7r7DyJqGA=; b=Xx31yyHXpGez40HI5Qy3R59qBOvbX5jSSCR4R37L1cCJ3VBcIvs3VPX3gMdzeDNaO/ /94Pw7FOo5AnNNQMecNGeT9rwSvgkB8jOCw9P26COzRv1+SOACL8B15wYkF6uOE1k81/ 08W/6NkMbeKGtKmVRt3k3Z0/C0YDdM0AY3l03ZcwnLo6IJL9zYyjerHNdl2JvvTSdiB4 bOopqsYBkxtgUH+FTgp6mCK/IGjHDLvPZZMpBgjZHXIoDFGHkjuqQGXscO1uMkvAWalI z8kWPFa4XqezjH+w9Fe+hK7Sw6gVv1yXPNcgBsMfiWKY1nIgBo7fvcgKpioQoMLFjiCJ FQMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=WK98TF2f; 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 a8-20020a17090a854800b001ecf6b6f350si17056303pjw.42.2022.06.27.14.49.45; Mon, 27 Jun 2022 14:49:58 -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=WK98TF2f; 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 S241392AbiF0Vn4 (ORCPT + 99 others); Mon, 27 Jun 2022 17:43:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241172AbiF0Vnw (ORCPT ); Mon, 27 Jun 2022 17:43:52 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25AD4C53 for ; Mon, 27 Jun 2022 14:43:51 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id o19so12439737ybg.2 for ; Mon, 27 Jun 2022 14:43:51 -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:content-transfer-encoding; bh=zVVDV7APfU9r2RLbdKg5/cTGtWPknd1MSe7r7DyJqGA=; b=WK98TF2fZfBa0/bAmyVmVIC8Zjaro5lVsqZPE5F2DRd46BRHPENt4IdG+aMKFgGu6J UevhukZvj75uZFsswaLyKxkHDNFvW7Cc+3iPnoqOqD4ItNDx0K39pOfz9U6daqXVR8xU ur0I66+aTKigkDWmRRrnTlFqWXcdrUkD5QxlA= 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:content-transfer-encoding; bh=zVVDV7APfU9r2RLbdKg5/cTGtWPknd1MSe7r7DyJqGA=; b=fLfEsizcMAN6JxWf5zPbZ5eZW6qjJ8L8w7AGCWLnX2Q2xgbucnbgThgSl43iJpp7rI okacOprvtBgem99Mmi9io8c0iybHkahXZtIy2spodX/t2mJRSj0mUUpENCgeoNjIvnF5 8BejsgPMd0VMR7ESD65hYFMZCUWTAC/eFyML3Cgq8UQTIwK20q4Cgqppw46837iZVF7X jsjbjv+GZAVFQn3z+g0U+0vAUOk+XjFuOx9R8R5cWoqNMa/WRN0rHPBRYK5uKgbdn6x6 mtIS2z6apioPpaNX3YqfsN/+Zl43ht87D8+Jxo0MNvOmsXBpHBm+VssE+3eltYXsnl/Q Zb+Q== X-Gm-Message-State: AJIora8R0SwPVYrRIUNxSt+GEgCGrRjdfRaKLI6pWW0UhlUDu8mL4vTD YmwqDLiEvZZbU15xe4VpOLMK5gYJy2a/iVvXjVWwVw== X-Received: by 2002:a25:da0b:0:b0:66c:850f:1b71 with SMTP id n11-20020a25da0b000000b0066c850f1b71mr16460322ybf.336.1656366230372; Mon, 27 Jun 2022 14:43:50 -0700 (PDT) MIME-Version: 1.0 References: <20220622173605.1168416-1-pmalani@chromium.org> <20220622173605.1168416-2-pmalani@chromium.org> <20220627210407.GA2905757-robh@kernel.org> In-Reply-To: <20220627210407.GA2905757-robh@kernel.org> From: Prashant Malani Date: Mon, 27 Jun 2022 14:43:39 -0700 Message-ID: Subject: Re: [PATCH v5 1/9] dt-bindings: usb: Add Type-C switch binding To: Rob Herring Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, bleung@chromium.org, swboyd@chromium.org, heikki.krogerus@linux.intel.com, Krzysztof Kozlowski , AngeloGioacchino Del Regno , =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , Allen Chen , 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 , Pin-Yen Lin , Robert Foss , Sam Ravnborg , Thomas Zimmermann , Xin Ji Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 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=ham 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 Hello Rob, On Mon, Jun 27, 2022 at 2:04 PM Rob Herring wrote: > > On Wed, Jun 22, 2022 at 05:34:30PM +0000, Prashant Malani wrote: > > Introduce a binding which represents a component that can control the > > routing of USB Type-C data lines as well as address data line > > orientation (based on CC lines' orientation). > > > > Reviewed-by: Krzysztof Kozlowski > > Reviewed-by: AngeloGioacchino Del Regno > > Reviewed-by: N=C3=ADcolas F. R. A. Prado > > Tested-by: N=C3=ADcolas F. R. A. Prado > > Signed-off-by: Prashant Malani > > --- > > > > Changes since v4: > > - Added Reviewed-by tags. > > - Patch moved to 1/9 position (since Patch v4 1/7 and 2/7 were > > applied to usb-next) > > > > Changes since v3: > > - No changes. > > > > Changes since v2: > > - Added Reviewed-by and Tested-by tags. > > > > Changes since v1: > > - Removed "items" from compatible. > > - Fixed indentation in example. > > > > .../devicetree/bindings/usb/typec-switch.yaml | 74 +++++++++++++++++++ > > 1 file changed, 74 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/usb/typec-switch.= yaml > > > > diff --git a/Documentation/devicetree/bindings/usb/typec-switch.yaml b/= Documentation/devicetree/bindings/usb/typec-switch.yaml > > new file mode 100644 > > index 000000000000..78b0190c8543 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/usb/typec-switch.yaml > > @@ -0,0 +1,74 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/usb/typec-switch.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: USB Type-C Switch > > + > > +maintainers: > > + - Prashant Malani > > + > > +description: > > + A USB Type-C switch represents a component which routes USB Type-C d= ata > > + lines to various protocol host controllers (e.g USB, VESA DisplayPor= t, > > + Thunderbolt etc.) depending on which mode the Type-C port, port part= ner > > + and cable are operating in. It can also modify lane routing based on > > + the orientation of a connected Type-C peripheral. > > + > > +properties: > > + compatible: > > + const: typec-switch > > + > > + mode-switch: > > + type: boolean > > + description: Specify that this switch can handle alternate mode sw= itching. > > + > > + orientation-switch: > > + type: boolean > > + description: Specify that this switch can handle orientation switc= hing. > > + > > + ports: > > + $ref: /schemas/graph.yaml#/properties/ports > > + description: OF graph binding modelling data lines to the Type-C s= witch. > > + > > + properties: > > + port@0: > > + $ref: /schemas/graph.yaml#/properties/port > > + description: Link between the switch and a Type-C connector. > > + > > + required: > > + - port@0 > > + > > +required: > > + - compatible > > + - ports > > + > > +anyOf: > > + - required: > > + - mode-switch > > + - required: > > + - orientation-switch > > + > > +additionalProperties: true > > + > > +examples: > > + - | > > + drm-bridge { > > + usb-switch { > > + compatible =3D "typec-switch"; > > Unless this child is supposed to represent what the parent output is > connected to, this is just wrong as, at least for the it6505 chip, it > doesn't know anything about Type-C functionality. The bridge is > just a protocol converter AFAICT. I'll let Pin-Yen comment on the specifics of the it6505 chip. > > If the child node represents what the output is connected to (like a > bus), then yes that is a pattern we have used. For the anx7625 case, the child node does represent what the output is conn= ected to (the usb-c-connector via the switch). Does that not qualify? Or do you m= ean the child node should be a usb-c-connector itself? > For example, a panel > represented as child node of a display controller. However, that only > works for simple cases, and is a pattern we have gotten away from in > favor of using the graph binding. The child node will still use a OF graph binding to connect to the usb-c-connector. Is that insufficient to consider a child node usage here? By "using the graph binding", do you mean "only use the top-level ports" ? I'm trying to clarify this, so that it will inform future versions and patc= hes. > > I think Stephen and I are pretty much saying the same thing. > > Rob