From patchwork Tue Jun 12 09:23:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 9217 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 114AA23EE1 for ; Tue, 12 Jun 2012 09:35:12 +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 D45ABA1847E for ; Tue, 12 Jun 2012 09:35:11 +0000 (UTC) Received: by mail-gg0-f180.google.com with SMTP id f1so3528294ggn.11 for ; Tue, 12 Jun 2012 02:35:11 -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=3BtCmyY3RttUBFSQHEGxjR6+KKvCyLnc+zZOMsX9/C0=; b=lCwMKrjqHVGBbFrp9REWTcVWyGUe3nCZimZR+X1TKWavvb6Z91dG7dWX1vjmP221Z5 9q+mCOCVuSlTr22GW+CCROixlgx3nZ453MQdJu9Tb+PSwO779wFntpy/C8A06Ab/jsvM FOOhSXoZOmM0zpO38GPbRXBjcaYW5l3cGstgmCVg+i/q8ExMQbezvM/7tqyXVjgNSfZq 62U1gJBYt6HInfugqBlVrR5VTPixVWCdbLTi3T1U8aANtAU5mrs2065ybZOVggzoB4c6 3ho7zrY+JCZ3eAMMFT/wKJ8eHyl9PPCjvLzFc3q3Yn4MosvceJGdPpz99gjqtGckDzCM K1KA== Received: by 10.50.46.232 with SMTP id y8mr7711943igm.57.1339493711139; Tue, 12 Jun 2012 02:35:11 -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.24.148 with SMTP id v20csp155331ibb; Tue, 12 Jun 2012 02:35:10 -0700 (PDT) Received: by 10.68.213.102 with SMTP id nr6mr36682022pbc.112.1339493710466; Tue, 12 Jun 2012 02:35:10 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id ss6si1480090pbc.303.2012.06.12.02.35.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jun 2012 02:35:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.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 danh15 with SMTP id h15so7888057dan.37 for ; Tue, 12 Jun 2012 02:35:10 -0700 (PDT) Received: by 10.68.203.40 with SMTP id kn8mr36370342pbc.162.1339493710074; Tue, 12 Jun 2012 02:35:10 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id wn3sm1424021pbc.74.2012.06.12.02.35.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jun 2012 02:35:09 -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 framebuffer support for SMDK4X12 Date: Tue, 12 Jun 2012 14:53:50 +0530 Message-Id: <1339493030-1354-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlAcXaNEYye7MUphCbsM/Fxh6WhVbkSof3Au0yBiU+lMK9/Q7ugbQ++PVMpKMNEmt0dWuJA This patch adds framebuffer support to SMDK4212 and SMDK4412 boards. A framebuffer window of 480x800x24bpp is defined. Signed-off-by: Sachin Kamat --- arch/arm/mach-exynos/Kconfig | 2 ++ arch/arm/mach-exynos/mach-smdk4x12.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index 573be57..96f898a 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -365,12 +365,14 @@ config MACH_SMDK4212 select S5P_DEV_FIMC1 select S5P_DEV_FIMC2 select S5P_DEV_FIMC3 + select S5P_DEV_FIMD0 select S5P_DEV_MFC select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_PWM select EXYNOS_DEV_SYSMMU select EXYNOS_DEV_DMA + select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C3 select EXYNOS4_SETUP_I2C7 diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index fb09c70..c4f4060 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -28,10 +29,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include @@ -234,6 +237,34 @@ static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = { .cols = 5, }; +static struct s3c_fb_pd_win smdk4x12_fb_win0 = { + .xres = 480, + .yres = 800, + .virtual_x = 480, + .virtual_y = 800 * 2, + .max_bpp = 32, + .default_bpp = 24, +}; + +static struct fb_videomode smdk4x12_lcd_timing = { + .left_margin = 8, + .right_margin = 8, + .upper_margin = 6, + .lower_margin = 6, + .hsync_len = 6, + .vsync_len = 4, + .xres = 480, + .yres = 800, +}; + +static struct s3c_fb_platdata smdk4x12_lcd_pdata __initdata = { + .win[0] = &smdk4x12_fb_win0, + .vtiming = &smdk4x12_lcd_timing, + .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, + .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, + .setup_gpio = exynos4_fimd0_gpio_setup_24bpp, +}; + static struct platform_device *smdk4x12_devices[] __initdata = { &s3c_device_hsmmc2, &s3c_device_hsmmc3, @@ -248,6 +279,7 @@ static struct platform_device *smdk4x12_devices[] __initdata = { &s5p_device_fimc2, &s5p_device_fimc3, &s5p_device_fimc_md, + &s5p_device_fimd0, &s5p_device_mfc, &s5p_device_mfc_l, &s5p_device_mfc_r, @@ -293,6 +325,8 @@ static void __init smdk4x12_machine_init(void) s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata); s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata); + s5p_fimd0_set_platdata(&smdk4x12_lcd_pdata); + platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices)); }