Skip to content

Commit 8c6c78e

Browse files
jk-ozlabsalexandrebelloni
authored andcommitted
i3c: ast2600: fix register setting for 545 ohm pullups
The 2k register setting is zero, OR-ing it in doesn't parallel the 2k and 750 ohm pullups. We need a separate value for the 545 ohm setting. Reported-by: Lukwinski Zbigniew <zbigniew.lukwinski@linux.intel.com> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://lore.kernel.org/r/20230428001849.1775559-1-jk@codeconstruct.com.au Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent f2539c2 commit 8c6c78e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/i3c/master/ast2600-i3c-master.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#define AST2600_I3CG_REG0_SDA_PULLUP_EN_MASK GENMASK(29, 28)
2222
#define AST2600_I3CG_REG0_SDA_PULLUP_EN_2K (0x0 << 28)
2323
#define AST2600_I3CG_REG0_SDA_PULLUP_EN_750 (0x2 << 28)
24+
#define AST2600_I3CG_REG0_SDA_PULLUP_EN_545 (0x3 << 28)
2425

2526
#define AST2600_I3CG_REG1_I2C_MODE BIT(0)
2627
#define AST2600_I3CG_REG1_TEST_MODE BIT(1)
@@ -62,8 +63,7 @@ static int ast2600_i3c_pullup_to_reg(unsigned int ohms, u32 *regp)
6263
reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_750;
6364
break;
6465
case 545:
65-
reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_2K |
66-
AST2600_I3CG_REG0_SDA_PULLUP_EN_750;
66+
reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_545;
6767
break;
6868
default:
6969
return -EINVAL;

0 commit comments

Comments
 (0)