[PATCH v11 4/4] G45 TWI: remove open drain setting for twi function gpios

STALE5077d

3 messages, 2 authors, 2012-08-27 · open the first message on its own page

[PATCH v11 4/4] G45 TWI: remove open drain setting for twi function gpios

From: ludovic.desroches <hidden>
Date: 2012-08-27 10:24:38

Hi Nikolaus,

Le 11/08/2011 12:11 PM, Nikolaus Voss a ?crit :
The G45 datasheets explicitly states that setting the open drain property
on peripheral function gpios is not allowed. (How about other A91 chips?)

Did you remove open drain because you had some issues or because you had 
seen it into datasheet?

I tried with and without open drain. The behavior was the same. Looking 
to the G45 datasheet, I didn't see that the open drain property is not 
allowed on peripheral function gpios:

'The Multi Drive can be selected whether the I/O line
is controlled by the PIO controller or assigned to a peripheral function.'

The datasheet should have been updated or there is another place where 
it is mentioned that open drain property is not allowed in this case.


Regards

Ludovic
quoted hunk
Signed-off-by: Nikolaus Voss <redacted>
---
  arch/arm/mach-at91/at91sam9g45_devices.c |    6 ------
  1 file changed, 6 deletions(-)
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c
index eec5eb6..2134663 100644
--- a/arch/arm/mach-at91/at91sam9g45_devices.c
+++ b/arch/arm/mach-at91/at91sam9g45_devices.c
@@ -686,18 +686,12 @@ void __init at91_add_device_i2c(short i2c_id, struct i2c_board_info *devices, in
  	/* pins used for TWI interface */
  	if (i2c_id == 0) {
  		at91_set_A_periph(AT91_PIN_PA20, 0);		/* TWD */
-		at91_set_multi_drive(AT91_PIN_PA20, 1);
-
  		at91_set_A_periph(AT91_PIN_PA21, 0);		/* TWCK */
-		at91_set_multi_drive(AT91_PIN_PA21, 1);

  		platform_device_register(&at91sam9g45_twi0_device);
  	} else {
  		at91_set_A_periph(AT91_PIN_PB10, 0);		/* TWD */
-		at91_set_multi_drive(AT91_PIN_PB10, 1);
-
  		at91_set_A_periph(AT91_PIN_PB11, 0);		/* TWCK */
-		at91_set_multi_drive(AT91_PIN_PB11, 1);

  		platform_device_register(&at91sam9g45_twi1_device);
  	}

[PATCH v11 4/4] G45 TWI: remove open drain setting for twi function gpios

From: Voss, Nikolaus <hidden>
Date: 2012-08-27 13:22:17

Hi Ludovic,

ludovic.desroches wrote on Monday, August 27, 2012 12:25 PM:
Le 11/08/2011 12:11 PM, Nikolaus Voss a ?crit :
quoted
The G45 datasheets explicitly states that setting the open drain property
on peripheral function gpios is not allowed. (How about other A91 chips?)
Did you remove open drain because you had some issues or because you
had  seen it into datasheet?

I tried with and without open drain. The behavior was the same. Looking
to the G45 datasheet, I didn't see that the open drain property is not
allowed on peripheral function gpios:

'The Multi Drive can be selected whether the I/O line
is controlled by the PIO controller or assigned to a peripheral function.'

The datasheet should have been updated or there is another place where
it is mentioned that open drain property is not allowed in this case.
well, it didn't work on my G45. I found the following note in the
TWI chapter 31.6.1 of the G45 datasheet:
"The user must not program TWD and TWCK as open-drain.
It is already done by the hardware."

After removing the open-drain setting, it worked.

Regards,
Nikolaus

[PATCH v11 4/4] G45 TWI: remove open drain setting for twi function gpios

From: ludovic.desroches <hidden>
Date: 2012-08-27 13:27:48

Le 08/27/2012 03:22 PM, Voss, Nikolaus a ?crit :
Hi Ludovic,

ludovic.desroches wrote on Monday, August 27, 2012 12:25 PM:
quoted
Le 11/08/2011 12:11 PM, Nikolaus Voss a ?crit :
quoted
The G45 datasheets explicitly states that setting the open drain property
on peripheral function gpios is not allowed. (How about other A91 chips?)
Did you remove open drain because you had some issues or because you
had  seen it into datasheet?

I tried with and without open drain. The behavior was the same. Looking
to the G45 datasheet, I didn't see that the open drain property is not
allowed on peripheral function gpios:

'The Multi Drive can be selected whether the I/O line
is controlled by the PIO controller or assigned to a peripheral function.'

The datasheet should have been updated or there is another place where
it is mentioned that open drain property is not allowed in this case.
well, it didn't work on my G45. I found the following note in the
TWI chapter 31.6.1 of the G45 datasheet:
"The user must not program TWD and TWCK as open-drain.
It is already done by the hardware."
Ok so it seems there is a contradiction. I'll try to inquire about this 
point.

Regards

Ludovic
After removing the open-drain setting, it worked.

Regards,
Nikolaus


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help