Skip to contentSkip to conversation

i3c: master: ast2600: Fix missing of_node for virtual I2C adapter

PATCH Superseded Peter Yin 2 participants 3 messages Feb 25

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Peter Yin

author
#0 lore raw

PATCH 1/1 i3c: master: ast2600: Fix missing of_node for virtual I2C adapter

The ASPEED AST2600 I3C master driver creates a virtual I2C adapter to provide backward compatibility with I2C devices. However, the current implementation does not associate this virtual adapter with any Device Tree node.

This patch propagates the of_node from the I3C master platform device to the virtual I2C adapter's device structure. This ensures that standard I2C aliases are correctly resolved and bus numbering remains consistent across reboots.

---
 drivers/i3c/master/ast2600-i3c-master.c | 1 +
 1 file changed, 1 insertion(+)
drivers/i3c/master/ast2600-i3c-master.c +1 -0
index e05e83812c71..a1c6c9d97d11 100644
@@ -156,6 +156,7 @@ static int ast2600_i3c_probe(struct platform_device *pdev)
 			i3c->sda_pullup);
 
 	i3c->dw.platform_ops = &ast2600_i3c_ops;
+	i3c->dw.base.i2c.dev.of_node = np;
 	return dw_i3c_common_probe(&i3c->dw, pdev);
 }
 
Signature · 1 line
2.43.0
maintainer
#1 lore raw

Hi Peter,

Quoted 9 lines

The ASPEED AST2600 I3C master driver creates a virtual I2C adapter to provide backward compatibility with I2C devices. However, the current implementation does not associate this virtual adapter with any Device Tree node.

This patch propagates the of_node from the I3C master platform device to the virtual I2C adapter's device structure. This ensures that standard I2C aliases are correctly resolved and bus numbering remains consistent across reboots.

Sounds sensible - but:

Quoted 9 lines
drivers/i3c/master/ast2600-i3c-master.c +0 -0
@@ -156,6 +156,7 @@ static int ast2600_i3c_probe(struct platform_device *pdev)
                         i3c->sda_pullup);


        i3c->dw.platform_ops = &ast2600_i3c_ops; +       i3c->dw.base.i2c.dev.of_node = np; return dw_i3c_common_probe(&i3c->dw, pdev); }

Why not do this in the common (dw) driver? Nothing about the of_node association is aspeed-specific.

Cheers,

Jeremy

author
#2 lore raw

Jeremy Kerr <[email protected]> 於 2026年2月25日週三 下午2:43寫道:

Quoted 28 lines

Hi Peter,

Quoted 9 lines

The ASPEED AST2600 I3C master driver creates a virtual I2C adapter to provide backward compatibility with I2C devices. However, the current implementation does not associate this virtual adapter with any Device Tree node.

This patch propagates the of_node from the I3C master platform device to the virtual I2C adapter's device structure. This ensures that standard I2C aliases are correctly resolved and bus numbering remains consistent across reboots.

Sounds sensible - but:

drivers/i3c/master/ast2600-i3c-master.c static int ast2600_i3c_probe(struct platform_device *pdev) · line 161

Quoted 9 lines
drivers/i3c/master/ast2600-i3c-master.c +1 -0
@@ -156,6 +156,7 @@ static int ast2600_i3c_probe(struct platform_device *pdev)
                        i3c->sda_pullup);
 
        i3c->dw.platform_ops = &ast2600_i3c_ops;
+       i3c->dw.base.i2c.dev.of_node = np;
        return dw_i3c_common_probe(&i3c->dw, pdev);
 }

Why not do this in the common (dw) driver? Nothing about the of_node association is aspeed-specific.

Quoted 4 lines

Cheers,

Jeremy

Hi Jeremy,
I will move the fix to dw_i3c_common_probe in
drivers/i3c/master/dw-i3c-master.c and send out a V2 patch shortly.