Missing USB on Intel Cherryview
Tom Jones
thj at freebsd.org
Tue Nov 27 14:21:49 UTC 2018
Hi,
Thanks for your reply.
> Currently there is not so much to try, but you can start poking in
> sys/dev/usb/controller/xhci*.[ch] . I have not made any USB-C specific
> changes to the XHCI driver in FreeBSD, so yes, it might not work.
>
> There are also some debug knobs: sysctl -a | grep xhci
USB-C here is a red herring, there is a i2c controlled mux involved
before it will work for USB data.
I think we are missing a second usb instance (instances? I am not sure
of the terminology) on the xhci controller.
Looking at Linux and NetBSD, they both launch two USB from their
xhci_pci drivers.
Linux creates the first here:
https://github.com/torvalds/linux/blob/master/drivers/usb/host/xhci-pci.c#L326
the second here
https://github.com/torvalds/linux/blob/master/drivers/usb/host/xhci-pci.c#L334
NetBSD manages two instances of bus in the softc, sc_bus and sc_bus2
sc_bus2 is configured here, the same as the first bus but with an
explicit usb revision set to USBREV_2_0. They share the same dmatag.
https://github.com/NetBSD/src/blob/trunk/sys/dev/usb/xhci.c#L929
Both instances are then registered with the usb subsystem here:
https://github.com/NetBSD/src/blob/trunk/sys/dev/pci/xhci_pci.c#L281
I seem a similar pattern in the tegra xhci drivers for NetBSD and Linux.
I am going to have a dive into the intel xHCI Interface docs to get more
background.
https://www.intel.com/content/dam/www/public/us/en/documents/technical-specifications/extensible-host-controler-interface-usb-xhci.pdf
Could you tell me if this multiple usb instance interface is something
we are missing or something we implement in a different manner?
- Tom
More information about the freebsd-usb
mailing list