All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: ux500: bump i2c bus speed to 400kHz
@ 2012-06-17 17:57 Linus Walleij
  2012-06-17 23:06 ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2012-06-17 17:57 UTC (permalink / raw)
  To: linux-arm-kernel

From: Linus Walleij <linus.walleij@linaro.org>

Some recent discussion revealed inconsistency in the board file
for the MOP500 family. The board can very well do 400kHz on
the I2C busses, so make it do that.

Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/mach-ux500/board-mop500.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 9c74ac5..e441bd7 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -354,13 +354,13 @@ static struct nmk_i2c_controller u8500_i2c##id##_data = { \
 /*
  * The board uses 4 i2c controllers, initialize all of
  * them with slave data setup time of 250 ns,
- * Tx & Rx FIFO threshold values as 8 and standard
+ * Tx & Rx FIFO threshold values as 1 resp. 8 and fast
  * mode of operation
  */
-U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
-U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
-U8500_I2C_CONTROLLER(2,	0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
-U8500_I2C_CONTROLLER(3,	0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
+U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
+U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
+U8500_I2C_CONTROLLER(2,	0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
+U8500_I2C_CONTROLLER(3,	0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
 
 static void __init mop500_i2c_init(struct device *parent)
 {
-- 
1.7.9.2

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

* [PATCH] ARM: ux500: bump i2c bus speed to 400kHz
  2012-06-17 17:57 [PATCH] ARM: ux500: bump i2c bus speed to 400kHz Linus Walleij
@ 2012-06-17 23:06 ` Marek Vasut
  2012-06-18  6:01   ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2012-06-17 23:06 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Linus Walleij,

> From: Linus Walleij <linus.walleij@linaro.org>
> 
> Some recent discussion revealed inconsistency in the board file
> for the MOP500 family. The board can very well do 400kHz on
> the I2C busses, so make it do that.

Shouldn't this be controlled by DT? Some of the i2c devices can't do 400kHz.

> Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  arch/arm/mach-ux500/board-mop500.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-ux500/board-mop500.c
> b/arch/arm/mach-ux500/board-mop500.c index 9c74ac5..e441bd7 100644
> --- a/arch/arm/mach-ux500/board-mop500.c
> +++ b/arch/arm/mach-ux500/board-mop500.c
> @@ -354,13 +354,13 @@ static struct nmk_i2c_controller u8500_i2c##id##_data
> = { \ /*
>   * The board uses 4 i2c controllers, initialize all of
>   * them with slave data setup time of 250 ns,
> - * Tx & Rx FIFO threshold values as 8 and standard
> + * Tx & Rx FIFO threshold values as 1 resp. 8 and fast
>   * mode of operation
>   */
> -U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
> -U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
> -U8500_I2C_CONTROLLER(2,	0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
> -U8500_I2C_CONTROLLER(3,	0xe, 1, 8, 100000, 200, I2C_FREQ_MODE_FAST);
> +U8500_I2C_CONTROLLER(0, 0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
> +U8500_I2C_CONTROLLER(1, 0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
> +U8500_I2C_CONTROLLER(2,	0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
> +U8500_I2C_CONTROLLER(3,	0xe, 1, 8, 400000, 200, I2C_FREQ_MODE_FAST);
> 
>  static void __init mop500_i2c_init(struct device *parent)
>  {

Best regards,
Marek Vasut

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

* [PATCH] ARM: ux500: bump i2c bus speed to 400kHz
  2012-06-17 23:06 ` Marek Vasut
@ 2012-06-18  6:01   ` Linus Walleij
  2012-06-18 11:28     ` Marek Vasut
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2012-06-18  6:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Jun 18, 2012 at 1:06 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
>> From: Linus Walleij <linus.walleij@linaro.org>
>>
>> Some recent discussion revealed inconsistency in the board file
>> for the MOP500 family. The board can very well do 400kHz on
>> the I2C busses, so make it do that.
>
> Shouldn't this be controlled by DT?

They can be controlled by Device Tree after Lee's patch I think.

> Some of the i2c devices can't do 400kHz.

Which ones? This works find on the MOP500/HREF board, are you referring
to Snowball devices?

Yours,
Linus Walleij

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

* [PATCH] ARM: ux500: bump i2c bus speed to 400kHz
  2012-06-18  6:01   ` Linus Walleij
@ 2012-06-18 11:28     ` Marek Vasut
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2012-06-18 11:28 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Linus Walleij,

> On Mon, Jun 18, 2012 at 1:06 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> >> From: Linus Walleij <linus.walleij@linaro.org>
> >> 
> >> Some recent discussion revealed inconsistency in the board file
> >> for the MOP500 family. The board can very well do 400kHz on
> >> the I2C busses, so make it do that.
> > 
> > Shouldn't this be controlled by DT?
> 
> They can be controlled by Device Tree after Lee's patch I think.
> 
> > Some of the i2c devices can't do 400kHz.
> 
> Which ones? This works find on the MOP500/HREF board, are you referring
> to Snowball devices?

I had issues with some omnivision cameras, but they were indeed quite old. My 
rant was rather about not closing the door for 100kHz if it was ever needed. But 
like you said above, if it can be changed after applying the aforementioned 
patch, that's ok.

Thanks for clearing this up, sorry for pestering you.

> Yours,
> Linus Walleij

Best regards,
Marek Vasut

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

end of thread, other threads:[~2012-06-18 11:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-17 17:57 [PATCH] ARM: ux500: bump i2c bus speed to 400kHz Linus Walleij
2012-06-17 23:06 ` Marek Vasut
2012-06-18  6:01   ` Linus Walleij
2012-06-18 11:28     ` Marek Vasut

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.