From patchwork Thu Nov 19 03:35:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 7656041 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7A2B49F1C2 for ; Thu, 19 Nov 2015 08:51:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 47081203F3 for ; Thu, 19 Nov 2015 08:51:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C496C20431 for ; Thu, 19 Nov 2015 08:51:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D22816E8F8; Thu, 19 Nov 2015 00:51:43 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ig0-f193.google.com (mail-ig0-f193.google.com [209.85.213.193]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E5166E894 for ; Wed, 18 Nov 2015 19:38:14 -0800 (PST) Received: by igbf6 with SMTP id f6so6912896igb.0 for ; Wed, 18 Nov 2015 19:38:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YrKAA5yfNhnqCAXqJYBQ8cz+Ck2qyeX2IEOLiYIjxQY=; b=khbNQMy9WTZ/MCnoRmHTY/IC80jS7VOX61ZxST7V4tT7xY+AzX7ljsefdu6sVUFQ8K LNlrMwMs2ZRP69a2ArWyBONJQkfcVZuIDXmpry2K2vUoN91kafqRNe28/cnrS+4kdP2t xKkN1Clp22cUsrCoGMuPmVUROBChwgBIvGtBD5Bj+Mos55SlXbHLhv+K1f//IEfGU3+S qb8UvsX8mtmZMMlPfM5+ggFJO38ZpNjaGHtabml9Tb+N29Ay5QSsfYoxMxsgycK3Zq6c SfsT0+BgjljX7DSH5W2+bRegrVCPSSdNsKTi+mpDgJXQHs34AwiFVXKOV1vB1RZ1DXMU 7S9g== X-Received: by 10.50.62.20 with SMTP id u20mr6889758igr.26.1447904293952; Wed, 18 Nov 2015 19:38:13 -0800 (PST) Received: from localhost.localdomain ([45.74.60.49]) by smtp.gmail.com with ESMTPSA id n3sm11392131iga.0.2015.11.18.19.37.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Nov 2015 19:38:12 -0800 (PST) From: Chris Zhong To: heiko@sntech.de, linux-rockchip@lists.infradead.org, Mark Yao Subject: [PATCH v3 06/12] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver Date: Thu, 19 Nov 2015 11:35:24 +0800 Message-Id: <1447904131-29328-7-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1447904131-29328-1-git-send-email-zyw@rock-chips.com> References: <1447904131-29328-1-git-send-email-zyw@rock-chips.com> X-Mailman-Approved-At: Thu, 19 Nov 2015 00:51:42 -0800 Cc: Vincent Palatin , Andrew Bresticker , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andy Yan , Chris Zhong , Russell King , Thierry Reding , Ajay Kumar X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP add Synopsys DesignWare MIPI DSI host controller driver support. Signed-off-by: Chris Zhong --- Changes in v3: None Changes in v2: None drivers/gpu/drm/bridge/Kconfig | 11 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/dw_mipi_dsi.c | 1055 ++++++++++++++++++++++++++++++++++ include/drm/bridge/dw_mipi_dsi.h | 27 + 4 files changed, 1094 insertions(+) create mode 100644 drivers/gpu/drm/bridge/dw_mipi_dsi.c create mode 100644 include/drm/bridge/dw_mipi_dsi.h diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 6dddd39..c0900e0 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -22,6 +22,17 @@ config DRM_DW_HDMI_AHB_AUDIO Designware HDMI block. This is used in conjunction with the i.MX6 HDMI driver. +config DRM_DW_MIPI_DSI + tristate "Synopsys DesignWare MIPI DSI host controller bridge" + depends on DRM + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL + help + Choose this if you want to use the Synopsys DesignWare MIPI DSI host + controller bridge. If M is selected, the module will be + called dw_mipi_dsi. DRM_MIPI_DSI support is required for this driver + to work. config DRM_NXP_PTN3460 tristate "NXP PTN3460 DP/LVDS bridge" diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index d4e28be..d908c4b 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -2,5 +2,6 @@ ccflags-y := -Iinclude/drm obj-$(CONFIG_DRM_DW_HDMI) += dw_hdmi.o obj-$(CONFIG_DRM_DW_HDMI_AHB_AUDIO) += dw_hdmi-ahb-audio.o +obj-$(CONFIG_DRM_DW_MIPI_DSI) += dw_mipi_dsi.o obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o diff --git a/drivers/gpu/drm/bridge/dw_mipi_dsi.c b/drivers/gpu/drm/bridge/dw_mipi_dsi.c new file mode 100644 index 0000000..442fc7c --- /dev/null +++ b/drivers/gpu/drm/bridge/dw_mipi_dsi.c @@ -0,0 +1,1055 @@ +/* + * Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include +#include +#include +#include