This is a system-specific thing, but presuming Linux (and not, say, BSD, etc.):
If you have the device name (which lsblk gives you), then:
$ udevadm info -a /dev/sdf1
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.0/host16/target16:0:0/16:0:0:0/block/sdf/sdf1':
looking at parent device '/devices/pci0000:00/0000:00:1a.7/usb1/1-2':
I suspect 'speed' is what you're looking for. If not, there is also
devnum there, which match the
bus:device given by
This also gives you a clue of how to do it by hand: you look in
/sys. You can find where to start by
readlink -f /sys/block/sdf which tells me
/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-2/1-2:1.0/host16/target16:0:0/16:0:0:0/block/sdf. You can then strip off trailing directories until you get back up to the USB device. Then
devnum, etc. are just files you can read.