From patchwork Thu Aug 16 10:08:09 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: 1337741 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 43AEDDF266 for ; Fri, 17 Aug 2012 07:43:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 002A79F011 for ; Fri, 17 Aug 2012 00:43:13 -0700 (PDT) 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 9B05F9F6B7 for ; Thu, 16 Aug 2012 02:00:00 -0700 (PDT) Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8U00ICPBNT6KL0@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 16 Aug 2012 17:59:59 +0900 (KST) X-AuditID: cbfee61a-b7fc66d0000043b7-c6-502cb68f485c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 21.F8.17335.F86BC205; Thu, 16 Aug 2012 17:59:59 +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 <0M8U008MUBNQAS90@mmp2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 16 Aug 2012 17:59:59 +0900 (KST) From: Leela Krishna Amudala To: dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH V3 2/2] video: drm: exynos: Add device tree support Date: Thu, 16 Aug 2012 15:38:09 +0530 Message-id: <1345111689-14601-3-git-send-email-l.krishna@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1345111689-14601-1-git-send-email-l.krishna@samsung.com> References: <1345111689-14601-1-git-send-email-l.krishna@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t9jQd3+bToBBh+mcVlc+fqezYHR4373 caYAxigum5TUnMyy1CJ9uwSujHU7VzMW3HSoONbYxtrAeNy0i5GTQ0LARGL3mR5GCFtM4sK9 9WxdjFwcQgLTGSVWXJ3HCuGsZpI4++klC0gVm4CxxP25m5lAbBEBD4nVs5cyg9jMAnkSr95P AYsLCzhLXF35nB3EZhFQlbi7roMVxOYVcJV4t+geC8Q2BYnWZYfAajgF3CTWdzwB2swBtMxV 4tIcrQmMvAsYGVYxiqYWJBcUJ6XnGuoVJ+YWl+al6yXn525iBPv8mdQOxpUNFocYBTgYlXh4 JZh0AoRYE8uKK3MPMUpwMCuJ8N6uBQrxpiRWVqUW5ccXleakFh9ilOZgURLnNfb+6i8kkJ5Y kpqdmlqQWgSTZeLglGpgtE+q37vyVf9P3d1b7nF1GndN41wg2GRTb82QWCFW6+D/If8z+xs/ 3k6TvQ99PFf/VglrflY9xcGG/xqLoEm1+Y6cCb05ikedFt88uVOh/9NK1Y0XmPt8TI4Yijgn tavNkRFzaZj2bs0tYdMNU1fGXmRxkToX4J3Z5OS+59KrKS5su/9klxopsRRnJBpqMRcVJwIA LJ+Um/UBAAA= X-TM-AS-MML: No X-Mailman-Approved-At: Thu, 16 Aug 2012 23:21:28 -0700 Cc: kgene.kim@samsung.com, laurent.pinchart@ideasonboard.com, m.szyprowski@samsung.com 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 Add device tree based discovery support for DRM-FIMD driver. Signed-off-by: Leela Krishna Amudala --- Documentation/devicetree/bindings/fb/drm-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/fb/drm-fimd.txt diff --git a/Documentation/devicetree/bindings/fb/drm-fimd.txt b/Documentation/devicetree/bindings/fb/drm-fimd.txt new file mode 100644 index 0000000..8ad8814 --- /dev/null +++ b/Documentation/devicetree/bindings/fb/drm-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-drm" 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: + - supports-mipi-panel: Specifies the lcd is mipi panel type + - 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-drm"; + 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 8379c59..1753846 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