summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@codeconstruct.com.au>2023-04-28 08:18:49 +0800
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2023-04-28 08:52:23 +0200
commit8c6c78ee3b3330cf8a00a3c6bdecc18d42e969d7 (patch)
tree984d190818837201dec1412a5a97192fe856631c /drivers/i3c
parentf2539c20791eb474ae083f60a572f207ffbc3a67 (diff)
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>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master/ast2600-i3c-master.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i3c/master/ast2600-i3c-master.c b/drivers/i3c/master/ast2600-i3c-master.c
index 6715d1f044b6..b72c12c5168f 100644
--- a/drivers/i3c/master/ast2600-i3c-master.c
+++ b/drivers/i3c/master/ast2600-i3c-master.c
@@ -21,6 +21,7 @@
#define AST2600_I3CG_REG0_SDA_PULLUP_EN_MASK GENMASK(29, 28)
#define AST2600_I3CG_REG0_SDA_PULLUP_EN_2K (0x0 << 28)
#define AST2600_I3CG_REG0_SDA_PULLUP_EN_750 (0x2 << 28)
+#define AST2600_I3CG_REG0_SDA_PULLUP_EN_545 (0x3 << 28)
#define AST2600_I3CG_REG1_I2C_MODE BIT(0)
#define AST2600_I3CG_REG1_TEST_MODE BIT(1)
@@ -62,8 +63,7 @@ static int ast2600_i3c_pullup_to_reg(unsigned int ohms, u32 *regp)
reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_750;
break;
case 545:
- reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_2K |
- AST2600_I3CG_REG0_SDA_PULLUP_EN_750;
+ reg = AST2600_I3CG_REG0_SDA_PULLUP_EN_545;
break;
default:
return -EINVAL;