From patchwork Fri Sep 7 09:07:38 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: 1420021 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id E73133FC33 for ; Fri, 7 Sep 2012 06:37:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01B269E874 for ; Thu, 6 Sep 2012 23:37:56 -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 65B9A9E957 for ; Thu, 6 Sep 2012 21:48:37 -0700 (PDT) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9Y00DMMQOW1PC0@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 07 Sep 2012 13:48:36 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F5.B1.32095.4AC79405; Fri, 07 Sep 2012 13:48:36 +0900 (KST) X-AuditID: cbfee61a-b7fba6d000007d5f-76-50497ca4bd88 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 45.B1.32095.4AC79405; Fri, 07 Sep 2012 13:48:36 +0900 (KST) Received: from localhost.localdomain ([107.108.73.106]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M9Y003HDQN3MW30@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 07 Sep 2012 13:48:36 +0900 (KST) From: Leela Krishna Amudala To: dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH V5 2/2] video: drm: exynos: Add device tree support Date: Fri, 07 Sep 2012 14:37:38 +0530 Message-id: <1347008858-12069-3-git-send-email-l.krishna@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1347008858-12069-1-git-send-email-l.krishna@samsung.com> References: <1347008858-12069-1-git-send-email-l.krishna@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrHLMWRmVeSWpSXmKPExsWyRsSkRHdJjWeAwbUNqhZXvr5nc2D0uN99 nCmAMYrLJiU1J7MstUjfLoEr4/HUHraCB/YV8yc1szYwXjTpYuTkkBAwkfh45wk7hC0mceHe erYuRi4OIYGljBL3D7WywRRNnzmPCSKxiFFi3/kVrBDOaiaJX5unsYBUsQkYS9yfu5kJxBYR 8JBYPXspM0gRs8BORolPC7YygySEBZwllj96DTaWRUBV4tCjx2DNvAKuEk0bbjJDrFOQaF12 COwmTgE3idY9E8FqhIBqrm78zQjRKyDxbfIhoDgHUL2sxKYDYLskBK6zSczsgaiREJCUOLji BssERuEFjAyrGEVTC5ILipPScw31ihNzi0vz0vWS83M3MQID8fS/Z1I7GFc2WBxiFOBgVOLh tbjiESDEmlhWXJl7iFGCg1lJhHfiL6AQb0piZVVqUX58UWlOavEhRh+gSyYyS4km5wOjJK8k 3tDY2MTMxNTCzMjMyASHsJI4r9M5uwAhgfTEktTs1NSC1CKYcUwcnFINjP4+cccyrDyf2R4w 2XxIreZq2i93xe9rTmXxB6X+nvLAf/GEqt7VLbyb4kIq+a7at0cdLJp/+l1wjsvk+wyv57G0 szBd582ICo+//tpIjm+a+e1Fcgv9612e8uuWpAXrGP1ddMM7oS1GaPJ7w3lp7trW+ifk1lf8 e7sq9be5c7DmT566f59KlViKMxINtZiLihMBHDBzAHECAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplkeLIzCtJLcpLzFFi42I5/e+xgO6SGs8Ag2vLuC2ufH3P5sDocb/7 OFMAY1QDo01GamJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO 0FglhbLEnFKgUEBicbGSvh2mCaEhbroWMI0Rur4hQXA9RgZoIGENY8bjqT1sBQ/sK+ZPamZt YLxo0sXIySEhYCIxfeY8JghbTOLCvfVsXYxcHEICixgl9p1fwQrhrGaS+LV5GgtIFZuAscT9 uZvBOkQEPCRWz17KDFLELLCTUeLTgq3MIAlhAWeJ5Y9es4HYLAKqEocePQZr5hVwlWjacJMZ Yp2CROuyQ+wgNqeAm0TrnolgNUJANVc3/macwMi7gJFhFaNoakFyQXFSeq6hXnFibnFpXrpe cn7uJkZwmD+T2sG4ssHiEKMAB6MSD6/FFY8AIdbEsuLK3EOMEhzMSiK8E38BhXhTEiurUovy 44tKc1KLDzH6AF01kVlKNDkfGIN5JfGGxiZmRpZG5oYWRsbmOISVxHmdztkFCAmkJ5akZqem FqQWwYxj4uCUamC0/Hl618zoN4ZMmVcdWqpmHSrkbk7+s17pw9dFB1Uvc2bbtEpMnGW7vuNe r/eqSdOKix8cX/SM3yw3UjKKQ27fQeNnVzdI3Fhk8OHusn3HD9wW4fvixZPLMPnzk0eC1xc0 rE7csLvUINl2U1ycljuT7nSHx9sMmOsXXPLNtnH/zvBa2fzCeW4HJZbijERDLeai4kQAqdAU pKACAAA= X-CFilter-Loop: Reflected X-Mailman-Approved-At: Thu, 06 Sep 2012 23:33:46 -0700 Cc: kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, 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..bf94cd6 --- /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-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 65e927b..cd1b841 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