So I have some updates after we got our staging working again. I set it up so I can manually set both the ID and VBUS lines logic states.
If I set ID=1 and VBUS=1 this shows up in dmesg (Same for USB Key, USB2 wire, and USB3 wire)
[ 1076.400334] extcon-gpio-states usb_otg: Cable state:0, cable id:0
[ 1076.400727] unbalanced disables for vdd-usb-vbus
[ 1076.423875] Workqueue: events tegra_xusb_otg_vbus_work
[ 1076.430330] [<ffffff800849cbac>] tegra210_xusb_padctl_vbus_power_off+0x1b4/0x3d0
[ 1076.430391] [<ffffff800849cfdc>] tegra210_xusb_padctl_otg_vbus_handle+0x74/0xe8
[ 1076.430440] [<ffffff80084960ec>] tegra_xusb_otg_vbus_work+0x5c/0x78
[ 1076.434527] tegra-xusb-padctl 7009f000.xusb_padctl: disable usb2-0 vbus failed -5
If I set ID=0 and VBUS=1 this shows up in dmesg (Same for USB Key, USB2 wire, and USB3 wire)
[ 1247.747147] extcon-gpio-states usb_otg: Cable state:1, cable id:1
[ 1247.751447] unbalanced disables for vdd-usb-vbus
[ 1247.773280] Workqueue: events tegra_xusb_otg_vbus_work
[ 1247.778062] [<ffffff800849cbac>] tegra210_xusb_padctl_vbus_power_off+0x1b4/0x3d0
[ 1247.778068] [<ffffff800849cfdc>] tegra210_xusb_padctl_otg_vbus_handle+0x74/0xe8
[ 1247.778073] [<ffffff80084960ec>] tegra_xusb_otg_vbus_work+0x5c/0x78
[ 1247.778263] tegra-xusb-padctl 7009f000.xusb_padctl: disable usb2-0 vbus failed -5
If I set ID=0 and VBUS=0 this shows up in dmesg with a USB3 cable in:
[ 1412.160139] extcon-gpio-states usb_otg: Cable state:1, cable id:2
[ 1412.160769] tegra-xusb 70090000.xusb: exiting ELPG
[ 1412.165224] unbalanced disables for vdd-usb-vbus
[ 1412.187023] Workqueue: events tegra_xusb_otg_vbus_work
[ 1412.191733] [<ffffff800849cbac>] tegra210_xusb_padctl_vbus_power_off+0x1b4/0x3d0
[ 1412.191737] [<ffffff800849cfdc>] tegra210_xusb_padctl_otg_vbus_handle+0x74/0xe8
[ 1412.191740] [<ffffff80084960ec>] tegra_xusb_otg_vbus_work+0x5c/0x78
[ 1412.191835] tegra-xusb-padctl 7009f000.xusb_padctl: disable usb2-0 vbus failed -5
[ 1412.201653] tegra-xusb 70090000.xusb: Firmware timestamp: 2020-07-31 09:33:12 UTC, Version: 50.26 release
[ 1412.202308] tegra-xusb 70090000.xusb: exiting ELPG done
[ 1412.202462] tegra-xusb 70090000.xusb: Upgrade port 0 to USB3.0
[ 1412.202466] tegra-xusb 70090000.xusb: Upgrade port 1 to USB3.0
[ 1412.219570] usb usb2-port1: config error
[ 1416.295979] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
[ 1420.376447] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
... repeats
If I set ID=0 and VBUS=0 this shows up in dmesg with a USB2 cable in:
[ 1516.187326] tegra-xusb 70090000.xusb: exiting ELPG
[ 1516.192503] tegra-xusb 70090000.xusb: Firmware timestamp: 2020-07-31 09:33:12 UTC, Version: 50.26 release
[ 1516.193163] tegra-xusb 70090000.xusb: exiting ELPG done
[ 1516.193270] tegra-xusb 70090000.xusb: Upgrade port 0 to USB3.0
[ 1516.193275] tegra-xusb 70090000.xusb: Upgrade port 1 to USB3.0
[ 1518.199705] tegra-xusb 70090000.xusb: entering ELPG
[ 1518.204597] tegra-xusb 70090000.xusb: entering ELPG done
If I set ID=0 and VBUS=0 I successfully can mount a USB drive. This shows up in dmesg with a USB Key in:
[ 1608.071715] tegra-xusb 70090000.xusb: exiting ELPG
[ 1608.073255] tegra-xusb-padctl 7009f000.xusb_padctl: power on UTMI pads 0
[ 1608.077958] tegra-xusb 70090000.xusb: Firmware timestamp: 2020-07-31 09:33:12 UTC, Version: 50.26 release
[ 1608.079781] tegra-xusb 70090000.xusb: exiting ELPG done
[ 1608.081423] usb usb2: usb_suspend_both: status 0
[ 1608.307969] usb 1-1: new high-speed USB device number 4 using tegra-xusb
[ 1608.336232] usb 1-1: New USB device found, idVendor=1221, idProduct=3234
[ 1608.336305] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1608.336352] usb 1-1: Product: USB Disk
[ 1608.336394] usb 1-1: Manufacturer: Flash
[ 1608.336440] usb 1-1: SerialNumber: 37270447F682197019048
[ 1608.341697] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 1608.342101] scsi host0: usb-storage 1-1:1.0
If I set ID=1 and VBUS=0 this shows up in dmesg with a USB2 cable:
[ 1782.131710] extcon-gpio-states usb_otg: Cable state:1, cable id:2
If I set ID=1 and VBUS=0 this shows up in dmesg with a USB3 cable:
[ 1940.387706] extcon-gpio-states usb_otg: Cable state:1, cable id:2
[ 1940.388405] tegra-xusb 70090000.xusb: exiting ELPG
[ 1940.393367] tegra-xusb 70090000.xusb: Firmware timestamp: 2020-07-31 09:33:12 UTC, Version: 50.26 release
[ 1940.394049] tegra-xusb 70090000.xusb: exiting ELPG done
[ 1940.394267] tegra-xusb 70090000.xusb: Upgrade port 0 to USB3.0
[ 1940.394277] tegra-xusb 70090000.xusb: Upgrade port 1 to USB3.0
[ 1940.411793] usb usb2-port1: config error
[ 1944.488486] usb usb2-port1: Cannot enable. Maybe the USB cable is bad?
...repeats
If I set ID=1 and VBUS=0 and when I plug in a USB key I successfully can find it in lsusb and mount the drive. This is the dmesg:
[ 1978.422599] tegra-xusb 70090000.xusb: exiting ELPG
[ 1978.424668] tegra-xusb-padctl 7009f000.xusb_padctl: power on UTMI pads 0
[ 1978.429701] tegra-xusb 70090000.xusb: Firmware timestamp: 2020-07-31 09:33:12 UTC, Version: 50.26 release
[ 1978.431471] tegra-xusb 70090000.xusb: exiting ELPG done
[ 1978.659697] usb 1-1: new high-speed USB device number 5 using tegra-xusb
[ 1978.682661] usb 1-1: New USB device found, idVendor=1221, idProduct=3234
[ 1978.682732] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1978.682785] usb 1-1: Product: USB Disk
[ 1978.682831] usb 1-1: Manufacturer: Flash
[ 1978.682876] usb 1-1: SerialNumber: 37270447F682197019048
[ 1978.688171] usb-storage 1-1:1.0: USB Mass Storage device detected
I can’t seem to get any device to show up on the Host side. I am running the /opt/nvidia/l4t-usb-device-mode scripts. I think USB Host mode is working, but I need help getting USB device mode to work.