ARM: ux500: bump i2c bus speed to 400kHz
Subsystems (3)
PATCH 1/1 ARM: ux500: bump i2c bus speed to 400kHz
From: Linus Walleij <[email protected]>
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.
--- arch/arm/mach-ux500/board-mop500.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm/mach-ux500/board-mop500.c +5 -5
@@ -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) {
Signature · 1 line
1.7.9.2
PATCH 1/1 ARM: ux500: bump i2c bus speed to 400kHz
Dear Linus Walleij,
Quoted 5 lines
From: Linus Walleij <[email protected]>
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.
Quoted 20 lines
Cc Srinidhi Kasagar <[email protected]>Cc Lee Jones <[email protected]>Signed-off-by Linus Walleij <[email protected]>--- arch/arm/mach-ux500/board-mop500.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)(quoted diff) +0
-0
b/arch/arm/mach-ux500/board-mop500.cindex 9c74ac5..e441bd7 100644arch/arm/mach-ux500/board-mop500.c +0
-0@@ -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
*/arch/arm/mach-ux500/board-mop500.c +0
-1-U8500_I2C_CONTROLLER (0 ,0xe ,1 ,8 ,100000 ,200 ,I2C_FREQ_MODE_FAST );
arch/arm/mach-ux500/board-mop500.c static struct nmk_i2c_controller u8500_i2c##id##_data = { \ · line 366
Quoted 10 lines
arch/arm/mach-ux500/board-mop500.c +4
-3-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
PATCH 1/1 ARM: ux500: bump i2c bus speed to 400kHz
Quoted 7 lines · Marek Vasut
Quoted 5 lines
From: Linus Walleij <[email protected]>
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.
Quoted 1 line
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
PATCH 1/1 ARM: ux500: bump i2c bus speed to 400kHz
Dear Linus Walleij,
Quoted 7 lines · Marek Vasut
Quoted 6 lines
Quoted 5 lines
From: Linus Walleij <[email protected]>
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.
Quoted 8 lines
Quoted 1 line
Shouldn't this be controlled by DT?
They can be controlled by Device Tree after Lee's patch I think.
Quoted 1 line
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.
Quoted 2 lines
Yours,
Linus Walleij
Best regards,
Marek Vasut