[Mer-discuss] S3C64xx backlight PWM misinited GPIO pin

Maurus Cuelenaere mcuelenaere at gmail.com
Thu Sep 24 21:27:10 EEST 2009


Hi David,

Op 24-09-09 20:11, David F. Carlson schreef:
> Maurus Cuelenaere,
>
> I am glad to meet another smartQ hacker.
>    

I think I've already tried to contact you twice (and you've replied 
once)? :-)

I'm currently teaming up with the Mer team, which have contacts with
the SmartQ people.

> I gave up on the kernel stuff until Dooks and Samsung can figure out what they
> want to do.  I felt like a fly being brushed away.  I got decently far but
> the sdhc bugs, sound support, lack of mfc/pp/g2d/etc., got me down.
>    

So you're experiencing the SDHCI bug too? (see my other post)

> My next-s3c says:
>
> 	} else if(id == 1) {
> 		if(gpio_is_valid(S3C64XX_GPF(15))) {
> 			ret = gpio_request(S3C64XX_GPF(15), "GPF");
>
> 			if (ret) {
> 				printk(KERN_ERR "failed to request GPF for PWM-OUT 1\n");
> 			}
> 			s3c_gpio_cfgpin(S3C64XX_GPF(15),S3C64XX_GPF15_PWM_TOUT1);			
> 		}
>
>    

grep -R 'S3C64XX_GPF(15)' arch/arm/*s3c* seems to only give matches on
mach-smartq.c and mach-smdk6410.c

> My smartQ lcd registers a power_set that I claim "works".
>
>
> static struct plat_lcd_data smartq_lcd_power_data = {
>     .set_power  = smartq_lcd_power_set,
> };
>
> /* framebuffer and LCD setup. */
>
> /* GPF15 = LCD backlight control
>   * GPF13 =>  Panel power
>   * GPN5 = LCD nRESET signal
>   * PWM_TOUT1 =>  backlight brightness
>   */
>
> static void smartq_lcd_power_set(struct plat_lcd_data *pd,
> 				   unsigned int power)
> {
> 	if (power) {
> 		gpio_direction_output(SMARTQ_GPIO_BACKLIGHT_EN, 0);	//S3C64XX_GPM3	: closed
> 		gpio_direction_output(SMARTQ_GPIO_VIDEOAMP_EN, 0);	//S3C64XX_GPK13	: close
> 		gpio_direction_output(S3C64XX_GPF(13), 1);
> 		// PWM controls: gpio_direction_output(S3C64XX_GPF(15), 1);
>
> 		/* fire nRESET on power up */
> 		gpio_direction_output(S3C64XX_GPN(5), 0);
> 		msleep(10);
> 		gpio_direction_output(S3C64XX_GPN(5), 1);
> 		msleep(1);
> 	} else {
> 		// PWM controls: gpio_direction_output(S3C64XX_GPF(15), 0);
> 		gpio_direction_output(SMARTQ_GPIO_BACKLIGHT_EN, 1);	//S3C64XX_GPM3	: open
> 		gpio_direction_output(SMARTQ_GPIO_VIDEOAMP_EN, 1);	//S3C64XX_GPK13	: open
> 		gpio_direction_output(S3C64XX_GPF(13), 0);
> 	}
> }
>    

Why do you also enable the video amplifier? (Which IIRC is for TV-out)

As for the backlight, I'm using the PWM driver; see [1].

[1] 
https://garage.maemo.org/pipermail/mer-discuss/2009-September/000006.html

Regards,

Maurus Cuelenaere


More information about the Mer-discuss mailing list