Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp201028pxb; Thu, 12 Nov 2020 01:12:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJy9TIKDMHeaxcjUZS+MWu3qk52q5LGZCLWkVrMJeKJHRSjx9xMAzDkhlxz3DOA2nl/amPUm X-Received: by 2002:a05:6402:716:: with SMTP id w22mr4147415edx.214.1605172339325; Thu, 12 Nov 2020 01:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605172339; cv=none; d=google.com; s=arc-20160816; b=dZ5tNf7OH1MHgY0BPPOyyGFqxOTeQhRL7WLp8L26x7HyrVYnqmPeo9WC0Zjd0U55Dl a1JRw4Y/OrH5FUuBSolIJ1558YPvjpgaavvRu8H8TlEUHemMKI4iCW/DR7mKUypvOj2/ 1xg9d3uryEswLU+oyzqV8y+dreAJsgNsZS5bjzTmwCFGUsmoGBS6NSfbA4xeRDnPs5UE SuIpgQQbhmSKj5V3p8ztXNJQm4alc7we+S8IsGMqgVU1u7PjcZnmgK6Q5PjrUOZnXo9O W0bN7U/WRMC6+Qk57ojmT7dX72IeQImqw6q5fgUPwMpEkPJ20zJJjDzCeyIQlJyyKas6 n0xw== 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=h9u5Hd/k602S0Bq8sFpKbzZCXBppMuyyaNJFma4F5QE=; b=Z6OmxuSgjNYXTJhzL1wnuy5X9lT1OQmf09J40mgeGEXSUZfz74L+Le7iIbz+2yaXe2 gAfDXBwopb+U9AZadfgPgsvxAX6LHEk7sqvYbYR/9hUI5mN6buoFJMUnBe13D0Bl5gl5 gL7N8yyHpyyUB6sMkFVHpdMkmSnZGGu4f6jR+8oZ+UDR5f6Yv8lbML/N3X32h9ofRkdr Zxggm29S89hyIdoE0jW7gsFBibIB8Dwq56Pl1KTARBhfiH0wLSxmVmBXZl4djY3tvMdg ZHT7AdQFc+S54di9y09S07nLAXG6mQhORmB1WnTNel0WQBQFW79VsZeVLgT7FmgC7YAo ke/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ATw238Uz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si3344051edi.485.2020.11.12.01.11.56; Thu, 12 Nov 2020 01:12:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ATw238Uz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727913AbgKLJHy (ORCPT + 99 others); Thu, 12 Nov 2020 04:07:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727925AbgKLJHp (ORCPT ); Thu, 12 Nov 2020 04:07:45 -0500 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E78DC0613D1 for ; Thu, 12 Nov 2020 01:07:43 -0800 (PST) Received: by mail-ej1-x642.google.com with SMTP id 7so6649127ejm.0 for ; Thu, 12 Nov 2020 01:07:43 -0800 (PST) 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=h9u5Hd/k602S0Bq8sFpKbzZCXBppMuyyaNJFma4F5QE=; b=ATw238UzY8CkoOP/BcuZxyhhEruWXvBv8RLXARErrKNDzHlh6KQFXQC0ncFMsuC6ua gpjKPJRjXUvAgADluKLG9wSZ7LJQtQ0xNMbWxfh4kTqfFGhBr0FhHCvt+Obu9WvUEmMm K6tfy6kj79u1gZU1cSoMNa9kf8Ph4Ev1Vv0sk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h9u5Hd/k602S0Bq8sFpKbzZCXBppMuyyaNJFma4F5QE=; b=RZvb1Gf1lb3H1BDm9UXTNXGezlUuaFtC/OLLn9lR0gl79LmPb6vzvY6HjrJ8PXuYzg xORd+jsJ8PIv2vG17bRpB04zk5M10v/6zDZqXCtbwHi/aSwT8b0UaqnID0PzYaA7LOXy tr8loPXwdUQfWDkHBrvlEqlf5hQwb27iqeEzTAWK0eGybDht/U1qrUaQbr0CresX/VNS rPJ+qqRdGgcB8PW14CoPSOE6NfK0MB+J07IvXGFC40tDrBZt39QqmLQ08faU+E78gWXm IdqBUoDnqBc1LZYAQGGQA/WCEbOiNUxtXe4PLDyUZrgJ4BaLqUnFCIZw1Vriqzp8fkLn 0gqA== X-Gm-Message-State: AOAM530C3SFkm5g8auqcQhIlggR3kUckCGu9EQ62HFl8lN9uii9X7ak2 WeKEiTk62slP9xM9MyBnQGj2b8zA1cm2glESu0ecvQ== X-Received: by 2002:a17:906:1e04:: with SMTP id g4mr28399323ejj.72.1605172061677; Thu, 12 Nov 2020 01:07:41 -0800 (PST) MIME-Version: 1.0 References: <20201112064051.3716968-1-pihsun@chromium.org> <20201112085920.GB1367855@google.com> In-Reply-To: <20201112085920.GB1367855@google.com> From: Pi-Hsun Shih Date: Thu, 12 Nov 2020 17:07:05 +0800 Message-ID: Subject: Re: [PATCH] drm/bridge: anx7625: Add anx7625 port switching. To: Prashant Malani Cc: Nicolas Boichat , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Xin Ji , Sam Ravnborg , "open list:DRM DRIVERS" , open list , heikki.krogerus@linux.intel.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prashant, Please see inline reply as below. On Thu, Nov 12, 2020 at 4:59 PM Prashant Malani wrote: > > Hi Pi-Hsun, > > I haven't gone through the code, but did have a high-level comment > (kindly see inline) > > On Thu, Nov 12, 2020 at 02:40:40PM +0800, Pi-Hsun Shih wrote: > > When output 2 lanes DP data, anx7625 can output to either TX1/RX1 or > > TX2/RX2. In typical usage, these two TX/RX pairs corresponds to two > > orientations of typec. > > > > On some board one anx7625 is used as DPI to DP converter for two typec > > ports. In this case, the TX1/RX1 and TX2/RX2 are connected to two usb > > muxes, which mux the DP data with the rest of the USB3 data, and > > connects to the two typec ports. > > > > This patch adds option for anx7625 to acts as a usb typec switch and > > switch output lanes based on the typec orientation, or acts as two usb > > typec mux and switch output lanes depending on whether the two ports > > currently has DP enabled. > > > > Signed-off-by: Pi-Hsun Shih > > > > ==================================================================== > > > > This is an attempt to use typec framework with how we're using anx7625 > > on Chrome OS asurada board. > > > > An example of the dts for the two ports case can be found at > > https://crrev.com/c/2507199/6 > > Do you plan on submitting DT schemas & bindings documentation for the switch(es) > that are intended to be used? Yes I plan to submit corresponding DT schemas & bindings documentation changes if this change looks good. > > I would strongly recommend that for usb-c-connector since AFAIK they don't exist, and > I don't believe there is explicit support for them in the Type C connector class framework > (even . > > IMO this would be needed to ensure an implementation here doesn't break > in the event of modifications to the connector class framework (or Type > C port drivers like cros-ec-typec) in the future. I think some patches > were floated for this for orientation switch [1] so those might provide > some hints about how to proceed. > > I've CC-ed Heikki (Type C maintainer) in case he has additional comments regarding this. > > > > > Sending this as a RFC patch since I'm not sure about the best approach > > here. Should the logic of switching output lanes depends on ports be > > coupled inside anx7625 driver, or in another driver, or is there > > any existing way to accomplish this? > > Might be good to add [RFC] as a tag instead of [PATCH] in case this > iteration is chiefly to solicit comments. Ah I did have [RFC] tag in some local .patch files before. I guess I somehow forgot it in later `git format-patch` runs... I'll add the tag in the next version, thanks for the comments. > > Best regards, > > -Prashant > > [1]: > https://lore.kernel.org/linux-usb/1604403610-16577-1-git-send-email-jun.li@nxp.com/ > >