How to know if USB-C DP port is working?

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Khadas official images

Please describe your issue below:

I just bought an Edge2. I managed to set it up and install ubuntu server using OOWOW. Mi main interest is using it as companion to my iPad, so I can power it and use the usb gadget to communicate to the device.

However, when I plug the device to the 3.1+DP port, the device powers on, but starts going to a reboot loop, and the OS never starts. Same thing happens if I try to connect it to my monitor (Lenovo P32u-10) for single cable power and display. According to the specs (screenshot below), the monitor should negotiate the right power output to the device.

On the other hand, if I connect the Edge2 PD port to the iPad USB the SBC boots normally, so it’s not an issue of power delivery

Am I using the port correctly? I have tested with Thunderbolt 3 and 4 cables
How can I test if the port of the device works properly ?

EDIT: I have also tried powering via the PD port and connecting the display separately, that does not work either. However, if I connect an USB-C cable to the port, while powering separately, I see the kernel detecting the connection

[  333.966653] android_work: sent uevent USB_STATE=CONNECTED

Here are theq kernel logs when connecting the external display to the board

May 05 19:02:51 vesta kernel: xhci-hcd xhci-hcd.10.auto: xHCI Host Controller
May 05 19:02:51 vesta kernel: xhci-hcd xhci-hcd.10.auto: new USB bus registered, assigned bus number 7
May 05 19:02:51 vesta kernel: xhci-hcd xhci-hcd.10.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000802002010010
May 05 19:02:51 vesta kernel: xhci-hcd xhci-hcd.10.auto: irq 133, io mem 0xfc000000
May 05 19:02:51 vesta kernel: xhci-hcd xhci-hcd.10.auto: xHCI Host Controller
May 05 19:02:51 vesta kernel: xhci-hcd xhci-hcd.10.auto: new USB bus registered, assigned bus number 8
May 05 19:02:51 vesta kernel: xhci-hcd xhci-hcd.10.auto: Host supports USB 3.0 SuperSpeed
May 05 19:02:51 vesta kernel: usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
May 05 19:02:51 vesta kernel: usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
May 05 19:02:51 vesta kernel: usb usb7: Product: xHCI Host Controller
May 05 19:02:51 vesta kernel: usb usb7: Manufacturer: Linux 5.10.198 xhci-hcd
May 05 19:02:51 vesta kernel: usb usb7: SerialNumber: xhci-hcd.10.auto
May 05 19:02:51 vesta kernel: hub 7-0:1.0: USB hub found
May 05 19:02:51 vesta kernel: hub 7-0:1.0: 1 port detected
May 05 19:02:51 vesta kernel: usb usb8: We don't know the algorithms for LPM for this host, disabling LPM.
May 05 19:02:51 vesta kernel: usb usb8: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
May 05 19:02:51 vesta kernel: usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
May 05 19:02:51 vesta kernel: usb usb8: Product: xHCI Host Controller
May 05 19:02:51 vesta kernel: usb usb8: Manufacturer: Linux 5.10.198 xhci-hcd
May 05 19:02:51 vesta kernel: usb usb8: SerialNumber: xhci-hcd.10.auto
May 05 19:02:51 vesta kernel: hub 8-0:1.0: USB hub found
May 05 19:02:51 vesta kernel: hub 8-0:1.0: 1 port detected
May 05 19:02:52 vesta kernel: usb 7-1: new high-speed USB device number 2 using xhci-hcd
May 05 19:02:52 vesta kernel: xhci-hcd xhci-hcd.10.auto: remove, state 1
May 05 19:02:52 vesta kernel: usb usb8: USB disconnect, device number 1
May 05 19:02:52 vesta kernel: usb 7-1: New USB device found, idVendor=0451, idProduct=8342, bcdDevice= 1.00
May 05 19:02:52 vesta kernel: usb 7-1: New USB device strings: Mfr=0, Product=0, SerialNumber=1
May 05 19:02:52 vesta kernel: usb 7-1: SerialNumber: 560200817836
May 05 19:02:52 vesta kernel: usb usb8-port1: attempt power cycle
May 05 19:02:52 vesta kernel: xhci-hcd xhci-hcd.10.auto: USB bus 8 deregistered
May 05 19:02:52 vesta kernel: xhci-hcd xhci-hcd.10.auto: remove, state 1
May 05 19:02:52 vesta kernel: usb usb7: USB disconnect, device number 1
May 05 19:02:52 vesta kernel: usb 7-1: USB disconnect, device number 2
May 05 19:02:52 vesta kernel: xhci-hcd xhci-hcd.10.auto: USB bus 7 deregistered
May 05 19:02:54 vesta kernel: dwc3 fc000000.usb: device disconnect
May 05 19:02:54 vesta kernel: android_work: did not send uevent (0 0 0000000000000000)
May 05 19:02:54 vesta kernel: android_work: did not send uevent (0 0 0000000000000000)
May 05 19:02:55 vesta kernel: dwc3 fc000000.usb: device disconnect
May 05 19:02:55 vesta kernel: android_work: did not send uevent (0 0 0000000000000000)
May 05 19:02:56 vesta kernel: dwc3 fc000000.usb: device reset
May 05 19:02:57 vesta kernel: dwc3 fc000000.usb: device disconnect
May 05 19:02:57 vesta kernel: android_work: did not send uevent (0 0 0000000000000000)
May 05 19:02:57 vesta kernel: android_work: did not send uevent (0 0 0000000000000000)

Hello @pipex

After connecting to a DP display, Edge2 needs to be powered by the other type-c.

Like this.

Thanks for the reply @Jacobe

I thought the device supported power delivery and display over the same cable, in fact videos usually show it working that way. Did I misunderstood the purpose of the USB 3.1+DP port?

In any case I have also tried that and the display is not recognized. Do I need one of the graphical versions of ubuntu to have the hardware recognize the display (I’m using ubuntu server)

I’ll try using a usb-c to hdmi adapter next to see if I get different results

Ok, so here is what I’ve been to test

  • While powering from the PD port,
    • I can get image out from the USB-C DP port using a USB to HDMI adapter
    • USB devices are recognized, tested with a USB-C drive with no issues
    • I cannot get the device to work as USB gadget, i can initialize the usb0 interface, but the edge2 is not recognized as a gadget by my other machine
    • Connecting the DP port to my display via does not work, the kernel detects the monitor’s USB hub but not the display itself
  • I can power the Edge 2 on the USB+DP port using a power adapter, but if I try to power it on the same port via using my display input (thunderbolt), the edge 2 goes into a reboot loop
  • I can power the Edge 2 on the PD port from the iPad USB-C port, but if I try to connect the ipad to the USB+DP port I also get a reboot loop

So the USB+DP port is working mostly, but something seems to go wrong when powering from a source that also provides data. I have purchased the IO board to see if I can get more debugging information via the serial port

Hello @pipex
The first problem

I thought the device supported power delivery and display over the same cable

Yes, but only in theory. Beacuse of the Edge2 relatively high power consumption, it will reboot in a loop if only connect to the USB3.1+DP interface.

So the viable solution is this.

After connecting to a DP display, Edge2 needs to be powered by the other type-c.

The second problem

I cannot get the device to work as USB gadget, i can initialize the usb0 interface, but the edge2 is not recognized as a gadget by my other machine

USB gadget in Edge2 need enable by the service, click here

Regards.

Thanks for the reply

After connecting to a DP display, Edge2 needs to be powered by the other type-c.

This works, but only when using the usb-c to hdmi adapter, doesn’t work via the usb-c to usb-c connection to my display

USB gadget in Edge2 need enable by the service, click here

I did this already, the device does not show on my laptop, I’d expect it to appear like this

Hello @pipex
Sorry to keep you waiting

This works, but only when using the usb-c to hdmi adapter, doesn’t work via the usb-c to usb-c connection to my display

When using a usb-c to usb-c cable to connect display, the display does not require additional power supply. Just connect this only cable.

I did this already, the device does not show on my laptop, I’d expect it to appear like this

Please check upgrade the system to latest version. I follow the document and input lsusb, Edge2 can be recognized.

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 057: ID 18d1:4e26 Google Inc. Edge2
Bus 001 Device 003: ID 8087:0026 Intel Corp. AX201 Bluetooth
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

When using a usb-c to usb-c cable to connect display, the display does not require additional power supply. Just connect this only cable.

That doesn’t work, the device never powers on, it just starts reboot looping. The display power output in theory matches the device specifications. The same thing happens if I try to power from my laptop usb port.

Please check upgrade the system to latest version. I follow the document and input lsusb , Edge2 can be recognized.

I’m already using the latest ubuntu release for the Edge 2. I’ll test connecting the edge to other computer to see if I get some more information. Thanks for your help!

That doesn’t work, the device never powers on, it just starts reboot looping. The display power output in theory matches the device specifications. The same thing happens if I try to power from my laptop usb port.

Well, power from laptop usb port is incorrect, the power adapter need at least 15W. When meeting reboot looping problem, I always check to see if the power adapter has enough power.

But if I connect the Edge 2 to my Macbook USB port on the PD port it powers no problem. AFAIK the thunderbolt 3 port on my Macbook M1 should be able to provide 15W no problem.

The same thing happens with my display, the display can provide up to 45W of power (I use it to power my laptop) and according to the spec, one of the power configurations is 5V/3A. If I connect the cable to the PD port on the Edge2, the Edge2 powers on, however, if I then switch to the DP+USB port, it starts looping.

Now I power Edge2 via PD port, the power adapter you can check the picture I post last time. And connect DP+USB port to my display which is not require additional power supply.

I still can’t reproduce the reboot looping issus by this way :smiling_face_with_tear: