Tuesday, September 29, 2009

Some stuff for rx1950

New kernel (still without sound support), bootloader (haret) and rootfs are available.
Also here you'll find repo with packages for rx1950 :)

Thursday, September 24, 2009

LCD backlight

It seems that we have no more issues with LCD and backlight management. LCD switches on/off flawlessly, so does LCD backlight :)

I've just fixed a problem with backlight not enabling after it was disabled. I've discussed PWM-problems with my friend Ordog (it's his nickname), and he suggested to play with PWM frequency; he described how it can work, and proposed some reasons why it doesn't enable in my case. I decided that backlight needs wormup to switch on properly, I've checked this hypothesis - and it works! Backlight switches on properly after short "warmup". So, thanks to Ordog!

Yesterday I've submited my patchset to the linux-arm-kernel maillist. I still have no response about rx1950-related patches, but s3c2440-udc related patch brought up small discussion. You can read it on linux-arm-kernel maillist archive if you're interested in it :)

Tuesday, September 22, 2009

LCD: no more garbage

Finaly! I find out how to disable LCD without leaving garbage on it! It's time to polish my patches and send them upstream :)

I've used haret to capture gpio values.

Here's code to disable LCD sanely:

/* GPC11-GPC15->OUTPUT */
s3c2410_gpio_cfgpin(S3C2410_GPC11, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPC12, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPC13, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPC14, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPC15, S3C2410_GPIO_OUTPUT);

/* GPC11-GPC15->1 */
s3c2410_gpio_setpin(S3C2410_GPC8, 1);
s3c2410_gpio_setpin(S3C2410_GPC9, 1);
s3c2410_gpio_setpin(S3C2410_GPC10, 1);
s3c2410_gpio_setpin(S3C2410_GPC11, 1);
s3c2410_gpio_setpin(S3C2410_GPC12, 1);
s3c2410_gpio_setpin(S3C2410_GPC13, 1);
s3c2410_gpio_setpin(S3C2410_GPC14, 1);
s3c2410_gpio_setpin(S3C2410_GPC15, 1);

/* Wait a bit here... */
mdelay(100);

/* GPD2-GPD7->OUTPUT */
s3c2410_gpio_cfgpin(S3C2410_GPD2, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD3, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD4, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD5, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD6, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD7, S3C2410_GPIO_OUTPUT);

/* GPD11-GPD15->OUTPUT */
s3c2410_gpio_cfgpin(S3C2410_GPD11, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD12, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD13, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD14, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPD15, S3C2410_GPIO_OUTPUT);

/* GPD2-GPD7->1, GPD11-GPD15->1 */
s3c2410_gpio_setpin(S3C2410_GPD2, 1);
s3c2410_gpio_setpin(S3C2410_GPD3, 1);
s3c2410_gpio_setpin(S3C2410_GPD4, 1);
s3c2410_gpio_setpin(S3C2410_GPD5, 1);
s3c2410_gpio_setpin(S3C2410_GPD6, 1);
s3c2410_gpio_setpin(S3C2410_GPD7, 1);
s3c2410_gpio_setpin(S3C2410_GPD11, 1);
s3c2410_gpio_setpin(S3C2410_GPD12, 1);
s3c2410_gpio_setpin(S3C2410_GPD13, 1);
s3c2410_gpio_setpin(S3C2410_GPD14, 1);
s3c2410_gpio_setpin(S3C2410_GPD15, 1);

/* Wait a bit here...*/
mdelay(100);

/* GPB0->OUTPUT, GPB0->0 */
s3c2410_gpio_setpin(S3C2410_GPB0, 0);
s3c2410_gpio_cfgpin(S3C2410_GPB0, S3C2410_GPIO_OUTPUT);

/* GPC1-GPC4->OUTPUT, GPC2->0 */
s3c2410_gpio_cfgpin(S3C2410_GPC1, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPC2, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_setpin(S3C2410_GPC2, 0);
s3c2410_gpio_cfgpin(S3C2410_GPC3, S3C2410_GPIO_OUTPUT);
s3c2410_gpio_cfgpin(S3C2410_GPC4, S3C2410_GPIO_OUTPUT);

/* GPC15-GPC11->0 */
s3c2410_gpio_setpin(S3C2410_GPC11, 0);
s3c2410_gpio_setpin(S3C2410_GPC12, 0);
s3c2410_gpio_setpin(S3C2410_GPC13, 0);
s3c2410_gpio_setpin(S3C2410_GPC14, 0);
s3c2410_gpio_setpin(S3C2410_GPC15, 0);

/* GPD15-GPD11->0, GPD3->GPD8->0 */
s3c2410_gpio_setpin(S3C2410_GPD11, 0);
s3c2410_gpio_setpin(S3C2410_GPD12, 0);
s3c2410_gpio_setpin(S3C2410_GPD13, 0);
s3c2410_gpio_setpin(S3C2410_GPD14, 0);
s3c2410_gpio_setpin(S3C2410_GPD15, 0);
s3c2410_gpio_setpin(S3C2410_GPD2, 0);
s3c2410_gpio_setpin(S3C2410_GPD3, 0);
s3c2410_gpio_setpin(S3C2410_GPD4, 0);
s3c2410_gpio_setpin(S3C2410_GPD5, 0);
s3c2410_gpio_setpin(S3C2410_GPD6, 0);
s3c2410_gpio_setpin(S3C2410_GPD7, 0);

/* GPC6->0, GPC7->0, GPC5->0 */
s3c2410_gpio_setpin(S3C2410_GPC6, 0);
s3c2410_gpio_setpin(S3C2410_GPC7, 0);
s3c2410_gpio_setpin(S3C2410_GPC5, 0);

/* GPB1->OUTPUT, GPB1->0 */
s3c2410_gpio_setpin(S3C2410_GPB1, 0);
s3c2410_gpio_cfgpin(S3C2410_GPB1, S3C2410_GPIO_OUTPUT);
pwm_config(lcd_power->pwm, 0, lcd_power->period);
pwm_disable(lcd_power->pwm);

/* GPC0->0, GPC10->0 */
s3c2410_gpio_setpin(S3C2410_GPC0, 0);
s3c2410_gpio_setpin(S3C2410_GPC10, 0);

Monday, September 21, 2009

Some words about what's going on...

I've got 5 minutes of spare time, so I decided to drop couple of lines into my blog.

I've started to bring up kernel from linus' tree on rx1950. Basic functional (no battery, no touchscreen, no sound, no wifi) works. I'm going to submit patches to linux-arm-kernel soon. (About touchscreen: I hope guys from openmoko kernel-team will submit their s3c-ts driver. If they don't I'll submit my own version.)

If anyone is interested, I can share patches. BTW, I doubt that they will be usefull for someone in current state :)

Tuesday, September 15, 2009

rx1950 and upstream haret

Finally got issue with mainline haret not booting linux on rx1950 fixed. It was so trivial... Haret modified by Denis Grigoriev initializes uart, mainline haret does not. Linux can't boot on s3c24xx with uart unitialized when it uses uart for low-level messages due to bug.

Fix for kernel was submited by Juergen Beisert in August, 2009 and can be found here.

Patches for haret (with workaround and proper rx1950 detection) can be found here.

Update: I've submited patch that adds configurable kernel offset to haret maillist. It seems that mainline haret will be able to boot linux on rx1950 soon :)

2nd update: My patches were included into mainline haret. Neat :)