Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp523717ybl; Fri, 9 Aug 2019 09:27:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzndJf0gIhMf37+ry02erMPuF3ZtPA8H+nZWFIm0TcW2gZa4Off7MHdVdpAA5sjuA8QA98R X-Received: by 2002:aa7:988a:: with SMTP id r10mr3804383pfl.253.1565368071589; Fri, 09 Aug 2019 09:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565368071; cv=none; d=google.com; s=arc-20160816; b=iwOcotd8lZkso9RhcPrpGnOL0W5lc2ZQkPTtD/BfVVMSqEyQwDu7mbtqp7NX18bp/2 yZb7sWNjj59JJNU9+Nby8gxLW4+T/6yubRsFtJCzzuo9c1aKcweUNh7r0tdXP7uG3woH xwjfy39cBrdhL4pounjRqAcOaBJqrKjeomdvXZlaciTblxkAEzx14CQ8DiPobLgzrZfP h8u/ZdnjYFLj27/YLnlHapvQuvIGP8mF+8t5H9PqxLrTEKszFJZUpDMS/mzxX9dhHtK/ xqde3cX2XcRpCHb97gsaYawaH+lBFI9CAc1tvF63cgRyOtluFwpKp5NxiVqfiBfP+Ian d/0Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6ZBjOx8wzjy8OYeaRb+ay8SWYMFsX52cXPVaZ7Tjcq0=; b=k3hc0rrYNZJZZwuK4C7omKDWwHPz9qINVgH3CyfjTBjoN8mwZhm0SFm9nNv0ZS3CMm cYskXeFG8nYgOn+SnKb1SIWUkVuMF58wDHbBsrM72AVEUq+BSmP1gigmxqHuB+dLPtwh 4/YV4mqAKeErU6hh/bnH6mmMYVJjFMJkUMzubxXZ/WpQt2w5Gkh+RiIisNSY6yhKM4BE BI2v3DszQuYkPlQxhUg61+lrVevaHubEBkN7Xrfe7aUg4EjXAFE8OZc/cRPCqDaxwh8U ht7qD9JxXCI/hXKTv5PU9FMu0Z42cYnXgMnAhqxJe1D9Fdns5co9cc2ocChau4PwY6I2 GpVw== ARC-Authentication-Results: i=1; mx.google.com; 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 u46si55595046pgn.578.2019.08.09.09.27.34; Fri, 09 Aug 2019 09:27:51 -0700 (PDT) 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; 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 S2437126AbfHIQZK (ORCPT + 99 others); Fri, 9 Aug 2019 12:25:10 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:59026 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406171AbfHIQZJ (ORCPT ); Fri, 9 Aug 2019 12:25:09 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 841DAFB03; Fri, 9 Aug 2019 18:25:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z5pwYJG_1txG; Fri, 9 Aug 2019 18:25:00 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 4A41741D9E; Fri, 9 Aug 2019 18:25:00 +0200 (CEST) Date: Fri, 9 Aug 2019 18:25:00 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Laurent Pinchart Cc: David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , Lee Jones , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Robert Chiras Subject: Re: [PATCH 3/3] drm/bridge: Add NWL MIPI DSI host controller support Message-ID: <20190809162500.GA3692@bogon.m.sigxcpu.org> References: <3158f4f8c97c21f98c394e5631d74bc60d796522.1563983037.git.agx@sigxcpu.org> <20190727024700.GD4902@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190727024700.GD4902@pendragon.ideasonboard.com> 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 Laurent, thanks for the review! Most of it seemed clear how to fix for the rest i've put some questions below: On Sat, Jul 27, 2019 at 05:47:00AM +0300, Laurent Pinchart wrote: > Hello Guido, > > Thank you for the patch. > > On Wed, Jul 24, 2019 at 05:52:26PM +0200, Guido G?nther wrote: > > This adds initial support for the NWL MIPI DSI Host controller found on > > i.MX8 SoCs. > > > > It adds support for the i.MX8MQ but the same IP can be found on > > e.g. the i.MX8QXP. > > > > It has been tested on the Librem 5 devkit using mxsfb. > > > > Signed-off-by: Guido G?nther > > Co-developed-by: Robert Chiras > > --- > > drivers/gpu/drm/bridge/Kconfig | 2 + > > drivers/gpu/drm/bridge/Makefile | 1 + > > drivers/gpu/drm/bridge/imx-nwl/Kconfig | 15 + > > drivers/gpu/drm/bridge/imx-nwl/Makefile | 2 + > > drivers/gpu/drm/bridge/imx-nwl/nwl-drv.c | 529 ++++++++++++++++ > > drivers/gpu/drm/bridge/imx-nwl/nwl-drv.h | 72 +++ > > drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.c | 745 +++++++++++++++++++++++ > > drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.h | 111 ++++ > > 8 files changed, 1477 insertions(+) > > create mode 100644 drivers/gpu/drm/bridge/imx-nwl/Kconfig > > create mode 100644 drivers/gpu/drm/bridge/imx-nwl/Makefile > > create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-drv.c > > create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-drv.h > > create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.c > > create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.h > > > > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig > > index a6eec908c43e..38c3145a7e57 100644 > > --- a/drivers/gpu/drm/bridge/Kconfig > > +++ b/drivers/gpu/drm/bridge/Kconfig > > @@ -152,6 +152,8 @@ source "drivers/gpu/drm/bridge/analogix/Kconfig" > > > > source "drivers/gpu/drm/bridge/adv7511/Kconfig" > > > > +source "drivers/gpu/drm/bridge/imx-nwl/Kconfig" > > + > > As this doesn't seem to be an i.MX-specific IP, I wouldn't use the name > imx in file names or in the code, at least in the parts that are not > NXP-specific. O.k. Since i've not seen other SoCs using this ip core I wasn't sure what would be sharable but we'll figure that out. Renamed to nwl-dsi/ > > source "drivers/gpu/drm/bridge/synopsys/Kconfig" > > > > endmenu > > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > > index 4934fcf5a6f8..904a9eb3a20a 100644 > > --- a/drivers/gpu/drm/bridge/Makefile > > +++ b/drivers/gpu/drm/bridge/Makefile > > @@ -16,4 +16,5 @@ obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ > > obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ > > obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o > > obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o > > +obj-y += imx-nwl/ > > obj-y += synopsys/ > > diff --git a/drivers/gpu/drm/bridge/imx-nwl/Kconfig b/drivers/gpu/drm/bridge/imx-nwl/Kconfig > > new file mode 100644 > > index 000000000000..822dba1b380a > > --- /dev/null > > +++ b/drivers/gpu/drm/bridge/imx-nwl/Kconfig > > @@ -0,0 +1,15 @@ > > +config DRM_IMX_NWL_DSI > > + tristate "Support for Northwest Logic MIPI DSI Host controller" > > + depends on DRM && (ARCH_MXC || ARCH_MULTIPLATFORM || COMPILE_TEST) > > + depends on COMMON_CLK > > + depends on OF && HAS_IOMEM > > + select DRM_KMS_HELPER > > + select DRM_MIPI_DSI > > + select DRM_PANEL_BRIDGE > > + select GENERIC_PHY_MIPI_DPHY > > + select MFD_SYSCON > > + select REGMAP_MMIO > > + help > > + This enables the Northwest Logic MIPI DSI Host controller as > > + found on NXP's i.MX8 Processors. > > + > > diff --git a/drivers/gpu/drm/bridge/imx-nwl/Makefile b/drivers/gpu/drm/bridge/imx-nwl/Makefile > > new file mode 100644 > > index 000000000000..9fa63483da5b > > --- /dev/null > > +++ b/drivers/gpu/drm/bridge/imx-nwl/Makefile > > @@ -0,0 +1,2 @@ > > +imx-nwl-objs := nwl-drv.o nwl-dsi.o > > +obj-$(CONFIG_DRM_IMX_NWL_DSI) += imx-nwl.o > > diff --git a/drivers/gpu/drm/bridge/imx-nwl/nwl-drv.c b/drivers/gpu/drm/bridge/imx-nwl/nwl-drv.c > > new file mode 100644 > > index 000000000000..451f8f067c6f > > --- /dev/null > > +++ b/drivers/gpu/drm/bridge/imx-nwl/nwl-drv.c > > @@ -0,0 +1,529 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > +/* > > + * i.MX8 NWL MIPI DSI host driver > > + * > > + * Copyright (C) 2017 NXP > > + * Copyright (C) 2019 Purism SPC > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > This doesn't seem to be needed. Dropped. > > > +#include > > +#include > > Same here. Dropped (it was a component driver before). > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include