From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Fri, 27 Mar 2009 13:23:58 -0500 Subject: [U-Boot] MPC8572E I2C bus speed after emulator reset In-Reply-To: <43EB80E07C42E1408726E4905FB96B04C08045@CYBORG3.cyclone.com> References: <43EB80E07C42E1408726E4905FB96B04C0803F@CYBORG3.cyclone.com> <43EB80E07C42E1408726E4905FB96B04C08045@CYBORG3.cyclone.com> Message-ID: <49CD19BE.1080904@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Scott Coulter wrote: > Hi Timur, > >> What is the value of CONFIG_SYS_I2C_SPEED in your board header file? > > #define CONFIG_SYS_I2C_SPEED 400000 So far, so good. >> What values does function set_i2c_bus_speed() in fsl_i2c.c program >> into the FDR and DFSR registers? > > According to my printfs and the emulator readback of the values, the > code is putting a 0x6 into the FDR and a 0x1 into the DFSR. These > values appear to be identical with either a hard reset or an emulator > reset. According to the 8572E RM, the default values for DFSR and FDR are 0x10 and 0x00. The values above represent, according to the table, a divider of 768. The RM also says that I2C clock is 1/2 CCB, so that means that your CCB should be 400,000 * 768 * 2 = 614MHz. Is that right? -- Timur Tabi Linux kernel developer at Freescale