[PATCH v2 1/3] bus: ti-sysc: fix I2C quirk for OMAP3 variants

From: Andreas Kemnade

Date: Tue Nov 10 2026 - 15:58:18 EST


OMAP3 has only one revision register, not split across two registers.
Do not try to interpret the interrupt enable register but instead
use the size of the revision register as indicator.
Specifying a fake 8 byte range and the original quirk only works if
u-boot has not messed around with the interrupt enable register.

Fixes: 4e23be473e306 ("bus: ti-sysc: Add support for module specific reset quirks")
Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
---
drivers/bus/ti-sysc.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 12285ad9ef51f..400259d1fc2da 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -122,6 +122,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
* @cookie: data used by legacy platform callbacks
* @name: name if available
* @revision: interconnect target module revision
+ * @revision_doubleword: revision is stored across two words
* @sysconfig: saved sysconfig register value
* @reserved: target module is reserved and already in use
* @enabled: sysc runtime enabled status
@@ -153,6 +154,7 @@ struct sysc {
struct ti_sysc_cookie cookie;
const char *name;
u32 revision;
+ bool revision_doubleword;
u32 sysconfig;
unsigned int reserved:1;
unsigned int enabled:1;
@@ -179,7 +181,8 @@ static void sysc_write(struct sysc *ddata, int offset, u32 value)

/* Only i2c revision has LO and HI register with stride of 4 */
if (ddata->offsets[SYSC_REVISION] >= 0 &&
- offset == ddata->offsets[SYSC_REVISION]) {
+ offset == ddata->offsets[SYSC_REVISION] &&
+ ddata->revision_doubleword) {
u16 hi = value >> 16;

writew_relaxed(hi, ddata->module_va + offset + 4);
@@ -200,7 +203,8 @@ static u32 sysc_read(struct sysc *ddata, int offset)

/* Only i2c revision has LO and HI register with stride of 4 */
if (ddata->offsets[SYSC_REVISION] >= 0 &&
- offset == ddata->offsets[SYSC_REVISION]) {
+ offset == ddata->offsets[SYSC_REVISION] &&
+ ddata->revision_doubleword) {
u16 tmp = readw_relaxed(ddata->module_va + offset + 4);

val |= tmp << 16;
@@ -761,8 +765,10 @@ static void sysc_check_children(struct sysc *ddata)
*/
static void sysc_check_quirk_16bit(struct sysc *ddata, struct resource *res)
{
- if (resource_size(res) == 8)
+ if (resource_size(res) == 8) {
ddata->cfg.quirks |= SYSC_QUIRK_16BIT | SYSC_QUIRK_USE_CLOCKACT;
+ ddata->revision_doubleword = true;
+ }
}

/**
@@ -1527,9 +1533,11 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000036, 0x000000ff,
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x0000003c, 0x000000ff,
- SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
+ SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE |
+ SYSC_QUIRK_16BIT | SYSC_QUIRK_USE_CLOCKACT),
SYSC_QUIRK("i2c", 0, 0, 0x20, 0x10, 0x00000040, 0x000000ff,
- SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
+ SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE |
+ SYSC_QUIRK_16BIT | SYSC_QUIRK_USE_CLOCKACT),
SYSC_QUIRK("i2c", 0, 0, 0x10, 0x90, 0x5040000a, 0xfffff0f0,
SYSC_MODULE_QUIRK_I2C | SYSC_MODULE_QUIRK_ENA_RESETDONE),
SYSC_QUIRK("gpu", 0x50000000, 0x14, -ENODEV, -ENODEV, 0x00010201, 0xffffffff, 0),
@@ -1872,7 +1880,7 @@ static void sysc_clk_quirk_i2c(struct sysc *ddata, bool enable)
u16 val;

/* I2C_CON, omap2/3 is different from omap4 and later */
- if ((ddata->revision & 0xffffff00) == 0x001f0000)
+ if (!ddata->revision_doubleword)
offset = 0x24;
else
offset = 0xa4;

--
2.47.3