From patchwork Sun Apr 27 01:50:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 4070131 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EAFC8BFF02 for ; Sun, 27 Apr 2014 01:50:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 728982021A for ; Sun, 27 Apr 2014 01:50:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1F9C2022A for ; Sun, 27 Apr 2014 01:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752664AbaD0Buy (ORCPT ); Sat, 26 Apr 2014 21:50:54 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:18659 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752699AbaD0BuU (ORCPT ); Sat, 26 Apr 2014 21:50:20 -0400 Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4O00FVG2FSJO80@mailout2.samsung.com>; Sun, 27 Apr 2014 10:50:17 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.42]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id F1.7C.09952.8526C535; Sun, 27 Apr 2014 10:50:16 +0900 (KST) X-AuditID: cbfee690-b7fcd6d0000026e0-b5-535c62584791 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 74.02.27725.8526C535; Sun, 27 Apr 2014 10:50:16 +0900 (KST) Received: from localhost.localdomain ([10.252.75.90]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4O008HN2FOD450@mmp1.samsung.com>; Sun, 27 Apr 2014 10:50:15 +0900 (KST) From: YoungJun Cho To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux-samsung-soc@vger.kernel.org, thierry.reding@gmail.com, kyungmin.park@samsung.com, inki.dae@samsung.com, kgene.kim@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, a.hajda@samsung.com, laurent.pinchart@ideasonboard.com Subject: [RFC v3 PATCH v4 12/16] drm/panel: add S6E3FA0 driver Date: Sun, 27 Apr 2014 10:50:08 +0900 Message-id: <1398563412-21781-13-git-send-email-yj44.cho@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1398563412-21781-1-git-send-email-yj44.cho@samsung.com> References: <1398563412-21781-1-git-send-email-yj44.cho@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsVy+t8zLd2IpJhgg+X/dSxurTvHatF77iST xfwjQNaVr+/ZLPrfLGS1OPdqJaPFpPsTWCxe3LvIYtG74CqbxdmmN+wWnROXsFvMOL+PyWLp 9YtMFhOmr2WxaN17BCg2+SWbxc9d81gcBD3WzFvD6HG5r5fJY+esu+weK5d/YfOY3TGT1WPT qk42j+3fHrB63O8+zuTRt2UVo8fnTXIBXFFcNimpOZllqUX6dglcGfPvvmArmDCVseLoui2s DYy3q7sYOTkkBEwknqw9zwphi0lcuLeerYuRi0NIYBmjxKSX91i6GDnAiqZ3xULEFzFKrPv2 kBHCaWWSaGtZzQLSzSagKfH84w6wSSICphIdk5aygBQxC3QyS3y5P5cJJC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ihOSs811CtOzC0uzUvXS87P3cQIju5nUjsYVzZYHGIU4GBU4uFdIBkTLMSa WFZcmXuIUYKDWUmEt9MLKMSbklhZlVqUH19UmpNafIgxGeioicxSosn5wMSTVxJvaGxiZmRp ZGZsYm5sTJqwkjjvgVbrQCGB9MSS1OzU1ILUIpgtTBycUg2Mi/P5WvOKfkQdzVOZFdB0p0BD dNt5rRvaqYwx57Krv//69VGTvcSg4aWCVPgh+7r7Oa4hgjun2z6Syd1/zDmiZoKjk8Jt14Lb W3LP2gYlyAvuNNvfuyDlh9Gl9tcei+t1J885sWylR0rUZKU53bFf1mxR59USXhdZdmZiy//m X5KcDh28GTVKLMUZiYZazEXFiQCuSgWHMgMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 This patch adds MIPI-DSI command mode based S6E3FA0 AMOLED LCD Panel driver. Changelog v2: - Declares delay, size properties in probe routine instead of DT Changelog v3: - Moves CPU timings relevant properties from FIMD DT (commented by Laurent Pinchart, Andrzej Hajda) Changelog v4: - Enhances readability, vddm readi failure case and removes duplicated power off (commented by Andrzej Hajda) Signed-off-by: YoungJun Cho Acked-by: Inki Dae Acked-by: Kyungmin Park --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-s6e3fa0.c | 595 +++++++++++++++++++++++++++++++++ 3 files changed, 603 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-s6e3fa0.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 4ec874d..be1392e 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -30,4 +30,11 @@ config DRM_PANEL_S6E8AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_S6E3FA0 + tristate "S6E3FA0 DSI command mode panel" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 8b92921..85c6738 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,3 +1,4 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_LD9040) += panel-ld9040.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_S6E3FA0) += panel-s6e3fa0.o diff --git a/drivers/gpu/drm/panel/panel-s6e3fa0.c b/drivers/gpu/drm/panel/panel-s6e3fa0.c new file mode 100644 index 0000000..ca0cc6b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-s6e3fa0.c @@ -0,0 +1,595 @@ +/* + * MIPI-DSI based s6e3fa0 AMOLED LCD 5.7 inch panel driver. + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * + * YoungJun Cho + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include + +#include +#include + +#include