The Orange Pi Zero 2 W currently only support one USB port in host mode (the one further from the edge of the board). If you want to be able to use the one near the edge (USB0) you can do so by modifying the system device tree.
Decompile device tree, into user’s home directory:
dtc -I dtb -O dts -o sun50i-h618-orangepi-zero2w.dts /boot/dtb/allwinner/sun50i-h618-orangepi-zero2w.dtb
Modify sun50i-h618-orangepi-zero2w.dts
...
usb@5100000 {
...
status="disabled"
dr_mode="host"
...
}
usb@5101400 {
...
status = "okay";
...
};
usb@5101000 {
...
status = "okay";
...
};
...
Backup the existing system device tree:
sudo cp /boot/dtb/allwinner/sun50i-h618-orangepi-zero2w.dtb /boot/dtb/allwinner/sun50i-h618-orangepi-zero2w.dtb.bak
Compile the modified device tree from user’s home directory into the system location:
sudo dtc -O dtb -o /boot/dtb/allwinner/sun50i-h618-orangepi-zero2w.dtb sun50i-h618-orangepi-zero2w.dts
Reboot:
sudo reboot
I’m trying to turn this into a device tree overlay so the configuration will be easier and safer.