diff options
author | Lily Zhang <r58066@freescale.com> | 2011-04-14 14:48:00 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-01-09 20:08:07 +0800 |
commit | 84ded1cfd3a4e8a34a692155267656255142f054 (patch) | |
tree | 20bcf1fc1c5757f02e0e5e45c33f86d6527a5a37 | |
parent | 0f9200677249f3783a7fe991e5724ecddb826b03 (diff) |
ENGR00142005-4 ARM: mx53 smd: Add LDVS support
Add LVDS support in MX53 SMD board.
Add ipu device, vpu device and v4l2 output device in MX53
SMD.
Signed-off-by: Lily Zhang <r58066@freescale.com>
-rwxr-xr-x | arch/arm/mach-mx5/board-mx53_smd.c | 73 | ||||
-rwxr-xr-x | arch/arm/mach-mx5/devices-imx53.h | 4 |
2 files changed, 74 insertions, 3 deletions
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c index ef2dd876aea9..eacae64c05ee 100755 --- a/arch/arm/mach-mx5/board-mx53_smd.c +++ b/arch/arm/mach-mx5/board-mx53_smd.c @@ -30,9 +30,12 @@ #include <linux/regulator/consumer.h> #include <linux/pwm_backlight.h> +#include <linux/mxcfb.h> +#include <linux/ipu.h> #include <mach/common.h> #include <mach/hardware.h> +#include <mach/ipu-v3.h> #include <mach/imx-uart.h> #include <mach/iomux-mx53.h> #include <mach/ahci_sata.h> @@ -153,6 +156,18 @@ static iomux_v3_cfg_t mx53_smd_pads[] = { MX53_PAD_KEY_COL4__GPIO4_14, /* PWM */ MX53_PAD_GPIO_1__PWM2_PWMO, + + /* LDVS */ + MX53_PAD_LVDS0_TX3_P__LDB_LVDS0_TX3, + MX53_PAD_LVDS0_CLK_P__LDB_LVDS0_CLK, + MX53_PAD_LVDS0_TX2_P__LDB_LVDS0_TX2, + MX53_PAD_LVDS0_TX1_P__LDB_LVDS0_TX1, + MX53_PAD_LVDS0_TX0_P__LDB_LVDS0_TX0, + MX53_PAD_LVDS1_TX3_P__LDB_LVDS1_TX3, + MX53_PAD_LVDS1_TX2_P__LDB_LVDS1_TX2, + MX53_PAD_LVDS1_CLK_P__LDB_LVDS1_CLK, + MX53_PAD_LVDS1_TX1_P__LDB_LVDS1_TX1, + MX53_PAD_LVDS1_TX0_P__LDB_LVDS1_TX0, }; #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) @@ -589,6 +604,50 @@ static struct imx_ssi_platform_data smd_ssi_pdata = { .flags = IMX_SSI_DMA, }; +static struct fb_videomode video_modes[] = { + { + /* 800x480 @ 57 Hz , pixel clk @ 27MHz */ + "CLAA-WVGA", 57, 800, 480, 37037, 40, 60, 10, 10, 20, 10, + FB_SYNC_CLK_LAT_FALL, + FB_VMODE_NONINTERLACED, + 0,}, + { + /* 800x480 @ 60 Hz , pixel clk @ 32MHz */ + "SEIKO-WVGA", 60, 800, 480, 29850, 89, 164, 23, 10, 10, 10, + FB_SYNC_CLK_LAT_FALL, + FB_VMODE_NONINTERLACED, + 0,}, + { + /* 1600x1200 @ 60 Hz 162M pixel clk*/ + "UXGA", 60, 1600, 1200, 6172, + 304, 64, + 1, 46, + 192, 3, + FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, + FB_VMODE_NONINTERLACED, + 0,}, +}; + +static struct ipuv3_fb_platform_data smd_fb_di0_data = { + .interface_pix_fmt = IPU_PIX_FMT_RGB24, + .mode_str = "1024x768M-16@60", + .modes = video_modes, + .num_modes = ARRAY_SIZE(video_modes), +}; + +static struct ipuv3_fb_platform_data smd_fb_di1_data = { + .interface_pix_fmt = IPU_PIX_FMT_RGB666, + .mode_str = "XGA", + .modes = video_modes, + .num_modes = ARRAY_SIZE(video_modes), +}; + +static struct imx_ipuv3_platform_data ipu_data = { + .rev = 3, + .fb_head0_platform_data = &smd_fb_di0_data, + .fb_head1_platform_data = &smd_fb_di1_data, +}; + static struct platform_pwm_backlight_data mxc_pwm_backlight_data = { .pwm_id = 1, .max_brightness = 255, @@ -596,6 +655,10 @@ static struct platform_pwm_backlight_data mxc_pwm_backlight_data = { .pwm_period_ns = 50000, }; +static struct fsl_mxc_ldb_platform_data ldb_data = { + .ext_ref = 1, +}; + static void __init mx53_smd_board_init(void) { mxc_iomux_v3_setup_multiple_pads(mx53_smd_pads, @@ -609,14 +672,18 @@ static void __init mx53_smd_board_init(void) imx53_add_imx_i2c(0, &mx53_smd_i2c_data); imx53_add_imx_i2c(1, &mx53_smd_i2c_data); imx53_add_imx_i2c(2, &mx53_smd_i2c_data); + + imx53_add_ipuv3(&ipu_data); + imx53_add_vpu(); + imx53_add_ldb(&ldb_data); + imx53_add_v4l2_output(0); + imx53_add_mxc_pwm(1); + imx53_add_mxc_pwm_backlight(0, &mxc_pwm_backlight_data); imx53_add_sdhci_esdhc_imx(0, NULL); imx53_add_sdhci_esdhc_imx(1, &mx53_smd_sd1_data); imx53_add_sdhci_esdhc_imx(2, NULL); imx53_add_ahci_imx(0, &sata_data); - imx53_add_mxc_pwm(1); - imx53_add_mxc_pwm_backlight(0, &mxc_pwm_backlight_data); - mx53_smd_init_usb(); imx53_add_iim(&iim_data); smd_add_device_buttons(); diff --git a/arch/arm/mach-mx5/devices-imx53.h b/arch/arm/mach-mx5/devices-imx53.h index 02c3c122cf8c..cc23448f5046 100755 --- a/arch/arm/mach-mx5/devices-imx53.h +++ b/arch/arm/mach-mx5/devices-imx53.h @@ -84,3 +84,7 @@ extern const struct imx_iim_data imx53_imx_iim_data __initconst; extern const struct imx_mxc_gpu_data imx53_gpu_data __initconst; #define imx53_add_mxc_gpu(pdata) \ imx_add_mxc_gpu(&imx53_gpu_data, pdata) + +extern const struct imx_ldb_data imx53_ldb_data __initconst; +#define imx53_add_ldb(pdata) \ + imx_add_ldb(&imx53_ldb_data, pdata); |