Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp805201iog; Thu, 30 Jun 2022 10:24:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZcK0rw6Ipbhp/deh1n9VouZROKwXSRiT6bdhVUoPOloO6yhRwgPqJVXunIGiEjefu1r0Y X-Received: by 2002:a17:907:8a21:b0:728:7984:76d with SMTP id sc33-20020a1709078a2100b007287984076dmr10069637ejc.189.1656609895414; Thu, 30 Jun 2022 10:24:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656609895; cv=none; d=google.com; s=arc-20160816; b=AG3QEcNMxp3N0qvb6HAg7OYzrn021gTXgvOl1UgRtsYxIYVZzxU/gkRTVdf0PQXFBq W4G1iJKdD3FDPEXIdbRtoLlTu+6Yh/kU3VHQco26nnDiuIgevrzqhBAdYfG54AK7sn6G tMmHJsd5ADcoUGpHvFYx/D9KWWGXfZDYtfhcKL6Xks0nr4PtAsGcbjVO68+x9X3wPwxT TLuSOdWYlvvu9tQkCfDmVyspaMJIAbpp5DoppXkAAWtaY/XGXjvCyRPO79Mq3L+E0VQl K02CKuIrCvWbm0CD3epYZtuy8EkXG6ETuQeE7ZQv/2U8pP5hoPBQhdEGDw0TSW8WhTo9 VexQ== 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=C4tyH3Wyg1tODv7Sm2smKsBoDS+J8nqhwGQaq6vu3uY=; b=AfDI0jg2TwurvYOQBuwEmI36tL7DzmbanuMPX534kqi0QCQ7tpo9f+u1iIUb5WA74J RyWyDdMFMmKdj/o7JI3XWc6VEHe8OkaeQ1O3AAX3s6SxOdYvYh3RdFDQcvJFX6g3Z2+0 IynOfYTDMPXySP8Fr21Vzi/U7sXLzMy+z2G53zfQ3paZBs/VF94zXBZs/Y3Ivo/rfrLr ubFWi33FwoQEQ+7Iyh7GUbpyGAzRyPpwDbw8xPbAA3r8CopfCy1U4E5d4FwHPqOzjwUg KsQVm6lzFURFIcFjMmuxiafitPgtLjuDzWmMCJTqejfPLHZat7UdEVmZp1J7qsDoqFnH E27g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gnYGD2jS; 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 s17-20020a056402521100b004359ebb62d7si9666288edd.1.2022.06.30.10.24.18; Thu, 30 Jun 2022 10:24:55 -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=gnYGD2jS; 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 S235251AbiF3RKr (ORCPT + 99 others); Thu, 30 Jun 2022 13:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235304AbiF3RKq (ORCPT ); Thu, 30 Jun 2022 13:10:46 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB7A533880 for ; Thu, 30 Jun 2022 10:10:44 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-317710edb9dso200947b3.0 for ; Thu, 30 Jun 2022 10:10:44 -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=C4tyH3Wyg1tODv7Sm2smKsBoDS+J8nqhwGQaq6vu3uY=; b=gnYGD2jS1FIJGGpq0jD3UITkms56aodG5VSVUw4KGb2NOASUoMBZF4GAF2pCZD4yuT 1BUfIMSa7UwkVNInhHWxVQsdUY45IwPorOfEp3ZMwrgvpq7Eq/wAAm816woi+NAnVzkO puOGIsOCuaPz5ZUYu6Y4EcKmJFWfdgBhBGv2w= 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=C4tyH3Wyg1tODv7Sm2smKsBoDS+J8nqhwGQaq6vu3uY=; b=qxtJEIIhXfSJorBMn2NWo7TOVXdz1wo1/lTXkqSjgHw28q0znpoU4kRlcGlYjcCGZ4 wD0kIZdrPLnsbKieWSEqIOLOkRoOr5oG7nTBwS28ieLqKlXmo/z/djWD92RgIHLrqHaP lEt0jxI/iBPACSQ8nhuEzPp6o4KAK36yyho0i6WxlPWUuvTyUzXSrMi7468pSk+C073y uxAtPoo5+gEHuul8O7GCjs7CQcjEVXpsetEK9WCwanYwPnUdDottax3nIELqVMJaLNVM 4RwxHaUc08YEWOLSqE9djAVSxyqXq97kv1wREEcmbAddcoOdSM6/KGvp+6X0H2G2RMPZ VXfw== X-Gm-Message-State: AJIora9xnEX5+5AlslRf5tlo0mFBepj+XWU4/DWCdAuP86w2jU+kuiEy sDsv+IAtyLh+93nBkuKpDu9AkmrIVnANXYfpyI0nWA== X-Received: by 2002:a81:5745:0:b0:318:99e6:3279 with SMTP id l66-20020a815745000000b0031899e63279mr11262932ywb.311.1656609043950; Thu, 30 Jun 2022 10:10:43 -0700 (PDT) MIME-Version: 1.0 References: <20220622173605.1168416-1-pmalani@chromium.org> <20220622173605.1168416-2-pmalani@chromium.org> <20220627210407.GA2905757-robh@kernel.org> <20220628182336.GA711518-robh@kernel.org> In-Reply-To: From: Prashant Malani Date: Thu, 30 Jun 2022 10:10:32 -0700 Message-ID: Subject: Re: [PATCH v5 1/9] dt-bindings: usb: Add Type-C switch binding To: Stephen Boyd Cc: Pin-yen Lin , Rob Herring , "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.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 (CC+ Bjorn) On Wed, Jun 29, 2022 at 4:55 PM Stephen Boyd wrote: > > Quoting Prashant Malani (2022-06-29 15:55:10) > > On Wed, Jun 29, 2022 at 2:58 PM Stephen Boyd wrote: > > > > > > My understanding is there are 4 DP lanes on it6505 and two lanes are > > > connected to one usb-c-connector and the other two lanes are connected > > > to a different usb-c-connector. The IT6505 driver will send DP out on > > > the associated two DP lanes depending on which usb-c-connector has DP > > > pins assigned by the typec manager. > [...] > > > > We can adopt this binding, but from what I gathered in this thread, that > > shouldn't be done, because IT6505 isn't meant to be aware of Type-C > > connections at all. > > How will the driver know which usb-c-connector to route DP to without > making the binding aware of typec connections? 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. > > HPD can be signalled out of band, or not at all (no-hpd). I suspect it's > valid to ignore/disconnect the HPD pin here and start/stop DP when, for > example, the HPD pin toggles within a dp-connector. HPD could be > signaled directly to the kernel via an out of band gpio going from the > dp-connector to the SoC. In this case HPD for each dp-connector could be > a different gpio and the driver may be required to arbitrate between the > two dp-connectors with some 'first to signal wins' logic or something. Sure, it's possible. I just didn't see anything in the anx7625 datasheet to suggest it supported 2x1-lane DP outputs. For that matter I don't think even it6505 supports > 1 DP sink (based on my reading of the datasheet), but I don't have too much experience with these parts. > > My interpretation of the current mode-switch search code [1] is that > > a top level property of "mode-switch" is required. > > Yeah that's how it is right now, but does it have to stay that way? > Could the code search the graph and look for a matching node that's > registered with the typec framework? I'll have to get back to you on that after reading the code a bit more. Maybe Heikki or Bjorn have some comments about it. The ACPI Type-C ports do require a device handle labelled "mode-switch" which points to the switch device.