Skip to content

Commit 4a7df24

Browse files
committed
Merge branch 'for-linus/2640/i2c' of git://git.fluff.org/bjdooks/linux
* 'for-linus/2640/i2c' of git://git.fluff.org/bjdooks/linux: (21 commits) mach-ux500: set proper I2C platform data from MOP500s i2c-nomadik: break out single messsage transmission i2c-nomadik: reset the hw after status check i2c-nomadik: remove the unnecessary delay i2c-nomadik: change the TX and RX threshold i2c-nomadik: add code to retry on timeout failure i2c-nomadik: use pm_runtime API i2c-nomadik: print abort cause only on abort tag i2c-nomadik: correct adapter timeout initialization i2c-nomadik: remove the redundant error message i2c-nomadik: corrrect returned error numbers i2c-nomadik: fix speed enumerator i2c-nomadik: make i2c timeout specific per i2c bus i2c-nomadik: add regulator support i2c: i2c-sh_mobile bus speed platform data V2 i2c: i2c-sh_mobile clock string removal i2c-eg20t: Support new device ML7223 IOH i2c: tegra: Add de-bounce cycles. i2c: tegra: fix repeated start handling i2c: tegra: recover from spurious interrupt storm ...
2 parents 37d8cb5 + 5bdfdfe commit 4a7df24

8 files changed

Lines changed: 263 additions & 115 deletions

File tree

‎arch/arm/mach-ux500/board-mop500.c‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static struct i2c_board_info __initdata mop500_i2c2_devices[] = {
204204
},
205205
};
206206

207-
#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, _sm) \
207+
#define U8500_I2C_CONTROLLER(id, _slsu, _tft, _rft, clk, t_out, _sm) \
208208
static struct nmk_i2c_controller u8500_i2c##id##_data = { \
209209
/* \
210210
* slave data setup time, which is \
@@ -219,19 +219,21 @@ static struct nmk_i2c_controller u8500_i2c##id##_data = { \
219219
.rft = _rft, \
220220
/* std. mode operation */ \
221221
.clk_freq = clk, \
222+
/* Slave response timeout(ms) */\
223+
.timeout = t_out, \
222224
.sm = _sm, \
223225
}
224226

225227
/*
226228
* The board uses 4 i2c controllers, initialize all of
227229
* them with slave data setup time of 250 ns,
228-
* Tx & Rx FIFO threshold values as 1 and standard
230+
* Tx & Rx FIFO threshold values as 8 and standard
229231
* mode of operation
230232
*/
231-
U8500_I2C_CONTROLLER(0, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
232-
U8500_I2C_CONTROLLER(1, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
233-
U8500_I2C_CONTROLLER(2, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
234-
U8500_I2C_CONTROLLER(3, 0xe, 1, 1, 100000, I2C_FREQ_MODE_STANDARD);
233+
U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
234+
U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
235+
U8500_I2C_CONTROLLER(2, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
236+
U8500_I2C_CONTROLLER(3, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
235237

236238
static void __init mop500_i2c_init(void)
237239
{

‎arch/arm/plat-nomadik/include/plat/i2c.h‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
enum i2c_freq_mode {
1212
I2C_FREQ_MODE_STANDARD, /* up to 100 Kb/s */
1313
I2C_FREQ_MODE_FAST, /* up to 400 Kb/s */
14+
I2C_FREQ_MODE_HIGH_SPEED, /* up to 3.4 Mb/s */
1415
I2C_FREQ_MODE_FAST_PLUS, /* up to 1 Mb/s */
15-
I2C_FREQ_MODE_HIGH_SPEED /* up to 3.4 Mb/s */
1616
};
1717

1818
/**
@@ -24,13 +24,15 @@ enum i2c_freq_mode {
2424
* to the values of 14, 6, 2 for a 48 MHz i2c clk
2525
* @tft: Tx FIFO Threshold in bytes
2626
* @rft: Rx FIFO Threshold in bytes
27+
* @timeout Slave response timeout(ms)
2728
* @sm: speed mode
2829
*/
2930
struct nmk_i2c_controller {
3031
unsigned long clk_freq;
3132
unsigned short slsu;
32-
unsigned char tft;
33-
unsigned char rft;
33+
unsigned char tft;
34+
unsigned char rft;
35+
int timeout;
3436
enum i2c_freq_mode sm;
3537
};
3638

‎drivers/i2c/busses/Kconfig‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,15 +673,19 @@ config I2C_XILINX
673673
will be called xilinx_i2c.
674674

675675
config I2C_EG20T
676-
tristate "Intel EG20T PCH/OKI SEMICONDUCTOR ML7213 IOH"
676+
tristate "Intel EG20T PCH / OKI SEMICONDUCTOR IOH(ML7213/ML7223)"
677677
depends on PCI
678678
help
679679
This driver is for PCH(Platform controller Hub) I2C of EG20T which
680680
is an IOH(Input/Output Hub) for x86 embedded processor.
681681
This driver can access PCH I2C bus device.
682682

683-
This driver also supports the ML7213, a companion chip for the
684-
Atom E6xx series and compatible with the Intel EG20T PCH.
683+
This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
684+
Output Hub), ML7213 and ML7223.
685+
ML7213 IOH is for IVI(In-Vehicle Infotainment) use and ML7223 IOH is
686+
for MP(Media Phone) use.
687+
ML7213/ML7223 is companion chip for Intel Atom E6xx series.
688+
ML7213/ML7223 is completely compatible for Intel EG20T PCH.
685689

686690
comment "External I2C/SMBus adapter drivers"
687691

‎drivers/i2c/busses/i2c-eg20t.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ static DEFINE_MUTEX(pch_mutex);
182182
/* Definition for ML7213 by OKI SEMICONDUCTOR */
183183
#define PCI_VENDOR_ID_ROHM 0x10DB
184184
#define PCI_DEVICE_ID_ML7213_I2C 0x802D
185+
#define PCI_DEVICE_ID_ML7223_I2C 0x8010
185186

186187
static struct pci_device_id __devinitdata pch_pcidev_id[] = {
187188
{ PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH_I2C), 1, },
188189
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_I2C), 2, },
190+
{ PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_I2C), 1, },
189191
{0,}
190192
};
191193

0 commit comments

Comments
 (0)