pocketbeagle 2 USB-C ssd usage

can an SSD be attached to USB-C connector when the board is powered via P1.01

i have done this, but not seeing the ssd drive with lslblk

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mmcblk1     179:0    0  14.4G  0 disk 
├─mmcblk1p1 179:1    0   256M  0 part /boot/firmware
├─mmcblk1p2 179:2    0     1G  0 part [SWAP]
└─mmcblk1p3 179:3    0  13.2G  0 part /
zram0       253:0    0 204.6M  0 disk [SWAP]

do i need to use a powered USB hub ??

It’s in peripheral mode you need to change it to host mode, or just wire up the second USB port on the side, same pins as the am335x pocketbeagle using an adafruit adapter

Second USB adapter. Second USB for PocketBeagle2: pinouts and configuration? - #6 by RobertCNelson

thanks,

i’m using the second USB for wifi.

will change dr_mode and test.

changing dr_mode to host did not work (for me)

i’m using a usb-c to A adapter to a usb-to-ssd adapter (weme), which is powered. connecting this to the usb-c, no drive appears in lsblk output. with another usb-to-ssd adapter (ugreen) there are some debug messages printed to the console “read descriptors” and “read strings” but nothing from lsblk

now this same usb-to-ssd adapter (weme) connected to the second usb (on P1), lsblk shows a sda drive attached, but no sda1. ok, this may be related to the usb-to-ssd adapter, switch of a different brand (ugreen) and i get the sda1 in lsblk output

i also connected a flash drive to both usb connectors, the second usb (on P1) shows a sda1 with lsblk, however the usb-c connector shows nothing.

i verified the usb-c adapter works when it is connected to a smartphone with a flash drive.

any ideas on getting the usb-c to work in host mode ??

usb-to-ssd adapters:

weme, did not work on usb on P1

ugreen, worked on usb on P1

benfei, did not work on usb on P1

none of these adapters work on usb-c connector

What does “lsusb” show? Have you check the device free changed was applied in (iirc) /proc?

lsusb only shows a device when it shows up in lsblk.

not sure what your looking for here

Hi slush should also show devices that aren’t a block device, so you can see it it is detected at all. The loaded device free can be found in /proc/device-tree so you can check there if the overlay works and has been applied where it was needed.

de compiling the dtb file, the dr_mode is set to ‘host’

usb0 = "/bus@f0000/dwc3-usb@f900000/usb@31000000";

usb@31000000 {
  compatible = "snps,dwc3";
  reg = <0x00 0x31000000 0x00 0x50000>;
  interrupts = <0x00 0xbc 0x04 0x00 0xbc 0x04>;
  interrupt-names = "host\0peripheral";
  maximum-speed = "high-speed";
  dr_mode = "host";
  snps,usb2-gadget-lpm-disable;
  snps,usb2-lpm-disable;
  bootph-all;
  #dr_mode = "otg";
  phandle = <0xd3>;
};

however, it looks like USB-5V on P1.07 needs to be connected to 5v when USB-C is used in ‘host’ mode. need to study/understand this a bit more.

While the connector is TYPE-C, it is technically usb 2.0, so trying flipping the type-c adapter, as there is only one usb pair..

done that.

i have a solution. will post in a bit

to get USB-C to work with a SSD using usb-to-ssd adapter
with USB-C (USB0) configured as dr_mode = “host” in k3-am6232-pocketbeagle2.dts
ya need to connect P1.07 VIN.USB (USB_5V) to 5V, P1.24 VOUT - VSYS

all of the usb-to-ssd adapters listed above worked on USB-C
weme, ugreen, benfei, and Inland

CAUTION:
USB_V5 provided by USB-C when connected to a USB power source is used to supply VSYS via LM73100RPW which powers the PB2
P1.24 VOUT (5V) VSYS
P1.07 VIN.USB (USB_5V)
shorting P1.07 USB_5V to P1.24 VSYS may have undesired consequences, when powering PB2 via USB-C
the LM73100RPW has a reverse voltage blocking diode, so maybe I’m being over cautious
someone with more understanding of this board will need to clarify if this is an issue.