All of lore.kernel.org
 help / color / mirror / Atom feed
* AST2500 I2C Controller got stuck in SRXD state
@ 2019-09-03 21:45 Tao Ren
  2019-09-03 21:51 ` Jae Hyun Yoo
  0 siblings, 1 reply; 3+ messages in thread
From: Tao Ren @ 2019-09-03 21:45 UTC (permalink / raw)
  To: OpenBMC Maillist, Jae Hyun Yoo

Hi,

I found the issue on Minipack (AST2500) BMC i2c-0: it's multi-master environment with BMC and Bridged-IC.

The BMC I2C controller got stuck in SLAVE_RX_DONE state because STOP condition is not detected during one BIC-to-BMC transfer.
Because of this, all the subsequent I2C master transactions would fail with timeout.
Here is BMC I2C state reported in I2CD14 Command/Status register:

- I2CD14[22:19] = 0100b  /* transfer state machine: SLAVE_RX_DONE */
- I2CD14[18] = 1 /* sampled SCL line: high/idle */
- I2CD14[17] = 1 /* sampled SDA line: high/idle */
- I2CD14[16] = 0 /* bus is idle */

I'm suspecting it's caused by some flaws in BIC firmware, but can we do something in BMC side to recover the bus?
For example:

1) As Jae mentioned earlier, enable slave inactive timeout interrupt and reset bus when the interrupt is delivered?

2) Check I2CD14[22:19] in aspeed_i2c_recover_bus() function and reset bus if needed?


Thanks,

Tao

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AST2500 I2C Controller got stuck in SRXD state
  2019-09-03 21:45 AST2500 I2C Controller got stuck in SRXD state Tao Ren
@ 2019-09-03 21:51 ` Jae Hyun Yoo
  2019-09-03 21:52   ` Tao Ren
  0 siblings, 1 reply; 3+ messages in thread
From: Jae Hyun Yoo @ 2019-09-03 21:51 UTC (permalink / raw)
  To: Tao Ren, OpenBMC Maillist

On 9/3/2019 2:45 PM, Tao Ren wrote:
> Hi,
> 
> I found the issue on Minipack (AST2500) BMC i2c-0: it's multi-master environment with BMC and Bridged-IC.
> 
> The BMC I2C controller got stuck in SLAVE_RX_DONE state because STOP condition is not detected during one BIC-to-BMC transfer.
> Because of this, all the subsequent I2C master transactions would fail with timeout.
> Here is BMC I2C state reported in I2CD14 Command/Status register:
> 
> - I2CD14[22:19] = 0100b  /* transfer state machine: SLAVE_RX_DONE */
> - I2CD14[18] = 1 /* sampled SCL line: high/idle */
> - I2CD14[17] = 1 /* sampled SDA line: high/idle */
> - I2CD14[16] = 0 /* bus is idle */
> 
> I'm suspecting it's caused by some flaws in BIC firmware, but can we do something in BMC side to recover the bus?
> For example:
> 
> 1) As Jae mentioned earlier, enable slave inactive timeout interrupt and reset bus when the interrupt is delivered?
> 
> 2) Check I2CD14[22:19] in aspeed_i2c_recover_bus() function and reset bus if needed?
> 

Hi Tao,

I made the slave inactive timeout support. Will submit it soon.

Cheers,
Jae

> 
> Thanks,
> 
> Tao
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: AST2500 I2C Controller got stuck in SRXD state
  2019-09-03 21:51 ` Jae Hyun Yoo
@ 2019-09-03 21:52   ` Tao Ren
  0 siblings, 0 replies; 3+ messages in thread
From: Tao Ren @ 2019-09-03 21:52 UTC (permalink / raw)
  To: Jae Hyun Yoo, OpenBMC Maillist

On 9/3/19 2:51 PM, Jae Hyun Yoo wrote:
> On 9/3/2019 2:45 PM, Tao Ren wrote:
>> Hi,
>>
>> I found the issue on Minipack (AST2500) BMC i2c-0: it's multi-master environment with BMC and Bridged-IC.
>>
>> The BMC I2C controller got stuck in SLAVE_RX_DONE state because STOP condition is not detected during one BIC-to-BMC transfer.
>> Because of this, all the subsequent I2C master transactions would fail with timeout.
>> Here is BMC I2C state reported in I2CD14 Command/Status register:
>>
>> - I2CD14[22:19] = 0100b  /* transfer state machine: SLAVE_RX_DONE */
>> - I2CD14[18] = 1 /* sampled SCL line: high/idle */
>> - I2CD14[17] = 1 /* sampled SDA line: high/idle */
>> - I2CD14[16] = 0 /* bus is idle */
>>
>> I'm suspecting it's caused by some flaws in BIC firmware, but can we do something in BMC side to recover the bus?
>> For example:
>>
>> 1) As Jae mentioned earlier, enable slave inactive timeout interrupt and reset bus when the interrupt is delivered?
>>
>> 2) Check I2CD14[22:19] in aspeed_i2c_recover_bus() function and reset bus if needed?
>>
> 
> Hi Tao,
> 
> I made the slave inactive timeout support. Will submit it soon.
> 
> Cheers,
> Jae

Awesome. Thank you Jae.


Cheers,

Tao

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-03 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03 21:45 AST2500 I2C Controller got stuck in SRXD state Tao Ren
2019-09-03 21:51 ` Jae Hyun Yoo
2019-09-03 21:52   ` Tao Ren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.