static void dp_lcd_set_power(struct plat_lcd_data *pd,
				unsigned int power)
{
	/* PMIC_LDO_19_EN */
	gpio_request(EXYNOS5410_GPJ3(6), "GPJ3");
	if (power)
		gpio_direction_output(EXYNOS5410_GPJ3(6), 1);

#ifndef CONFIG_BACKLIGHT_PWM
	/* LCD_PWM_IN_2.8V: LCD_B_PWM, GPB2_0 */
	gpio_request(EXYNOS5410_GPB2(0), "GPB2");
#endif

	/* LCD_EN: GPH0_1 */
	gpio_request(EXYNOS5410_GPH0(1), "GPH0");

	/* LCD_EN: GPH0_1 */
	gpio_direction_output(EXYNOS5410_GPH0(1), power);
	msleep(90);

#ifndef CONFIG_BACKLIGHT_PWM
	/* LCD_PWM_IN_2.8V: LCD_B_PWM, GPB2_0 */
	gpio_direction_output(EXYNOS5410_GPB2(0), power);

	gpio_free(EXYNOS5410_GPB2(0));
#endif

	/* PMIC_LDO_19_EN */
	if (!power)
		gpio_direction_output(EXYNOS5410_GPJ3(6), 0);

	gpio_free(EXYNOS5410_GPH0(1));
	gpio_free(EXYNOS5410_GPJ3(6));
}
static void mipi_lcd_set_power(struct plat_lcd_data *pd,
				unsigned int power)
{
	/* reset */
	gpio_request_one(EXYNOS5410_GPX1(5), GPIOF_OUT_INIT_HIGH, "GPX1");

	usleep_range(20000, 21000);
	if (power) {
		/* fire nRESET on power up */
		gpio_set_value(EXYNOS5410_GPX1(5), 0);
		usleep_range(20000, 21000);
		gpio_set_value(EXYNOS5410_GPX1(5), 1);
		usleep_range(20000, 21000);
		gpio_free(EXYNOS5410_GPX1(5));
	} else {
		/* fire nRESET on power off */
		gpio_set_value(EXYNOS5410_GPX1(5), 0);
		usleep_range(20000, 21000);
		gpio_set_value(EXYNOS5410_GPX1(5), 1);
		usleep_range(20000, 21000);
		gpio_free(EXYNOS5410_GPX1(5));
	}
	usleep_range(20000, 21000);
	/* power */
	gpio_request_one(EXYNOS5410_GPX3(0), GPIOF_OUT_INIT_LOW, "GPX3");
	if (power) {
		/* fire nRESET on power up */
		gpio_set_value(EXYNOS5410_GPX3(0), 1);
		gpio_free(EXYNOS5410_GPX3(0));
	} else {
		/* fire nRESET on power off */
		gpio_set_value(EXYNOS5410_GPX3(0), 0);
		gpio_free(EXYNOS5410_GPX3(0));
	}

#ifndef CONFIG_BACKLIGHT_PWM
	/* backlight */
	gpio_request_one(EXYNOS5410_GPB2(0), GPIOF_OUT_INIT_LOW, "GPB2");
	if (power) {
		/* fire nRESET on power up */
		gpio_set_value(EXYNOS5410_GPB2(0), 1);
		gpio_free(EXYNOS5410_GPB2(0));
	} else {
		/* fire nRESET on power off */
		gpio_set_value(EXYNOS5410_GPB2(0), 0);
		gpio_free(EXYNOS5410_GPB2(0));
	}
#endif /* CONFIG_BACKLIGHT_PWM */
}
Example #3
0
static void dp_lcd_set_power(struct plat_lcd_data *pd,
				unsigned int power)
{
	printk("## %s, %d\n", __func__, __LINE__);

#ifndef CONFIG_BACKLIGHT_PWM
	/* LCD_PWM_IN_2.8V: LCD_B_PWM, GPB2_0 */
	gpio_request(EXYNOS5410_GPB2(0), "GPB2");
#endif

	gpio_request(EXYNOS5410_GPJ0(0), "GPJ0");
	if(power)
		gpio_direction_output(EXYNOS5410_GPJ0(0), 1);

#ifndef CONFIG_BACKLIGHT_PWM
	/* LCD_PWM_IN_2.8V: LCD_B_PWM, GPB2_0 */
	gpio_direction_output(EXYNOS5410_GPB2(0), power);

	gpio_free(EXYNOS5410_GPB2(0));
#endif

	gpio_free(EXYNOS5410_GPJ0(0));
}
#endif
#endif
#ifdef CONFIG_S5P_DEV_FIMD0
	&s5p_device_fimd0,
#else
	&s5p_device_fimd1,
#endif
#ifdef CONFIG_S5P_DP
	&s5p_device_dp,
	&smdk5410_dp_lcd,
#endif
};

/* LCD Backlight data */
static struct samsung_bl_gpio_info smdk5410_bl_gpio_info = {
	.no = EXYNOS5410_GPB2(0),
	.func = S3C_GPIO_SFN(2),
};

static struct platform_pwm_backlight_data smdk5410_bl_data = {
	.pwm_id = 0,
	.pwm_period_ns = 30000,
};

void __init exynos5_smdk5410_display_init(void)
{
#ifdef CONFIG_FB_MIPI_DSIM
#ifdef CONFIG_S5P_DEV_MIPI_DSIM0
	s5p_dsim0_set_platdata(&dsim_platform_data);
#else
	s5p_dsim1_set_platdata(&dsim_platform_data);
Example #5
0
static void vienna_audio_gpio_init(void)
{
	int err;

	if (system_rev < 0x2) {
		/* codec spi_mode */
		err = gpio_request(EXYNOS5410_GPB2(1), "CODEC_SPIMODE");
		if (err) {
			pr_err(KERN_ERR "GPIO_CODEC_SPI_MODE GPIO set error!\n");
			return;
		}
		gpio_direction_output(EXYNOS5410_GPB2(1), 1);
		gpio_set_value(EXYNOS5410_GPB2(1), 0); /* codec spi_mode 0, 3 */
		gpio_free(EXYNOS5410_GPB2(1));
	}

	/* Interrupt from codec jack detection */
	err = gpio_request(EXYNOS5410_GPX2(5), "EAR_SEND_END");
	if (err) {
		pr_err(KERN_ERR "EAR_SEND_END GPIO set error!\n");
		return;
	}
	s3c_gpio_setpull(EXYNOS5410_GPX2(5), S3C_GPIO_PULL_NONE);
	s5p_register_gpio_interrupt(EXYNOS5410_GPX2(5));
	gpio_direction_input(EXYNOS5410_GPX2(5));
	s3c_gpio_cfgpin(EXYNOS5410_GPX2(5), S3C_GPIO_SFN(0xf));

#ifdef CONFIG_SND_USE_YMU831_LDODE_GPIO
	err = gpio_request(GPIO_YMU_LDO_EN, "YMU_LDO_EN");
	if (err) {
		pr_err(KERN_ERR "YMU_LDO_EN GPIO set error!\n");
		return;
	}
	gpio_direction_output(GPIO_YMU_LDO_EN, 1);
	gpio_set_value(GPIO_YMU_LDO_EN, 0);
	gpio_free(GPIO_YMU_LDO_EN);
#endif

	/* Main Microphone BIAS */
	err = gpio_request(EXYNOS5410_GPJ1(2), "MICBIAS");
	if (err) {
		pr_err(KERN_ERR "MICBIAS_EN GPIO set error!\n");
		return;
	}
	gpio_direction_output(EXYNOS5410_GPJ1(2), 1);
	gpio_set_value(EXYNOS5410_GPJ1(2), 0);
	gpio_free(EXYNOS5410_GPJ1(2));

	err = gpio_request(EXYNOS5410_GPJ0(1), "SPK_EN");
	if (err) {
		pr_err(KERN_ERR "SPK_EN GPIO set error!\n");
		return;
	}
	gpio_direction_output(EXYNOS5410_GPJ0(1), 1);
	gpio_set_value(EXYNOS5410_GPJ0(1), 1);
	gpio_free(EXYNOS5410_GPJ0(1));

	err = gpio_request(EXYNOS5410_GPK0(7), "LINEOUT_ON");
	if (err) {
		pr_err(KERN_ERR "LINEOUT_ON GPIO set error!\n");
		return;
	}
	gpio_direction_output(EXYNOS5410_GPK0(7), 1);
	gpio_set_value(EXYNOS5410_GPK0(7), 1);
	gpio_free(EXYNOS5410_GPK0(7));
}
static struct platform_device *odroidxu_display_devices[] __initdata = {
	&s5p_device_fimd1,
};

static struct platform_device *odroidxu_mipi_display_devices[] __initdata = {
	&s5p_device_mipi_dsim1,
};

static struct platform_device *odroidxu_dp_display_devices[] __initdata = {
	&s5p_device_dp,
	&odroidxu_dp_lcd,
};

/* LCD Backlight data */
static struct samsung_bl_gpio_info odroidxu_bl_gpio_info = {
	.no = EXYNOS5410_GPB2(3),
	.func = S3C_GPIO_SFN(2),
};

static struct platform_pwm_backlight_data odroidxu_bl_data = {
	.pwm_id = 3,
	.pwm_period_ns = 30000,
};

void    s5p_dp_set_parameter(void)
{
    odroidxu_fb_default.win_mode.left_margin	= simple_strtol(FbLeft , NULL, 10);
    odroidxu_fb_default.win_mode.right_margin	= simple_strtol(FbRight, NULL, 10);
    odroidxu_fb_default.win_mode.upper_margin	= simple_strtol(FbUpper, NULL, 10);
    odroidxu_fb_default.win_mode.lower_margin	= simple_strtol(FbLower, NULL, 10);
    odroidxu_fb_default.win_mode.hsync_len	    = simple_strtol(FbHsync, NULL, 10);