Skip to contentSkip to conversation

ARMV7: OMAP: I2C driver: Fix bug found in 37XX testing

PATCH New Steve Sakoman 2 participants 2 messages Oct 22, 2010 – Oct 25, 2010 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARMV7: OMAP: I2C driver: Fix bug found in 37XX testing

On OMAP36/37XX the standard on chip pullups are not sufficient to ensure proper i2c operation without external pullups or switching to high speed mode and enabling special on chip pullups.

This is an issue for Beagle xM, which does not have external pullups on the expansion board i2c lines.

The issue manifests itself as an AL (arbitration lost) error when probing for a non-existent device (i.e. on a Beagle xM with no expansion boards attached). This issue does not occur on expansion boards that include pullups or on Overo 37XX COM's since they include pull-ups.

This patch fixes the issue by checking for the AL bit in the i2c_probe function.

---

drivers/i2c/omap24xx_i2c.c +1 -1
index a72d1a1..fab49fd 100644
@@ -329,7 +329,7 @@ int i2c_probe (uchar chip)
 
 	while (1) {
 		status = wait_for_pin();
-		if (status == 0) {
+		if (status == 0 || status & I2C_STAT_AL) {
 			res = 1;
 			goto probe_exit;
 		}
#1 lore raw

PATCH 1/1 ARMV7: OMAP: I2C driver: Fix bug found in 37XX testing

Hello Steve,

Quoted 12 lines · Steve Sakoman

On OMAP36/37XX the standard on chip pullups are not sufficient to ensure proper i2c operation without external pullups or switching to high speed mode and enabling special on chip pullups.

This is an issue for Beagle xM, which does not have external pullups on the expansion board i2c lines.

The issue manifests itself as an AL (arbitration lost) error when probing for a non-existent device (i.e. on a Beagle xM with no expansion boards attached). This issue does not occur on expansion boards that include pullups or on Overo 37XX COM's since they include pull-ups.

Quoted 5 lines

This patch fixes the issue by checking for the AL bit in the i2c_probe function.

---

Tested it here on my beagle board too, thanks!

Texas Instruments X-Loader 1.4.2 (Feb 19 2009 - 12:01:24)

U-Boot 2010.09-04580-g4df6689 (Oct 25 2010 - 07:57:35)

OMAP3530-GP ES3.0, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz OMAP3 Beagle board + LPDDR/NAND
I2C: ready
[...]

Applied to u-boot-i2c master

bye,
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany