From patchwork Mon Jan 26 01:29:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyungwon Hwang X-Patchwork-Id: 5705901 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C1BFC9F302 for ; Mon, 26 Jan 2015 01:29:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E12A20160 for ; Mon, 26 Jan 2015 01:29:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4D43B20148 for ; Mon, 26 Jan 2015 01:29:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E54706E146; Sun, 25 Jan 2015 17:29:43 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B0876E04B for ; Sun, 25 Jan 2015 17:29:41 -0800 (PST) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NIR00KFFG5FGM90@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 26 Jan 2015 10:29:39 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.116]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 9E.FB.18484.38895C45; Mon, 26 Jan 2015 10:29:39 +0900 (KST) X-AuditID: cbfee68f-f791c6d000004834-6f-54c5988344ad Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 98.78.09430.38895C45; Mon, 26 Jan 2015 10:29:39 +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 <0NIR00D2GG5BV750@mmp2.samsung.com>; Mon, 26 Jan 2015 10:29:39 +0900 (KST) From: Hyungwon Hwang To: dri-devel@lists.freedesktop.org Subject: [PATCH v2] drm/panel: add s6e3ha2 LCD panel driver Date: Mon, 26 Jan 2015 10:29:34 +0900 Message-id: <1422235774-4418-1-git-send-email-human.hwang@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCLMWRmVeSWpSXmKPExsWyRsSkRLd5xtEQg5uftSyun7ezuPL1PZvF 0hl9rBYXptdZTLo/gcXi+KeDLA5sHjtn3WX3uN99nMmjb8sqxgDmKC6blNSczLLUIn27BK6M d7OmMhfsaGasaJkr38D4L7eLkZNDQsBEYtOLG0wQtpjEhXvr2UBsIYGljBIvjpjA1Nw4cYe1 i5ELKD6dUeLKrLnMEE4bk8Te99cYQarYBPQkFlz7wQ5iiwgoS/yduIoRpIhZYCejxIZvf1lB EsIC1hLLbvUzg9gsAqoSE15NBmvgFXCTOPhkPyvEOjmJk8cmg62TEHjOJvHn+z6oBgGJb5MP sXQxcgAlZCU2HWCGqJeUOLjiBssERsEFjAyrGEVTC5ILipPSi4z1ihNzi0vz0vWS83M3MQID 8/S/Z/07GO8esD7EKMDBqMTD29B8NESINbGsuDL3EKMp0IaJzFKiyfnA8M8riTc0NjOyMDUx NTYytzRTEuddKPUzWEggPbEkNTs1tSC1KL6oNCe1+BAjEwenVAPjKp78q4pOj1UOC9zp2B8t fHjuTjb7nizP9IrblZFnbjX/TN/muubnazaZ6x1zQ3gWckY6Lo9KkJG7qTR1S5NEbPzV5UKh 53jjr2w+3feu9uaGJx4Jtmds7At9eozqf9X9ZCgTtu+3ajZbU7DeZOmuSo13Sevrw1LuVK/N yEz60NRXUymQ0aPEUpyRaKjFXFScCAC4kR5IRwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrPLMWRmVeSWpSXmKPExsVy+t9jQd3mGUdDDA5OlLa4ft7O4srX92wW S2f0sVpcmF5nMen+BBaL458OsjiweeycdZfd4373cSaPvi2rGAOYoxoYbTJSE1NSixRS85Lz UzLz0m2VvIPjneNNzQwMdQ0tLcyVFPISc1NtlVx8AnTdMnOA9ioplCXmlAKFAhKLi5X07TBN CA1x07WAaYzQ9Q0JgusxMkADCWsYM97NmspcsKOZsaJlrnwD47/cLkZODgkBE4kbJ+6wQthi EhfurWfrYuTiEBKYzihxZdZcZginjUli7/trjCBVbAJ6Eguu/WAHsUUElCX+TlzFCFLELLCT UWLDt79go4QFrCWW3epnBrFZBFQlJryaDNbAK+AmcfDJfqh1chInj01mncDIvYCRYRWjaGpB ckFxUnqukV5xYm5xaV66XnJ+7iZGcOA/k97BuKrB4hCjAAejEg+vRuPRECHWxLLiytxDjBIc zEoivOVTgEK8KYmVValF+fFFpTmpxYcYTYG2T2SWEk3OB0ZlXkm8obGJmZGlkbmhhZGxuZI4 r5J9W4iQQHpiSWp2ampBahFMHxMHp1QD40rBGplC09jJ3wtO+LzljNDbxOwx5Ve4ebro9+Nb Fk0/5WyXUCOv5Z6eeKxaxad/8UbuhYfMnTOCg/y/mzKXHd0199PB6ZW21xXajzHMmVYq9lch 2spBYUlH5IrvqT8LrPl3dVvZ7S1Nt1/3+eBpN4eIrdderLh8J6WgWWrdRnOlA+lpgs72SizF GYmGWsxFxYkAQ+NgQ5ICAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: Sangbae Lee , Donghwa Lee , Hyungwon Hwang , hyungwon.hwang7@gmail.com 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 --- Changes for v2: - 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..7b7ac60 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/samsung,s6e3ha2.txt @@ -0,0 +1,49 @@ +Samsung S6E3HA2 5.7" 1440x2560 TFT LCD 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 + - 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..a8a8881 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-s6e3ha2.c @@ -0,0 +1,513 @@ +/* + * MIPI-DSI based s6e3ha2 AMOLED LCD 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