Hi Ruben,
please add the list to CC: or otherwise others will loose important information (maybe the moderators could change the reply-to?)...

Am 03.05.2010 um 20:36 schrieb Ruben Viets:

Hi Nikolaus,

In my compiled kernel The rtc problem is a minor issue, just that the kernel cannot reset the hwclock. If I disable CONFIG_RTC_HCTOSYS, I can get rid of the error during kernel startup, linux script will set the hwclock right during start.

Well, switching off error messages is also a solution :) But, unless one has ntp and internet service, a working RTC would be a nice feature.


If you run hwclock --hctosys script from linux. You will see the rtc is running ok or not.

Ah, ok. Would be a manual workaround.

If it's not, check /dev/rtc .
If there is not a /dev/rtc add it with
#mknod /dev/rtc c 10 135
 and add rw for all users with
 #chmod 666 rtc


The I2C issue could also be related to the wrong configs for sound.ak4642en.c and jz_i2s.c. If you didn't modify the sources this will never work. These files need a full rewriting if you want to get sound working. there are a lot conflicts/warnings with 'dangerous' function calls etc..... still they can partly work, but will never be stable in kernel 2.6.24.3.

I also think it has something to do with I2C. What I have found is some work by Qi-Hardware for the JZ4740/4750 and they have written/ modified a I2C bus driver. I have tried to port it (needs some obvious minor tweaking) but is also not installed/probed/loaded/used. Maybe they can help. Therefore, I will ask on their mailing list.

Debugging has only shown the the I2C error for address 0x13 comes right after calling i2c_open() from file arch/mips/jz4730/i2c.c

The unknown question is what this device is... Since i2c-tools don't work it is difficult to identify...

So it appears that there are multiple I2C drivers available. Perhaps "old" and "new" style.

The interesting experiment was to re-enable the Drivers/Character/pcf driver. And now I see tens of successful i2c_open() calls! And, hwclock --hctosys works. And, the write to 0x13 error is reduced (but not completely removed). hwclock --show also works.

What has changed now is that I have a /sys/class/misc/rtc (which appears to create the /dev/rtc) AND a /sys/class/rtc (which is empty)

So what can we learn? I think I should look into the sources of the old RTC driver to find out what it is doing differently (with respect to initialization, e.g. GPIO assignment?).


I quickly copied pasted some parts of these files and uploaded here:
https://projects.kwaak.net/twiki/pub/Epc700/KernelPort26Compiling/ak4642en.c
https://projects.kwaak.net/twiki/pub/Epc700/KernelPort26Compiling/jz_i2s.c

Thanks! I have started my own git server for the kernel sources and will publish details (togetter with the Lenny 400 rootfs) as soon as I have some progress. Then, one can easily create branches that have sound enabled/disabled and include your patches. And different versions of the rootfs without starting from scratch.

Another question regarding the touch buttons: to your knowledge, is there already a stub driver that simply does not work or has it to be written from scratch? Or can we integrate this into the keyboard driver?

BR,
Nikolaus


You can use them on your own risk ;-) Or you just disable the sound section in the kernel.

Grt Ruben.

Date: Mon, 3 May 2010 17:12:55 +0200
From: mul...@gmail.com
To: h...@computer.org
CC: mipsbook-devel@linuxtogo.org
Subject: Re: [Mipsbook-devel] 2.6-Kernel: RTC not working - may be that I2C is not working?

Hi,

On Mon, May 3, 2010 at 4:32 PM, Dr. H. Nikolaus Schaller <h...@computer.org > wrote:
After more and more experimenting I now tried this config:

$ fgrep I2C kernel/.config
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=m
# I2C Algorithms
# CONFIG_I2C_ALGOBIT is not set
# CONFIG_I2C_ALGOPCF is not set
# CONFIG_I2C_ALGOPCA is not set
# I2C Hardware Bus support
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_TINY_USB is not set
# Miscellaneous I2C Chip support
CONFIG_I2C_DEBUG_CORE=y
CONFIG_I2C_DEBUG_ALGO=y
CONFIG_I2C_DEBUG_BUS=y
CONFIG_I2C_DEBUG_CHIP=y

There is no I2C algoritm enabled and no Hardware Bus support.
With that the only i2c related messages I see in dmesg:

i2c-core: driver [pcf8563] registered
i2c-core: driver [pcf8583] registered

and the

Write I2C device 0x13 failed.

Finally,

/sys/bus/i2c/devices

exists but is completely empty.

Finally, i2cdump reports:

Error: No I2C busses found!

So I now think that the I2C chip driver is not working or not enabled.

Does anyone know where to look for this? How does the JZ4730 I2C interface work? Do we need to do some board-configuration for initialization/registration

Apparently the 2.4 kernel is setup up quite differently.

the only RTC line I see is (verbatim):

PCF8563 RTC installed !!!

there are no i2c or I2C lines in dmesg,

only I2S is mentioned, which is for sound and not clocks :)

Riccardo



New Windows 7: Find the right PC for you. Learn more.

_______________________________________________
Mipsbook-devel mailing list
Mipsbook-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel

Reply via email to