From: Anand Mallya Date: Fri, 12 May 2006 01:53:00 -0700 (PDT) Subject: [U-Boot-Users] External RTC in MPC860P (i2c - rtc DS1307) In-Reply-To: <20060510133209.751EE352B0C@atlas.denx.de> Message-ID: <20060512085300.48840.qmail@web36913.mail.mud.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Wolfgang, >No, this is NOT correct. You must not define the same things in >several place, and differently. Use a single definition in your board >config file, and make sure it is correct. Now I've taken reference of the TQM866M.h for the I2C RTC and changed the the "include/configs/BOARD.h" as below: /* enable I2C and select the hardware/software driver */ #undef CONFIG_HARD_I2C /* I2C with hardware support */ #define CONFIG_SOFT_I2C 1 /* I2C bit-banged */ #define CONFIG_RTC_DS1307 1 #define CFG_I2C_SPEED 93000 /* 93 kHz is supposed to work */ #define CFG_I2C_SLAVE 0xFE #ifdef CONFIG_SOFT_I2C /* * * Software (bit-bang) I2C driver configuration * */ #define PB_SCL 0x00000020 /* PB 26 */ #define PB_SDA 0x00000010 /* PB 27 */ #define I2C_INIT (immr->im_cpm.cp_pbdir |= PB_SCL) #define I2C_ACTIVE (immr->im_cpm.cp_pbdir |= PB_SDA) #define I2C_TRISTATE (immr->im_cpm.cp_pbdir &= ~PB_SDA) #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) #define I2C_SDA(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \ else immr->im_cpm.cp_pbdat &= ~PB_SDA #define I2C_SCL(bit) if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \ else immr->im_cpm.cp_pbdat &= ~PB_SCL #define I2C_DELAY udelay(2) /* 1/4 I2C clock duration */ #endif /* CONFIG_SOFT_I2C */ All other definitions I've reverted back. But now after the changes done following is what I get: [ICM] $date i2c_read: chip 68 addr 00 alen 1 buffer 00f3dbf8 len 1 i2c_read, no chip responded 68 i2c_read: chip 68 addr 01 alen 1 buffer 00f3dbf8 len 1 i2c_read, no chip responded 68 i2c_read: chip 68 addr 02 alen 1 buffer 00f3dbf8 len 1 i2c_read, no chip responded 68 i2c_read: chip 68 addr 03 alen 1 buffer 00f3dbf8 len 1 i2c_read, no chip responded 68 i2c_read: chip 68 addr 04 alen 1 buffer 00f3dbf8 len 1 i2c_read, no chip responded 68 i2c_read: chip 68 addr 05 alen 1 buffer 00f3dbf8 len 1 i2c_read, no chip responded 68 i2c_read: chip 68 addr 06 alen 1 buffer 00f3dbf8 len 1 i2c_read, no chip responded 68 Get RTC year: 00 mon: 00 mday: 00 wday: 00 hr: 00 min: 00 sec: 00 Get DATE: 2000-00-00 (wday=7) TIME: 0:00:00 Date: 2000-00-00 (unknown day) Time: 0:00:00 [ICM] $ Is there anything still I'm missing, Please do help me in this regard. Thanks in Advance! --Ganesh --------------------------------- Blab-away for as little as 1?/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.denx.de/pipermail/u-boot/attachments/20060512/971a8567/attachment.htm