Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1413938
| From | Lu Baolu <baolu.lu@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux |
| Date | 2016-06-05 09:00 +0200 |
| Message-ID | <rGAcp-3pe-1@gated-at.bofh.it> (permalink) |
| References | <rFpM5-7QO-3@gated-at.bofh.it> <rFpM5-7QO-9@gated-at.bofh.it> <rFS1H-kK-11@gated-at.bofh.it> <rFZPz-5sI-23@gated-at.bofh.it> <rG9Ff-30C-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Peter, On 06/04/2016 10:28 AM, Peter Chen wrote: > On Sat, Jun 04, 2016 at 12:06:06AM +0800, Lu Baolu wrote: >>> from my point,it is a dual-role switch >>> driver too, >> No, it's not a dual-role switch driver, but a driver for USB port multiplexing. >> >> One example of port multiplexing can be found in several Intel SOC and PCH >> chips, inside of which, there are two independent USB controllers: host and >> device. They might share a single port and this port could be configured to >> route the line to one of these two controllers. This patch introduced a generic >> framework for port mux drivers. It aids the drivers to handle port mux by >> providing interfaces to 1) register/unregister a mux device; 2) lookup the >> mux device; and 3) switch the port. >> > For this case, I can't see it is different with dual-role switch. Port mux is part of dual role switch, but not the whole thing. Dual role switch includes at least below things: - ID or type-C event detection - port mux - VBUS management - start/stop host/device controllers An OTG/Dual-role framework can be used to keep all these things run together with an internal state machine. But it's not duplicated with a generic framework for port mux and the port mux drivers. > Your > case is just like Renesas case, which uses two different drivers between > peripheral and host[1]. In my case, the port mux devices are physical devices and they can be controlled through GPIO pins or device registers. They are independent of both peripheral and host controllers. >> Port multiplexing isn't equal to USB dual role. There are other cases in today's >> systems. In several Intel PCH chips, there equips two USB host controllers: ehci >> and xhci. The xhci USB2 ports are multiplexed with ehci. This guarantees all >> USB ports work even running an old version of OS which lacks of USB3 support. >> In theory, we can create a driver for the port mux and switch the ports between >> xhci and ehci, but that's silly, isn't it? Why not always USB3?:-) >> >> Another case is xHCI debug capability. The xHCI host controller might equip >> a unit for system debugging (refer to 7.6 of xHCI spec). The debugging unit is >> independent of xhci host controller. But it shares its port with xhci. Software >> could switch the port between xhci and the debugging unit through the registers >> defined in xHCI spec. >> > Yes, above two are different with dual role switch. But in your code and > Kconfig, it seems this framework is dedicated for dual-role. Eg: > > +menuconfig USB_PORTMUX > + bool "USB dual role port MUX support" > + help > + Generic USB dual role port mux support. Above two cases are examples for port multiplexing, but I don't think we need drivers for them. At this moment, this framework is only for dual role port mux devices. > > I think a general dual role port mux is necessary, it can be used to > manage different dual-role switch method, eg Yes, I agree. > - ID pin > - External connector through GPIO > - SoC register > - sysfs > - type-C events ID pin and type-C events are the *reasons* which trigger the port mux switch. Currently, on our platforms, gpio, registers and sysfs are methods to control the mux. > > But this code is better co-work with OTG/Dual-role framework, we'd > better have only interface that the user can know which role for the > current port. OTG/Dual-role framework and portmux framework are not overlapped. The sysfs interface shouldn't be overlapped as well. Say, I have a port mux device and I have a driver for it. I am able to read the status of my port mux device through sysfs. This is not part of OTG/Dual-role as far as I can see. Best regards, Lu Baolu
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-02 03:40 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-03 09:50 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Heikki Krogerus <heikki.krogerus@linux.intel.com> - 2016-06-03 10:20 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-03 11:30 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-03 18:10 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-04 04:40 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-05 09:00 +0200
RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-05 10:40 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-05 10:50 +0200
RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-06 03:10 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 04:40 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 04:20 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 04:50 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 09:00 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 03:40 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 05:10 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-06 09:10 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-06 09:40 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-06 09:10 +0200
RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-07 05:20 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-07 08:30 +0200
RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-07 09:10 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-07 11:30 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-07 14:50 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Lu Baolu <baolu.lu@linux.intel.com> - 2016-06-07 12:00 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-07 15:00 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-06-07 15:10 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-07 16:10 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Felipe Balbi <felipe.balbi@linux.intel.com> - 2016-06-07 17:10 +0200
RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-08 05:10 +0200
RE: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Jun Li <jun.li@nxp.com> - 2016-06-08 08:30 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Peter Chen <hzpeterchen@gmail.com> - 2016-06-08 08:40 +0200
Re: [PATCH v10 2/7] usb: mux: add generic code for dual role port mux Roger Quadros <rogerq@ti.com> - 2016-06-08 10:00 +0200
csiph-web