Posts

Showing posts from June, 2008

rx1950 battery driver

Today I've finished first implementation of rx1950 battery driver. It's based on adc-battery driver from hh.org Charging now work correctly (I've tested it, it can charge my battery to 100%, and then disables charging and makes red LED to light solid) Battery level estimated only by battery voltage. It's quite inaqurate and I'm trying to find ways to improve it. Results of my efforts as usually available on hh.org: http://handhelds.org/moin/moin.cgi/HpIpaqRx1950 P.S. Unfortunately, battery driver conflicts with touchscreen driver. I'm working on solution...

Batteries, lithium, ions, chargers...

At last :) I've managed to get charging work correctly, red led blinks when charging is in progress, and lights solid when charging finished. (Denis reported that his PDA has yellow led, btw, it does not matter :)) Problem was stupid: GPJ2, GPJ3 and GPJ6 (and not GPJ4 as I've reported before!) are affected in battery charging. I'll post patch after some testing ;) Here's short description: when charger connected, GPF2 goes to 0, and EINT2 interrupt occurs. In that case we should: set GPA2 and GPA3 to 1 wait for some time, GPF3 should become 0 (not sure that it's necessary) then we need to set GPJ2, GPJ3 and GPJ6 to 1 when charging is finished, GPF3 becomes 1 (GPF2 still 0!), in that case we should: set GPA2 and GPA3 to 0, set GPA6 and GPA7 to 1 set GPJ2, GPJ3, GPJ6 to 0  when charger is disconnected, GPF2 = 1. Each charger connecting/disconnecting event EINT2 occurs. But it doesn't when charging finished - so we should poll GPF3 periodically to prevent battery o

Some notes about s3c24xx suspend/resume (with htc-compatible loader)

Here's some interesting notes about suspend/resume with stock htc-compatible bootloader (rx1950, h1940, rx3000 PDAs) After waking up from suspend bootloader: checks if we really wake up from suspend (not power-on after power-off, etc) performs quick memory check (it calculates simple checksum), if check was successfull jumps to physical address 0x30081000 But haret loads kernel to address 0x30008000. So resume address overlaps kernel space. To avoid kernel code corruption we should load kernel higher :) So, you'll need to patch your kernel to create offset for .text section, and also you'll need to patch haret. Here's patch for haret: diff -Naur haret/src/linboot.cpp haret.offset/src/linboot.cpp --- haret/src/linboot.cpp 2007-04-15 20:13:41.000000000 +0200 +++ haret.offset/src/linboot.cpp 2007-04-26 19:52:13.000000000 +0200 @@ -87,7 +87,7 @@ // Recommended tags placement = RAM start + 256 #define PHYSOFFSET_TAGS 0x100 // Recommended kernel placement = RAM start + 3

rx1950 porting

Sooooo, here we go :) Here I'll post history of porting linux to rx1950, info about its hardware, etc. Prehistory: Port was started by Victor Chukhantsev and Denis Grigoriev in the end of 2006. At the early stage modified version of linux-2.6.17 could be booted into console using modified haret. SD card didn't work, usb didn't work... At the beggining of 2007 (when I've joined to the development ;)) many drivers for rx1950 were ported (they were taken from other s3c24xx-based devices): s3c2440mci (sd/mmc driver), backlight driver, usb-device driver. Suspend/battery control/sound still didn't work. Also there were some issues with usb-device driver From may'07 till may'08 development was stalled. Our days: In may'08 I've continued porting. Old patches were adapted to 2.6.25.4 kernel, old s3c2440mci driver was removed, and new s3cmci driver took his place. Also some patches were taken from openmoko repository (s3c2440-usbdevice workaround) I've add