From patchwork Tue Jul 17 04:58:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 10018 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 51B1323E1B for ; Tue, 17 Jul 2012 04:59:29 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 1CA25A18544 for ; Tue, 17 Jul 2012 04:59:29 +0000 (UTC) Received: by ggnf1 with SMTP id f1so3714ggn.11 for ; Mon, 16 Jul 2012 21:59:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=GPtRp+KDXXyXCcByZW5rmy3lq6PWjrpYJaVuK2W8NKY=; b=UT5n/vx69ix4ohJxASzP826xt65gPsnC+B+H0UA5VPmjTtSawyqWf405pOKE1+oOpO roTeHlPF0R59ZFiAIiB0/pOntM8xQ/fOPGNBuwHTx0QNKCPcRONk8ajpKhgsBrvjDvR0 3dIqZSge3JVefd2BaW2d7NgEHxFv2wDxZ4LM9PA7amTwUx9+7KEQUb4pXVMcSunsktNd LytcCCtkz2i3TGtL9R7v1DDfv0aCuuGtYauOncODzzPxqhmktzcqWzrNxlWlgcyKVw4m 5TTKJPaT5xmVz1GQsGbJ2xK0SRS0Lii/YLdU71RNCGuDW9FU8qwY6zjvi37zsvAy8JYg yzQw== Received: by 10.42.155.73 with SMTP id t9mr486234icw.48.1342501168393; Mon, 16 Jul 2012 21:59:28 -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.231.241.2 with SMTP id lc2csp15221ibb; Mon, 16 Jul 2012 21:59:27 -0700 (PDT) Received: by 10.68.220.163 with SMTP id px3mr3375964pbc.167.1342501167254; Mon, 16 Jul 2012 21:59:27 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id tv8si21369121pbc.332.2012.07.16.21.59.26 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Jul 2012 21:59:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f50.google.com with SMTP id rr4so230964pbb.37 for ; Mon, 16 Jul 2012 21:59:26 -0700 (PDT) Received: by 10.68.233.201 with SMTP id ty9mr3100599pbc.34.1342501166846; Mon, 16 Jul 2012 21:59:26 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id wi6sm13270354pbc.35.2012.07.16.21.59.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Jul 2012 21:59:25 -0700 (PDT) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH] ARM: EXYNOS: Add DRM device to SMDK4X12 board Date: Tue, 17 Jul 2012 10:28:55 +0530 Message-Id: <1342501135-10341-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQnxSzQO8rbk9HDbjueo4Dk7tgv9JFPNn1FNplQo+Ku9Ir8ByBPdwx88iAJS7RTy6e1JU5xW DRM core device and FIMD DRM platform device support is added to SMDK4212 & SMDK4412 boards. Signed-off-by: Sachin Kamat --- This patch is based on for-next branch of Kukjin's tree. --- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-smdk4x12.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e698ca0..b5b4c8c 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -375,6 +375,7 @@ config MACH_SMDK4212 select SAMSUNG_DEV_PWM select EXYNOS_DEV_SYSMMU select EXYNOS_DEV_DMA + select EXYNOS_DEV_DRM select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C3 diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index 2623f3b..30ed609 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -41,6 +41,7 @@ #include +#include #include "common.h" /* Following are default values for UCON, ULCON and UFCON UART registers */ @@ -240,6 +241,26 @@ static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = { .cols = 8, }; +#ifdef CONFIG_DRM_EXYNOS +static struct exynos_drm_fimd_pdata drm_fimd_pdata = { + .panel = { + .timing = { + .left_margin = 8, + .right_margin = 8, + .upper_margin = 6, + .lower_margin = 6, + .hsync_len = 6, + .vsync_len = 4, + .xres = 480, + .yres = 800, + }, + }, + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, + .default_win = 0, + .bpp = 32, +}; +#else static struct s3c_fb_pd_win smdk4x12_fb_win0 = { .xres = 480, .yres = 800, @@ -267,6 +288,7 @@ static struct s3c_fb_platdata smdk4x12_lcd_pdata __initdata = { .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, }; +#endif /* USB OTG */ static struct s3c_hsotg_plat smdk4x12_hsotg_pdata; @@ -290,6 +312,9 @@ static struct platform_device *smdk4x12_devices[] __initdata = { &s5p_device_mfc, &s5p_device_mfc_l, &s5p_device_mfc_r, +#ifdef CONFIG_DRM_EXYNOS + &exynos_device_drm, +#endif &samsung_device_keypad, }; @@ -334,7 +359,12 @@ static void __init smdk4x12_machine_init(void) s3c_hsotg_set_platdata(&smdk4x12_hsotg_pdata); +#ifdef CONFIG_DRM_EXYNOS + s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata; + exynos4_fimd0_gpio_setup_24bpp(); +#else s5p_fimd0_set_platdata(&smdk4x12_lcd_pdata); +#endif platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices)); }