From patchwork Tue Jan 27 01:48:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyungwon Hwang X-Patchwork-Id: 5714111 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 D1C9DC058D for ; Tue, 27 Jan 2015 01:49:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1CC2720160 for ; Tue, 27 Jan 2015 01:48:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5C1C12015A for ; Tue, 27 Jan 2015 01:48:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 75ED06E2C4; Mon, 26 Jan 2015 17:48:55 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id C18B36E2C4 for ; Mon, 26 Jan 2015 17:48:53 -0800 (PST) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NIT00876BPG1D40@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 27 Jan 2015 10:48:52 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.115]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 35.0A.19034.48EE6C45; Tue, 27 Jan 2015 10:48:52 +0900 (KST) X-AuditID: cbfee691-f79b86d000004a5a-0b-54c6ee84d60d Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 37.A3.09430.38EE6C45; Tue, 27 Jan 2015 10:48:51 +0900 (KST) Received: from localhost.localdomain ([10.252.82.145]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NIT00GKIBPA6FJ0@mmp1.samsung.com>; Tue, 27 Jan 2015 10:48:51 +0900 (KST) From: Hyungwon Hwang To: dri-devel@lists.freedesktop.org, thierry.reding@gmail.com Subject: [PATCH v3] drm/panel: add s6e3ha2 AMOLED panel driver Date: Tue, 27 Jan 2015 10:48:32 +0900 Message-id: <1422323312-13306-1-git-send-email-human.hwang@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMLMWRmVeSWpSXmKPExsWyRsSkWLfl3bEQg6OTeS2un7ezuPL1PZvF 0hl9rBaT7k9gsTj+6SCLxc9d81gc2Dx2zrrL7nG/+ziTR9+WVYwBzFFcNimpOZllqUX6dglc GccW72QseN3CWNEwL6WBcXJ+FyMnh4SAicSnK7OZIGwxiQv31rOB2EICSxkl+o8VwdR8vn0T qIYLKL6IUeLNj83sEE4bk8SMBfsZQarYBPQkFlz7AZTg4BARsJU4NCcTpIZZYB6jxLxZ+8A2 CAvYSRzc8QpsA4uAqkTX1KusIDavgLvEtuP7WCC2yUmcPDaZFcJ+zSax8F8gRL2AxLfJh1hA 5ksIyEpsOsAMUSIpcXDFDZYJjIILGBlWMYqmFiQXFCelF5nqFSfmFpfmpesl5+duYgSG5el/ zybuYLx/wPoQowAHoxIP74abx0KEWBPLiitzDzGaAm2YyCwlmpwPDP68knhDYzMjC1MTU2Mj c0szJXFeHemfwUIC6YklqdmpqQWpRfFFpTmpxYcYmTg4pRoYV+wTfP0t01PszfYvJccWb5eN 2cQVNXt5R2lOS/Nvpfv1Wv9Dg94vOTYtsXrZzxsxP/vlJ14zu2P1UFe5+WG5vsqZ9+91Ux+Y fetxNpgudYUxQ1MilFGRWU67a1/iZjul+98Fr5x+5xvZ0Liz9Mpri01H8muPqF9vP151sbv+ shCHcWhQlZSWEktxRqKhFnNRcSIAwA7DDUYCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPLMWRmVeSWpSXmKPExsVy+t9jAd3md8dCDK6csLa4ft7O4srX92wW S2f0sVpMuj+BxeL4p4MsFj93zWNxYPPYOesuu8f97uNMHn1bVjEGMEc1MNpkpCampBYppOYl 56dk5qXbKnkHxzvHm5oZGOoaWlqYKynkJeam2iq5+AToumXmAC1WUihLzCkFCgUkFhcr6dth mhAa4qZrAdMYoesbEgTXY2SABhLWMGYcW7yTseB1C2NFw7yUBsbJ+V2MnBwSAiYSn2/fZIKw xSQu3FvP1sXIxSEksIhR4s2PzewQThuTxIwF+xlBqtgE9CQWXPsBlODgEBGwlTg0JxOkhllg HqPEvFn7wCYJC9hJHNzxig3EZhFQleiaepUVxOYVcJfYdnwfC8Q2OYmTxyazTmDkXsDIsIpR NLUguaA4KT3XSK84Mbe4NC9dLzk/dxMjOPCfSe9gXNVgcYhRgINRiYd3w81jIUKsiWXFlbmH GCU4mJVEeCefAArxpiRWVqUW5ccXleakFh9iNAXaPpFZSjQ5HxiVeSXxhsYmZkaWRuaGFkbG 5krivEr2bSFCAumJJanZqakFqUUwfUwcnFINjLZHDu7Lcyq8YaCYcuZ2fsnj+hibtTbL8vev CzsawGzUsDyK/W2vz7wNE3/rfXiX+HD99KnzspXKz3bpaLA7bfYyrK26PN87uGHS/0N1J0xt NtXvjywQOrR+45qclw4vghX+7tJTY38fymmc9ymwwD0kqfb2zp7b685M/6BjJPlt4ecwju+S V5RYijMSDbWYi4oTAaA1gSmSAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: Sangbae Lee , Donghwa Lee , Hyungwon Hwang 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 From: Donghwa Lee This patch adds MIPI-DSI based S6E3HA2 panel driver. This panel has 1440x2560 resolution in 5.7-inch physical panel. Signed-off-by: Donghwa Lee Signed-off-by: Hyungwon Hwang Cc: Inki Dae Cc: Sangbae Lee --- Changes for v2: - Fix errata in documentation and source code comments Changes for v3: - Remove the term LCD to clarify the sort of this panel - Rename lcd-en-gpios to panel-en-gpios to clarify the sort of this panel - Fix errata in documentation and source code comments .../devicetree/bindings/panel/samsung,s6e3ha2.txt | 49 ++ drivers/gpu/drm/panel/Kconfig | 6 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-s6e3ha2.c | 513 +++++++++++++++++++++ 4 files changed, 569 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt create mode 100644 drivers/gpu/drm/panel/panel-s6e3ha2.c -- 1.9.1 diff --git a/Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt b/Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt new file mode 100644 index 0000000..5210926 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt @@ -0,0 +1,49 @@ +Samsung S6E3HA2 5.7" 1440x2560 AMOLED panel + +Required properties: + - compatible: "samsung,s6e3ha2" + - reg: the virtual channel number of a DSI peripheral + - vdd3-supply: core voltage supply + - vci-supply: voltage supply for analog circuits + - reset-gpios: a GPIO spec for the reset pin + - panel-en-gpios: a GPIO spec for the panel enable pin + - te-gpios: a GPIO spec for the tearing effect synchronization signal gpio pin + +Optional properties: + - display-timings: timings for the connected panel as described by [1] + - panel-width-mm: physical panel width [mm] + - panel-height-mm: physical panel height [mm] + +The device node can contain one 'port' child node with one child +'endpoint' node, according to the bindings defined in [2]. This +node should describe panel's video bus. + +[1]: Documentation/devicetree/bindings/video/display-timing.txt +[2]: Documentation/devicetree/bindings/media/video-interfaces.txt + +Example: + +panel@0 { + compatible = "samsung,s6e3ha2"; + reg = <0>; + vdd3-supply = <&ldo27_reg>; + vci-supply = <&ldo28_reg>; + reset-gpios = <&gpg0 0 0>; + panel-en-gpios = <&gpf1 5 0>; + te-gpios = <&gpf1 3 1>; + panel-width-mm = <71>; + panel-height-mm = <125>; + + display-timings { + timing-0 { + clock-frequency = <0>; + hactive = <1440>; + vactive = <2560>; + hfront-porch = <1>; + hback-porch = <1>; + hsync-len = <1>; + vfront-porch = <1>; + vback-porch = <15>; + vsync-len = <1>; + }; + }; diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index dec60b2..451b5f3 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -46,4 +46,10 @@ config DRM_PANEL_S6E63J0X03 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_S6E3HA2 + tristate "S6E3HA2 DSI video mode 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 6467be7..7bd7b84 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -3,3 +3,4 @@ obj-$(CONFIG_DRM_PANEL_LD9040) += panel-ld9040.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o obj-$(CONFIG_DRM_PANEL_S6E63J0X03) += panel-s6e63j0x03.o obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o +obj-$(CONFIG_DRM_PANEL_S6E3HA2) += panel-s6e3ha2.o diff --git a/drivers/gpu/drm/panel/panel-s6e3ha2.c b/drivers/gpu/drm/panel/panel-s6e3ha2.c new file mode 100644 index 0000000..af22bdc --- /dev/null +++ b/drivers/gpu/drm/panel/panel-s6e3ha2.c @@ -0,0 +1,513 @@ +/* + * MIPI-DSI based s6e3ha2 AMOLED 5.7 inch panel driver. + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * + * Donghwa Lee + * + * 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 + +#include