From patchwork Wed Sep 5 15:39:15 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: 1408821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id CD766DF28C for ; Wed, 5 Sep 2012 11:40:21 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9Duj-0005TZ-92; Wed, 05 Sep 2012 11:36:57 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9Duc-0005Qd-G3 for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 11:36:51 +0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9V003IPK99RZ00@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 20:36:49 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.112]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 5B.B7.11106.15937405; Wed, 05 Sep 2012 20:36:49 +0900 (KST) X-AuditID: cbfee61a-b7fd26d000002b62-ce-504739516ff5 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id CA.B7.11106.15937405; Wed, 05 Sep 2012 20:36:49 +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 <0M9V00DX2K4YFTB0@mmp2.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 20:36:49 +0900 (KST) From: Leela Krishna Amudala To: dri-devel@lists.freedesktop.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH V4 2/2] video: drm: exynos: Add device tree support Date: Wed, 05 Sep 2012 21:09:15 +0530 Message-id: <1346859555-13527-3-git-send-email-l.krishna@samsung.com> X-Mailer: git-send-email 1.7.0.4 In-reply-to: <1346859555-13527-1-git-send-email-l.krishna@samsung.com> References: <1346859555-13527-1-git-send-email-l.krishna@samsung.com> DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsWyRsSkQDfQ0j3AoOWFrMWmx9dYHRg9Ni+p D2CM4rJJSc3JLEst0rdL4Mro+bODreCBfcXlzqUsDYyXTLoYOTkkBEwk7i5cyw5hi0lcuLee rYuRi0NIYCmjxLzjn1i6GDnAihqW2oLUCAlMZ5T4ddMMwt7AJHH2tSSIzSZgLHF/7mYmEFtE wENi9eylzCBzmAV2Mkp8WrCVGSQhLOAs8fzBSTYQm0VAVeLvip1MIPN5BVwl/v0zhrhBQaJ1 2SGwezgF3CT2X1jJDLHLVeL5o71MEK0CEt8mH4I6TVZi0wGwVRICl9kkNu47zQwxR1Li4Iob LBMYhRcwMqxiFE0tSC4oTkrPNdQrTswtLs1L10vOz93ECAy/0/+eSe1gXNlgcYhRgINRiYeX wdstQIg1say4MvcQowQHs5II7+3VrgFCvCmJlVWpRfnxRaU5qcWHGH2ALpnILCWanA+MjbyS eENjYxMzE1MLMyMzIxMcwkrivE7n7AKEBNITS1KzU1MLUotgxjFxcEo1MB5aypqw9ptlNsv3 j5tW9j+/dcB3+QnFTyEf+wK0Zye8aD9dfUPQrOiiW8W0+Hnsv11Mz1kUf/i5gef7FuMijQsL T95hfxFyquxjf+SaxfIlMjWRvkIq1YWJX6yXSn1K75+tcVF1iaZxy+5917ZnqZV42m8JN3xR f0rT9nhTpJLWw4LMj7OkOJRYijMSDbWYi4oTAX6CPa9sAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeLIzCtJLcpLzFFi42I5/e+xoG6gpXuAwYZl3BabHl9jdWD02Lyk PoAxqoHRJiM1MSW1SCE1Lzk/JTMv3VbJOzjeOd7UzMBQ19DSwlxJIS8xN9VWycUnQNctMwdo qpJCWWJOKVAoILG4WEnfDtOE0BA3XQuYxghd35AguB4jAzSQsIYxo+fPDraCB/YVlzuXsjQw XjLpYuTgkBAwkWhYatvFyAlkiklcuLeeDcQWEpjOKPHrphmEvYFJ4uxrSRCbTcBY4v7czUwg toiAh8Tq2UuZuxi5OJgFdjJKfFqwlRkkISzgLPH8wUmwQSwCqhJ/V+xkAtnFK+Aq8e+fMcQu BYnWZYfYQWxOATeJ/RdWMkPscpV4/mgv0wRG3gWMDKsYRVMLkguKk9JzDfWKE3OLS/PS9ZLz czcxgoP7mdQOxpUNFocYBTgYlXh4GbzdAoRYE8uKK3MPMUpwMCuJ8N5e7RogxJuSWFmVWpQf X1Sak1p8iNEH6KiJzFKiyfnAyMsriTc0NjEzsjQyN7QwMjbHIawkzut0zi5ASCA9sSQ1OzW1 ILUIZhwTB6dUA2O+dc3rVQ5qD+v7XWIKNA6svq2pJrNzuXd4olLqO7elE3bwX+a60tO80Pzb PLWoFQl1k66Z/EvmP33INiewWrWzls/W1zxoBf+CjD0WrO4zz2tuz+bdLjJxlt/lT54qF+54 dU9X+KqqqawbvDjiYvUNRaN7bGrZp59qLe052dL2becOmQN9U5RYijMSDbWYi4oTARm7NAqb AgAA X-CFilter-Loop: Reflected X-Spam-Note: CRM114 invocation failed X-Spam-Score: -3.9 (---) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-3.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 3.0 DATE_IN_FUTURE_03_06 Date: is 3 to 6 hours after Received: date -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, inki.dae@samsung.com, linux-samsung-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, m.szyprowski@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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..4ff1829 --- /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-fb" 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 3701fbe..a4fa8e9 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