From patchwork Sat Oct 10 09:55:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zhong X-Patchwork-Id: 7380891 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 54FDFBEEA4 for ; Tue, 13 Oct 2015 02:20:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B392C20991 for ; Tue, 13 Oct 2015 02:20:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0D62F20995 for ; Tue, 13 Oct 2015 02:20:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FC8F720ED; Mon, 12 Oct 2015 19:19:43 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE9CC6E812 for ; Sat, 10 Oct 2015 02:56:34 -0700 (PDT) Received: by padhy16 with SMTP id hy16so109099459pad.1 for ; Sat, 10 Oct 2015 02:56:34 -0700 (PDT) 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=FYboFAVxckbeON9a+EFOtteqcZB2GZDKSEeTLx9/KFE=; b=PgKVBElY8kupftejdHpTAtZSO6rkRsZZXe+litqo7cEhW+iwIvZydHoRNBTDAtPj0S iDSoz5pS1e19nbwHtCtaIhORtZNugGuUNL6pT2GxcBpOOFHrpybBWjAmDYSoznpCD0F0 aU7YykC3N1HOrVWMve4MpcbWNjX08SA9qbd5qydp++3zJ91rxxmvuxTE82kHrXx//SQJ POdbVXvso4nr5jHFCtvEcVHbZwxsuTkEIKqPgG8hztLevfY7ddTT8Zo6Rvr3yUe7O+WB ZQvfbj1TDkotGVaxxmCNj2hLOM84tdTeMH/7qtXrJn3RyuUGQG0iFcVr0KXGcu0Kwoly aPuw== X-Received: by 10.68.225.138 with SMTP id rk10mr20941988pbc.121.1444470994550; Sat, 10 Oct 2015 02:56:34 -0700 (PDT) Received: from localhost.localdomain ([192.253.240.50]) by smtp.gmail.com with ESMTPSA id wi10sm7235351pbc.31.2015.10.10.02.56.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 10 Oct 2015 02:56:33 -0700 (PDT) From: Chris Zhong To: heiko@sntech.de, linux-rockchip@lists.infradead.org Subject: [PATCH 05/10] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver Date: Sat, 10 Oct 2015 17:55:25 +0800 Message-Id: <1444470930-17150-6-git-send-email-zyw@rock-chips.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1444470930-17150-1-git-send-email-zyw@rock-chips.com> References: <1444470930-17150-1-git-send-email-zyw@rock-chips.com> X-Mailman-Approved-At: Mon, 12 Oct 2015 19:19:40 -0700 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 --- drivers/gpu/drm/bridge/Kconfig | 10 + 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, 1093 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 2de52a5..9d1bd04 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -11,6 +11,16 @@ config DRM_DW_HDMI tristate select DRM_KMS_HELPER +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. + 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 e2eef1c..6f22942 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -1,5 +1,6 @@ ccflags-y := -Iinclude/drm obj-$(CONFIG_DRM_DW_HDMI) += dw_hdmi.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..c30e0ca --- /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