We have a custom carrier board, utilizing the AGX Xavier (Industrial) SOM and we want to use a type-c connector to use as an otg port.
Currently we are using TI’s TPS65988 PD-controller and TI’s TUSB1042I redriver for this.
When the port operates in host mode all is fine, but when an external host tries to use the port as a device we often run into problems.
Ánd it seems to be dependent of the type of the external host. When using a Dell Precision 7730, device mode works as a charm, but when using a Dell Latitude 7420 it does not. Unfourtunately most external hosts does not work.
We have no sinking capability, but can provide 5V and 15V, and that also works as a charm. The trouble is when the usb port is supposed to enter device mode.
Attached is a dmesg log with debug printouts when a Dell Latitude 7420 is connected to the port. Also usb dts settings are attached.
I have tried numerous settings for example thw EQ/SSEQ gain settings for the redriver, and nothing seems to help.
We have a custom driver for tps65988 that exposes the extcon cables to the xhci/xudc controller.
Does anybode have any insights in where I should start digging?
dmesg:
[ 416.285473] tps65988 0-0020: [typec-port] Cable state:1, cable id:1
[ 416.291751] tegra-xudc-new 3550000.xudc: vbus state: 1
[ 416.291975] [hold VBUS wakelock]
[ 416.292123] tegra-xudc-new 3550000.xudc: exiting ELPG
[ 416.292993] tegra-xudc-new 3550000.xudc: exiting ELPG done
[ 416.293208] tegra-xudc-new 3550000.xudc: device mode on: 0
[ 416.293399] tegra-xudc-new 3550000.xudc: active: 0 => 1
[ 416.764797] tps65988 0-0020: [typec-port] Cable state:0, cable id:1
[ 416.769187] tegra-xudc-new 3550000.xudc: vbus state: 0
[ 416.773331] tegra-xudc-new 3550000.xudc: device mode off: 0
[ 416.773591] [drop VBUS wakelock]
[ 416.773735] tegra-xudc-new 3550000.xudc: active: 1 => 0
[ 416.773926] tegra-xudc-new 3550000.xudc: entering ELPG
[ 416.774788] tegra-xudc-new 3550000.xudc: entering ELPG done
[ 417.390854] tps65988 0-0020: [typec-port] Cable state:1, cable id:2
[ 417.673842] tps65988 0-0020: [typec-port] Cable state:0, cable id:2
[ 418.019731] tps65988 0-0020: [typec-port] Cable state:1, cable id:1
[ 418.024355] tegra-xudc-new 3550000.xudc: vbus state: 1
[ 418.025857] [hold VBUS wakelock]
[ 418.026007] tegra-xudc-new 3550000.xudc: exiting ELPG
[ 418.028123] tegra-xudc-new 3550000.xudc: exiting ELPG done
[ 418.028392] tegra-xudc-new 3550000.xudc: device mode on: 0
[ 418.028621] tegra-xudc-new 3550000.xudc: active: 0 => 1
[ 418.331841] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2000, lo = 0x1000000, hi = 0x0, status = 0x1000000, control = 0x8801
[ 418.336264] tegra-xudc-new 3550000.xudc: CSC, PORTSC = 0x21003
[ 418.338808] tegra-xudc-new 3550000.xudc: PORTSC = 0x1003
[ 418.340915] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2010, lo = 0x210500, hi = 0x0, status = 0x1000000, control = 0xfc01
[ 418.345123] tegra-xudc-new 3550000.xudc: USB_REQ_SET_ADDRESS
[ 418.347126] tegra-xudc-new 3550000.xudc: set address: 33
[ 418.349295] tegra-xudc-new 3550000.xudc: TRANSFER: ffffff800b101310, lo = 0x0, hi = 0x0, status = 0x0, control = 0x11025
[ 418.353354] tegra-xudc-new 3550000.xudc: ring doorbell: 0x0
[ 418.355780] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2020, lo = 0xffede310, hi = 0x0, status = 0x1000000, control = 0x8001
[ 418.360459] tegra-xudc-new 3550000.xudc: trb_in_request: request ffffff800b101310 -> ffffff800b101310; trb ffffff800b101310
[ 418.364482] tegra-xudc-new 3550000.xudc: bytes transferred 0 / 0
[ 418.367017] tegra-xudc-new 3550000.xudc: completing request ffffffc6ca09c780 on ep 0 with status 0
[ 418.370502] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2030, lo = 0x1000680, hi = 0x120000, status = 0x1000001, control = 0xfc01
[ 418.374913] tegra-xudc-new 3550000.xudc: TRANSFER: ffffff800b101320, lo = 0xffe92400, hi = 0x0, status = 0x12, control = 0x10c25
[ 418.379281] tegra-xudc-new 3550000.xudc: ring doorbell: 0x10000
[ 418.381940] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2040, lo = 0xffede320, hi = 0x0, status = 0x1000000, control = 0x8001
[ 418.386519] tegra-xudc-new 3550000.xudc: trb_in_request: request ffffff800b101320 -> ffffff800b101320; trb ffffff800b101320
[ 418.396442] tegra-xudc-new 3550000.xudc: bytes transferred 18 / 18
[ 418.402988] tegra-xudc-new 3550000.xudc: completing request ffffffc6c43e5480 on ep 0 with status 0
[ 418.411970] tegra-xudc-new 3550000.xudc: TRANSFER: ffffff800b101330, lo = 0x0, hi = 0x0, status = 0x0, control = 0x1025
[ 418.423044] tegra-xudc-new 3550000.xudc: ring doorbell: 0x10000
[ 418.429033] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2050, lo = 0xffede330, hi = 0x0, status = 0x1000000, control = 0x8001
[ 418.440592] tegra-xudc-new 3550000.xudc: trb_in_request: request ffffff800b101330 -> ffffff800b101330; trb ffffff800b101330
[ 418.451608] tegra-xudc-new 3550000.xudc: bytes transferred 0 / 0
[ 418.457815] tegra-xudc-new 3550000.xudc: completing request ffffffc6ca09c780 on ep 0 with status 0
[ 418.466931] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2060, lo = 0x2000680, hi = 0xff0000, status = 0x1000002, control = 0xfc01
[ 418.478598] tegra-xudc-new 3550000.xudc: TRANSFER: ffffff800b101340, lo = 0xffe92400, hi = 0x0, status = 0xff, control = 0x10c25
[ 418.490124] tegra-xudc-new 3550000.xudc: ring doorbell: 0x20000
[ 418.496242] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2070, lo = 0xffede340, hi = 0x0, status = 0x1000000, control = 0x8001
[ 418.508018] tegra-xudc-new 3550000.xudc: trb_in_request: request ffffff800b101340 -> ffffff800b101340; trb ffffff800b101340
[ 418.519194] tegra-xudc-new 3550000.xudc: bytes transferred 255 / 255
[ 418.525504] tegra-xudc-new 3550000.xudc: completing request ffffffc6c43e5480 on ep 0 with status 0
[ 418.534579] tegra-xudc-new 3550000.xudc: TRANSFER: ffffff800b101350, lo = 0x0, hi = 0x0, status = 0x0, control = 0x1025
[ 418.545541] tegra-xudc-new 3550000.xudc: ring doorbell: 0x20000
[ 418.551948] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2080, lo = 0xffede350, hi = 0x0, status = 0x1000000, control = 0x8001
[ 418.563121] tegra-xudc-new 3550000.xudc: trb_in_request: request ffffff800b101350 -> ffffff800b101350; trb ffffff800b101350
[ 418.574571] tegra-xudc-new 3550000.xudc: bytes transferred 0 / 0
[ 418.580606] tegra-xudc-new 3550000.xudc: completing request ffffffc6ca09c780 on ep 0 with status 0
[ 418.589457] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e2090, lo = 0x2000680, hi = 0x13b0000, status = 0x1000003, control = 0xfc01
[ 418.601722] tegra-xudc-new 3550000.xudc: TRANSFER: ffffff800b101360, lo = 0xffe92400, hi = 0x0, status = 0x13b, control = 0x10c25
[ 418.613335] tegra-xudc-new 3550000.xudc: ring doorbell: 0x30000
[ 418.620088] android_work: sent uevent USB_STATE=CONNECTED
[ 418.687635] tegra-xudc-new 3550000.xudc: EVENT: ffffff800d1e20a0, lo = 0x1000000, hi = 0x0, status = 0x1000000, control = 0x8801
[ 418.688932] tegra-xudc-new 3550000.xudc: CSC, PORTSC = 0x20080
[ 418.689593] tegra-xudc-new 3550000.xudc: completing request ffffffc6c43e5480 on ep 0 with status -108
[ 418.690707] tegra-xudc-new 3550000.xudc: PORTSC = 0x80
[ 418.691615] android_work: sent uevent USB_STATE=DISCONNECTED
dts:
xusb_padctl: xusb_padctl@3520000 {
status = "okay";
pads {
usb2 {
lanes {
usb2-0 {
nvidia,function = "xusb";
status = "disabled";
};
usb2-1 {
nvidia,function = "xusb";
status = "okay";
};
usb2-2 {
nvidia,function = "xusb";
status = "disabled";
};
usb2-3 {
nvidia,function = "xusb";
status = "okay";
};
};
};
usb3 {
lanes {
usb3-0 {
nvidia,function = "xusb";
status = "disabled";
};
usb3-2 {
nvidia,function = "xusb";
status = "disabled";
};
usb3-3 {
nvidia,function = "xusb";
status = "okay";
};
};
};
};
ports {
usb2-0 {
mode = "host";
vbus-supply = <&battery_reg>;
status = "disabled";
};
usb2-1 {
mode = "otg";
vbus-supply = <&battery_reg>;
status = "okay";
};
usb2-2 {
mode = "host";
vbus-supply = <&battery_reg>;
status = "disabled";
};
usb2-3 {
mode = "host";
vbus-supply = <&battery_reg>;
status = "okay";
};
usb3-0 {
nvidia,usb2-companion = <0x02>;
status = "disabled";
};
usb3-2 {
nvidia,usb2-companion = <0x00>;
status = "disabled";
};
usb3-3 {
nvidia,usb2-companion = <0x01>;
status = "okay";
};
};
};
tegra_xudc: xudc@3550000 {
extcon-cables = <&typec_port_1 0>;
extcon-cable-names = "vbus";
#extcon-cells = <1>;
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-3}>;
phy-names = "usb2-1", "usb3-3";
nvidia,xusb-padctl = <&xusb_padctl>;
nvidia,boost_cpu_freq = <1200>;
status = "okay";
};
tegra_xhci: xhci@3610000 {
extcon-cables = <&typec_port_1 1>;
extcon-cable-names = "id";
#extcon-cells = <1>;
phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-1}>,
<&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-3}>,
<&{/xusb_padctl@3520000/pads/usb3/lanes/usb3-3}>;
phy-names = "usb2-1", "usb2-3", "usb3-3";
nvidia,xusb-padctl = <&xusb_padctl>;
status = "okay";
};