All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Boichat <drinkcat@chromium.org>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Collabora Kernel ML <kernel@collabora.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>, Jonas Karlman <jonas@kwiboo.se>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Maxime Ripard <maxime@cerno.tech>,
	Thomas Gleixner <tglx@linutronix.de>,
	Icenowy Zheng <icenowy@aosc.io>,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Torsten Duwe <duwe@suse.de>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH v2 2/2] drm/bridge: anx7688: Add anx7688 bridge driver support
Date: Sat, 15 Feb 2020 08:57:53 +0800	[thread overview]
Message-ID: <CANMq1KCAp6fYEqX3udxUXi+zEgjSy_FddDngDwriB8D-gAj=YQ@mail.gmail.com> (raw)
In-Reply-To: <CA+E=qVffVzZwRTk9K7=xhWn-AOKExkew0aPcyL_W1nokx-mDdg@mail.gmail.com>

On Sat, Feb 15, 2020 at 5:36 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote:
>
> On Thu, Feb 13, 2020 at 6:54 AM Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
> >
> > From: Nicolas Boichat <drinkcat@chromium.org>
> >
> > ANX7688 is a HDMI to DP converter (as well as USB-C port controller),
> > that has an internal microcontroller.
> >
> > The only reason a Linux kernel driver is necessary is to reject
> > resolutions that require more bandwidth than what is available on
> > the DP side. DP bandwidth and lane count are reported by the bridge
> > via 2 registers on I2C.
>
> It is true only for your particular platform where usb-c part is
> managed by firmware. Pinephone has the same anx7688 but linux will
> need a driver that manages usb-c in addition to DP.
>
> I'd suggest making it MFD driver from the beginning, or at least make
> proper bindings so we don't have to rework it and introduce binding
> incompatibilities in future.

If that helps for the binding, ANX7688 is indeed a MFD (TCPC, HDMI to
DP converter, USB-C mux between USB 3.0 lanes and the DP output of the
embedded converter), with 2 I2C addresses:
- 0x2c is the TCPC/mux, used by the Embedded Controller [1] on Chrome
OS, and the code in this patch (my understanding is that lane count/BW
registers in the kernel driver below may only be available to FW on
Chromebooks).
- 0x28:
    - Used to update the embedded FW in the anx7688 (on Chrome OS we
do this in depthcharge [2]). This is a EEPROM-based FW (so even
without implementing this, it'll usually "just work").
    - Used to workaround some TCPC issues (see [1] again).

[1] EC driver: https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/master/driver/tcpm/anx7688.c
[2] depthcharge driver to update ANX7688 FW:
https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/master/src/drivers/ec/anx7688/anx7688.c

WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Boichat <drinkcat@chromium.org>
To: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>, Torsten Duwe <duwe@suse.de>,
	Jonas Karlman <jonas@kwiboo.se>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Collabora Kernel ML <kernel@collabora.com>,
	Icenowy Zheng <icenowy@aosc.io>
Subject: Re: [PATCH v2 2/2] drm/bridge: anx7688: Add anx7688 bridge driver support
Date: Sat, 15 Feb 2020 08:57:53 +0800	[thread overview]
Message-ID: <CANMq1KCAp6fYEqX3udxUXi+zEgjSy_FddDngDwriB8D-gAj=YQ@mail.gmail.com> (raw)
In-Reply-To: <CA+E=qVffVzZwRTk9K7=xhWn-AOKExkew0aPcyL_W1nokx-mDdg@mail.gmail.com>

On Sat, Feb 15, 2020 at 5:36 AM Vasily Khoruzhick <anarsoul@gmail.com> wrote:
>
> On Thu, Feb 13, 2020 at 6:54 AM Enric Balletbo i Serra
> <enric.balletbo@collabora.com> wrote:
> >
> > From: Nicolas Boichat <drinkcat@chromium.org>
> >
> > ANX7688 is a HDMI to DP converter (as well as USB-C port controller),
> > that has an internal microcontroller.
> >
> > The only reason a Linux kernel driver is necessary is to reject
> > resolutions that require more bandwidth than what is available on
> > the DP side. DP bandwidth and lane count are reported by the bridge
> > via 2 registers on I2C.
>
> It is true only for your particular platform where usb-c part is
> managed by firmware. Pinephone has the same anx7688 but linux will
> need a driver that manages usb-c in addition to DP.
>
> I'd suggest making it MFD driver from the beginning, or at least make
> proper bindings so we don't have to rework it and introduce binding
> incompatibilities in future.

If that helps for the binding, ANX7688 is indeed a MFD (TCPC, HDMI to
DP converter, USB-C mux between USB 3.0 lanes and the DP output of the
embedded converter), with 2 I2C addresses:
- 0x2c is the TCPC/mux, used by the Embedded Controller [1] on Chrome
OS, and the code in this patch (my understanding is that lane count/BW
registers in the kernel driver below may only be available to FW on
Chromebooks).
- 0x28:
    - Used to update the embedded FW in the anx7688 (on Chrome OS we
do this in depthcharge [2]). This is a EEPROM-based FW (so even
without implementing this, it'll usually "just work").
    - Used to workaround some TCPC issues (see [1] again).

[1] EC driver: https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/master/driver/tcpm/anx7688.c
[2] depthcharge driver to update ANX7688 FW:
https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/master/src/drivers/ec/anx7688/anx7688.c
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-02-15  0:58 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 14:54 [PATCH v2 1/2] Documentation: bindings: Add ANX7688 HDMI to DP bridge binding Enric Balletbo i Serra
2020-02-13 14:54 ` Enric Balletbo i Serra
2020-02-13 14:54 ` [PATCH v2 2/2] drm/bridge: anx7688: Add anx7688 bridge driver support Enric Balletbo i Serra
2020-02-13 14:54   ` Enric Balletbo i Serra
2020-02-14 12:18   ` Andrzej Hajda
2020-02-14 12:18     ` Andrzej Hajda
2020-02-14 13:29     ` Nicolas Boichat
2020-02-14 13:29       ` Nicolas Boichat
2020-02-15  0:36     ` Nicolas Boichat
2020-02-15  0:36       ` Nicolas Boichat
2020-02-14 21:36   ` Vasily Khoruzhick
2020-02-14 21:36     ` Vasily Khoruzhick
2020-02-14 21:53     ` Enric Balletbo Serra
2020-02-14 21:53       ` Enric Balletbo Serra
2020-02-14 22:17       ` Vasily Khoruzhick
2020-02-14 22:17         ` Vasily Khoruzhick
2020-02-14 22:20         ` Enric Balletbo Serra
2020-02-14 22:20           ` Enric Balletbo Serra
2020-02-14 22:22           ` Vasily Khoruzhick
2020-02-14 22:22             ` Vasily Khoruzhick
2020-03-05 15:28             ` Enric Balletbo i Serra
2020-03-05 15:28               ` Enric Balletbo i Serra
2020-03-05 18:29               ` Vasily Khoruzhick
2020-03-05 18:29                 ` Vasily Khoruzhick
2020-03-05 18:35                 ` Icenowy Zheng
2020-03-05 18:35                   ` Icenowy Zheng
2020-03-06  8:46                   ` Enric Balletbo i Serra
2020-03-06  8:46                     ` Enric Balletbo i Serra
2020-03-05 19:35                 ` Ondřej Jirman
2020-03-05 19:35                   ` Ondřej Jirman
2020-03-06  8:46                   ` Enric Balletbo i Serra
2020-03-06  8:46                     ` Enric Balletbo i Serra
2020-03-06  8:53                     ` Icenowy Zheng
2020-03-06  8:53                       ` Icenowy Zheng
2020-03-06 12:07                       ` Ondřej Jirman
2020-03-06 12:07                         ` Ondřej Jirman
2020-03-06 12:11                         ` Nicolas Boichat
2020-03-06 12:11                           ` Nicolas Boichat
2020-03-06 12:46                           ` Ondřej Jirman
2020-03-06 12:46                             ` Ondřej Jirman
2020-03-06 12:03                     ` Ondřej Jirman
2020-03-06 12:03                       ` Ondřej Jirman
2020-03-06 12:18                       ` Enric Balletbo i Serra
2020-03-06 12:18                         ` Enric Balletbo i Serra
2020-02-15  0:57     ` Nicolas Boichat [this message]
2020-02-15  0:57       ` Nicolas Boichat
2020-02-19 15:30 ` [PATCH v2 1/2] Documentation: bindings: Add ANX7688 HDMI to DP bridge binding Rob Herring
2020-02-19 15:30   ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANMq1KCAp6fYEqX3udxUXi+zEgjSy_FddDngDwriB8D-gAj=YQ@mail.gmail.com' \
    --to=drinkcat@chromium.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=anarsoul@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=duwe@suse.de \
    --cc=enric.balletbo@collabora.com \
    --cc=hsinyi@chromium.org \
    --cc=icenowy@aosc.io \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=maxime@cerno.tech \
    --cc=narmstrong@baylibre.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.