Skip to contentSkip to conversation

Nokia RX-51: Decrease i2c speed to 100000

PATCH New Pali Rohár 4 participants 9 messages Nov 21, 2020 – Jan 5, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +2 -2
index 3d62b5d9ad..2dd41604c9 100644
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
 static const struct omap_i2c_platdata rx51_i2c[] = {
-	{ I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE1, 100000, OMAP_I2C_REV_V1 },
 	{ I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-	{ I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE3, 100000, OMAP_I2C_REV_V1 },
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

Quoted 10 lines · On Saturday 21 November 2020 23:30:11 Pali Roh?r wrote:

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

Hello! Could you please review this patch?

Quoted 23 lines
---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +2 -2
index 3d62b5d9ad..2dd41604c9 100644
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
 static const struct omap_i2c_platdata rx51_i2c[] = {
-	{ I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE1, 100000, OMAP_I2C_REV_V1 },
 	{ I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-	{ I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE3, 100000, OMAP_I2C_REV_V1 },
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {
Signature · 1 line
2.20.1
#2 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

In reply to Pali Rohár

Hi

Quoted 20 lines · Pali Roh?r

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +0 -0
index 3d62b5d9ad..2dd41604c9 100644

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 707

Quoted 5 lines
board/nokia/rx51/rx51.c +1 -1
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
 static const struct omap_i2c_platdata rx51_i2c[] = {
-       { I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+       { I2C_BASE1, 100000, OMAP_I2C_REV_V1 },

I can understand this one. I don't know what kind of speed was before

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 709

Quoted 3 lines
board/nokia/rx51/rx51.c +1 -1
        { I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-       { I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+       { I2C_BASE3, 100000, OMAP_I2C_REV_V1 },

Can you report the peripherals have this problem? I mean a lot of i2c devices can run to 400Khz. And how are those buses configured in the kernel?

Michael

Quoted 6 lines
board/nokia/rx51/rx51.c +0 -1
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {
--

2.20.1

Signature · 7 lines
Michael Nazzareno Trimarchi
Amarula Solutions BV
COO Co-Founder
Cruquiuskade 47 Amsterdam 1018 AM NL
T. +31(0)851119172
M. +39(0)3479132170
[`as] https://www.amarulasolutions.com
#3 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

Quoted 25 lines · On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote:

Hi

Quoted 22 lines · Pali Roh?r

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +0 -0
index 3d62b5d9ad..2dd41604c9 100644
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
Quoted 5 lines

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 707

Quoted 3 lines
board/nokia/rx51/rx51.c +1 -1
 static const struct omap_i2c_platdata rx51_i2c[] = {
-       { I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+       { I2C_BASE1, 100000, OMAP_I2C_REV_V1 },

I can understand this one. I don't know what kind of speed was before

Prior to mentioned commit which is doing conversion to DM, i2c speed was set to 100000.

Quoted 6 lines

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 709

Quoted 3 lines
board/nokia/rx51/rx51.c +1 -1
        { I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-       { I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+       { I2C_BASE3, 100000, OMAP_I2C_REV_V1 },

Can you report the peripherals have this problem? I mean a lot of i2c devices can run to 400Khz.

Problematic is i2c LED device.

Quoted 1 line

And how are those buses configured in the kernel?

It configures it to 2200000, 100000, 400000, like prior this patch. In kernel they are working fine. I really do not know why U-Boot has problems...

Quoted 19 lines

Michael

Quoted 6 lines
board/nokia/rx51/rx51.c +0 -1
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {
--

2.20.1

Signature · 7 lines
Michael Nazzareno Trimarchi
Amarula Solutions BV
COO Co-Founder
Cruquiuskade 47 Amsterdam 1018 AM NL
T. +31(0)851119172
M. +39(0)3479132170
[`as] https://www.amarulasolutions.com
#4 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

Hi

Quoted 27 lines · Pali Roh?r
Quoted 25 lines · On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote:

Hi

Quoted 22 lines · Pali Roh?r

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +0 -0
index 3d62b5d9ad..2dd41604c9 100644
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
Quoted 9 lines
Quoted 5 lines

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 707

Quoted 3 lines
board/nokia/rx51/rx51.c +1 -1
 static const struct omap_i2c_platdata rx51_i2c[] = {
-       { I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+       { I2C_BASE1, 100000, OMAP_I2C_REV_V1 },

I can understand this one. I don't know what kind of speed was before

Prior to mentioned commit which is doing conversion to DM, i2c speed was set to 100000.

Does this impact the led?

Quoted 7 lines
Quoted 6 lines

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 709

Quoted 3 lines
board/nokia/rx51/rx51.c +1 -1
        { I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-       { I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+       { I2C_BASE3, 100000, OMAP_I2C_REV_V1 },

Can you report the peripherals have this problem? I mean a lot of i2c devices can run to 400Khz.

Quoted 8 lines

Problematic is i2c LED device.

Quoted 1 line

And how are those buses configured in the kernel?

It configures it to 2200000, 100000, 400000, like prior this patch. In kernel they are working fine. I really do not know why U-Boot has problems...

Maybe the selected pull up is not the same for pinmux configuration. Anyway I suggest only to change the value that impact the device, reduce the commit as mimal and describe what is the peripheral was involved

Michael

Quoted 19 lines
Quoted 19 lines

Michael

Quoted 6 lines
board/nokia/rx51/rx51.c +0 -1
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {
--

2.20.1

--
Michael Nazzareno Trimarchi
Amarula Solutions BV
COO Co-Founder
Cruquiuskade 47 Amsterdam 1018 AM NL
T. +31(0)851119172
M. +39(0)3479132170
[`as] https://www.amarulasolutions.com

Signature · 7 lines
Michael Nazzareno Trimarchi
Amarula Solutions BV
COO Co-Founder
Cruquiuskade 47 Amsterdam 1018 AM NL
T. +31(0)851119172
M. +39(0)3479132170
[`as] https://www.amarulasolutions.com
#5 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

Quoted 36 lines · On Saturday 28 November 2020 14:02:20 Michael Nazzareno Trimarchi wrote:

Hi

Quoted 33 lines · Pali Roh?r
Quoted 30 lines · On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote:

Hi

Quoted 20 lines · Pali Roh?r

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +0 -0
index 3d62b5d9ad..2dd41604c9 100644

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 707

Quoted 5 lines
board/nokia/rx51/rx51.c +1 -1
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
 static const struct omap_i2c_platdata rx51_i2c[] = {
-       { I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+       { I2C_BASE1, 100000, OMAP_I2C_REV_V1 },

I can understand this one. I don't know what kind of speed was before

Quoted 5 lines
Quoted 3 lines

Prior to mentioned commit which is doing conversion to DM, i2c speed was set to 100000.

Does this impact the led?

Yes, it starts working again.

Quoted 16 lines
Quoted 7 lines
Quoted 6 lines

board/nokia/rx51/rx51.c void board_mmc_power_init(void) · line 709

Quoted 3 lines
board/nokia/rx51/rx51.c +1 -1
        { I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-       { I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+       { I2C_BASE3, 100000, OMAP_I2C_REV_V1 },

Can you report the peripherals have this problem? I mean a lot of i2c devices can run to 400Khz.

Quoted 8 lines

Problematic is i2c LED device.

Quoted 1 line

And how are those buses configured in the kernel?

It configures it to 2200000, 100000, 400000, like prior this patch. In kernel they are working fine. I really do not know why U-Boot has problems...

Quoted 4 lines

Maybe the selected pull up is not the same for pinmux configuration. Anyway I suggest only to change the value that impact the device, reduce the commit as mimal and describe what is the peripheral was involved

Commit is already minimal. It revers back to configuration which was stable and was working prior DM migration.

Quoted 32 lines

Michael

Quoted 19 lines
Quoted 19 lines

Michael

Quoted 6 lines
board/nokia/rx51/rx51.c +0 -1
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {
--

2.20.1

--
Michael Nazzareno Trimarchi
Amarula Solutions BV
COO Co-Founder
Cruquiuskade 47 Amsterdam 1018 AM NL
T. +31(0)851119172
M. +39(0)3479132170
[`as] https://www.amarulasolutions.com

Signature · 7 lines
Michael Nazzareno Trimarchi
Amarula Solutions BV
COO Co-Founder
Cruquiuskade 47 Amsterdam 1018 AM NL
T. +31(0)851119172
M. +39(0)3479132170
[`as] https://www.amarulasolutions.com
#6 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

In reply to Pali Rohár
Quoted 7 lines · Pali Roh?r

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

Best regards,
Pavel

Signature · 8 lines
http://www.livejournal.com/~pavelmachek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201129/e5d02e1e/attachment.sig>
#7 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

In reply to Pali Rohár
Quoted 7 lines · Pali Roh?r

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

Applied to u-boot-ti/for-next branch

Thanks and regards,
Lokesh

Quoted 24 lines

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +2 -2
index 3d62b5d9ad..2dd41604c9 100644
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
 static const struct omap_i2c_platdata rx51_i2c[] = {
-	{ I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE1, 100000, OMAP_I2C_REV_V1 },
 	{ I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-	{ I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE3, 100000, OMAP_I2C_REV_V1 },
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {
#8 lore raw

PATCH 1/1 Nokia RX-51: Decrease i2c speed to 100000

Quoted 6 lines · On Tuesday 05 January 2021 11:51:20 Lokesh Vutla wrote:
Quoted 5 lines · Pali Roh?r

It looks like that i2c bus lot of times timeout on some units. Prior migration to CONFIG_DM_I2C i2c speed was set to CONFIG_SYS_OMAP24_I2C_SPEED value which was 100000. Lower speed fixes timeout problems, so change speed back to its previous value.

Quoted 11 lines
Quoted 2 lines
Fixes 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")

Applied to u-boot-ti/for-next branch

Thanks and regards,
Lokesh

Quoted 3 lines

---
Please include this patch into U-Boot master branch for 2020.01 release to have i2c bus working.

Could you please include this patch into master branch (and not only into for-next) as I asked more than month ago? It is fixing i2c bus.

Quoted 21 lines
Quoted 21 lines
---
 board/nokia/rx51/rx51.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
board/nokia/rx51/rx51.c +2 -2
index 3d62b5d9ad..2dd41604c9 100644
@@ -704,9 +704,9 @@ void board_mmc_power_init(void)
 }
 
 static const struct omap_i2c_platdata rx51_i2c[] = {
-	{ I2C_BASE1, 2200000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE1, 100000, OMAP_I2C_REV_V1 },
 	{ I2C_BASE2, 100000, OMAP_I2C_REV_V1 },
-	{ I2C_BASE3, 400000, OMAP_I2C_REV_V1 },
+	{ I2C_BASE3, 100000, OMAP_I2C_REV_V1 },
 };
 
 U_BOOT_DEVICES(rx51_i2c) = {