From patchwork Fri Jan 23 08:03:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyungwon Hwang X-Patchwork-Id: 5691391 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 591ACC058D for ; Fri, 23 Jan 2015 08:03:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCEDB20149 for ; Fri, 23 Jan 2015 08:03:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E86062012E for ; Fri, 23 Jan 2015 08:03:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A20D06E4A1; Fri, 23 Jan 2015 00:03:28 -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 6F5C66E4A1 for ; Fri, 23 Jan 2015 00:03:26 -0800 (PST) Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NIM0036QEDPMN20@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 23 Jan 2015 17:03:25 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.113]) by epcpsbgr4.samsung.com (EPCPMTA) with SMTP id 47.FD.18167.A4002C45; Fri, 23 Jan 2015 17:03:22 +0900 (KST) X-AuditID: cbfee690-f79ab6d0000046f7-06-54c2004adbad Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2F.8F.20081.A4002C45; Fri, 23 Jan 2015 17:03:22 +0900 (KST) Received: from localhost.localdomain ([10.252.82.145]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NIM00HOWEDHK630@mmp2.samsung.com>; Fri, 23 Jan 2015 17:03:22 +0900 (KST) From: Hyungwon Hwang To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/panel: add s6e3ha2 LCD panel driver Date: Fri, 23 Jan 2015 17:03:15 +0900 Message-id: <1422000195-11839-1-git-send-email-human.hwang@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDLMWRmVeSWpSXmKPExsWyRsSkUNeL4VCIwYY/NhbXz9tZXPn6ns1i 6Yw+VotJ9yewWBz/dJDFgdXjfvdxJo++LasYA5iiuGxSUnMyy1KL9O0SuDK2L+tlLPjWxFix ZIVsA+OJ3C5GTg4JAROJTV92MkPYYhIX7q1n62Lk4hASWMoo8frCZRaYopcr5jFDJKYzSlxc MZUJwmljkmje9Z0JpIpNQE9iwbUf7CC2iICyxN+JqxhBipgFJjNKdO/tAEsIC1hIPF55GKyB RUBV4smzi4wgNq+Au8THHdfYINbJSZw8NpkVpFlC4DabxL+bEAkWAQGJb5MPAd3EAZSQldh0 AOpuSYmDK26wTGAUXMDIsIpRNLUguaA4Kb3IRK84Mbe4NC9dLzk/dxMjMBBP/3s2YQfjvQPW hxgFOBiVeHgbthwMEWJNLCuuzD3EaAq0YSKzlGhyPjDc80riDY3NjCxMTUyNjcwtzZTEeV9L /QwWEkhPLEnNTk0tSC2KLyrNSS0+xMjEwSnVwNh1wu4mmyL7dHmRPWq2G32/1gW/UG2/Et2Z eedmjvrlj8s8vRPagmJ09pjGHPTt0nT5uZR1T1XSL86l/GX3bmfGC6l3Tgj4OIk1VTBrzpOd s6bND2O7EHv624dqZlH3Gxa3/Wfc7v0ml7nVYMX0KyvNrl1bOSl25lrV+WzhAlkzTwRzfQn/ lKbEUpyRaKjFXFScCAB/6sT6PwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGLMWRmVeSWpSXmKPExsVy+t9jQV0vhkMhBq9u61pcP29nceXrezaL pTP6WC0m3Z/AYnH800EWB1aP+93HmTz6tqxiDGCKamC0yUhNTEktUkjNS85PycxLt1XyDo53 jjc1MzDUNbS0MFdSyEvMTbVVcvEJ0HXLzAFap6RQlphTChQKSCwuVtK3wzQhNMRN1wKmMULX NyQIrsfIAA0krGHM2L6sl7HgWxNjxZIVsg2MJ3K7GDk5JARMJF6umMcMYYtJXLi3nq2LkYtD SGA6o8TFFVOZIJw2JonmXd+ZQKrYBPQkFlz7wQ5iiwgoS/yduIoRpIhZYDKjRPfeDrCEsICF xOOVh8EaWARUJZ48u8gIYvMKuEt83HGNDWKdnMTJY5NZJzByL2BkWMUomlqQXFCclJ5rqFec mFtcmpeul5yfu4kRHObPpHYwrmywOMQowMGoxMPbsOVgiBBrYllxZe4hRgkOZiUR3rgvQCHe lMTKqtSi/Pii0pzU4kOMpkDbJzJLiSbnA2MwryTe0NjEzMjSyNzQwsjYXEmcV8m+LURIID2x JDU7NbUgtQimj4mDU6qB0faB/+XsFMW5z14kT45Vav/FsIflh8Xc80FPgqbO3DO5xYLlWtdZ 3dvd4V83/jU4eyyxQr+Dp/vkosZH7NlZWk23O74fuMVyXmr/XXbGTYe+MKg+jjq/NzD1dMf1 z33TfnhVnWM0SJgcbNBWKtth+0PylOHDL/66ji8PRTFo71X+9Jnvzqw7+kosxRmJhlrMRcWJ ALNuKviJAgAA 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. This panel was selected for Galaxy Note 4. Signed-off-by: Donghwa Lee Signed-off-by: Hyungwon Hwang Cc: Inki Dae Cc: Sangbae Lee --- .../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 diff --git a/Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt b/Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt new file mode 100644 index 0000000..098089b --- /dev/null +++ b/Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt @@ -0,0 +1,49 @@ +Samsung S6E63J0X03 1.63" 320x320 TFT LCD panel + +Required properties: + - compatible: "samsung,s6e63j0x03" + - 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 + - lcd-en-gpios: a GPIO spec for the LCD 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>; + lcd-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..9664b72 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-s6e3ha2.c @@ -0,0 +1,513 @@ +/* + * MIPI-DSI based s6e3ha2 AMOLED LCD 5.3 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