Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1187223imw; Wed, 13 Jul 2022 15:26:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vpUId/jPJjjfOjuqinLIUKyqpZxBgVhAFIT6mOt4aNB6JSwZhZW1DQtSWkLL0VfveZROKN X-Received: by 2002:a63:470f:0:b0:419:aa0d:7c51 with SMTP id u15-20020a63470f000000b00419aa0d7c51mr1708163pga.482.1657751219746; Wed, 13 Jul 2022 15:26:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657751219; cv=none; d=google.com; s=arc-20160816; b=W3pjhM3nQyOReqbhmrdt7ytd1vOEianynnifzftlHIACqcxBwoLGi2jlRLIFj41ciu CwIg8eoTe7q91qUN9CD/4XiKif0ctJtI1h/IqQUk4LkbDgipivTlTkfJxhKWJFuOUZ0d jn/vTL4NjMwdgtpL1UEMviEu1O6VQpw7KJjL2JIai2RuF37kcX/FbvIsREzwYLhFhnt1 YrTwORPoVQooP9MAowL3tWOuh9tGyCeQhznqMcS7o6MsYQTRSkUxKL6BVM0MFU8TAqcF mACiYam8vVjXjElRcIg172wpnOriF9IWHQLxCr44O793ZehKKoIdYpXmSOPXlDkcOhYv R3Nw== 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=0Y/kMPSFak6KTkDH8JrbRublyvpU6jPq482xurs5eSI=; b=DGjRMk6J6XJd7/wEDtasUAU0WvTHioDx+xkV6T063rOIpTOdlnMrDJFpvrLExGpI5P ke0E4VQU7rlJap5CvoHANIKyIHGb/pcLaplxjOlhKYoLQHRTm/EgyPFfF7yWM7K76lRF 3ZgFtlDZepz4WGS5JfYjno1Xokz/8M1R8nWNm3QPHrcibZeY87vrBUn/SRMAIj3R/eKx iHw6ItRLv86ULJ+34nb2nAmqEIeUnDwk9IYwmhKySC8EhpImllsJJ8VMbEgCTjNCgmW8 jnVOYB7pNiiIHymqVPeBPtRE2Y2dlTrUzkoKGcPwkJmRicGcZu7SET6jH5VwTzv/bgOV 7oWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Pg8WFVRV; 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 28-20020a630c5c000000b0041980058985si4899552pgm.194.2022.07.13.15.26.45; Wed, 13 Jul 2022 15:26:59 -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=Pg8WFVRV; 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 S230479AbiGMV6V (ORCPT + 99 others); Wed, 13 Jul 2022 17:58:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiGMV6T (ORCPT ); Wed, 13 Jul 2022 17:58:19 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AFBC41D08 for ; Wed, 13 Jul 2022 14:58:18 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-31c8bb90d09so126816407b3.8 for ; Wed, 13 Jul 2022 14:58:18 -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=0Y/kMPSFak6KTkDH8JrbRublyvpU6jPq482xurs5eSI=; b=Pg8WFVRV86+5cOKU60Qmv48iCaAGyTTjOhRWK3NKVzBIbS/gpDDLSZqiEOvAwGhA1w eC+Rpyx6Ranio0sdXI60+nvvCdWxK/oy3Lg5TfHGhVqSseUCZiZFdLIFn3WE5gmHC+Iu eGp12EEND6O4XUTvWCyBwcnm44P/YV+oYrBVk= 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=0Y/kMPSFak6KTkDH8JrbRublyvpU6jPq482xurs5eSI=; b=W5yZSbiXYXVlqujRnNBmxMDOH/+sli4ULL/BB0qrm6BZpwZk9BiTfNgdziewk++LG6 CEH0smxCTHmT/gfMKIqWUoQQQvKNdSC68tp+NYumbpi05StwDYz9LghIaFDz5pbwh8qY JeY7nQMFltMSaPduzjbKmH6ri/YWZ1BaS64+ZGfSvxbe2S66fWypjzqbsvEr5eilmIIC POUDk2S4qJ40tNMlRBXkA4J0yjacSgsosY3U8k/SZemVifdh7u2TXON7xzFO0o/71IxG ERHJmyRLuEd1AI+MiVZCwePJ8nfnczscB4hwtFHWf1NkULbQWo/q/2pf76EOnCRaC2BG K+nQ== X-Gm-Message-State: AJIora+nYHgVXhu0zHk9BYsNp2WTaySG+iATuWY4lYMc6aiO8rqX6DJr QL5gJH2wp1K7vpGU4Cov9nv/WYX8B1OJdlPTFBCsQg== X-Received: by 2002:a81:7b8b:0:b0:31d:17d1:4666 with SMTP id w133-20020a817b8b000000b0031d17d14666mr6695386ywc.269.1657749497528; Wed, 13 Jul 2022 14:58:17 -0700 (PDT) MIME-Version: 1.0 References: <20220627210407.GA2905757-robh@kernel.org> <20220628182336.GA711518-robh@kernel.org> <20220712174551.GG1823936-robh@kernel.org> In-Reply-To: <20220712174551.GG1823936-robh@kernel.org> From: Prashant Malani Date: Wed, 13 Jul 2022 14:58:05 -0700 Message-ID: Subject: Re: [PATCH v5 1/9] dt-bindings: usb: Add Type-C switch binding To: Rob Herring Cc: Stephen Boyd , Pin-yen Lin , "linux-kernel@vger.kernel.org" , Linux USB List , Benson Leung , Heikki Krogerus , Krzysztof Kozlowski , AngeloGioacchino Del Regno , =?UTF-8?B?TsOtY29sYXMgRiAuIFIgLiBBIC4gUHJhZG8=?= , Allen Chen , Andrzej Hajda , Daniel Vetter , David Airlie , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Greg Kroah-Hartman , Hsin-Yi Wang , Jernej Skrabec , Jonas Karlman , =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= , Krzysztof Kozlowski , Laurent Pinchart , Maxime Ripard , Neil Armstrong , Robert Foss , Sam Ravnborg , Thomas Zimmermann , Xin Ji , Bjorn Andersson Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.7 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 On Tue, Jul 12, 2022 at 10:45 AM Rob Herring wrote: > > > I agree with you; I'm saying my interpretation of the comments of this > > thread are that it's not the intended usage of the it6505 part, so the driver > > shouldn't be updated to support that. > > That's not the right interpretation. There should not be some Type-C > specific child mux/switch node because the device has no such h/w within > it. Assuming all the possibilities Stephen outlined are valid, it's > clear this lane selection has nothing to do with Type-C. It does have an > output port for its DP output already and using that to describe the > connection to DP connector(s) and/or Type-C connector(s) should be > handled. Got it. Thanks for the clarification. > > Whether the driver is type-C aware is a separate question from the > binding. I would think the driver just needs to be told (or it can ask) > which endpoint should be active and it just enables output on the > corresponding lanes for that endpoint. Is it acceptable to tag the end-points with a "mode-switch" / "orientation-switch" property? Something like the following: ``` dp-bridge@5c { compatible = "ite,it6505"; ... port { #adderss-cells = <1>; #size-cells = <0>; ite_typec0: endpoint@0 { reg = <0>; mode-switch; remote-endpoint = <&typec_connector0>; }; ite_typec1: endpoint@1 { reg = <1>; mode-switch; remote-endpoint = <&typec_connector1>; }; }; }; ``` Or should the DRM bridge device binding not have those properties in the end-points either? The reasons those are required are: - The Type-C matching code looks for the "mode-switch" identifier in the fwnode while performing the switch matching [1] - While we can look up whether the remote-endpoint is a "usb-c-connector" in the bridge driver the "mode-switch"/"orientation-switch" property tells the bridge driver whether to register just a mode-switch, an orientation switch or both. Best regards, - Prashant [1] https://elixir.bootlin.com/linux/v5.19-rc6/source/drivers/usb/typec/mux.c#L347