Hi Angus > -----Original Message----- > From: Angus Ainslie <angus.ainslie@xxxxxxx> > Sent: 2018年11月1日 21:53 > To: Jun Li <jun.li@xxxxxxx> > Subject: USB Type C ptn5110 > > Hi Li, > > We have a custom PCB that has a PTN5110 on it. The board can power from the > USB C no problem but we are starting to look into the data modes and roles > switching. > > When I plug it into a host PC the host doesn't not recognize any device attached. I > don't have anything setup on the target as far as the gadgetfs so I assume that is > the issue there. > > Also we would like the port to work in host mode. When we plug and unplug > devices ( Type C hub and Type C HDMI connector ) I was expecting activity and a > role switch on the port but we only get VBUS on/off events. There's a log below > and I'll attach the page from our schematic, I can send additional pages if needed. > What usb driver are you using? Is there a sync mechanism between typec driver and your usb driver? What kernel version you are using, why SNK_ATTACH_WAIT can come to PORT_RESET state? This is tcpm code I see: case SNK_ATTACH_WAIT: if ((port->cc1 == TYPEC_CC_OPEN && port->cc2 != TYPEC_CC_OPEN) || (port->cc1 != TYPEC_CC_OPEN && port->cc2 == TYPEC_CC_OPEN)) tcpm_set_state(port, SNK_DEBOUNCED, PD_T_CC_DEBOUNCE); else if (tcpm_port_is_disconnected(port)) tcpm_set_state(port, SNK_UNATTACHED, PD_T_PD_DEBOUNCE); break; You can cc to linux-usb mail list for more help. Li Jun > Any help would be appreciated. > > Thanks > > Angus > > [ 9.995334] Setting voltage/current limit 0 mV 0 mA [ 9.995339] polarity 0 > [ 9.999888] Requesting mux mode 0, usb-role 0, orientation 0 [ 10.001072] > state change INVALID_STATE -> SNK_UNATTACHED [ 10.001688] CC1: 0 -> 3, > CC2: 0 -> 0 [state SNK_UNATTACHED, polarity 0, connected] [ 10.001693] state > change SNK_UNATTACHED -> SNK_ATTACH_WAIT [ 10.001699] state change > SNK_ATTACH_WAIT -> PORT_RESET [ 10.001709] 0-0052: > registered > > > [ 10.015559] Setting voltage/current limit 0 mV 0 mA [ 10.015564] polarity 0 > [ 10.018415] Requesting mux mode 0, usb-role 0, orientation 0 [ 10.018915] > cc:=0 [ 10.020105] pending state change PORT_RESET -> > PORT_RESET_WAIT_OFF @ > 100 ms > [ 10.021369] CC1: 3 -> 0, CC2: 0 -> 0 [state PORT_RESET, polarity 0, > disconnected] [ 10.021374] state change PORT_RESET -> SNK_UNATTACHED > [ 10.021384] Start DRP toggling [ 10.026761] CC1: 0 -> 0, CC2: 0 -> 0 [state > DRP_TOGGLING, polarity 0, disconnected] > > [ 102.839786] VBUS off > [ 102.843610] VBUS off > [ 107.269437] VBUS on > [ 107.270646] VBUS on > [ 107.273120] VBUS on > [ 265.490589] VBUS off