From patchwork Thu Oct 17 11:26:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: archit taneja X-Patchwork-Id: 3060411 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 45116BF925 for ; Thu, 17 Oct 2013 11:28:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F37E220455 for ; Thu, 17 Oct 2013 11:28:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8EFC20464 for ; Thu, 17 Oct 2013 11:28:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754665Ab3JQL1u (ORCPT ); Thu, 17 Oct 2013 07:27:50 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:50826 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753222Ab3JQL1t (ORCPT ); Thu, 17 Oct 2013 07:27:49 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r9HBRmuu032103; Thu, 17 Oct 2013 06:27:48 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id r9HBRmXr017071; Thu, 17 Oct 2013 06:27:48 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.2.342.3; Thu, 17 Oct 2013 06:27:48 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id r9HBRm6F023850; Thu, 17 Oct 2013 06:27:48 -0500 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.145.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r9HBRkt04011; Thu, 17 Oct 2013 06:27:47 -0500 (CDT) From: Archit Taneja To: CC: , , Archit Taneja Subject: [PATCH 5/6] omapdss: hdmi: add OMAP5/DRA7x hdmi driver Date: Thu, 17 Oct 2013 16:56:41 +0530 Message-ID: <1382009202-18984-6-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1382009202-18984-1-git-send-email-archit@ti.com> References: <1382009202-18984-1-git-send-email-archit@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The HDMI IP on OMAP5/DRA7x has a different core sub block compared to the one one OMAP4. The rest of the IPs are the same. Add a hdmi5 platform driver which calls hdmi5_core.c apis. The rest of the driver uses the same api's for wrapper, pll and phy, and the common helper funcs for timings. Signed-off-by: Archit Taneja --- drivers/video/omap2/dss/Kconfig | 10 + drivers/video/omap2/dss/Makefile | 2 + drivers/video/omap2/dss/core.c | 6 + drivers/video/omap2/dss/dss.h | 3 + drivers/video/omap2/dss/hdmi.h | 2 +- drivers/video/omap2/dss/hdmi5.c | 699 ++++++++++++++++++++++++++++++++++++++ drivers/video/omap2/dss/hdmi_wp.c | 2 +- 7 files changed, 722 insertions(+), 2 deletions(-) create mode 100644 drivers/video/omap2/dss/hdmi5.c diff --git a/drivers/video/omap2/dss/Kconfig b/drivers/video/omap2/dss/Kconfig index dde4281..a00932f 100644 --- a/drivers/video/omap2/dss/Kconfig +++ b/drivers/video/omap2/dss/Kconfig @@ -69,6 +69,16 @@ config OMAP4_DSS_HDMI config OMAP4_DSS_HDMI_AUDIO bool +config OMAP5_DSS_HDMI + bool "OMAP5 HDMI support" + default y + help + HDMI Interface for OMAP5 and SoCs containing the same HDMI core IP. + +config OMAP5_DSS_HDMI_AUDIO + depends on OMAP5_DSS_HDMI + bool + config OMAP2_DSS_SDI bool "SDI support" default n diff --git a/drivers/video/omap2/dss/Makefile b/drivers/video/omap2/dss/Makefile index d3aa91b..89d83be 100644 --- a/drivers/video/omap2/dss/Makefile +++ b/drivers/video/omap2/dss/Makefile @@ -12,4 +12,6 @@ omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi4.o hdmi_common.o hdmi_wp.o hdmi_pll.o \ hdmi_phy.o hdmi4_core.o +omapdss-$(CONFIG_OMAP5_DSS_HDMI) += hdmi5.o hdmi_common.o hdmi_wp.o hdmi_pll.o \ + hdmi_phy.o hdmi5_core.o ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index ffa45c8..6b74f73 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -268,6 +268,9 @@ static int (*dss_output_drv_reg_funcs[])(void) __initdata = { #ifdef CONFIG_OMAP4_DSS_HDMI hdmi4_init_platform_driver, #endif +#ifdef CONFIG_OMAP5_DSS_HDMI + hdmi5_init_platform_driver, +#endif }; static void (*dss_output_drv_unreg_funcs[])(void) __exitdata = { @@ -289,6 +292,9 @@ static void (*dss_output_drv_unreg_funcs[])(void) __exitdata = { #ifdef CONFIG_OMAP4_DSS_HDMI hdmi4_uninit_platform_driver, #endif +#ifdef CONFIG_OMAP5_DSS_HDMI + hdmi5_uninit_platform_driver, +#endif }; static bool dss_output_drv_loaded[ARRAY_SIZE(dss_output_drv_reg_funcs)]; diff --git a/drivers/video/omap2/dss/dss.h b/drivers/video/omap2/dss/dss.h index f777962..bb8a39c 100644 --- a/drivers/video/omap2/dss/dss.h +++ b/drivers/video/omap2/dss/dss.h @@ -430,6 +430,9 @@ void venc_uninit_platform_driver(void) __exit; int hdmi4_init_platform_driver(void) __init; void hdmi4_uninit_platform_driver(void) __exit; +int hdmi5_init_platform_driver(void) __init; +void hdmi5_uninit_platform_driver(void) __exit; + /* RFBI */ int rfbi_init_platform_driver(void) __init; void rfbi_uninit_platform_driver(void) __exit; diff --git a/drivers/video/omap2/dss/hdmi.h b/drivers/video/omap2/dss/hdmi.h index 8fa2121..2b2db2d 100644 --- a/drivers/video/omap2/dss/hdmi.h +++ b/drivers/video/omap2/dss/hdmi.h @@ -429,7 +429,7 @@ const struct hdmi_config *hdmi_default_timing(void); const struct hdmi_config *hdmi_get_timings(int mode, int code); struct hdmi_cm hdmi_get_code(struct omap_video_timings *timing); -#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) +#if defined(CONFIG_OMAP4_DSS_HDMI_AUDIO) || defined(CONFIG_OMAP5_DSS_HDMI_AUDIO) int hdmi_compute_acr(u32 pclk, u32 sample_freq, u32 *n, u32 *cts); int hdmi_wp_audio_enable(struct hdmi_wp_data *wp, bool enable); int hdmi_wp_audio_core_req_enable(struct hdmi_wp_data *wp, bool enable); diff --git a/drivers/video/omap2/dss/hdmi5.c b/drivers/video/omap2/dss/hdmi5.c new file mode 100644 index 0000000..5a1cfd6 --- /dev/null +++ b/drivers/video/omap2/dss/hdmi5.c @@ -0,0 +1,699 @@ +/* + * hdmi.c + * + * HDMI interface DSS driver setting for TI's OMAP4 family of processor. + * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com/ + * Authors: Yong Zhi + * Mythri pk + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see . + */ + +#define DSS_SUBSYS_NAME "HDMI" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include