public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Wilken Haase <Hibbelharry-Mmb7MZpHnFY@public.gmane.org>
To: i2c list <i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: Re: Problem with unstable i2c communication with i810 bus driver
Date: Tue, 20 May 2008 14:15:04 +0200	[thread overview]
Message-ID: <4832C0C8.2090401@gmx.de> (raw)
In-Reply-To: <20080520091807.071f1032-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>

Hi Jean, Hi List,

Jean Delvare wrote:
> Hi Wilken,
>
> On Tue, 20 May 2008 02:48:25 +0200, Wilken Haase wrote:
>   
>> Hi People,
>> i own a Samsung TV settopbox which is nice to use with linux, even while
>> its manufacturer samsung ships it with another operating system. The box
>> consists of a intel i815 chipset with integrated graphics, connected to
>> a focus enhancements fs454 scan converter which is controlled by i2c
>> commands and which must be setup correctly to produce a useable picture.
>>
>> In the current state it kinda works. If i do a dump of the registers of
>> the fs454 I always get some bogus values back, even while most registers
>> are read out correctly. There is no visible pattern in what registers
>> give back wrong values, it differs from dump to dump. As another fact
>> writing to the chip is unstable, too. I often need to rewrite the values
>> 2 or 3 times to get them in place.
>>
>> I did test some different kernel versions up to the current 2.6.25 and i
>> saw a nice little increase in reliability but still its a piece off from
>> perfect.
>>
>> Failures in writing are producing the following messages in syslog:
>>
>> May 20 02:33:13 smt i2c-adapter i2c-1: sendbytes: NAK bailout.
>>
>> Identified busses derived from the output of i2cdump are:
>>
>> i2c-0    i2c           I810-DDC
>> i2c-1    i2c           I810-I2C
>> i2c-2    i2c           I810-GPIOC
>> i2c-3    smbus         SMBus I801 adapter at 1810
>> i2c-4    i2c           cx88[0]
>>
>> The fs454 scan converter is located on I810-I2C.
>>
>> I tried some different values for delays in i2c-i810.c like here:
>>
>> /* delays */
>> #define CYCLE_DELAY             100
>> #define TIMEOUT                 100
>>
>> But this didn't seem to offer advantages.
>>     
>
> I think that you are not modifying the right file. Apparently you
> modified the delay values in drivers/i2c/busses/i2c-i810.c? While bus
> I810-I2C is created by driver i810fb. So if you want to change the
> timings, you should edit chan->algo.udelay and chan->algo.timeout in
> drivers/video/i810/i810-i2c.c.
>
> Note that the i2c-i810 driver is deprecated and will be removed in
> kernel 2.6.27, this should help clear the confusion.
>
>   
You seem to be right, i modified the wrong file. Thanks for that hint !

>> What else can i do ?
>> Any suggestions ?
>> If more information is needed feel free to drop me a mail, i will offer
>> any information as needed.
>>     
>
> Are there other I2C devices connected to the i810? It would be
> interesting to know whether the problem happens only with the FS454 or
> also with other devices. If all I2C devices are affected then the
> problem is probably hardware noise, maybe you have a defective part,
> and there's not much we can do. If only the FS454 is affected, maybe
> this specific device is not able of clock stretching and does support
> only very slow I2C transactions (in which case increasing
> chan->algo.udelay should help). But the current speed isn't very high
> (50 kHz) so I'd be surprised.
>
>   
Badly I don't know of anymore devices connected to this bus.
> Or maybe the FS454 simply needs a delay between reads and writes, I've
> seen other I2C devices like this before. It is common for the device to
> simply nack the transactions (as you see in your logs) while it is
> busy. In this case the fix is to add delays in the fs454 driver (or
> user-space tool accessing the device over i2c-dev) between transactions.
>
> If you have access to the FS454 datasheet, it should tell whether the
> device can stretch the clock and whether it needs a delay between the
> transactions.
>
>   
I do have the datasheets and read them multiple times just to be sure.
The data sheet talks of needed delays.
> As an additional note, I seem to remember that i2c-algo-bit (which
> I810-I2C uses) doesn't properly support bus arbitration. So, if you
> have a multi-master bus, that could explain your problems, too. You'd
> need to know the exact I2C bus topology of your system to rule out this
> possibility.
>
>   
I tried experimenting with udelay values at the right file and did slow
the bus
down, both values up to 150. But while dumping the chip slowed noticeably
down i still got some bogus values back. Think that's maybe not the
right idea.
On another sidenote: I own another settopbox which is partly similar and
also uses
a fs454 scan konverter, but controlled by an intel i830 chipset. The
fs454 is
accessible without any problems there with the stock kernel driver.
I really don't think the bus is multi mastered. Maybe this is a
termination problem.
If i can try anything else i would appreciate all your people thoughts.

Thanks Jean !
Thanks anyone else !

Greetings
Wilken Haase
 


_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

  parent reply	other threads:[~2008-05-20 12:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-20  0:48 Problem with unstable i2c communication with i810 bus driver Wilken Haase
     [not found] ` <48321FD9.2010007-Mmb7MZpHnFY@public.gmane.org>
2008-05-20  7:18   ` Jean Delvare
     [not found]     ` <20080520091807.071f1032-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-20 12:15       ` Wilken Haase [this message]
     [not found]         ` <4832C0C8.2090401-Mmb7MZpHnFY@public.gmane.org>
2008-05-20 18:37           ` Jean Delvare
     [not found]             ` <20080520203715.68c502f3-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-20 22:38               ` Wilken Haase
     [not found]                 ` <483352EA.2090005-Mmb7MZpHnFY@public.gmane.org>
2008-05-21  7:14                   ` Jean Delvare
     [not found]                     ` <20080521091440.2252167d-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-07-24 17:23                       ` Wilken Haase

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4832C0C8.2090401@gmx.de \
    --to=hibbelharry-mmb7mzphnfy@public.gmane.org \
    --cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox