Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4233692ybl; Mon, 9 Dec 2019 07:33:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxGP5yZP1hl/SzjqjTz71tdYe2goo+SvdpbCufNa7H97lTOze98EY+5LFzPPQZFD9UblCkv X-Received: by 2002:a9d:ea6:: with SMTP id 35mr21053252otj.106.1575905611533; Mon, 09 Dec 2019 07:33:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575905611; cv=none; d=google.com; s=arc-20160816; b=lVNcwibZ75FXx8FPEyWH1nyVIcJCD9RV+rSYY6nL7uW1mIfmg/FJXGuezTlZdJgyvb 4q9neAN1McJlkevt3/oJqrgiOWnOurrrfn10byQvTbWMS2KfLWp4Dbrw1/Ithg01un9N un1gzjdL5DHaVk6oBU+fK8CAZ6kWGSQWVG9dc5v9tSsqK6KyZaqwQAaXdb9AFUqm6RfH iwjROdtQXqtnEkc1qan9Xnhvz5tjDLmgEiRHSEF7xk65/GiMipcv0757TLIPTdupnYRO c/xdJdT8/Nqf4kTij+OSoiPOcTWLU68CPGUQBfK3r8cZnwOs4i2AxPqjWBepdOPxACVe f6ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=74g2WWKWth5duFGe2y6lsj53tG/Zobu/FD5W2M+KmXM=; b=hPAG6XDUqjlmkMiE6myEfaQk/kKb50eI4cNF0Lsq1Bej+2xz7/F92uOELFzwUKEGeY hxFOGJh4Kiru3pOHxVgZTucu5zIW2/wvLA8HWNsOyMpwVeFuvZ3YF8013lzIUanuirnf LV2DlOe0pzUxCraBJUCAq+nQVyppzknJwLo6msZFbmj6fdhQDLd0GpKXzs8QuVJpdgIm yf3ZKaDBbNfhLHEhJWqlQLsnj/1o0bBZhTKnXCivJfXgR3C3dwfwlRXQWrvafpPgoBSE hSN3k4DHFVZ5g/OBz9Qo5nt0VJaEt78rZIwzvR7hW8wIvMhO3tb00/lo+oFI58ZrtFjL ZiLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=b2QZylIm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l19si38432oib.48.2019.12.09.07.33.19; Mon, 09 Dec 2019 07:33:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=b2QZylIm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726678AbfLIPcr (ORCPT + 99 others); Mon, 9 Dec 2019 10:32:47 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:36954 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbfLIPcr (ORCPT ); Mon, 9 Dec 2019 10:32:47 -0500 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C44B6FCF; Mon, 9 Dec 2019 16:32:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1575905565; bh=0cB0KQ3w+T+YFNjQmKzHnWoA1Lbe2MnHeWDxvrD8lXM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b2QZylIm5A2WoRrkTXJACdWQ8pVO3Oc6jF1G0+p6ZZZ5RxitGUqTKPs/gxaeVL5xs knCiwQStorSLSz+tdnbQ0oSMO4fc+799n85bSK0hRusxluYigK4T5+5JzphL63NLCZ cFkTOH3wYDnQiipsxpDzlK3VP6tXltJ+KHLb+rDw= Date: Mon, 9 Dec 2019 17:32:38 +0200 From: Laurent Pinchart To: Hsin-Yi Wang Cc: dri-devel@lists.freedesktop.org, David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Nicolas Boichat , Devicetree List , lkml , Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , Archit Taneja , Philipp Zabel , Enric Balletbo i Serra , Matthias Brugger , Russell King Subject: Re: [PATCH RESEND 3/4] dt-bindings: drm/bridge: analogix-anx78xx: support bypass GPIO Message-ID: <20191209153238.GE12841@pendragon.ideasonboard.com> References: <20191209145016.227784-1-hsinyi@chromium.org> <20191209145016.227784-4-hsinyi@chromium.org> <20191209145552.GD12841@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hsin-Yi, On Mon, Dec 09, 2019 at 11:09:34PM +0800, Hsin-Yi Wang wrote: > On Mon, Dec 9, 2019 at 10:55 PM Laurent Pinchart wrote: > > On Mon, Dec 09, 2019 at 10:50:15PM +0800, Hsin-Yi Wang wrote: > > > Support optional feature: bypass GPIO. > > > > > > Some SoC (eg. mt8173) have a hardware mux that connects to 2 ports: > > > anx7688 and hdmi. When the GPIO is active, the bridge is bypassed. > > > > This doesn't look like the right place to fix this, as the mux is > > unrelated to the bridge. You would have to duplicate this logic in every > > bridge driver otherwise. > > > > Could you describe the hardware topology in a bit more details ? I can > > then try to advise on how to best support it. > > Hi Laurent, > > The mt8173 layout is: > > MT8173 HDMI bridge-- hardware mux --- HDMI > | > ------------ anx7688 You may have used a proportional font when writing this, the | doesn't align with anything using a fixed font. Do I assume correctly that the hardware multiplexer is actually a demultiplexer with one input and two outputs ? +-----------+ +---------+ +------+ /--> | HDMI | | MT8173 | HDMI | -->| --/ | Connector | | HDMI | ------> |--/ | +-----------+ | Encoder | | ->| --\ +-----------+ +-----------+ +---------+ +------+ \--> | ANX7688 | ---> | USB-C | | Bridge | | Connector | +-----------+ +-----------+ > There's a hardware mux that takes mt8173 hdmi as input and has 2 > output port: native hdmi and anx7688 bridge. > If gpio is active, we would like it to go to HDMI. > > Previous approach is to make hardware mux a generic gpio mux bridge, > but this is probably a very rare use case that is only for > mt8173.(https://lore.kernel.org/lkml/57723AD2.8020806@codeaurora.org/) > We merge the mux and anx7688 to a single bridge and leave this as an > optional feature in this time. I think that's a better approach, at least at the DT level. The HDMI demultiplexer should be represented as a DT node with 3 ports (one input and two outputs) with a control GPIO. From a video point of view, the ANX7688 should be represented as a DT node with 2 ports (one input and one output), regardless of whether it is used in conjunction with an HDMI switch as shown above, or directly connected to the output of an HDMI encoder. However, as the ANX7688 supports both DP output and USB-C output, the situation may be slightly more complex. Please see https://patchwork.kernel.org/patch/11184895/ for a similar discussion, related to the ANX7625. In any case, I don't think the ANX7688 should care about the GPIO. -- Regards, Laurent Pinchart