From patchwork Thu Sep 29 09:15:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 4425 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0528123EFA for ; Thu, 29 Sep 2011 09:20:16 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id E2D54A182F0 for ; Thu, 29 Sep 2011 09:20:15 +0000 (UTC) Received: by fxe23 with SMTP id 23so2237681fxe.11 for ; Thu, 29 Sep 2011 02:20:15 -0700 (PDT) Received: by 10.223.57.17 with SMTP id a17mr1577250fah.65.1317288015633; Thu, 29 Sep 2011 02:20:15 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.3.234 with SMTP id f10cs8561laf; Thu, 29 Sep 2011 02:20:15 -0700 (PDT) Received: by 10.236.152.105 with SMTP id c69mr38519453yhk.93.1317288013361; Thu, 29 Sep 2011 02:20:13 -0700 (PDT) Received: from mail-gy0-f178.google.com (mail-gy0-f178.google.com [209.85.160.178]) by mx.google.com with ESMTPS id a8si995280yhm.110.2011.09.29.02.20.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Sep 2011 02:20:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.178 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by gyf1 with SMTP id 1so389406gyf.37 for ; Thu, 29 Sep 2011 02:20:12 -0700 (PDT) Received: by 10.68.58.138 with SMTP id r10mr9870239pbq.72.1317288011899; Thu, 29 Sep 2011 02:20:11 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ml4sm4668188pbc.0.2011.09.29.02.20.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Sep 2011 02:20:11 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, patches@linaro.org, sachin.kamat@linaro.org Subject: [PATCH] ARM: EXYNOS4: Add HPD and PD support for HDMI on Origen Date: Thu, 29 Sep 2011 14:45:42 +0530 Message-Id: <1317287742-23091-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 This patch adds hot plug detection (HPD) and power domain (PD) support for HDMI on Origen board. Signed-off-by: Sachin Kamat --- I have added the KConfig entry and header file required for enabling PD since the patch [1] is not yet applied on Kgene's tree [2]. [1] http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/6763 [2] https://github.com/kgene/linux-samsung/tree/for-next --- arch/arm/mach-exynos4/Kconfig | 1 + arch/arm/mach-exynos4/mach-origen.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig index d0491c2..a02c94f 100644 --- a/arch/arm/mach-exynos4/Kconfig +++ b/arch/arm/mach-exynos4/Kconfig @@ -243,6 +243,7 @@ config MACH_ORIGEN select S5P_DEV_I2C_HDMIPHY select S5P_DEV_TV select S5P_DEV_USB_EHCI + select EXYNOS4_DEV_PD select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_PWM select EXYNOS4_SETUP_SDHCI diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c index 421294b..36709ea 100644 --- a/arch/arm/mach-exynos4/mach-origen.c +++ b/arch/arm/mach-exynos4/mach-origen.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -168,6 +169,7 @@ static struct platform_device *origen_devices[] __initdata = { &s5p_device_i2c_hdmiphy, &s5p_device_mixer, &origen_device_gpiokeys, + &exynos4_device_pd[PD_TV], }; /* LCD Backlight data */ @@ -181,6 +183,14 @@ static struct platform_pwm_backlight_data origen_bl_data = { .pwm_period_ns = 1000, }; +static void s5p_tv_setup(void) +{ + /* Direct HPD to HDMI chip */ + gpio_request_one(EXYNOS4_GPX3(7), GPIOF_IN, "hpd-plug"); + s3c_gpio_cfgpin(EXYNOS4_GPX3(7), S3C_GPIO_SFN(0x3)); + s3c_gpio_setpull(EXYNOS4_GPX3(7), S3C_GPIO_PULL_NONE); +} + static void __init origen_map_io(void) { s5p_init_io(NULL, 0, S5P_VA_CHIPID); @@ -200,10 +210,14 @@ static void __init origen_machine_init(void) origen_ehci_init(); clk_xusbxti.rate = 24000000; + s5p_tv_setup(); s5p_i2c_hdmiphy_set_platdata(NULL); platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices)); + s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev; + s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev; + samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data); }