Basically your question is same as this one.
You need to make the usb device tree to have correct otg setup so that the flash could proceed.