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 X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFB7AC3B1BF for ; Sat, 15 Feb 2020 00:58:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7FC920726 for ; Sat, 15 Feb 2020 00:58:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="TeSq9Nlz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7FC920726 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 052016E89A; Sat, 15 Feb 2020 00:58:07 +0000 (UTC) Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by gabe.freedesktop.org (Postfix) with ESMTPS id E98C36E89A for ; Sat, 15 Feb 2020 00:58:05 +0000 (UTC) Received: by mail-qv1-xf42.google.com with SMTP id l14so5132158qvu.12 for ; Fri, 14 Feb 2020 16:58:05 -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=1cKFrJvxjBZmwV8fx4PYPqMr+d+UV5RB12ZA7bxHkY0=; b=TeSq9Nlzf7M/ZtJ8VOaje5NhgoW8Yeqrn8llHTbkbSXb5O/a1WCI5M5AZcp131CFwf 13Arnsb5ipnKvw44LV/bDy99jaw3XQ6+lrSgP3r47jcFBAANti4hct/FKSVSzETMGn1s g5c5h0yzaGpiilE+3o2Xg2CjsUeE+cvpiSA/k= 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=1cKFrJvxjBZmwV8fx4PYPqMr+d+UV5RB12ZA7bxHkY0=; b=QBl1e3pdGx6gJPkNj5oQ9NCtYf2IFol1NahGzJK/qwZoD8jtN+/FFzFVGqKUxyISCN C68NDAF0S/UOzLi5yWIQ4MfhMmwXnr5Wvp9DF4iCa1KYMZ/HHaGXTUIGdCM6TI2Ry6bY 7lQM6i8Hxg2zNdPtlS1uTtV+xMpblG6M5eeAA8nA1+uImEhTDDdr/TPHyG8tOrbp73nP 3eFBJaJgYXKToWkIP2MGNdGLCtcKvyGy3zi/UzTDJqY50EZ/laRO/jo2qzN9t/OwhUWU EEttYnA2oodDlPgQt3f7V3pD/W/egj2HGSGk4YuSG+yeA48Fd4QOQ/wUo2oQ2MkQkRBB +bSg== X-Gm-Message-State: APjAAAWlYnksDoYMSSa5GcwYiJCASNpDl4KgjqCKOzlB4DU0rWUyPsT2 6fANsctQUSI6J3MMwCaJSSl5RiSX6jWXgB742s/fsA== X-Google-Smtp-Source: APXvYqzCBMYNJm+5z3VItZNU8GREjvs8qxBPDVO54pJ2EWZ9LKE1F+BAhKKuBrQstARpdGDLibG5Ehxxqpzcf4gxABI= X-Received: by 2002:a05:6214:531:: with SMTP id x17mr4638090qvw.156.1581728284775; Fri, 14 Feb 2020 16:58:04 -0800 (PST) MIME-Version: 1.0 References: <20200213145416.890080-1-enric.balletbo@collabora.com> <20200213145416.890080-2-enric.balletbo@collabora.com> In-Reply-To: From: Nicolas Boichat Date: Sat, 15 Feb 2020 08:57:53 +0800 Message-ID: Subject: Re: [PATCH v2 2/2] drm/bridge: anx7688: Add anx7688 bridge driver support To: Vasily Khoruzhick X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Laurent Pinchart , Neil Armstrong , David Airlie , Torsten Duwe , Jonas Karlman , linux-kernel , dri-devel , Andrzej Hajda , Matthias Brugger , Maxime Ripard , Hsin-Yi Wang , Enric Balletbo i Serra , Thomas Gleixner , Collabora Kernel ML , Icenowy Zheng Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sat, Feb 15, 2020 at 5:36 AM Vasily Khoruzhick wrote: > > On Thu, Feb 13, 2020 at 6:54 AM Enric Balletbo i Serra > wrote: > > > > From: Nicolas Boichat > > > > 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