* Re: [PATCH] i2c: ast_i2c: Remove SCL direct drive mode
2022-05-11 20:52 [PATCH] i2c: ast_i2c: Remove SCL direct drive mode Eddie James
@ 2022-05-12 4:49 ` Heiko Schocher
2022-05-19 0:28 ` Joel Stanley
2022-07-19 11:53 ` Heiko Schocher
2 siblings, 0 replies; 5+ messages in thread
From: Heiko Schocher @ 2022-05-12 4:49 UTC (permalink / raw)
To: Eddie James, u-boot
Hello Eddie,
On 11.05.22 22:52, Eddie James wrote:
> 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.
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
> drivers/i2c/ast_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Heiko Schocher <hs@denx.de>
It would be good to have here more comments from users of this driver.
bye,
Heiko
--
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: hs@denx.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: ast_i2c: Remove SCL direct drive mode
2022-05-11 20:52 [PATCH] i2c: ast_i2c: Remove SCL direct drive mode Eddie James
2022-05-12 4:49 ` Heiko Schocher
@ 2022-05-19 0:28 ` Joel Stanley
2022-05-19 1:55 ` Ryan Chen
2022-07-19 11:53 ` Heiko Schocher
2 siblings, 1 reply; 5+ messages in thread
From: Joel Stanley @ 2022-05-19 0:28 UTC (permalink / raw)
To: Eddie James, Ryan Chen, BMC-SW; +Cc: U-Boot Mailing List, hs
On Wed, 11 May 2022 at 20:52, Eddie James <eajames@linux.ibm.com> wrote:
>
> 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 <eajames@linux.ibm.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
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.
> ---
> drivers/i2c/ast_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
> index 2d3fecaa14..8b24a260c0 100644
> --- a/drivers/i2c/ast_i2c.c
> +++ b/drivers/i2c/ast_i2c.c
> @@ -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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] i2c: ast_i2c: Remove SCL direct drive mode
2022-05-19 0:28 ` Joel Stanley
@ 2022-05-19 1:55 ` Ryan Chen
0 siblings, 0 replies; 5+ messages in thread
From: Ryan Chen @ 2022-05-19 1:55 UTC (permalink / raw)
To: Joel Stanley, Eddie James, BMC-SW; +Cc: U-Boot Mailing List, hs@denx.de
> -----Original Message-----
> From: Joel Stanley <joel@jms.id.au>
> Sent: Thursday, May 19, 2022 8:28 AM
> To: Eddie James <eajames@linux.ibm.com>; Ryan Chen
> <ryan_chen@aspeedtech.com>; BMC-SW <BMC-SW@aspeedtech.com>
> Cc: U-Boot Mailing List <u-boot@lists.denx.de>; hs@denx.de
> Subject: Re: [PATCH] i2c: ast_i2c: Remove SCL direct drive mode
>
> On Wed, 11 May 2022 at 20:52, Eddie James <eajames@linux.ibm.com>
> wrote:
> >
> > 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 <eajames@linux.ibm.com>
>
> Reviewed-by: Joel Stanley <joel@jms.id.au>
>
Reviewed-by: ryan_chen <ryan_chen@aspeedtech.com>
> 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.
> > ---
> > drivers/i2c/ast_i2c.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c index
> > 2d3fecaa14..8b24a260c0 100644
> > --- a/drivers/i2c/ast_i2c.c
> > +++ b/drivers/i2c/ast_i2c.c
> > @@ -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
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i2c: ast_i2c: Remove SCL direct drive mode
2022-05-11 20:52 [PATCH] i2c: ast_i2c: Remove SCL direct drive mode Eddie James
2022-05-12 4:49 ` Heiko Schocher
2022-05-19 0:28 ` Joel Stanley
@ 2022-07-19 11:53 ` Heiko Schocher
2 siblings, 0 replies; 5+ messages in thread
From: Heiko Schocher @ 2022-07-19 11:53 UTC (permalink / raw)
To: Eddie James, u-boot
Hello Eddie,
On 11.05.22 22:52, Eddie James wrote:
> 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 <eajames@linux.ibm.com>
> ---
> drivers/i2c/ast_i2c.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-i2c master
Thanks!
bye,
Heiko
--
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: hs@denx.de
^ permalink raw reply [flat|nested] 5+ messages in thread