MPC5200 with PCF8563 RTC

Jón Benediktsson jonb at
Fri Sep 24 04:06:39 EST 2004


I am working on porting linux to a custom board based on MPC5200, which 
has a PCF8563 real time clock connected via i2c2_io and i2c2_clk pins.
It looks like this same combination is used on the PM520 board.

I am using u-boot and it was a breeze getting this combination to work in 
u-boot.  I just added the right CONFIG_s and the u-boot date command 
without any problems.

I am however having a more difficult time getting the linux kernel 
(linuxppc_2_4_devel from Denx) to work with PCF8563.  I get errors from 
rtc_rd( ), but I
can't understand why.  I have compared the i2c clock signals between 
u-boot and linux and noticed that the clock signal is different with 
linux.   The third clock
pulse is much narrower than the others, whereas with u-boot the clock 
pulses are all even.  But I can't figure out why the i2c clock behaves 
differently with linux.
Attached is the console output.

Any thoughts ?

Jón Benediktsson
Marel hf.

Memory BAT mapping: BAT2=32Mb, BAT3=0Mb, residual: 0Mb
Linux version 2.4.25 (jonb at (gcc version 3.2.2 20030217 
(Yellow Dog
 Linux 3.0 3.2.2-2a_1)) #46 Fim Sep 23 17:43:42 UTC 2004
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/nfs rw 
nfsroot= ip= panic=1
Calibrating delay loop (skipped)... 0.05 BogoMIPS
Memory: 29992k available (1348k kernel code, 452k data, 76k init, 0k 
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
JFFS2 version 2.2. (C) 2001-2003 Red Hat, Inc.
i2c-core.o: i2c core module version 2.6.1 (20010830)
i2c-dev.o: i2c /dev entries driver module version 2.6.1 (20010830)
i2c-proc.o version 2.6.1 (20010830)
pty: 256 Unix98 ptys configured
ttyS0 on PSC1
ttyS1 on PSC2
ttyS2 on PSC3
PCF8563 Real-Time Clock Driver $Revision: 1.3 $ wd at
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with 
Port Config is: 0x91050404
ipb=66MHz, set clock period to 15
GPIO config: 91050404
ATA invalid: 00800000
ATA hostcnf: 03000000
ATA pio1   : 100a0a00
ATA pio2   : 02040600
XLB Arb cnf: 80002006
mpc5xxx_ide: Setting up IDE interface ide0...
Probing IDE interface ide0...
ide0 at 0xf0003a60-0xf0003a67,0xf0003a5c on irq 45
hda: attached ide-disk driver.
hda: 507904 sectors (260 MB) w/1KiB Cache, CHS=992/16/32
Partition check:
 hda: hda1 hda2 hda3 hda4
Icecube Bank 0: Found 1 x16 devices at 0x0 in 8-bit mode
 Amd/Fujitsu Extended Query Table at 0x0040
Icecube Bank 0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Icecube flash bank 0: Using static image partition definition
Creating 5 MTD partitions on "Icecube Bank 0":
0x00000000-0x00800000 : "Spare"
0x00800000-0x00900000 : "kernel"
0x00900000-0x00c00000 : "initrd"
0x00c00000-0x00f00000 : "jffs"
0x00f00000-0x01000000 : "Firmware"
i2c-core.o: client [PCF8563] registered to adapter [PM520 I2C module #2 
e](pos. 0).
RTC switching kernel pointers
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
Get RTC year: ff mon/cent: ff mday: ff wday: ff hr: ff min: ff sec: ff
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_rd(): i2c transfer error
Alarms: wday: ff day: ff hour: ff min: ff
PCF8563 RTC Low Voltage - date/time not reliable
get rtc [dec] year=2165 mon=25 day=45 hour=45 min=85 sec=85
Set System Time from RTC Time: 1925913489
RTC installed, minor 135
rtc_rd(): i2c transfer error
PCF8563 RTC Low Voltage - date/time not reliable
rtc_wr(): i2c transfer error
rtc_wr(): i2c transfer error
rtc_wr(): i2c transfer error
rtc_rd(): i2c transfer error
rtc_wr(): i2c transfer error
rtc_wr(): i2c transfer error
rtc_wr(): i2c transfer error
rtc_wr(): i2c transfer error
rtc_wr(): i2c transfer error
i2c-algo-5xxx.o: scanning bus PM520 I2C module #2 interface...
i2c-pm520.o: I2C module #2 installed
NET4: Linux TCP/IP 1.0 for NET4.0
eth0: Phy @ 0x0, type DP83847 (0x20005c30)
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
eth0: Waiting for the link to be up...
eth0: status: link up, 100 Mbps Half Duplex.
IP-Config: Complete:
      device=eth0, addr=, mask=, gw=,
     host=ns4, domain=, nis-domain=(none),
     bootserver=, rootserver=, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on
Looking up port of RPC 100005/1 on
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 76k init
INIT: version 2.84 booting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Linuxppc-dev mailing list