Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2039141ybg; Sat, 19 Oct 2019 07:14:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkJ8hwyB38+9gufHw0nTqUiuVxrkrl25HpbyoKfGtVW2JMhGZ8DGEfui6l4TTSdtQVkhoH X-Received: by 2002:a05:6402:21d6:: with SMTP id bi22mr15084721edb.19.1571494472752; Sat, 19 Oct 2019 07:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571494472; cv=none; d=google.com; s=arc-20160816; b=pVxFJ09VKSQOE3PfXe2P8Oj9SVmJ4lXKn7s7LZCHKJD5mYyBPKBpcvl7U++KgusmaN rfVLysMMlUFTRQ9+AlRshfrvyYZU/dYEQOUANO4gkunhLcIP9WgSSRg2bKNrTkYQ/2oD uU44YZKNc/d9KZJIiJsyTumdlYHsuV2iGXu7JHXZpzM9BwM/6Hvm9BUusnwyLrHv6mGO X8Ia4CZOVLk+MpGtqZyeUfgC51Y+qWfMk9qVJORRNQLaPYLdYe8HwtjaUsGzizBHcUsk cP4vzk+hBCzSk69psxwhUBPcy7r9yHdEuiqBxcXJk9RbEPv/2MocCswCJ3+218w1+EJM DT5w== 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=TMezcL4BrRGFiQr0M+07NXii8Tlvk9SgjUycP3+3e08=; b=JJyVHQON/kOVENiUilaC/H3nFcikhbYJLkuSb0Oh9BnlF81w4ZtBRBYKfvgSXgBoK4 CTOW78OnlfIH2i7aRIKsx89ac9XkCmGsXhD7mkekF/0GufX2FISEGmsyEZAPWmNCMrkS xhX870uaZvhX0S24C5ZCv0CdS1AYaHNTAFimCkYyT9li2hDd9wnM2NryMmb0my7Vm78R +pNjcsA15k/WKeviIr0DVuYUSUvCtez22EYrdqhaKZ88X8OFyIAhtYvxfk4hxfjU4ghI g4zkvlqzPmu3c5p2mxxqH59z6QpkNS5i6EfksVn/SCvBJIo/UPviHLx99vxXY60d9D9s qNAg== 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 y28si6239283edb.162.2019.10.19.07.14.09; Sat, 19 Oct 2019 07:14:32 -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 S1725937AbfJSOLN (ORCPT + 99 others); Sat, 19 Oct 2019 10:11:13 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:50782 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725890AbfJSOLN (ORCPT ); Sat, 19 Oct 2019 10:11:13 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 36E46FB03; Sat, 19 Oct 2019 16:11:10 +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 VLCgsYuBdfeV; Sat, 19 Oct 2019 16:11:04 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id BCEA349B0C; Sat, 19 Oct 2019 16:11:03 +0200 (CEST) Date: Sat, 19 Oct 2019 16:11:03 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Andrzej Hajda Cc: David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Neil Armstrong , Laurent Pinchart , 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 , Sam Ravnborg , Arnd Bergmann Subject: Re: [PATCH v6 2/2] drm/bridge: Add NWL MIPI DSI host controller support Message-ID: <20191019141103.GA21138@bogon.m.sigxcpu.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Andrzej, thanks for your comments! See inline for follow ups. On Mon, Sep 23, 2019 at 12:01:51PM +0200, Andrzej Hajda wrote: > On 22.09.2019 18:47, 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 > > Signed-off-by: Robert Chiras > > Tested-by: Robert Chiras > > --- > > drivers/gpu/drm/bridge/Kconfig | 16 + > > drivers/gpu/drm/bridge/Makefile | 3 + > > drivers/gpu/drm/bridge/nwl-dsi.c | 1180 ++++++++++++++++++++++++++++++ > > drivers/gpu/drm/bridge/nwl-dsi.h | 144 ++++ > > 4 files changed, 1343 insertions(+) > > create mode 100644 drivers/gpu/drm/bridge/nwl-dsi.c > > create mode 100644 drivers/gpu/drm/bridge/nwl-dsi.h > > > > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig > > index 1cc9f502c1f2..13021f9a6107 100644 > > --- a/drivers/gpu/drm/bridge/Kconfig > > +++ b/drivers/gpu/drm/bridge/Kconfig > > @@ -65,6 +65,22 @@ config DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW > > to DP++. This is used with the i.MX6 imx-ldb > > driver. You are likely to say N here. > > > > +config DRM_NWL_MIPI_DSI > > + tristate "Northwest Logic MIPI DSI Host controller" > > + depends on DRM > > + 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 MULTIPLEXER > > + select REGMAP_MMIO > > + help > > + This enables the Northwest Logic MIPI DSI Host controller as > > + for example found on NXP's i.MX8 Processors. > > + > > config DRM_NXP_PTN3460 > > tristate "NXP PTN3460 DP/LVDS bridge" > > depends on OF > > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > > index 4934fcf5a6f8..c3f3a43e9b8f 100644 > > --- a/drivers/gpu/drm/bridge/Makefile > > +++ b/drivers/gpu/drm/bridge/Makefile > > @@ -16,4 +16,7 @@ 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-$(CONFIG_DRM_NWL_MIPI_DSI) += nwl-dsi.o > > obj-y += synopsys/ > > + > > +header-test-y += nwl-dsi.h > > diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c > > new file mode 100644 > > index 000000000000..dea5429a1e17 > > --- /dev/null > > +++ b/drivers/gpu/drm/bridge/nwl-dsi.c > > @@ -0,0 +1,1180 @@ > > +// 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 > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include