The OHCI companion has one port, so a second device only fits behind
the hub.

npcm7xx has no versioned machine type, so compat cannot reach it. Turn
the property on here instead. The companion shares the EHCI bus, so
the EHCI carries the property.

Suggested-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Jamin Lin <[email protected]>
---
 hw/arm/npcm7xx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c
index 695f30a0dc..3f5b33d7e3 100644
--- a/hw/arm/npcm7xx.c
+++ b/hw/arm/npcm7xx.c
@@ -628,6 +628,8 @@ static void npcm7xx_realize(DeviceState *dev, Error **errp)
     /* USB Host */
     object_property_set_bool(OBJECT(&s->ehci), "companion-enable", true,
                              &error_abort);
+    object_property_set_bool(OBJECT(&s->ehci), "auto-hub", true,
+                             &error_abort);
     sysbus_realize(SYS_BUS_DEVICE(&s->ehci), &error_abort);
     sysbus_mmio_map(SYS_BUS_DEVICE(&s->ehci), 0, NPCM7XX_EHCI_BA);
     sysbus_connect_irq(SYS_BUS_DEVICE(&s->ehci), 0,
-- 
2.43.0

Reply via email to