On 1/15/26 20:47, Philippe Mathieu-Daudé wrote:
Hi,

Cc'ing Markus.

On 12/1/26 09:30, Kane Chen via qemu development wrote:
From: Kane-Chen-AS <[email protected]>

Currently, the Aspeed I2C controller uses a static naming convention
for its buses (e.g., "aspeed.i2c.bus.0"). This approach leads to
object name conflicts in machine models that incorporate multiple I2C
controllers, such as an Aspeed SoC paired with an external IO expander
or a co-processor like the AST1700.


Is this a side-effect of Problem 4: 'The /machine/unattached/ orphanage'
described here?
https://lore.kernel.org/qemu-devel/[email protected]/

This problem isn't specific to I2C nor Aspeed.


See the discussion here :

  
https://lore.kernel.org/qemu-devel/[email protected]/

The Aspeed SoC has 3*16 I2C buses attached on 3 different I2C
controllers plus the I2C/I3C buses. We need to find a way to
distinguish these groups at the QEMU machine level to be able
to add devices on the right bus when using the command line.

Suggestions welcome !

Thanks,

C.



This patch series introduces a 'bus-label' property to the Aspeed I2C
controller. By setting this property, higher-level platform code
(e.g., the SoC realize function) can provide a unique prefix for the
I2C buses.

Changes in v1:

Added bus-label property to AspeedI2CState.
Added bus-name property to AspeedI2CBus.
Modified aspeed_i2c_realize to generate bus names based on the label.
Updated aspeed_i2c_bus_realize to use the customized name for bus
initialization and memory region naming.

Example usage: If a controller's bus-label is set to "ioexp0", its buses
will be named "ioexp0.0", "ioexp0.1", etc., instead of the default
"aspeed.i2c.bus.0".

Any feedback or suggestions are appreciated.

Best Regards,
Kane

Kane-Chen-AS (1):
   hw/i2c/aspeed: Introduce 'bus-label' to customize bus naming

  include/hw/i2c/aspeed_i2c.h |  2 ++
  hw/i2c/aspeed_i2c.c         | 27 +++++++++++++++++++++------
  2 files changed, 23 insertions(+), 6 deletions(-)




Reply via email to