From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58603C433EF for ; Wed, 6 Jul 2022 18:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233786AbiGFS0e (ORCPT ); Wed, 6 Jul 2022 14:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232295AbiGFS0d (ORCPT ); Wed, 6 Jul 2022 14:26:33 -0400 Received: from mail-yw1-x1129.google.com (mail-yw1-x1129.google.com [IPv6:2607:f8b0:4864:20::1129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5332CCCE for ; Wed, 6 Jul 2022 11:26:30 -0700 (PDT) Received: by mail-yw1-x1129.google.com with SMTP id 00721157ae682-31c89111f23so98388747b3.0 for ; Wed, 06 Jul 2022 11:26:30 -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=AKNzyuxVbT+auUhZLi3IyFDil3epaFKjcWDvpCGicX8=; b=Uxpv0YELVEct5DKRBFz2Fhk7QOvnqJthA8Ckw5wBsDZGh8wJXJiOrindJG/RdyVU2K 5kOY4qIummQC7LrVENX11WZTxRSqjS7URB43qjRq8OGIZqeDgCN81GIPSiMWTmCOOup2 QQdGRwejIFzn0MvwrWJWBomzFz7wDHAU+ejoU= 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=AKNzyuxVbT+auUhZLi3IyFDil3epaFKjcWDvpCGicX8=; b=R727dVksDPJfuz8WxpkrjNDNfAJGTZ2pQ+QY3SAZipp6TCNh4/LFut8HmXyrIoR+sI LV7Dzx44SdB3Xe+2PXpwEj7EqPiWlb776vk66pDzPHJEDvvu5OMHzJeA/zCdKGLyfT+B ReAnZxqhJiEtui0WQWRKJ5XPd9c7kh46hSaiWa3Mqo3NeXcrD4LDQGR3yGBI9yxRObLK p0iU/K1n+XgsU2jzjykD4ooEexz/uFTriHurmCEGxHQPRFkSouhXyjDIjt3VgYZsowB5 omWqwziKXnk8eZMCJqfuOtCObqRP16i5lGvegk5LjHhGKy64cN0iVHap4AZOcB8P2aCJ rX2w== X-Gm-Message-State: AJIora9QOyX7jYXz7NrdH/4sHPH/SYhx//hO0dvE3GIbDjwmw1GDtQyJ q3iCV917toa5TM3ICzqlWzZNd1cWZbVN2iQJJAG8KA== X-Google-Smtp-Source: AGRyM1udr5yyAZaFO4FJIEc1fs4jCrlvFfgCL6OO6ePlgo7ORdpuX2cwPgLlDUrByF02oMjAX082RxZNAQZV1iQkw1A= X-Received: by 2002:a0d:c787:0:b0:31b:a963:e1de with SMTP id j129-20020a0dc787000000b0031ba963e1demr47186325ywd.283.1657131989488; Wed, 06 Jul 2022 11:26:29 -0700 (PDT) MIME-Version: 1.0 References: <20220622173605.1168416-1-pmalani@chromium.org> <20220622173605.1168416-6-pmalani@chromium.org> In-Reply-To: From: Prashant Malani Date: Wed, 6 Jul 2022 11:26:19 -0700 Message-ID: Subject: Re: [PATCH v5 5/9] drm/bridge: anx7625: Add typec_mux_set callback function To: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, bleung@chromium.org, heikki.krogerus@linux.intel.com, Pin-Yen Lin , 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 , Rob Herring , Sam Ravnborg , Thomas Zimmermann , Xin Ji Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 30, 2022 at 4:38 PM Prashant Malani wrote: > > On Thu, Jun 30, 2022 at 4:21 PM Stephen Boyd wrote: > > > > Quoting Prashant Malani (2022-06-28 13:56:22) > > > On Tue, Jun 28, 2022 at 1:40 PM Stephen Boyd wrote: > > > > > > > > I suppose none of those things matter though as long as there is some > > > > typec switch registered here so that the driver can be informed of the > > > > pin assignment. Is it right that the "mode-switch" property is only > > > > required in DT if this device is going to control the mode of the > > > > connector, i.e. USB+DP, or just DP? Where this device can't do that > > > > because it doesn't support only DP. > > > > > > If the anx7625 is used just to route all lanes from 1 usb-c-connector (i.e > > > the USB+DP case), a mode-switch wouldn't be of much use, since one > > > would also route the CC lines to the built-in PD controller; so it will > > > already have knowledge of what mode the switch is in. > > > > > > The mode-switch is likely only relevant for this hardware configuration( > > > it's "DP only" in the sense that the USB pins to the SoC never go anywhere). > > > One only has 2 SS lanes each (from each usb-c-connector). > > > > > > Since there is no CC-line, the anx7625 needs to know which one has DP > > > enabled on it. > > > > Can the CC line be "captured" and not actually sent to the anx7625? > > That's what happens on Chrome OS. The cc line goes to the EC (and is "consumed" > by the TCPM (Type C Port Manager)) and signals are then sent to the AP > over the Host command interface to `cros-ec-typec`. The signals here being all > the PD messages communicated between the peripheral and the port. > > > I imagine if that is possible, maybe the CC lines would go to some > > micro-controller or something that did more typec management things and > > then the anx7625 driver would need to do software control of the mode > > and orientation control. > > I _guess_ that is possible (though it would seem odd to not use all the PD > control hardware in that configuration)? If an system implements it in > such a way > then: > 1. mode-switch: Can be updated to do something when num_typec_switches == 1 ( > in the mux_set function imp.l I haven't looked into what registers > need to be configured, since we > don't have this hardware implementation. > 2. orientation-switch: This should be registered, and then flip the > lanes when the port > driver tells it the orientation is one way or another. > > So, if someone uses it that way, I think the driver needs only minor > updates to support it. Stephen, any pending concerns? If not,I will post a v6 series with the suggested changes: - Drop typec-switch binding; instead add a new top-level port with end-points for each Type-C connector's switch. - Drop it6505 patches. - Squash anx7625 driver patches into one patch. - Add a comment mentioning that we aren't registering the orientation-switch.