Posts

Showing posts from January, 2009

Power and PWM issues fixed.

Finally got power issues fixed. PDA doesn't consume power in suspend anymore (at least with sound driver unloaded). The thing was in incorrect poweroff sequence (just a small typo in code) for lcd and in mmc power management. Btw, after ~8h of sleep voltage on the battery is the same as before sleep. Also I got s3c24xx pwm driver working flawlessly on rx1950. There were several bugs in it: no resume handler. So after resume timer was not configured. Results: no backlight and lcd flickering wrong configuration sequence. tcmp and tcnt registers were updated before manual_update flag was set. I've fixed these bugs and submitted patches for pwm upstream. Hope to see them in next kernel versions :) One more thing: battery driver was improved to display proper consumption in uA. I've used WM application - BattLog (thanks to its author(s)!) - to monitor battery and at the same time captured ADC values with haret. As result I've got multiplier for current value :) The next step...

Power management issues

It seems that code that puts rx1950 into sleep is not clear: even in sleep mode rx1950 consumes some power. After ~8h in sleep ~20% of battery was eaten :( I suspect one cause of this problem can be sd/mmc card power management - it was not implemented for rx1950. So I implemented rx1950 s3c2410_mmc_def_setpower function that controls sd/mmc card power. When GPJ1 == 0 card is not powered, when GPJ0 == 1 card is powered. Some info about card-related gpios: GPJ1 - controls card power (1 == on) GPH8 - ro sense, (1 == rw, 0 == ro) GPF5 - card detection Latest patch is available here Precompiled kernel and sound modules are available here

Points 0 and 1 completed :)

Yep, I've just finished rewriting touchscreen and battery drivers to use s3c24xx_adc driver instead using adc directly. It was relatively easy :) No more adc_battery driver (s3c24xx_adc is not adc-class compliant, and I was too lazy to port adc-class to 2.6.28). I rewrote adc_battery to use s3c24xx_adc driver directly, and named it s3c_adc_battery :) And with touchscreen it was much easier: just add some #includes, add adc_client field to device struct, add 2 callback implementations, add some lines about registering as adc_client, and replace some lines that start adc conversion... That's all. Patch is available here P.S. It seems touchscreen driver needs some filtering... I'll look what openmoko guys made to implement touchscreen filtering.

2.6.28 on rx1950

I've spent a day porting old patches to the new kernel, and here's results: 2.6.28-04-jan-2009.tar.bz2 Almost all is working, except wifi (need to port acx100 driver to the 2.6.28 kernel) and battery driver (need to adapt it and touchscreen driver to the new s3c24xx_adc driver) Following tasks are on going: 0. Port touchscreen driver to use s3c24xx_adc 1. Re-implement battery driver 2. Fix sound problems (incorrect sample rate, find out why it doesn't play first time). Problems I've encountered during porting: 1. soft lockup in s3cmci driver in do_pio_write. Thanks to Yaugen Kharuzhy for fix! 2. new fancy (and buggy) gpio lib. No more gpio_to_irq, and gpio_request doesn't work for GPJ, GPGx, where x >=10 P.S. Is there any rx1950-owners who want to help me with porting? :)

Changing blog profile

So, here we go again :) Sorry for not writing new posts since July, but I really had no topics to write about, as this blog was about rx1950 and I did nothing about rx1950. So I've decided to change blog title. Now it's just Engineer's blog :) Don't worry, I do not drop rx1950 hacking, and here's short todo list: 0. Port old patches to 2.6.28 kernel (highest priority) 1. Write sane adc driver, adapt battery and touchscreen drivers to make them use adc driver 2. Clean up sound driver 3. Make screen to switch off correctly before suspend 4. Clean up wifi driver, find out how to turn on/off wifi 5. Build custom rootfs :) 6. Other stuff (lower priority) P.S. Happy new year to everybody ;)