[PATCH] 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.
Signed-off-by: Pali Rohár pali@kernel.org 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(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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) = {

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.
Signed-off-by: Pali Rohár pali@kernel.org 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?
board/nokia/rx51/rx51.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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) = {
2.20.1

Hi
On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár pali@kernel.org 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.
Signed-off-by: Pali Rohár pali@kernel.org 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(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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
{ 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
};
U_BOOT_DEVICES(rx51_i2c) = {
2.20.1

On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote:
Hi
On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár pali@kernel.org 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.
Signed-off-by: Pali Rohár pali@kernel.org 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(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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
Prior to mentioned commit which is doing conversion to DM, i2c speed was set to 100000.
{ 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.
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...
Michael
};
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

Hi
On Sat, Nov 28, 2020 at 1:59 PM Pali Rohár pali@kernel.org wrote:
On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote:
Hi
On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár pali@kernel.org 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.
Signed-off-by: Pali Rohár pali@kernel.org 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(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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
Prior to mentioned commit which is doing conversion to DM, i2c speed was set to 100000.
Does this impact the led?
{ 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.
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
Michael
};
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

On Saturday 28 November 2020 14:02:20 Michael Nazzareno Trimarchi wrote:
Hi
On Sat, Nov 28, 2020 at 1:59 PM Pali Rohár pali@kernel.org wrote:
On Saturday 28 November 2020 13:48:37 Michael Nazzareno Trimarchi wrote:
Hi
On Sat, Nov 21, 2020 at 11:30 PM Pali Rohár pali@kernel.org 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.
Signed-off-by: Pali Rohár pali@kernel.org 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(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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
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.
{ 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.
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
Commit is already minimal. It revers back to configuration which was stable and was working prior DM migration.
Michael
Michael
};
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
-- 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

On Sat 2020-11-21 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.
Signed-off-by: Pali Rohár pali@kernel.org Fixes: 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")
Reviewed-by: Pavel Machek pavel@ucw.cz
Best regards, Pavel

On 22/11/20 4:00 am, 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.
Signed-off-by: Pali Rohár pali@kernel.org Fixes: 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")
Applied to u-boot-ti/for-next branch
Thanks and regards, Lokesh
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(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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) = {

On Tuesday 05 January 2021 11:51:20 Lokesh Vutla wrote:
On 22/11/20 4:00 am, 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.
Signed-off-by: Pali Rohár pali@kernel.org Fixes: 8d8c18170325 ("Nokia RX-51: Convert to CONFIG_DM_I2C")
Applied to u-boot-ti/for-next branch
Thanks and regards, Lokesh
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.
board/nokia/rx51/rx51.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c index 3d62b5d9ad..2dd41604c9 100644 --- a/board/nokia/rx51/rx51.c +++ b/board/nokia/rx51/rx51.c @@ -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) = {
participants (4)
-
Lokesh Vutla
-
Michael Nazzareno Trimarchi
-
Pali Rohár
-
Pavel Machek