From patchwork Fri Nov 20 08:15:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 7665141 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6DF0BBF90C for ; Fri, 20 Nov 2015 08:17:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3022F20494 for ; Fri, 20 Nov 2015 08:17:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3572220498 for ; Fri, 20 Nov 2015 08:17:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C4786EA56; Fri, 20 Nov 2015 00:16:59 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ig0-f196.google.com (mail-ig0-f196.google.com [209.85.213.196]) by gabe.freedesktop.org (Postfix) with ESMTPS id BD9786EA56 for ; Fri, 20 Nov 2015 00:16:57 -0800 (PST) Received: by igbgg5 with SMTP id gg5so810511igb.2 for ; Fri, 20 Nov 2015 00:16:57 -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=UZTWYAzw/mQlgtqNiyA9kNNpgkwNvRPrmVgalC+brZQ=; b=VJqwQ/YJSeXfoj4W6wT1xff08JfukguWct0tbL/u3HGBvSfsUFWFFMOe4dL27wLNXC ljf7xsKF8VwKAW5EAuVIDMQlnGllfL6i2ROS9ahHNwjtLtN84m6tEc8jsZ7e80pxo5hw 6ffo9zV3PKpnUXvYSHvaHsSVn7GZO/ZVcfPL1p2Mdq+Oe9JK/SAJNS5cDj7/XBzaxeUT 6fyb2aB6i57vhHA37AtBWUqePiXiUzZvFdrfvLchg7qxYGJyAzG7YvzTR1Gcv6+pygKl MU1tEosq3nQzL73LgB76MkGI/F6wKGA/wrlTwYmz1fV4uU4Q5BEPIp3qy2565yBQu5pq lPdg== X-Received: by 10.50.18.44 with SMTP id t12mr623556igd.12.1448007417247; Fri, 20 Nov 2015 00:16:57 -0800 (PST) Received: from localhost.localdomain ([45.74.60.24]) by smtp.gmail.com with ESMTPSA id b10sm696026igx.19.2015.11.20.00.16.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Nov 2015 00:16:56 -0800 (PST) From: Chris Zhong To: heiko@sntech.de, linux-rockchip@lists.infradead.org, mark.yao@rock-chips.com, treding@nvidia.com, emil.l.velikov@gmail.com Subject: [PATCH v4 06/13] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver Date: Fri, 20 Nov 2015 16:15:32 +0800 Message-Id: <1448007339-10966-7-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448007339-10966-1-git-send-email-zyw@rock-chips.com> References: <1448007339-10966-1-git-send-email-zyw@rock-chips.com> Cc: Vincent Palatin , Andrew Bresticker , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andy Yan , Chris Zhong , rmk+kernel@arm.linux.org.uk, ajaykumar.rs@samsung.com, Rahul Sharma 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 v4: eliminate some warnning 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 | 1056 ++++++++++++++++++++++++++++++++++ include/drm/bridge/dw_mipi_dsi.h | 27 + 4 files changed, 1095 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..23b612d --- /dev/null +++ b/drivers/gpu/drm/bridge/dw_mipi_dsi.c @@ -0,0 +1,1056 @@ +/* + * 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