From patchwork Wed Feb 12 11:31:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 3637551 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DB3B29F3B2 for ; Wed, 12 Feb 2014 11:33:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D917620127 for ; Wed, 12 Feb 2014 11:33:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4324E201FA for ; Wed, 12 Feb 2014 11:32:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbaBLLc0 (ORCPT ); Wed, 12 Feb 2014 06:32:26 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:19351 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752622AbaBLLcZ (ORCPT ); Wed, 12 Feb 2014 06:32:25 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N0V00EUKS201QA0@mailout3.w1.samsung.com>; Wed, 12 Feb 2014 11:32:24 +0000 (GMT) X-AuditID: cbfec7f4-b7f796d000005a13-ef-52fb5bc7e79f Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 2B.A7.23059.7CB5BF25; Wed, 12 Feb 2014 11:32:23 +0000 (GMT) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N0V00CLBS14OO70@eusync2.samsung.com>; Wed, 12 Feb 2014 11:32:23 +0000 (GMT) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org Cc: Andrzej Hajda , Mark Rutland , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Pawel Moll , Ian Campbell , Kyungmin Park , Rob Herring , Kumar Gala , Grant Likely , Sean Paul , Marek Szyprowski Subject: [RFC PATCH v2 08/21] drm/panel: add TC358764 driver Date: Wed, 12 Feb 2014 12:31:15 +0100 Message-id: <1392204688-4591-9-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.8.3.2 In-reply-to: <1392204688-4591-1-git-send-email-a.hajda@samsung.com> References: <1392204688-4591-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrBLMWRmVeSWpSXmKPExsVy+t/xK7rHo38HGUx6YWBxa905Vov5R4DE la/v2Sz63yxktTjwZwejxblXKxktzja9YbeYcX4fk8XaI3fZLZZev8hkMWH6WhaL1r1H2C3u bjjL6MDrsWbeGkaP2Q0XWTwu9/Uyeaxc/oXNY9OqTjaPO9f2sHnc7z7O5NG3ZRWjx+dNcgGc UVw2Kak5mWWpRfp2CVwZC47eZS3YVVExf/pJlgbGO0ldjJwcEgImEm8Wv2CDsMUkLtxbD2Rz cQgJLGWUWH96LyuE08ckcebxNxaQKjYBTYm/m2+CdYgIKEv8nbiKEaSIWeAMs8S1txPAEsIC NhLvLiwGs1kEVCVurXnCBGLzCjhJbGs6xgSxTkFi2Ze1zF2MHBycAs4Sh7t1QMJCQCVbp99j nMDIu4CRYRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSOh+2cG4+JjVIUYBDkYlHl4Gz19B QqyJZcWVuYcYJTiYlUR4g6J+BwnxpiRWVqUW5ccXleakFh9iZOLglGpgFD+3tDn2imFrbF1g 9qqWv5IrKjJWdq1zf3lj+Ur549fsDhw7cSDZoGWy7JFpsvfPPhF009b92eSg66stflM79dB8 16fMNrLnDnQritcxKbnbhWzi+LbEtsxpSefXkjccKiVnhfWXdvRxCQd9/mtpcsitri5WM3eZ zyW5Y468DpqPZyrE3i1VYinOSDTUYi4qTgQA6ss+BjsCAAA= 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=-4.5 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, 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 The patch adds driver for Toshiba DSI/LVDS TC358764 bridge. Driver registers itself as mipi_dsi_driver. It is exposed to the system via drm_panel interface, it uses also drm_panel framework to interact with LVDS panel connected to it. Driver supports only DT bindings. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-tc358764.c | 505 +++++++++++++++++++++++++++++++++ 3 files changed, 513 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-tc358764.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 7527557..b98a485 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -23,4 +23,11 @@ config DRM_PANEL_S6E8AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_TC358764 + tristate "TC358764 DSI/LVDS bridge" + 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 181265b..7cbb0cf 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,2 +1,3 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_TC358764) += panel-tc358764.o diff --git a/drivers/gpu/drm/panel/panel-tc358764.c b/drivers/gpu/drm/panel/panel-tc358764.c new file mode 100644 index 0000000..f9c1289 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-tc358764.c @@ -0,0 +1,505 @@ +/* + * TC358764 MIPI-DSI to LVDS bridge panel driver. + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd + * + * Andrzej Hajda + * + * 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 + +#include