Re: [PATCH v6 4/5] i2c: aspeed: added driver for Aspeed I2C
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2017-03-28 08:59:00
Also in:
linux-i2c, lkml, openbmc
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2017-03-28 08:59:00
Also in:
linux-i2c, lkml, openbmc
On Mon, 2017-03-27 at 22:12 -0700, Brendan Higgins wrote:
+/* 0x04 : I2CD Clock and AC Timing Control Register #1 */ +#define ASPEED_I2CD_TIME_SCL_HIGH_SHIFT 16 +#define ASPEED_I2CD_TIME_SCL_HIGH_MASK GENMASK(19, 16) +#define ASPEED_I2CD_TIME_SCL_LOW_SHIFT 12 +#define ASPEED_I2CD_TIME_SCL_LOW_MASK GENMASK(15, 12) +#define ASPEED_I2CD_TIME_BASE_DIVISOR_MASK GENMASK(3, 0) +#define ASPEED_I2CD_TIME_SCL_REG_MAX GENMASK(3, 0) +/* 0x08 : I2CD Clock and AC Timing Control Register #2 */ +#define ASPEED_NO_TIMEOUT_CTRL 0
Those are slightly different between the 2400 and 2500, allowing slightly more fine grained settings (faster base clock and thus higher numbers in high/low counts). I *think* that using the 2400 values as-is might work ok, at least it does for 100kHz but I would double check. I'll review the rest tomorrow. Cheers, Ben.