I use this script to manually reset USB ports on my OpenSUSE pc (it's a Linux-based OS, same as OpenWrt is, so it should be similar).
When I googled the commands to do this I also found the command needed to do so on devices without PCI bus (if the controller isn't on a pcie lane) like a raspberry Pi.
On my linksys EA4500 running OpenWrt the usb controller isn't on PCI bus, so if I needed to reset its USB I would use that.
I don't know if it actually powers down the port, but on my Linux PC it does unlock any USB device that was frozen.
If you call it on its own it will execute the "for newer kernels", if you call it with "-old" argument will run the first block "for old kernels", and if you call it with "-nopci" argument you will run the commands for devices without PCI bus.
Or you can take the commands and use them in your own script.
#!/bin/sh
if [ "$1" == "-old" ] ; then
echo "for older kernels"
for i in /sys/bus/pci/drivers/[uoex]hci_hcd/*:*; do
echo "${i##*/}" > "${i%/*}/unbind"
echo "${i##*/}" > "${i%/*}/bind"
done
exit
fi
if [ "$1" == "-nopci" ] ; then
echo "For devices without PCI bus "
for i in /sys/bus/usb/drivers/*/*:*; do
echo "${i##*/}" > "${i%/*}/unbind"
echo "${i##*/}" > "${i%/*}/bind"
done
exit
fi
echo "for newer kernels"
for i in /sys/bus/pci/drivers/[uoex]hci-pci/*:*; do
echo "${i##*/}" > "${i%/*}/unbind"
echo "${i##*/}" > "${i%/*}/bind"
done
A hardware-based solution is to get a USB-controlled relay (they are cheap and plentiful on ebay) and use crelay tool (from package feed) to control it (either from a script or from its web interface) and switch power on/off from a custom USB cable where you connected power lines to the relay so you can physically power cycle the thing. See here the wiki article about crelay https://openwrt.org/docs/guide-user/services/automation/crelay
I did something similar in the past to drive a 220V AC latching relay to turn on and off other equipment depending on conditions I set in a script.