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: 1419491 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 D3838E006E for ; Fri, 7 Sep 2012 04:53:35 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9qUj-0002nJ-5v; Fri, 07 Sep 2012 04:48:41 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9qUf-0002mx-KV for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2012 04:48:38 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M9Y00CPZQNSBI40@mailout4.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 07 Sep 2012 13:48:36 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.113]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id E9.A1.31452.4AC79405; Fri, 07 Sep 2012 13:48:36 +0900 (KST) X-AuditID: cbfee61b-b7f586d000007adc-8c-50497ca42006 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 39.A1.31452.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 linux-arm-kernel@lists.infradead.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+NgFrrDLMWRmVeSWpSXmKPExsWyRsSkUHdJjWeAwau96habHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugSvj8dQetoIH9hXzJzWzNjBeNOli5OSQEDCRWHtvASuELSZx4d56 ti5GLg4hgaWMEt3PD7B0MXKAFXUv94aIL2KU2PXyMCOEs4FJ4umheWDdbALGEvfnbmYCsUUE PCRWz17KDFLELLCTUeLTgq3MIAlhAWeJ5Y9es4HYLAKqEocePWYBsXkFXCWaNtxkhjhDQaJ1 2SF2EJtTwE2idc9EsBohoJqrG38zQvQKSHybfAjqOlmJTQfAdkkI3GaTmHzlAtQcSYmDK26w TGAUXsDIsIpRNLUguaA4KT3XSK84Mbe4NC9dLzk/dxMjMAhP/3smvYNxVYPFIUYBDkYlHl6L Kx4BQqyJZcWVuYcYJTiYlUR4J/4CCvGmJFZWpRblxxeV5qQWH2L0AbpkIrOUaHI+MELySuIN jY1NzExMLcyMzIxMcAgrifM6nbMLEBJITyxJzU5NLUgtghnHxMEp1cDYZh/geNd33Zk1hUw+ j65IfK9uePPW5umz+KsdP3ib2I/Mt8n/oFwsbZijOudT5qYeH/YVVTcKe5fslZ2iL7vtxtHq l4FaId73mCXKf7xyEU/23CNkwe2Us9nAbIHf3oJ8gRkfz7ovuRoxb59U0KPIm5t2mh7s0ViT fnT6c6G2unW50QJC/04qsRRnJBpqMRcVJwIAkWWc8m8CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xgO6SGs8Ag+fTeS02Pb7G6sDosXlJ fQBjVAOjTUZqYkpqkUJqXnJ+SmZeuq2Sd3C8c7ypmYGhrqGlhbmSQl5ibqqtkotPgK5bZg7Q VCWFssScUqBQQGJxsZK+HaYJoSFuuhYwjRG6viFBcD1GBmggYQ1jxuOpPWwFD+wr5k9qZm1g vGjSxcjBISFgItG93LuLkRPIFJO4cG89WxcjF4eQwCJGiV0vDzNCOBuYJJ4emscKUsUmYCxx f+5mJhBbRMBDYvXspcwgRcwCOxklPi3YygySEBZwllj+6DUbiM0ioCpx6NFjFhCbV8BVomnD TWaIdQoSrcsOsYPYnAJuEq17JoLVCAHVXN34m3ECI+8CRoZVjKKpBckFxUnpuUZ6xYm5xaV5 6XrJ+bmbGMEh/kx6B+OqBotDjAIcjEo8vBZXPAKEWBPLiitzDzFKcDArifBO/AUU4k1JrKxK LcqPLyrNSS0+xOgDdNVEZinR5Hxg/OWVxBsam5gZWRqZG1oYGZvjEFYS53U6ZxcgJJCeWJKa nZpakFoEM46Jg1OqgXH9Gc1+k5395xcvZWxr+z2VwenowbvGGexfj0omuBZdr3B9ZvnXyMH4 w/0zf0PXBir9uCj63Un7J+d2i8+vfu56v+PrOcOzE2Z4sawWfs2t/Wzd8tXHb82fumVepVZo 8vlHwazzNsss67lyeqVy2KOfgfXs57asL/Nwvnb8pAyXX4Dd+kOXXus/UmIpzkg01GIuKk4E AEKzJn6eAgAA 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.34 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 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..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