Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp819985ybn; Tue, 24 Sep 2019 10:00:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzX86TE7GgaDcNw2m2AsYcXVDKlljuJqeZmXdsTPMxExSz0Yg37ZIMYroBqEwm/PwOoQh+k X-Received: by 2002:a7b:c761:: with SMTP id x1mr1184984wmk.47.1569344446329; Tue, 24 Sep 2019 10:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569344446; cv=none; d=google.com; s=arc-20160816; b=DMYLw7b9t4hVBYk/A54uBl7r6Seqo9MS+v2tKSI8gLyxmWBq2n3HtMWVTQdfNsr3rP 5ICwDG8v03qm9K0ojYegAnBVRx24be7zmR7cwGxKjXBAwTtev7ORZs0me+kLOV8LFQ8V m6qmHOCxEHZDwx3Cw00DBKp+dKUgrUwkYtPuX6uol17kVf70k/YqIx+tdZwlDCSqB5sm aGboKPibC8WcmqS8WIq8eZLV8JVciIQQnO0/lzuPnT9Krr9mO7Um14oXlKhfI538fqNc +kSm+GJwWQun4udUk6MT47sokFbHvkbfxVgjBmwdsyYeJLXFb2mJClUCCYV4RcZ/r0IB FueQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:to:subject:dkim-signature:dkim-filter; bh=l/0SIkq+IFjpWvcwhrWWtHUrwC+HJtsppVpikY5h+zs=; b=t4VO8uUQYFpHdDyGPiEFejYwbqQUG0uq1u8M4eBF2wKFd4eOLwpNi4ZKjUtZCPTUa8 1Ekk0c9ESlvCT4jJ0cWdPsncwk2L0jULjTFofDUKFPP3K0V+PhYmusv1v6UQd3puCW/n Wvv/PM8h+JtQfkE/6fFSVCTl7mG/RD1L8aWld9ZqSSDDM6VLFZ0fSkee4fnyobNmuodX BkNVR/zGxbZI2FpxwLAYAhuRErTqpv/oMTR0xTUwoKZxylnqCvkJYEQQDgt5ay7w5QH2 zztcOZlbWX7uso9Ar6XKZtTcwRnyLX7eKZ820Up/uS5NBWtoXul+YyjaMe4cT5UXbcoz 7osA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=A2kQxdCU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o32si1700425edb.63.2019.09.24.10.00.22; Tue, 24 Sep 2019 10:00:46 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=A2kQxdCU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407563AbfIWKB6 (ORCPT + 99 others); Mon, 23 Sep 2019 06:01:58 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:47184 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407538AbfIWKB6 (ORCPT ); Mon, 23 Sep 2019 06:01:58 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190923100154euoutp01cb08790f0a7805852dbe2c1273687803~HCQV0CS9_0464904649euoutp01h for ; Mon, 23 Sep 2019 10:01:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190923100154euoutp01cb08790f0a7805852dbe2c1273687803~HCQV0CS9_0464904649euoutp01h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1569232914; bh=l/0SIkq+IFjpWvcwhrWWtHUrwC+HJtsppVpikY5h+zs=; h=Subject:To:From:Date:In-Reply-To:References:From; b=A2kQxdCU628yLktd7qgxH/METvH2IwVHehD1Zxhs/r203z/wLZU8xICN+1GJePw/p g0FZnLFMGnI9x5i8lkg/IFtzpl/CzRYReld3vNhe5TJ4DI7PjmamlZxUzNVzvtivel 9UXrURqOQ4ErixcK/JPc6qtAXdpwDRdfmNtlztzU= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190923100153eucas1p14d47c62cec8bb12bfe06a57464613788~HCQVcUxUV0552505525eucas1p1F; Mon, 23 Sep 2019 10:01:53 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id B5.C4.04469.118988D5; Mon, 23 Sep 2019 11:01:53 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190923100153eucas1p154a8d1178ae13d3f97c4eea1dbdc048d~HCQU39DSG0764607646eucas1p1E; Mon, 23 Sep 2019 10:01:53 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190923100153eusmtrp14b068f87cf98301d0fcac3ad98d16fa8~HCQUyzQWz1414014140eusmtrp1g; Mon, 23 Sep 2019 10:01:53 +0000 (GMT) X-AuditID: cbfec7f2-569ff70000001175-c6-5d8898110dd9 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 85.A8.04117.018988D5; Mon, 23 Sep 2019 11:01:52 +0100 (BST) Received: from [106.120.51.74] (unknown [106.120.51.74]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190923100152eusmtip2a97fdb808d57d25f277ded3bfef61f41~HCQTxtpM30933109331eusmtip2v; Mon, 23 Sep 2019 10:01:51 +0000 (GMT) Subject: Re: [PATCH v6 2/2] drm/bridge: Add NWL MIPI DSI host controller support To: =?UTF-8?Q?Guido_G=c3=bcnther?= , 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 From: Andrzej Hajda Message-ID: Date: Mon, 23 Sep 2019 12:01:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0iTYRjt/W77tBafU9uTBeUoKMkyiHihiKJ+vAVR9CPsIjbzY0luxZZm RWTUzFulViunpJSSmV2cl7QL1NLmksyspV1sEwfa1VJnaM5yfov8d57znPM+58DL04obXBif oDsg6nXqRBUXyNQ+HW6JDLqUHhPV0xSBfx7vYvHpFjuFvXlPZfhPbS6NixpaWPza08fhLscm 7Pj1icb2rw4Gl1+oZ3BGbokMOz2NCFu637A4c+Q6jV/dK+RwaftLClvP7MCPi6wsNj5skGHv XQuDy4ZrEO6tVq6eQSouVyDyeyQPkb4Oo4w8HCpmSL25U0YK0vNZYinP4EhTThtFPrx5wJG7 Qy6WOLNsFKkqOUYqv9dR5Kw3ipSYHBwxZ9WizYrtgSvjxcSEZFG/ZNWuwD15d16w+2+9p1IK PhUyqejGeSoTBfAgLIM+UyudiQJ5hVCG4Gp3L5KGQQTnWgdl0jCAoDLT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BVLKFSokV4aq 5IqQcPUmZZgsKDLiIJ+SlMEbgiLj5YlF9U/otBtvicNlo+WUCVwtJizAi4VcKCx5OkVZwCJW wtUAOHP+IeMJpLC18gvp0T7QNWBhPKUxAB+9ss0GLOvD7YL29wFzvi/Xw8CZ/NZ/pT4Aa2pv gjma4dZDd+Pr+aliLhKOjEzNr6a4NfBG+2NqTvtxe+B9uxV4Ot6wu3R43vfidkOX7eV8n+TW QVdFH+nRK+GJ5rJ/WgrfDFcSBcDbugC3LkCsCxDrAuQSoOqAL58u6BJ0glIuaHRCemqCXKvX 2cDsv7Q4fzbZgWUi2gE4FsiWiL825KgltCZDyNQ5AGRJma/YFnhaLREf1GRm8QZ9nCE9hRcc IGz2uELS30+rn/2+VGOcIkwRjlSK8JDwkI1IJhWbufZ9Ei5BY+STeT6NN/znCNbL3wSKDzR+ fOOQOr8OqtMO+Vf4Tceui3aZBk6GyAJXhCo7fVRHR/dHjeuqlve05nTGdLFDJ5NdAQ2J7uJh U8EZ5x5tthAt2Ks2xA73BmatvewzPeiq33pszJyzsynmedSJ8SObV5wftSzdhpkhdnsXGZ+R uTg013y9+vtibfb24HurdTJKSNQoAkmDoPkLyFzYUEUDAAA= X-CMS-MailID: 20190923100153eucas1p154a8d1178ae13d3f97c4eea1dbdc048d X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190922164727epcas4p3da05d770057f57cbf00d8dfd01ae06b6 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190922164727epcas4p3da05d770057f57cbf00d8dfd01ae06b6 References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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