Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1603054ybl; Thu, 5 Dec 2019 04:11:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzlIGDM3xaOejPEVgIaGL6ooJCuuEVvlEZVlSRPcZJYbMpRWsdF84cW4nZeqUZRl5k3SuMI X-Received: by 2002:aca:4c15:: with SMTP id z21mr1172409oia.12.1575547912674; Thu, 05 Dec 2019 04:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575547912; cv=none; d=google.com; s=arc-20160816; b=VXiGbv5zFUJEilwWRTGcDS9Su+CVxRRs18bTMrdchEJSE5PlXKDr65ts170kWPYKtu Xg7VtlxIfedX6yGZTM0P5/i+8RLO8UlXRBW+qkb1l3eV8VYJvLonuyCImUL/gfWdqcev 0ib1LHFmLhrjaFrJNgTWwEprC2MvzdAasAs14QoGM0O/jeKE8pN+Ru4GTA9N8E6OjPxO kwIqOGxt1Q0Zo8Aq7lInin0Z6Ds0vaAD14qFYNhfGCEP5Gqg68CH0insvgkEvWCUUmaq Kv7z4Kc8XBp8W5eWwJk6/OewcP7J7EmIR69EKX/40yfSvU8tzB6zrMvxKDyjHep76Oha oeAg== 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=S8Ta3YMQuGG9E9Qbe1ngJvrR63GScMQsbCRUz/eAR4g=; b=vifB4Yc8c0tmSBIAdXw8i21lO2cBUKpC9oG4PklsxtAEdfn7ylu3dvVgzOTRC+ox5c TKbeBlSS5N60BqANMfF1u8qkCP2rXKPhuvGkvE4dza865XfC9lbFBqjT8snv3VTbp8HE r7KGmtQytcNBN8maSSrM83h+9hdF4bMvyMoG3EpY4zAYRGr4YE9LQ1rdTAJ2HW7e+kC7 BU6FCgctMYjnhg2Rt8TZDtp5G1bg9V708C4V1yTnU7S3F3JQXp8X3ALsW5KA+Dzz4oif AY/mb/H2YUspq3nhFA6bvgoNcOUxqvBk6MJBMQKLzDzl63LBrKYuhGu0t4y3F38OXboH Kg2g== 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 t130si4307782oih.37.2019.12.05.04.11.39; Thu, 05 Dec 2019 04:11:52 -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; 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 S1729444AbfLEMJ1 (ORCPT + 99 others); Thu, 5 Dec 2019 07:09:27 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:53810 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729096AbfLEMJ0 (ORCPT ); Thu, 5 Dec 2019 07:09:26 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 2C370FB02; Thu, 5 Dec 2019 13:09:21 +0100 (CET) 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 kN_thwc3iyku; Thu, 5 Dec 2019 13:08:58 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 6C36241530; Thu, 5 Dec 2019 13:08:44 +0100 (CET) Date: Thu, 5 Dec 2019 13:08:44 +0100 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Robert Chiras Cc: dl-linux-imx , "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "narmstrong@baylibre.com" , "devicetree@vger.kernel.org" , "festevam@gmail.com" , "lee.jones@linaro.org" , "jernej.skrabec@siol.net" , "daniel@ffwll.ch" , "mark.rutland@arm.com" , "a.hajda@samsung.com" , "dri-devel@lists.freedesktop.org" , "jonas@kwiboo.se" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "airlied@linux.ie" , "sam@ravnborg.org" , "Laurent.pinchart@ideasonboard.com" , "kernel@pengutronix.de" , "arnd@arndb.de" , "s.hauer@pengutronix.de" Subject: Re: [EXT] [PATCH v8 2/2] drm/bridge: Add NWL MIPI DSI host controller support Message-ID: <20191205120844.GB8514@bogon.m.sigxcpu.org> References: <1575366594.6423.61.camel@nxp.com> <20191204120638.GB18094@bogon.m.sigxcpu.org> <1575462277.6423.71.camel@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1575462277.6423.71.camel@nxp.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 Robert, On Wed, Dec 04, 2019 at 12:24:39PM +0000, Robert Chiras wrote: > On Mi, 2019-12-04 at 13:06 +0100, Guido G?nther wrote: > > Hi Robert, > > On Tue, Dec 03, 2019 at 09:50:03AM +0000, Robert Chiras wrote: > > > > > > Hi Guido, > > > > > > Since your last revision sent, I've done more tests here and found > > > a > > > few more improvements that could be added to this driver. > > > See inline. > > > > > > On Lu, 2019-12-02 at 20:35 +0100, Guido G?nther wrote: > > > > > > > > Caution: EXT Email > > > > > > > > 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 | 1230 > > > > ++++++++++++++++++++++++++++++ > > > > ?drivers/gpu/drm/bridge/nwl-dsi.h |??144 ++++ > > > > ?4 files changed, 1393 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 34362976cd6f..6fb534f55d22 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..023191894fe4 > > > > --- /dev/null > > > > +++ b/drivers/gpu/drm/bridge/nwl-dsi.c > > > > @@ -0,0 +1,1230 @@ > > > > +// 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