From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Date: Thu, 17 Sep 2009 08:36:32 +0200 Subject: [U-Boot] [PATCH 2/2] fsl_i2c: Add CONFIG_FSL_I2C_CUSTOM_DFSR In-Reply-To: References: <1253040358-30817-1-git-send-email-Joakim.Tjernlund@transmode.se> <1253040358-30817-2-git-send-email-Joakim.Tjernlund@transmode.se> <4AAFE249.9080604@freescale.com> <4AAFE54F.7000501@freescale.com> <4AB0BC4D.1030007@denx.de> <4AB0CFBF.2050009@grandegger.com> Message-ID: <4AB1D8F0.2040804@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Joakim Tjernlund wrote: > Wolfgang Grandegger wrote on 16/09/2009 13:45:03: >> Joakim Tjernlund wrote: >>> Wolfgang Grandegger wrote on 16/09/2009 12:22:05: >>>> Joakim Tjernlund wrote: >>>>>> Timur Tabi wrote on 15/09/2009 21:04:47: >>>>>>> Joakim Tjernlund wrote: >>>>>>> >>>>>>>> No, the impact on speed from DFSR is pretty small so it will >>>>>>>> be close enough. >>>>>>> How small? >>>>>> From the app note: >>>>>> divisor = B * (A + ((3*C)/B)*2); >>>>>> >>>>>> C is dfsr and 10 <= A <= 30, 16 <= B <= 2048 >>>>>> Considering the actual speed may be way lower the requested speed >>>>>> I think this is small enough. >>>>> Once we have the new procedure in place, we can calculate the exact >>>>> divisor so the need for extra CONFIG_ options goes away. >>>> As Timur pointed out, a new table/algorithm would require some real >>>> testing and also some feedback from the users. Who knows if "your" >>>> values do not make trouble. Therefore I vote for using custom >>>> settings for maximum flexibility: >>>> >>>> CONFIG_FSL_I2C_CUSTOM_FDR >>>> CONFIG_FSL_I2C_CUSTOM_DFSR >>> Oh well, since you both wanted it I added it. >>> Sent 3 patches, the last patch impl. the latest AN2819 spec. >>> >>> Would you mind test it a little? >> OK, I will do some tests later this week. What CPU do you use and at >> what I2C bus frequency do you test? > > mpc8321, I2C bus is between 34KHz and 100KHz, CSB is 133.332 MHz OK, where can I find the new AN2819? I found Document Number: AN2919, Rev. 5, 12/2008. Wolfgang.