i2c: ast_i2c: Remove SCL direct drive mode
PATCH 1/1 i2c: ast_i2c: Remove SCL direct drive mode
SCL direct drive mode prevents communication with devices that do clock stretching, so disable. The Linux driver doesn't use this mode, and the engine can handle clock stretching.
--- drivers/i2c/ast_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/ast_i2c.c +1 -1
@@ -76,7 +76,7 @@ static void ast_i2c_init_bus(struct udevice *dev)/* Enable Master Mode. Assuming single-master */ writel (I2CD_MASTER_EN |I2CD_M_SDA_LOCK_EN - |I2CD_MULTI_MASTER_DIS |I2CD_M_SCL_DRIVE_EN , + |I2CD_MULTI_MASTER_DIS , &priv->regs->fcr);/* Enable Interrupts */ writel(I2CD_INTR_TX_ACK
Signature · 1 line
2.27.0
Hello Eddie,
Quoted 3 lines · Eddie James
SCL direct drive mode prevents communication with devices that do clock stretching, so disable. The Linux driver doesn't use this mode, and the engine can handle clock stretching.
My first thought was why not make this option configurable, as I do not know if there is any user of this mode configuration.
But as linux does not use this option, we may can disable it.
Quoted 4 lines
Signed-off-by Eddie James <[email protected]>--- drivers/i2c/ast_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
It would be good to have here more comments from users of this driver.
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]
Quoted 6 lines · Eddie James
SCL direct drive mode prevents communication with devices that do clock stretching, so disable. The Linux driver doesn't use this mode, and the engine can handle clock stretching.
Signed-off-by Eddie James <[email protected]>
I have added the aspeed team to cc for their review.
Ryan, we discovered this fix when testing the tpm i2c driver on the ast2600.
Quoted 20 lines
--- drivers/i2c/ast_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/ast_i2c.c +1
-2@@ -76,7 +76,7 @@ static void ast_i2c_init_bus(struct udevice *dev)/* Enable Master Mode. Assuming single-master */ writel (I2CD_MASTER_EN |I2CD_M_SDA_LOCK_EN - |I2CD_MULTI_MASTER_DIS |I2CD_M_SCL_DRIVE_EN , + |I2CD_MULTI_MASTER_DIS , &priv->regs->fcr);/* Enable Interrupts */ writel(I2CD_INTR_TX_ACK --2.27.0
Ryan Chen
Reviewed-byQuoted 11 lines
-----Original Message-----
From: Joel Stanley <[email protected]>
Sent: Thursday, May 19, 2022 8:28 AM
To: Eddie James <[email protected]>; Ryan Chen <[email protected]>; BMC-SW <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; [email protected]
Subject: Re: [PATCH] i2c:ast_i2c: Remove SCL direct drive modeQuoted 1 line · Eddie James
Quoted 8 lines
Quoted 5 lines
SCL direct drive mode prevents communication with devices that do clock stretching, so disable. The Linux driver doesn't use this mode, and the engine can handle clock stretching.
Signed-off-by Eddie James <[email protected]>Reviewed-by Joel Stanley <[email protected]>
Quoted 4 lines
I have added the aspeed team to cc for their review.
Ryan, we discovered this fix when testing the tpm i2c driver on the ast2600.
Yes, it should remove. Thank for inform.
Quoted 20 lines
Quoted 20 lines
--- drivers/i2c/ast_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/i2c/ast_i2c.c index renamed from drivers/i2c/ast_i2c.c +0
-0
2d3fecaa14..8b24a260c0100644drivers/i2c/ast_i2c.c +1
-2@@ -76,7 +76,7 @@ static void ast_i2c_init_bus(struct udevice *dev)/* Enable Master Mode. Assuming single-master */ writel (I2CD_MASTER_EN |I2CD_M_SDA_LOCK_EN - |I2CD_MULTI_MASTER_DIS |I2CD_M_SCL_DRIVE_EN , + |I2CD_MULTI_MASTER_DIS , &priv->regs->fcr);/* Enable Interrupts */ writel(I2CD_INTR_TX_ACK --2.27.0
Hello Eddie,
Quoted 8 lines · Eddie James
SCL direct drive mode prevents communication with devices that do clock stretching, so disable. The Linux driver doesn't use this mode, and the engine can handle clock stretching.
Signed-off-by Eddie James <[email protected]>--- drivers/i2c/ast_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-i2c master
Thanks!
bye,
Heiko
Signature · 3 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: [email protected]