public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: omap: highspeed only over 1000mhz
@ 2008-10-17 21:09 Felipe Balbi
  2008-10-17 21:51 ` Ben Dooks
  2008-10-20 10:26 ` Felipe Balbi
  0 siblings, 2 replies; 9+ messages in thread
From: Felipe Balbi @ 2008-10-17 21:09 UTC (permalink / raw)
  To: linux-omap; +Cc: Ben Dooks, Tony Lindgren, Felipe Balbi

up to 1000mhz it's Fast Mode+, not highspeed.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
 drivers/i2c/busses/i2c-omap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index a999606..53d6244 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -296,7 +296,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
 		psc = psc - 1;
 
 		/* If configured for High Speed */
-		if (dev->speed > 400) {
+		if (dev->speed > 1000) {
 			/* For first phase of HS mode */
 			fsscll = internal_clk / (400 * 2) - 6;
 			fssclh = internal_clk / (400 * 2) - 6;
-- 
1.6.0.2.307.gc427


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

* Re: [PATCH] i2c: omap: highspeed only over 1000mhz
  2008-10-17 21:09 [PATCH] i2c: omap: highspeed only over 1000mhz Felipe Balbi
@ 2008-10-17 21:51 ` Ben Dooks
  2008-10-17 23:49   ` Felipe Balbi
  2008-10-20 10:26 ` Felipe Balbi
  1 sibling, 1 reply; 9+ messages in thread
From: Ben Dooks @ 2008-10-17 21:51 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-omap, Ben Dooks, Tony Lindgren

On Sat, Oct 18, 2008 at 12:09:55AM +0300, Felipe Balbi wrote:
> up to 1000mhz it's Fast Mode+, not highspeed.

mill-hz? 1MHz or 1000kHz.
 
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
>  drivers/i2c/busses/i2c-omap.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index a999606..53d6244 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -296,7 +296,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
>  		psc = psc - 1;
>  
>  		/* If configured for High Speed */
> -		if (dev->speed > 400) {
> +		if (dev->speed > 1000) {
>  			/* For first phase of HS mode */
>  			fsscll = internal_clk / (400 * 2) - 6;
>  			fssclh = internal_clk / (400 * 2) - 6;
> -- 
> 1.6.0.2.307.gc427
> 

-- 
-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.


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

* Re: [PATCH] i2c: omap: highspeed only over 1000mhz
  2008-10-17 21:51 ` Ben Dooks
@ 2008-10-17 23:49   ` Felipe Balbi
  0 siblings, 0 replies; 9+ messages in thread
From: Felipe Balbi @ 2008-10-17 23:49 UTC (permalink / raw)
  To: Ben Dooks; +Cc: Felipe Balbi, linux-omap, Tony Lindgren

On Fri, Oct 17, 2008 at 10:51:24PM +0100, Ben Dooks wrote:
> On Sat, Oct 18, 2008 at 12:09:55AM +0300, Felipe Balbi wrote:
> > up to 1000mhz it's Fast Mode+, not highspeed.
> 
> mill-hz? 1MHz or 1000kHz.

hehe, typo :-)

Thanks

-- 
balbi

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

* [PATCH] i2c: omap: highspeed only over 1000mhz
  2008-10-17 21:09 [PATCH] i2c: omap: highspeed only over 1000mhz Felipe Balbi
  2008-10-17 21:51 ` Ben Dooks
@ 2008-10-20 10:26 ` Felipe Balbi
  2008-10-20 12:42   ` Nishanth Menon
  2008-10-20 15:15   ` Tony Lindgren
  1 sibling, 2 replies; 9+ messages in thread
From: Felipe Balbi @ 2008-10-20 10:26 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-omap, Ben Dooks, Tony Lindgren

up to 1000khz it's Fast Mode+, not highspeed.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
---
 drivers/i2c/busses/i2c-omap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index a999606..53d6244 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -296,7 +296,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
 		psc = psc - 1;
 
 		/* If configured for High Speed */
-		if (dev->speed > 400) {
+		if (dev->speed > 1000) {
 			/* For first phase of HS mode */
 			fsscll = internal_clk / (400 * 2) - 6;
 			fssclh = internal_clk / (400 * 2) - 6;
-- 
1.6.0.2.307.gc427

-- 
balbi

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

* Re: [PATCH] i2c: omap: highspeed only over 1000mhz
  2008-10-20 10:26 ` Felipe Balbi
@ 2008-10-20 12:42   ` Nishanth Menon
  2008-10-20 12:53     ` Felipe Balbi
  2008-10-20 15:15   ` Tony Lindgren
  1 sibling, 1 reply; 9+ messages in thread
From: Nishanth Menon @ 2008-10-20 12:42 UTC (permalink / raw)
  To: felipe.balbi; +Cc: linux-omap, Ben Dooks, Tony Lindgren

Felipe,
Felipe Balbi said the following on 10/20/2008 05:26 AM:
> up to 1000khz it's Fast Mode+, not highspeed.
>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
>  drivers/i2c/busses/i2c-omap.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index a999606..53d6244 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -296,7 +296,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
>  		psc = psc - 1;
>  
>  		/* If configured for High Speed */
> -		if (dev->speed > 400) {
> +		if (dev->speed > 1000) {
>   
Ref: http://www.nxp.com/acrobat_download/literature/9398/39340011.pdf
Page 4:
"Serial, 8-bit oriented, bi-directional data transfers can be
made at *up to* 100 kbit/s in the Standard-mode, *up to*
400 kbit/s in the Fast-mode, or *up to* 3.4 Mbit/s in the
High-speed mode"

Why do say high speed is >1000khz?

Thanks and Regards,
Nishanth Menon

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

* Re: [PATCH] i2c: omap: highspeed only over 1000mhz
  2008-10-20 12:42   ` Nishanth Menon
@ 2008-10-20 12:53     ` Felipe Balbi
       [not found]       ` <48FC851C.3040506@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Felipe Balbi @ 2008-10-20 12:53 UTC (permalink / raw)
  To: ext Nishanth Menon; +Cc: felipe.balbi, linux-omap, Ben Dooks, Tony Lindgren

On Mon, Oct 20, 2008 at 07:42:17AM -0500, ext Nishanth Menon wrote:
> Felipe,
> Felipe Balbi said the following on 10/20/2008 05:26 AM:
> > up to 1000khz it's Fast Mode+, not highspeed.
> >
> > Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> > ---
> >  drivers/i2c/busses/i2c-omap.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> > index a999606..53d6244 100644
> > --- a/drivers/i2c/busses/i2c-omap.c
> > +++ b/drivers/i2c/busses/i2c-omap.c
> > @@ -296,7 +296,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
> >  		psc = psc - 1;
> >  
> >  		/* If configured for High Speed */
> > -		if (dev->speed > 400) {
> > +		if (dev->speed > 1000) {
> >   
> Ref: http://www.nxp.com/acrobat_download/literature/9398/39340011.pdf
> Page 4:
> "Serial, 8-bit oriented, bi-directional data transfers can be
> made at *up to* 100 kbit/s in the Standard-mode, *up to*
> 400 kbit/s in the Fast-mode, or *up to* 3.4 Mbit/s in the
> High-speed mode"
> 
> Why do say high speed is >1000khz?

http://www.standardics.nxp.com/support/documents/i2c/pdf/i2c.bus.specification.pdf

section 5.2:

"Fast-mode Plus (Fm+) devices offer an increase in I2C-bus transfer speeds and total bus
capacitance. Fm+ devices can transfer information at bit rates of up to 1 Mbit/s, yet they
remain fully downward compatible with Fast- or Standard-mode devices for bidirectional
communication in a mixed-speed bus system. The same serial bus protocol and data
format is maintained as with the Fast- or Standard-mode system. Fm+ devices also offer
increased drive current over Fast- or Standard-mode devices allowing them to drive
longer and/or more heavily loaded buses so that bus buffers do not need
to be used"

-- 
balbi

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

* Re: [PATCH] i2c: omap: highspeed only over 1000mhz
       [not found]       ` <48FC851C.3040506@gmail.com>
@ 2008-10-20 13:22         ` Felipe Balbi
  0 siblings, 0 replies; 9+ messages in thread
From: Felipe Balbi @ 2008-10-20 13:22 UTC (permalink / raw)
  To: ext Nishanth Menon; +Cc: felipe.balbi, linux-omap, Ben Dooks, Tony Lindgren

On Mon, Oct 20, 2008 at 08:18:20AM -0500, ext Nishanth Menon wrote:

hehe, please don't send html mails,

That was a nice catch. Didn't see that in the TRM. Let's drop this patch
then, or at least until someone test a FM+ device with omap3.

-- 
balbi

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

* Re: [PATCH] i2c: omap: highspeed only over 1000mhz
  2008-10-20 10:26 ` Felipe Balbi
  2008-10-20 12:42   ` Nishanth Menon
@ 2008-10-20 15:15   ` Tony Lindgren
  2008-10-20 17:10     ` Felipe Balbi
  1 sibling, 1 reply; 9+ messages in thread
From: Tony Lindgren @ 2008-10-20 15:15 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-omap, Ben Dooks

* Felipe Balbi <felipe.balbi@nokia.com> [081020 03:27]:
> up to 1000khz it's Fast Mode+, not highspeed.

Have you tested this? To me it seems this code is needed for
dev->speed > 400, and the comment may be wrong.

Tony

> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
>  drivers/i2c/busses/i2c-omap.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index a999606..53d6244 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -296,7 +296,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
>  		psc = psc - 1;
>  
>  		/* If configured for High Speed */
> -		if (dev->speed > 400) {
> +		if (dev->speed > 1000) {
>  			/* For first phase of HS mode */
>  			fsscll = internal_clk / (400 * 2) - 6;
>  			fssclh = internal_clk / (400 * 2) - 6;
> -- 
> 1.6.0.2.307.gc427
> 
> -- 
> balbi

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

* Re: [PATCH] i2c: omap: highspeed only over 1000mhz
  2008-10-20 15:15   ` Tony Lindgren
@ 2008-10-20 17:10     ` Felipe Balbi
  0 siblings, 0 replies; 9+ messages in thread
From: Felipe Balbi @ 2008-10-20 17:10 UTC (permalink / raw)
  To: ext Tony Lindgren; +Cc: Felipe Balbi, linux-omap, Ben Dooks

On Mon, Oct 20, 2008 at 08:15:16AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <felipe.balbi@nokia.com> [081020 03:27]:
> > up to 1000khz it's Fast Mode+, not highspeed.
> 
> Have you tested this? To me it seems this code is needed for
> dev->speed > 400, and the comment may be wrong.

the thing is that looks like omap i2c controller doesn't support fast
mode+ devices, would be useful if someone had a fastmode+ device to test
with.

Let's drop this one.

btw, at least triton still works, but then again it could be working as
a high speed with a lower speed.

-- 
balbi

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

end of thread, other threads:[~2008-10-20 17:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-17 21:09 [PATCH] i2c: omap: highspeed only over 1000mhz Felipe Balbi
2008-10-17 21:51 ` Ben Dooks
2008-10-17 23:49   ` Felipe Balbi
2008-10-20 10:26 ` Felipe Balbi
2008-10-20 12:42   ` Nishanth Menon
2008-10-20 12:53     ` Felipe Balbi
     [not found]       ` <48FC851C.3040506@gmail.com>
2008-10-20 13:22         ` Felipe Balbi
2008-10-20 15:15   ` Tony Lindgren
2008-10-20 17:10     ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox