[U-Boot] [PATCH 0/3] i2c: improve s3c24x0 with High-speed and new SYS_I2C framework support

Naveen Krishna Chatradhi ch.naveen at samsung.com
Mon Sep 30 08:58:06 CEST 2013


This patchset fixes few bugs in the existing s3c24x0.c code (standard i2c)
and add support for High-speed i2c bus controller available on Exynos5 SoCs
from Samsung.

Exynos5250 channels [0 ~ 3] can configured for I2C contoller or
           new HSI2C controller
           channels [3 ~ 7] are standard I2C controller channels
Exynos5420 channels [0 ~ 3] are standard I2C controller channels and
           channels [4 ~ 10] are High-speed controller channels

Patchset:
1.  exynos: i2c: Fix i2c driver to handle NACKs properly
    Improvements and fixes from Vadim Bendebury for standard i2c calls

2.  exynos: i2c: Change FDT bus setup code to enumerate ports correctly
    FDT bus setup code from Simon Glass

3.  PATCH v5: i2c: s3c24xx: add hsi2c controller support
    High-speed controller register description and defines new i2c read/write,
    probe and set_bus calls.

    This is been reviewed earlier at
    http://lists.denx.de/pipermail/u-boot/2013-May/153245.html
    Thanks for review and improvements from Vadim Bendebury.

Question:
4. RFC: samsung: i2c: Enable new CONFIG_SYS_I2C framework
I've tried to implement the new I2C multi bus framework in u-boot tree,
taking tegra-i2c.c as reference.

a). We have different number of channels on Exynos5250 and Exynos5420
   (as explained above). How are we supposed to define the U_BOOT_I2C_ADAP_COMPLETE
   in such cases. Can i use #ifdef EXYNOS5420 or EXYNOS5250
b). When i define 11 buses as in the case of Exynos5420, the "i2c bus" lists them
 SMDK5420 # i2c bus
 Bus 0:  s3c0
 Bus 1:  s3c1
 Bus 2:  s3c10
 Bus 3:  s3c2
 Bus 4:  s3c3
 Bus 5:  s3c4
 Bus 6:  s3c5
 Bus 7:  s3c6
 Bus 8:  s3c7
 Bus 9:  s3c8
 Bus 10: s3c9
 or  (If i change the name to hsi2c)
 SMDK5420 # i2c bus
 Bus 0:  hsi2c10
 Bus 1:  hsi2c4
 Bus 2:  hsi2c5
 Bus 3:  hsi2c6
 Bus 4:  hsi2c7
 Bus 5:  hsi2c8
 Bus 6:  hsi2c9
 Bus 7:  s3c0
 Bus 8:  s3c1
 Bus 9:  s3c2
 Bus 10: s3c3

Whats the expected behaviour. If the above result is correct, I need to changei
the strings to get them in the correct order.

c). What's the alternative for the
   board_i2c_init(), i2c_get_bus_num_fdt(), i2c_reset_port_fdt().
  "Functions to get the I2C bus number and reset I2C bus using FDT node"

   I think, these functions are still needed.

Kindly, help me with the above questions.
I'm willing to implement the new i2c frame work.

Thanks in advance.

Naveen Krishna Chatradhi (3):
  exynos: i2c: Fix i2c driver to handle NACKs properly
  i2c: s3c24xx: add hsi2c controller support
  RFC: samsung: i2c: Enable new CONFIG_SYS_I2C framework

Simon Glass (1):
  exynos: i2c: Change FDT bus setup code to enumerate ports correctly

 drivers/i2c/Makefile      |    2 +-
 drivers/i2c/s3c24x0_i2c.c |  912 ++++++++++++++++++++++++++++++++++++---------
 drivers/i2c/s3c24x0_i2c.h |   38 ++
 3 files changed, 771 insertions(+), 181 deletions(-)

-- 
1.7.9.5



More information about the U-Boot mailing list