From patchwork Thu Mar 7 10:30:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 10842643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E9821575 for ; Thu, 7 Mar 2019 10:31:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B7662E5A1 for ; Thu, 7 Mar 2019 10:31:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FBF12E5A4; Thu, 7 Mar 2019 10:31:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 073072E5A1 for ; Thu, 7 Mar 2019 10:31:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 53DDF6E27F; Thu, 7 Mar 2019 10:31:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id E2A9A6E27F for ; Thu, 7 Mar 2019 10:30:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 01F81FB05; Thu, 7 Mar 2019 11:30:57 +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 ob5P3FVnMllA; Thu, 7 Mar 2019 11:30:55 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id B3E4647355; Thu, 7 Mar 2019 11:30:53 +0100 (CET) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Philipp Zabel , David Airlie , Daniel Vetter , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dri-devel@lists.freedesktop.org, Robert Chiras Subject: [PATCH 0/2] drm: imx: Add NWL MIPI DSI host controller support Date: Thu, 7 Mar 2019 11:30:51 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 core can also be found on e.g. i.MX8QXP. I added the necessary hooks to support other imx8 variants but since I only have imx8mq boards to test I omitted the platform data for other SoCs. The code is based on NXPs BSP so I added Robert Chiras as Co-authored-by but I'm happy to swap Author: and Co-authored-by: if that looks more appropriate. The most notable changes over the BSP driver are - Calculate HS mode timing from phy_configure_opts_mipi_dphy - Perform all clock setup via DT - Merge nwl-imx and nwl drivers - Add B0 silion revision quirk Posting this is likely a bit premature (hence v0) but I wanted for one show how this hooks into the mixel dphy posted earlier [1] and avoid duplicating work. So if there's other code out there doing the same I'm be happy to merge efforts. It has been tested quite bit (in a version backported to 4.18) on Librem 5 devkit using DCSS (which is not mainlined yet) and a MIPI DSI panel[2]. In principle LCDIF can also act as input source. I intend look into next so this can actually be tested without further patches on mainline kernels. [1]: https://lists.freedesktop.org/archives/dri-devel/2019-March/209680.html [2]: https://source.puri.sm/guido.gunther/linux-imx8/tree/imx8-4.18-wip-nwl-dsi-rework Guido Günther (2): dt-bindings: imx: Add binding for IMX NWL mipi dsi host controller drm/imx: Add NWL MIPI DSI host controller support .../bindings/display/imx/imx-nwl-dsi.txt | 72 ++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/nwl/Kconfig | 12 + drivers/gpu/drm/nwl/Makefile | 2 + drivers/gpu/drm/nwl/nwl-drv.c | 594 ++++++++++++++ drivers/gpu/drm/nwl/nwl-drv.h | 68 ++ drivers/gpu/drm/nwl/nwl-dsi.c | 752 ++++++++++++++++++ drivers/gpu/drm/nwl/nwl-dsi.h | 105 +++ 9 files changed, 1608 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/imx/imx-nwl-dsi.txt create mode 100644 drivers/gpu/drm/nwl/Kconfig create mode 100644 drivers/gpu/drm/nwl/Makefile create mode 100644 drivers/gpu/drm/nwl/nwl-drv.c create mode 100644 drivers/gpu/drm/nwl/nwl-drv.h create mode 100644 drivers/gpu/drm/nwl/nwl-dsi.c create mode 100644 drivers/gpu/drm/nwl/nwl-dsi.h