From patchwork Mon Sep 24 19:36:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Kumar X-Patchwork-Id: 1497511 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AA596DF280 for ; Mon, 24 Sep 2012 12:45:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755275Ab2IXMph (ORCPT ); Mon, 24 Sep 2012 08:45:37 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:18655 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755268Ab2IXMpf (ORCPT ); Mon, 24 Sep 2012 08:45:35 -0400 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 <0MAU00A8EU2UTH21@mailout4.samsung.com>; Mon, 24 Sep 2012 21:44:54 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.125]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 44.D8.03860.6C550605; Mon, 24 Sep 2012 21:44:54 +0900 (KST) X-AuditID: cbfee61b-b7f2b6d000000f14-b2-506055c6a8e8 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id F3.D8.03860.6C550605; Mon, 24 Sep 2012 21:44:54 +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 <0MAU00BKAU14GJ70@mmp2.samsung.com>; Mon, 24 Sep 2012 21:44:54 +0900 (KST) From: Ajay Kumar To: linux-samsung-soc@vger.kernel.org, linux-fbdev@vger.kernel.org, jg1.han@samsung.com Cc: FlorianSchandinat@gmx.de, thomas.ab@samsung.com Subject: [PATCH V3] video: exynos_dp: Add device tree support to DP driver Date: Tue, 25 Sep 2012 01:06:25 +0530 Message-id: <1348515385-22332-1-git-send-email-ajaykumar.rs@samsung.com> X-Mailer: git-send-email 1.7.0.4 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOLMWRmVeSWpSXmKPExsWyRsSkVvdYaEKAwavdWhYn+j6wWsw4v4/J gcnj8ya5AMYoLpuU1JzMstQifbsEroy+VTeYCi4EV7Re3MrWwHjHpYuRk0NCwESieftCNghb TOLCvfVgtpDAUkaJZR+DYWpuN/9h7mLkAopPZ5SYfuEoK4TTziTxeeJDFpAqNgFtiW3Tb4LZ IgKREs8PrmfvYuTgYBYwlphwjBckLCzgJbG8+ywjiM0ioCqxf9tBdhCbV8BD4sr1XewQyxQk WpcdYoeoEZD4NvkQC8gYCQFZiU0HwG6QEDjCJrH61QUmiHpJiYMrbrBMYBRcwMiwilE0tSC5 oDgpPddIrzgxt7g0L10vOT93EyMwtE7/eya9g3FVg8UhRgEORiUe3g1n4gOEWBPLiitzDzFK cDArifBONEwIEOJNSaysSi3Kjy8qzUktPsToA3TJRGYp0eR8YNjnlcQbGpuYmxqbWhoZmZma 4hBWEucV/hQYICSQnliSmp2aWpBaBDOOiYNTqoFx8cctjrPXNe5nfPus/FjC3d1epxf4RPs0 Or634uJJUJ/bKPqkNeGai/ubs823pSRVJ8qtbBfw87zp+P5JRNa6ZVbtO34YvVS5NOPtNUHN VZW/TF1V31wonrN0fuBqh9lus18rSnfek5H+Iuq+3WruQyPPs+HGke/mrNe0Vl7/RDtp0Zbl roeklViKMxINtZiLihMBRnYwHVoCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOLMWRmVeSWpSXmKPExsVy+t9jQd1joQkBBhuXSVuc6PvAajHj/D4m ByaPz5vkAhijGhhtMlITU1KLFFLzkvNTMvPSbZW8g+Od403NDAx1DS0tzJUU8hJzU22VXHwC dN0yc4BGKymUJeaUAoUCEouLlfTtME0IDXHTtYBpjND1DQmC6zEyQAMJaxgz+lbdYCq4EFzR enErWwPjHZcuRk4OCQETidvNf5ghbDGJC/fWs3UxcnEICUxnlJh+4SgrhNPOJPF54kMWkCo2 AW2JbdNvgtkiApESzw+uZ+9i5OBgFjCWmHCMFyQsLOAlsbz7LCOIzSKgKrF/20F2EJtXwEPi yvVd7BDLFCRalx1in8DIvYCRYRWjaGpBckFxUnqukV5xYm5xaV66XnJ+7iZGcOg+k97BuKrB 4hCjAAejEg/vhjPxAUKsiWXFlbmHGCU4mJVEeCcaJgQI8aYkVlalFuXHF5XmpBYfYvQB2j6R WUo0OR8YV3kl8YbGJuamxqaWJhYmZpY4hJXEeYU/BQYICaQnlqRmp6YWpBbBjGPi4JRqYHSM 3NnYlhG5ZPJyrt6WYrbaX763/odPdHmU2/Q+x/TohGWJZy3ONGjpz8owm1K748WKXQ/n/7hh xtSvaq71+vudG+3Mj9f3ip8z7rvFe27R8rWVokGsobUrnPVPcAZO2GeZtevvIVM1Rus/p3xm rDLMcYxyDlx6Q8yTY+EVlUnt7KtWmwlrxCqxFGckGmoxFxUnAgB+XItwigIAAA== X-CFilter-Loop: Reflected Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org This patch enables device tree based discovery support for DP driver. The driver is modified to handle platform data in both the cases: with DT and non-DT. Documentation is also added for the DT bindings. DP-PHY should be regarded as a seperate device node while being passed from device tree list, and device node for DP should contain DP-PHY as child node with property name "dp-phy" associated with it. Signed-off-by: Ajay Kumar Acked-by: Jingoo Han --- .../devicetree/bindings/video/exynos_dp.txt | 83 ++++++++++ drivers/video/exynos/exynos_dp_core.c | 168 ++++++++++++++++++-- drivers/video/exynos/exynos_dp_core.h | 2 + 3 files changed, 239 insertions(+), 14 deletions(-) create mode 100644 Documentation/devicetree/bindings/video/exynos_dp.txt diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt new file mode 100644 index 0000000..c27f892 --- /dev/null +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt @@ -0,0 +1,83 @@ +Exynos Displayport driver should configure the displayport interface +based on the type of panel connected to it. + +We use two nodes: + -dptx_phy node + -display-port-controller node + +For the dp-phy initialization, we use a dptx_phy node. +Required properties for dptx_phy: + -compatible: + Should be "samsung,dp-phy". + -samsung,dptx_phy_reg: + Base address of DP PHY register. + -samsung,enable_bit: + The bit used to enable/disable DP PHY. + +For the Panel initialization, we read data from display-port-controller node. +Required properties for display-port-controller: + -compatible: + Should be "samsung,exynos5-dp". + -reg: + physical base address of the controller and length + of memory mapped region. + -interrupts: + Internet combiner values. + -interrupt-parent: + Address of Interrupt combiner node. + -dp_phy: + Address of dptx_phy node. + -samsung,color_space: + input video data format. + COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 + -samsung,dynamic_range: + dynamic range for input video data. + VESA = 0, CEA = 1 + -samsung,ycbcr_coeff: + YCbCr co-efficients for input video. + COLOR_YCBCR601 = 0, COLOR_YCBCR709 = 1 + -samsung,color_depth: + Bit per color component. + COLOR_6 = 0, COLOR_8 = 1, COLOR_10 = 2, COLOR_12 = 3 + -samsung,link_rate: + link rates supportd by the panel. + LINK_RATE_1_62GBPS = 0x6, LINK_RATE_2_70GBPS = 0x0A + -samsung,lane_count: + number of lanes supported by the panel. + LANE_COUNT1 = 1, LANE_COUNT2 = 2, LANE_COUNT4 = 4 + -samsung,interlaced: + Interlace scan mode. + Progressive if defined, Interlaced if not defined + -samsung,v_sync_polarity: + VSYNC polarity configuration. + High if defined, Low if not defined + -samsung,h_sync_polarity: + HSYNC polarity configuration. + High if defined, Low if not defined + +Example: + +SOC specific portion: + dptx_phy: dptx_phy@0x10040720 { + compatible = "samsung,dp-phy"; + samsung,dptx_phy_reg = <0x10040720>; + samsung,enable_bit = <1>; + }; + + display-port-controller { + compatible = "samsung,exynos5-dp"; + reg = <0x145B0000 0x10000>; + interrupts = <10 3>; + interrupt-parent = <&combiner>; + dp_phy = <&dptx_phy>; + }; + +Board Specific portion: + display-port-controller { + samsung,color_space = <0>; + samsung,dynamic_range = <0>; + samsung,ycbcr_coeff = <0>; + samsung,color_depth = <1>; + samsung,link_rate = <0x0a>; + samsung,lane_count = <2>; + }; diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index cdc1398..bb0f10c 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include