From patchwork Fri Sep 21 11:22:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leela Krishna Amudala X-Patchwork-Id: 1490191 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id EECF3DF28C for ; Fri, 21 Sep 2012 07:38:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDDD6A0ECD for ; Fri, 21 Sep 2012 00:38:49 -0700 (PDT) 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 AE9519E7BB for ; Thu, 20 Sep 2012 21:59:53 -0700 (PDT) Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAO00FWOOJOMLM0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 21 Sep 2012 13:59:53 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.123]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 60.FE.03860.844FB505; Fri, 21 Sep 2012 13:59:52 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-40-505bf4482536 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id BF.EE.03860.844FB505; Fri, 21 Sep 2012 13:59:52 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MAO00BO2OI8FWB0@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 21 Sep 2012 13:59:52 +0900 (KST) From: Leela Krishna Amudala To: dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH V6 2/2] video: drm: exynos: Add device tree support Date: Fri, 21 Sep 2012 16:52:16 +0530 Message-id: <1348226536-22899-3-git-send-email-l.krishna@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1348226536-22899-1-git-send-email-l.krishna@samsung.com> References: <1348226536-22899-1-git-send-email-l.krishna@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsWyRsSkWtfjS3SAwaoOa4srX9+zOTB63O8+ zhTAGMVlk5Kak1mWWqRvl8CVsevBQdaCPseKy98FGxjvmnYxcnJICJhI3Nx7lQ3CFpO4cG89 kM3FISSwlFHi08ffTF2MHGBFh697gdQICUxnlFi5UQzCXs0k0fdYHMRmEzCWuD93MxOILSLg IbF69lJmkDnMAnMZJf4d+soKkhAWcJb4d70brIhFQFXi2NQGFhCbV8BV4v2vtawQRyhItC47 xA5icwq4SXxa9YMZYpmrxIIj39ggegUkvk0+xAJxm6zEpgNguyQELrNJHDj3ngVijqTEwRU3 WCYwCi9gZFjFKJpakFxQnJSea6RXnJhbXJqXrpecn7uJERiAp/89k97BuKrB4hCjAAejEg9v vXt0gBBrYllxZe4hRgkOZiUR3kcxQCHelMTKqtSi/Pii0pzU4kOMPkCXTGSWEk3OB0ZHXkm8 obGJuamxqaWRkZmpKQ5hJXFe4U+BAUIC6YklqdmpqQWpRTDjmDg4pRoYRQylJ/xl0tVbtTLv yoF/pxk+OfJobLjHZCgpKm30+O0Eu6tXXYQvJL1sLpsw6eTbspkzdyen3Dhd3tdpFVR3k/Ep Y+YsTi+z2Z/nx/pW3jd7dOFaVIzg8yrXRfyc1qq+3s5sE5Ols1fNXKKcOOXlfe+tr3bsufih 4+OiuTc4V9+7McPUvOHwVSWW4oxEQy3mouJEAFeKmEltAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42I5/e+xoK7Hl+gAg0OHjC2ufH3P5sDocb/7 OFMAY1QDo01GamJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO 0FglhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGENY8auBwdZC/ocKy5/F2xg vGvaxcjBISFgInH4ulcXIyeQKSZx4d56NhBbSGA6o8TKjWIQ9momib7H4iA2m4CxxP25m5lA bBEBD4nVs5cydzFycTALzGWU+HfoKytIQljAWeLf9W6wIhYBVYljUxtYQGxeAVeJ97/WskIs U5BoXXaIHcTmFHCT+LTqBzPEMleJBUe+sU1g5F3AyLCKUTS1ILmgOCk910ivODG3uDQvXS85 P3cTIzi8n0nvYFzVYHGIUYCDUYmHt949OkCINbGsuDL3EKMEB7OSCO+jGKAQb0piZVVqUX58 UWlOavEhRh+gqyYyS4km5wNjL68k3tDYxNzU2NTSxMLEzBKHsJI4r/CnwAAhgfTEktTs1NSC 1CKYcUwcnFINjEtXb5Yx8woNsDp/8cEWdvFf/+eYGzK/9siaNpH7/HzhkJPh7D6MnvxqnelX Cj2Pvrwosv7bixcONRcnf2dQsK05x7FxzdrY3XsmN6z+13nql+imEJl3yYFv3BVX6vhc6LVo naO4RaHMjrnVOFnxtNFL5+mum+cGnm6rcVql3Xsx8u/haRyLBJVYijMSDbWYi4oTAcPyJ0ac AgAA X-CFilter-Loop: Reflected X-Mailman-Approved-At: Fri, 21 Sep 2012 00:37:03 -0700 Cc: kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org This patch adds device tree based discovery support for exynos DRM-FIMD driver which includes driver modification to handle platform data in both the cases with DT and non-DT, Also adds the documentation for bindings. Signed-off-by: Leela Krishna Amudala --- .../devicetree/bindings/drm/exynos/fimd.txt | 80 ++++++++++++++++ drivers/gpu/drm/exynos/exynos_drm_fimd.c | 95 +++++++++++++++++++- 2 files changed, 173 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/drm/exynos/fimd.txt diff --git a/Documentation/devicetree/bindings/drm/exynos/fimd.txt b/Documentation/devicetree/bindings/drm/exynos/fimd.txt new file mode 100644 index 0000000..e94120c --- /dev/null +++ b/Documentation/devicetree/bindings/drm/exynos/fimd.txt @@ -0,0 +1,80 @@ +* Samsung Display Controller using DRM frame work + +The display controller is used to transfer image data from memory to an +external LCD driver interface. It supports various color formats such as +rgb and yuv. + +Required properties: + - compatible: Should be "samsung,exynos5-fimd" or "samsung,exynos4-fimd" for + fimd using DRM frame work. + - reg: physical base address of the controller and length of memory + mapped region. + - interrupts: Three interrupts should be specified. The interrupts should be + specified in the following order. + - VSYNC interrupt + - FIFO level interrupt + - FIMD System Interrupt + + - samsung,fimd-display: This property should specify the phandle of the + display device node which holds the video interface timing with the + below mentioned properties. + + - lcd-htiming: Specifies the horizontal timing for the overlay. The + horizontal timing includes four parameters in the following order. + + - horizontal back porch (in number of lcd clocks) + - horizontal front porch (in number of lcd clocks) + - hsync pulse width (in number of lcd clocks) + - Display panels X resolution. + + - lcd-vtiming: Specifies the vertical timing for the overlay. The + vertical timing includes four parameters in the following order. + + - vertical back porch (in number of lcd lines) + - vertical front porch (in number of lcd lines) + - vsync pulse width (in number of lcd clocks) + - Display panels Y resolution. + + + - samsung,default-window: Specifies the default window number of the fimd controller. + + - samsung,fimd-win-bpp: Specifies the bits per pixel. + +Optional properties: + - samsung,fimd-vidout-rgb: Video output format is RGB. + - samsung,fimd-inv-vclk: invert video clock polarity. + - samsung,fimd-frame-rate: Number of video frames per second. + +Example: + + The following is an example for the fimd controller is split into + two portions. The SoC specific portion can be specified in the SoC + specific dts file. The board specific portion can be specified in the + board specific dts file. + + - SoC Specific portion + + fimd { + compatible = "samsung,exynos5-fimd"; + interrupt-parent = <&combiner>; + reg = <0x14400000 0x40000>; + interrupts = <18 5>, <18 4>, <18 6>; + }; + + - Board Specific portion + + lcd_fimd0: lcd_panel0 { + lcd-htiming = <4 4 4 480>; + lcd-vtiming = <4 4 4 320>; + supports-mipi-panel; + }; + + fimd { + samsung,fimd-display = <&lcd_fimd0>; + samsung,fimd-vidout-rgb; + samsung,fimd-inv-vclk; + samsung,fimd-frame-rate = <60>; + samsung,default-window = <0>; + samsung,fimd-win-bpp = <32>; + }; + diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 1ad10b6..b2d22ac 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -18,6 +18,7 @@ #include #include #include +#include #include