Assuming You are talking about USB 2.0, And Mentioning Documentation to turned it ON/OFF.
1. Using uhubctl
sudo apt install uhubctl
Connected USB Pendrive on Upper side of USB 2.0 Port.
❯ lsusb -t
/: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 001: Dev 004, If 0, Class=Mass Storage, Driver=usb-storage, 480M
/: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=ehci-platform/1p, 480M
/: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=ohci-platform/1p, 12M
Run below command to turn off
sudo uhubctl -l 1 -p 1 -a off
For Turn on
sudo uhubctl -l 1 -p 1 -a on
2 Using /sys/class/usb
Upper USB 2.0 Port : usb1
Bottom USB 2.0 Port : usb3