diff options
Diffstat (limited to 'arch/arm/mach-exynos/midas-lcd.c')
-rw-r--r-- | arch/arm/mach-exynos/midas-lcd.c | 297 |
1 files changed, 293 insertions, 4 deletions
diff --git a/arch/arm/mach-exynos/midas-lcd.c b/arch/arm/mach-exynos/midas-lcd.c index 68125e2..ad722a6 100644 --- a/arch/arm/mach-exynos/midas-lcd.c +++ b/arch/arm/mach-exynos/midas-lcd.c @@ -471,10 +471,13 @@ static struct s3cfb_lcd s6e8aa0 = { .width = 720, .p_width = 60, /* 59.76 mm */ #endif - .p_height = 106, /* 106.24 mm */ + .p_height = 106, .bpp = 24, .freq = 60, +#if defined(CONFIG_S6E8AA0_AMS480GYXX) + .freq_limit = 40, +#endif /* minumun value is 0 except for wr_act time. */ .cpu_timing = { @@ -506,14 +509,135 @@ static struct s3cfb_lcd s6e8aa0 = { }; #endif +#ifdef CONFIG_FB_S5P_EA8061 +/* for Geminus based on MIPI-DSI interface */ +static struct s3cfb_lcd ea8061 = { + .name = "ea8061", + .height = 1280, + .width = 720, + .p_width = 74, + .p_height = 131, + .bpp = 24, + .freq = 60, + + /* minumun value is 0 except for wr_act time. */ + .cpu_timing = { + .cs_setup = 0, + .wr_setup = 0, + .wr_act = 1, + .wr_hold = 0, + }, + + .timing = { + .h_fp = 52, + .h_bp = 96, + .h_sw = 4, + .v_fp = 13, + .v_fpe = 1, + .v_bp = 1, + .v_bpe = 1, + .v_sw = 2, + .cmd_allow_len = 11, /* v_fp=stable_vfp + cmd_allow_len */ + .stable_vfp = 2, + }, + + .polarity = { + .rise_vclk = 1, + .inv_hsync = 0, + .inv_vsync = 0, + .inv_vden = 0, + }, +}; +#endif + +#ifdef CONFIG_FB_S5P_S6EVR02 +/* for Geminus based on MIPI-DSI interface */ +static struct s3cfb_lcd s6evr02 = { + .name = "s6evr02", + .height = 1280, + .width = 720, + .p_width = 74, + .p_height = 131, + .bpp = 24, + .freq = 58, + .freq_limit = 41, + + /* minumun value is 0 except for wr_act time. */ + .cpu_timing = { + .cs_setup = 0, + .wr_setup = 0, + .wr_act = 1, + .wr_hold = 0, + }, + + .timing = { + .h_fp = 70, + .h_bp = 40, + .h_sw = 3, + .v_fp = 13, + .v_fpe = 1, + .v_bp = 1, + .v_bpe = 1, + .v_sw = 2, + .cmd_allow_len = 7, /* v_fp=stable_vfp + cmd_allow_len + mask_len*/ + .stable_vfp = 2, + }, + + .polarity = { + .rise_vclk = 1, + .inv_hsync = 0, + .inv_vsync = 0, + .inv_vden = 0, + }, +}; + +static struct s3cfb_lcd ea8061 = { + .name = "ea8061", + .height = 1280, + .width = 720, + .p_width = 64, + .p_height = 106, + .bpp = 24, + .freq = 60, + + /* minumun value is 0 except for wr_act time. */ + .cpu_timing = { + .cs_setup = 0, + .wr_setup = 0, + .wr_act = 1, + .wr_hold = 0, + }, + + .timing = { + .h_fp = 52, + .h_bp = 96, + .h_sw = 4, + .v_fp = 13, + .v_fpe = 1, + .v_bp = 1, + .v_bpe = 1, + .v_sw = 2, + .cmd_allow_len = 7, /* v_fp=stable_vfp + cmd_allow_len + mask_len*/ + .stable_vfp = 2, + }, + + .polarity = { + .rise_vclk = 1, + .inv_hsync = 0, + .inv_vsync = 0, + .inv_vden = 0, + }, +}; +#endif + #ifdef CONFIG_FB_S5P_S6E63M0 /* for Geminus based on MIPI-DSI interface */ static struct s3cfb_lcd s6e63m0 = { .name = "s6e63m0", .width = 480, .height = 800, - .p_width = 60, /* 59.76 mm */ - .p_height = 106, /* 106.24 mm */ + .p_width = 60, + .p_height = 106, .bpp = 24, .freq = 56, @@ -630,6 +754,44 @@ static struct s3cfb_lcd s6d6aa1 = { }; #endif +#ifdef CONFIG_FB_S5P_LMS501XX +/* for Geminus based on MIPI-DSI interface */ +static struct s3cfb_lcd lms501xx = { + .name = "lms501xx", + .width = 480, + .height = 800, + .p_width = 66, + .p_height = 110, + .bpp = 24, + .freq = 60, + + /* minumun value is 0 except for wr_act time. */ + .cpu_timing = { + .cs_setup = 0, + .wr_setup = 0, + .wr_act = 1, + .wr_hold = 0, + }, + .timing = { + .h_fp = 65, + .h_bp = 49, + .h_sw = 17, + .v_fp = 8, + .v_fpe = 1, + .v_bp = 12, + .v_bpe = 1, + .v_sw = 4, + .cmd_allow_len = 6, /* v_fp=stable_vfp + cmd_allow_len */ + .stable_vfp = 2, + }, + .polarity = { + .rise_vclk = 1, + .inv_hsync = 0, + .inv_vsync = 0, + .inv_vden = 0, + }, +}; +#endif static int reset_lcd(void) { int err; @@ -664,6 +826,65 @@ static void lcd_cfg_gpio(void) return; } +#if defined(CONFIG_FB_S5P_LMS501XX) +static int lcd_power_on(void *ld, int enable) +{ + struct regulator *regulator; + int err; + + printk(KERN_INFO "%s : enable=%d\n", __func__, enable); + + err = gpio_request(GPIO_LCD_BL_EN, "LCD_BL_EN"); + if (err) { + printk(KERN_ERR "failed to request GPF0[5] for " + "LCD_BL_EN control\n"); + return -EPERM; + } + err = gpio_request(GPIO_MLCD_RST, "MLCD_RST"); + if (err) { + printk(KERN_ERR "failed to request GPY4[5] for " + "MLCD_RST control\n"); + return -EPERM; + } + + err = gpio_request(GPIO_LCD_22V_EN_00, "LCD_EN"); + if (err) { + printk(KERN_ERR "failed to request GPM4[4] for " + "LCD_2.2V_EN control\n"); + return -EPERM; + } + + if (enable) { + gpio_set_value(GPIO_LCD_22V_EN_00, GPIO_LEVEL_HIGH); + msleep(25); + regulator = regulator_get(NULL, "vlcd_3.3v"); + if (IS_ERR(regulator)) + goto out; + regulator_enable(regulator); + regulator_put(regulator); + gpio_set_value(GPIO_LCD_BL_EN, 1); + } else { + regulator = regulator_get(NULL, "vlcd_3.3v"); + if (IS_ERR(regulator)) + goto out; + if (regulator_is_enabled(regulator)) + regulator_force_disable(regulator); + regulator_put(regulator); + + gpio_set_value(GPIO_LCD_22V_EN_00, GPIO_LEVEL_LOW); + gpio_set_value(GPIO_MLCD_RST, 0); + gpio_set_value(GPIO_LCD_BL_EN, 0); + } + +out: +/* Release GPIO */ + gpio_free(GPIO_MLCD_RST); + gpio_free(GPIO_LCD_22V_EN_00); + gpio_free(GPIO_LCD_BL_EN); +return 0; + +} +#else static int lcd_power_on(void *ld, int enable) { struct regulator *regulator; @@ -688,18 +909,52 @@ static int lcd_power_on(void *ld, int enable) if (enable) { gpio_set_value(GPIO_LCD_22V_EN_00, GPIO_LEVEL_HIGH); +#if defined(CONFIG_MACH_T0) + regulator = regulator_get(NULL, "vcc_1.8v_lcd"); + if (IS_ERR(regulator)) + goto out; + regulator_enable(regulator); + regulator_put(regulator); +#endif + +#ifdef CONFIG_MACH_GC1 + regulator = regulator_get(NULL, "lcd_io_1.8v"); + if (IS_ERR(regulator)) + goto out; + regulator_enable(regulator); + regulator_put(regulator); +#else regulator = regulator_get(NULL, "vlcd_3.3v"); if (IS_ERR(regulator)) goto out; regulator_enable(regulator); regulator_put(regulator); +#endif } else { +#ifdef CONFIG_MACH_GC1 + regulator = regulator_get(NULL, "lcd_io_1.8v"); + if (IS_ERR(regulator)) + goto out; + if (regulator_is_enabled(regulator)) + regulator_force_disable(regulator); + regulator_put(regulator); +#else regulator = regulator_get(NULL, "vlcd_3.3v"); if (IS_ERR(regulator)) goto out; if (regulator_is_enabled(regulator)) regulator_force_disable(regulator); regulator_put(regulator); +#endif + +#if defined(CONFIG_MACH_T0) + regulator = regulator_get(NULL, "vcc_1.8v_lcd"); + if (IS_ERR(regulator)) + goto out; + if (regulator_is_enabled(regulator)) + regulator_force_disable(regulator); + regulator_put(regulator); +#endif gpio_set_value(GPIO_LCD_22V_EN_00, GPIO_LEVEL_LOW); gpio_set_value(GPIO_MLCD_RST, 0); } @@ -709,7 +964,9 @@ out: gpio_free(GPIO_MLCD_RST); gpio_free(GPIO_LCD_22V_EN_00); return 0; + } +#endif static void s5p_dsim_mipi_power_control(int enable) { @@ -781,10 +1038,26 @@ void __init mipi_fb_init(void) #if defined(CONFIG_FB_S5P_S6E8AA0) dsim_lcd_info->lcd_panel_info = (void *)&s6e8aa0; #endif + +#if defined(CONFIG_FB_S5P_EA8061) + dsim_lcd_info->lcd_panel_info = (void *)&ea8061; +#endif + +#if defined(CONFIG_FB_S5P_S6EVR02) + dsim_lcd_info->lcd_panel_info = (void *)&s6evr02; +#endif + #if defined(CONFIG_FB_S5P_S6D6AA1) dsim_lcd_info->lcd_panel_info = (void *)&s6d6aa1; #endif +#if defined(CONFIG_MACH_T0) && defined(CONFIG_FB_S5P_S6EVR02) && defined(GPIO_OLED_ID) + if (!gpio_get_value(GPIO_OLED_ID)) { /* for EA8061 DDI */ + dsim_lcd_info->lcd_panel_info = (void *)&ea8061; + fb_platform_data.lcd = (void *)&ea8061; + } +#endif + #ifdef CONFIG_FB_S5P_S6E63M0 dsim_lcd_info->lcd_panel_info = (void *)&s6e63m0; dsim_pd->dsim_info->e_no_data_lane = DSIM_DATA_LANE_2; @@ -792,6 +1065,13 @@ void __init mipi_fb_init(void) dsim_pd->dsim_info->p = 3; dsim_pd->dsim_info->m = 80; dsim_pd->dsim_info->s = 1; +#elif defined(CONFIG_FB_S5P_LMS501XX) + dsim_lcd_info->lcd_panel_info = (void *)&lms501xx; + dsim_pd->dsim_info->e_no_data_lane = DSIM_DATA_LANE_2; + /* 440Mbps */ + dsim_pd->dsim_info->p = 3; + dsim_pd->dsim_info->m = 110; + dsim_pd->dsim_info->s = 1; #else /* 500Mbps */ dsim_pd->dsim_info->p = 3; @@ -809,7 +1089,6 @@ void __init mipi_fb_init(void) /*s3cfb_set_platdata(&fb_platform_data);*/ } #endif -#endif struct s3c_platform_fb fb_platform_data __initdata = { .hw_ver = 0x70, @@ -839,7 +1118,17 @@ struct s3c_platform_fb fb_platform_data __initdata = { #if defined(CONFIG_FB_S5P_S6D6AA1) .lcd = &s6d6aa1 #endif +#if defined(CONFIG_FB_S5P_EA8061) + .lcd = &ea8061 +#endif +#if defined(CONFIG_FB_S5P_S6EVR02) + .lcd = &s6evr02 +#endif +#if defined(CONFIG_FB_S5P_LMS501XX) + .lcd = &lms501xx +#endif }; +#endif #ifdef CONFIG_FB_S5P_MDNIE static struct platform_mdnie_data mdnie_data = { |