2008-03-18 05:39:19     soft i2c on bf561 EZKIT

Document created by Aaronwu Employee on Sep 17, 2013
Version 1Show Document
  • View in full screen mode

2008-03-18 05:39:19     soft i2c on bf561 EZKIT

Michiel Verschueren (BELGIUM)

Message: 52672    Hi,

 

I have found an issue using the soft i2c implementation on my BF561 EZKIT board.

 

In common/soft_i2c.c, in the i2c_read() function, a stop sequence is sent before the repeated start sequence. Apparently, this causes problems for the ADV7183B video decoder and the ADV7179 video encoder: they don't pull down SDA when they should send their data. Omitting the send_stop() seems to solve the problem.

 

Note that this stop sequence is not part of the standard: I2C only defines the repeated start. The video encoder and decoder see the stop sequence as an abort sequence (see datasheets).

 

Therefore, I would suggest that the stop sequence be controlled by a boolean argument to the i2c_read function:

 

int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len, uchar stop = 0) {

    ...

    if (stop) send_stop();

    send_start();

    ...

}

 

By the way, i2c support for the BF561-EZKIT is, as far as I can see, not included in the current U-Boot. I have added this support basically by adapting include/configs/bf561-ezkit.h. If anyone can tell me how, I will gladly contribute my additions.

QuoteReplyEditDelete

 

 

2008-03-18 07:19:04     Re: soft i2c on bf561 EZKIT

Mike Frysinger (UNITED STATES)

Message: 52689    you're right that soft i2c is not built into the default u-boot for the bf561-ezkit, but it will never be ... the random pins i pick dont really help you

 

could you open a tracker item for this issue please

QuoteReplyEditDelete

 

 

2008-03-18 10:14:02     Re: soft i2c on bf561 EZKIT

Michiel Verschueren (BELGIUM)

Message: 52701    Mike,

 

I'm afraid I don't understand.

Why will there never be a soft i2c for the bf561-ezkit?

And what do you mean by the "random pins"?

QuoteReplyEditDelete

 

 

2008-03-18 10:39:30     Re: soft i2c on bf561 EZKIT

Mike Frysinger (UNITED STATES)

Message: 52707    there will never be soft i2c support enabled in default bf561-ezkit builds ... soft i2c is done via gpios so whatever pins i pick most likely wont match whatever pins you pick or anyone else picks ... that means enabling by default is kind of pointless when you need to configure it in the first place for your needs

 

none of this precludes you from configuring/using it yourself

 

QuoteReplyEditDelete

 

 

2008-03-18 11:15:15     Re: soft i2c on bf561 EZKIT

Michiel Verschueren (BELGIUM)

Message: 52708    Hi Mike,

 

The bf561 ezkit manual explicitly states that SCL is on the blackfin's PF0, and SDA is on PF1. So these pins are specific to the board, but certainly not random.

I made changes to bf561_ezkit.h with exactly these definitions.

QuoteReplyEditDelete

 

 

2008-03-18 13:09:34     Re: soft i2c on bf561 EZKIT

Mike Frysinger (UNITED STATES)

Message: 52713    i was thinking you were hooking up your own codecs ... i forget there are codecs already on the board seeing as how we dont use them

Attachments

    Outcomes