From patchwork Tue Dec 27 09:05:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9489067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1354662AAF for ; Tue, 27 Dec 2016 09:06:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03AEC1FFD6 for ; Tue, 27 Dec 2016 09:06:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC4A12094D; Tue, 27 Dec 2016 09:06:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4FE701FFD6 for ; Tue, 27 Dec 2016 09:06:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFB4889971; Tue, 27 Dec 2016 09:06:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B12689939 for ; Tue, 27 Dec 2016 09:06:09 +0000 (UTC) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OIU031GA6M6OW20@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 27 Dec 2016 18:06:06 +0900 (KST) Received: from epsmges5p1.samsung.com (unknown [182.195.40.67]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20161227090606epcas1p13040b88d3a7e84b9098308371838b870~UEaJbHcrv2452524525epcas1p1u; Tue, 27 Dec 2016 09:06:06 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1.samsung.com (EPCPMTA) with SMTP id 71.8D.31243.EFE22685; Tue, 27 Dec 2016 18:06:06 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20161227090606epcas5p2d71e13cc6d1bcd7f47bc5d92387f4e32~UEaJIw2ZP2285022850epcas5p20; Tue, 27 Dec 2016 09:06:06 +0000 (GMT) X-AuditID: b6c32a2c-f79ad6d000007a0b-9a-58622efebde2 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id B1.2D.28332.DFE22685; Tue, 27 Dec 2016 18:06:05 +0900 (KST) Received: from khg_DeskTop.10.32.193.11 ([10.113.63.38]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OIU00IZ16M0XA60@mmp1.samsung.com>; Tue, 27 Dec 2016 18:06:05 +0900 (KST) From: Hoegeun Kwon To: robh@kernel.org, thierry.reding@gmail.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org Subject: [PATCH v2 1/2] drm/panel: Add support for S6E3HA2 panel driver on TM2 board Date: Tue, 27 Dec 2016 18:05:47 +0900 Message-id: <1482829548-20842-2-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1482829548-20842-1-git-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrF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/sH0DAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprOIsWRmVeSWpSXmKPExsVy+t9jAd2/ekkRBu1TLS16z51ksrj+5Tmr xfwj51gtrp+3s7jy9T2bxfvlXWwWS2f0sVpMuj+BxaL/8Wtmi/PnN7BbXN41h81ixvl9TBb/ 9+xgt/i5ax6LA5/Hzll32T02repk89j+7QGrx/3u40wefVtWMXp83iQXwBblZpORmpiSWqSQ mpecn5KZl26rFBripmuhpJCXmJtqqxSh6xsSpKRQlphTCuQZGaABB+cA92AlfbsEt4znk3Yw Fbx9x1hx7von1gbGVYcZuxg5OSQETCSWH3oKZYtJXLi3nq2LkYtDSGApo8S/G39YIJxfjBI9 TY+ZQKrYBHQlvvZcB7NFBFIkPsw/wwpSxCywhkniStNbZpCEsECYRNekRWwgNouAqkT/xnMs IDavgIdE27cGVoh1chInj00GszkFPCV+Lu8D6xUCqlk65zvrBEbeBYwMqxglUguSC4qT0nON 8lLL9YoTc4tL89L1kvNzNzGCI+WZ9A7Gw7vcDzEKcDAq8fBGbEyMEGJNLCuuzD3EKMHBrCTC u0M7KUKINyWxsiq1KD++qDQntfgQoynQYROZpUST84FRnFcSb2hibmJubGBhbmlpYqQkzts4 +1m4kEB6YklqdmpqQWoRTB8TB6dUA+N6prNu63XUpjOYzlhy+cYm5VfBWZ4NwcXuGT9/Lq7/ GKxwYP7Ed/YRPedjFinntGyR2v3vhPNWb1O1V+9Y5iw8cDbpSKOpz+KtVU/tL53PizA/qqzx zLVwqse20zWT1P4usN0z1d7IzyCKuyXT642saWP3hPTWxPmOQhZ9yQxSkWcL+Uv4ZiixFGck GmoxFxUnAgDC4rkLqgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20161227090606epcas5p2d71e13cc6d1bcd7f47bc5d92387f4e32 X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 X-Local-Sender: =?UTF-8?B?6raM7ZqM6re8G1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbUzMo7IKs7JuQKS/sgqzsm5A=?= X-Global-Sender: =?UTF-8?B?SG9lZ2V1biBLd29uG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTMy9Bc3Npc3RhbnQgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20161227090606epcas5p2d71e13cc6d1bcd7f47bc5d92387f4e32 X-RootMTR: 20161227090606epcas5p2d71e13cc6d1bcd7f47bc5d92387f4e32 References: <1482829548-20842-1-git-send-email-hoegeun.kwon@samsung.com> Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Donghwa Lee , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, cw00.choi@samsung.com, Hyungwon Hwang , Hoegeun Kwon 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-Virus-Scanned: ClamAV using ClamSMTP This patch add support for MIPI-DSI based S6E3HA2 AMOLED panel driver. This panel has 1440x2560 resolution in 5.7-inch physical panel in the TM2 device. Signed-off-by: Donghwa Lee Signed-off-by: Hyungwon Hwang Signed-off-by: Hoegeun Kwon --- Changes for V2: - Fixed the samsung,s6e3ha2.txt DT document. - Added active high or low after the description of the GPIOs. - Removed the reg and added a description of the virtual channel number of a DSI peripheral. .../bindings/display/panel/samsung,s6e3ha2.txt | 62 ++ drivers/gpu/drm/panel/Kconfig | 6 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 756 +++++++++++++++++++++ 4 files changed, 825 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/samsung,s6e3ha2.txt create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6e3ha2.txt b/Documentation/devicetree/bindings/display/panel/samsung,s6e3ha2.txt new file mode 100644 index 0000000..6e989ee --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e3ha2.txt @@ -0,0 +1,62 @@ +Samsung S6E3HA2 5.7" 1440x2560 AMOLED panel + +Required properties: + - compatible: "samsung,s6e3ha2" + - vdd3-supply: core voltage supply + - vci-supply: voltage supply for analog circuits + - reset-gpios: a GPIO spec for the reset pin (active high) + - enable-gpios: a GPIO spec for the panel enable pin (active high) + - te-gpios: a GPIO spec for the tearing effect synchronization signal + gpio pin (active high) + +Optional properties: + - display-timings: timings for the connected panel as described by [1] + +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. + +The virtual channel number of a DSI peripheral as described by [3]. +Must be in the range from 0 to 3. +/* peripheral responds to virtual channel 0 */ +peripheral@0 { + compatible = "..."; + reg = <0>; +}; + +[1]: Documentation/devicetree/bindings/display/panel/display-timing.txt +[2]: Documentation/devicetree/bindings/media/video-interfaces.txt +[3]: Documentation/devicetree/bindings/display/mipi-dsi-bus.txt + +Example: + + panel@0 { + ... + + compatible = "samsung,s6e3ha2"; + vdd3-supply = <&ldo27_reg>; + vci-supply = <&ldo28_reg>; + reset-gpios = <&gpg0 0 GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpf1 5 GPIO_ACTIVE_HIGH>; + te-gpios = <&gpf1 3 GPIO_ACTIVE_HIGH>; + + 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>; + }; + }; + + port { + dsi_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + }; diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 62aba97..e1a2fcd 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -58,6 +58,12 @@ config DRM_PANEL_SAMSUNG_S6E8AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_SAMSUNG_S6E3HA2 + tristate "Samsung S6E3HA2 DSI video mode panel" + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + config DRM_PANEL_SHARP_LQ101R1SX01 tristate "Sharp LQ101R1SX01 panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index a5c7ec0..993699b 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -4,5 +4,6 @@ obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c new file mode 100644 index 0000000..a6ad63b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c @@ -0,0 +1,756 @@ +/* + * MIPI-DSI based s6e3ha2 AMOLED 5.7 inch panel driver. + * + * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Donghwa Lee + * Hyungwon Hwang + * Hoegeun Kwon + * + * 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