Hello,
in our application we are using a type A 4-pin USB connector connected to the USB0 PHY to allow the connection of USB Mass Storage Devices or other devices in normal usage.
But we'd also like to use the "USB boot" feature embedded in the Sitara boot rom by allowing the communication of our product with a PC (which behaves as a host) so that in production the operators can flash our Product already assembled in its box.
To do this, we are looking for a way of manually turning the USB0_ID pin low once in Linux.
Note: not using Ethernet because of Advisory 1.0.25.
Please, check if this procedure is logically correct:
1. On the PCB, SYSBOOT[...] always selects the order 0.USB, 1.NAND
2. USB0_DRVVBUS is connected to the enable pin of an USB-specific current source driving the VBUS rail for the Sitara host mode. That same VBUS is fed back to USB0_VBUS for level sensing.
3. A GPIO controls the USB0_ID pin: the buffer enable pin (OE) is connected to a ball that is held LOW in the RESET and AFTER RESET state (as per AM335x datasheet), so that USB0_ID is floating (Hi-Z buffer output) at boot. The A (input) pin of the buffer is grounded. To sum up, when OE is high, Y (USB0_ID) is low. When OE is low, Y (USB0_ID) is Hi-Z.
Now, here is what should happen at boot:
CASE 1: EMPTY NAND - PC CONNECTED TO USB0
The boot rom boots up, the GPIO connected to the tri-state buffer - thus to USB0_ID - is held low as stated in the datasheet, the USB0_DRVVBUS is driven low, the USB-specific current source connected to it gets disabled and the AM335x behaves like a device, allowing programming via PC.
CASE 2: PROGRAMMED NAND - PC NOT ATTACHED OR USB KEY CONNECTED TO USB0
The bootrom boots up, like in CASE 1, but can't boot via USB. The boot rom gives control to SPL=>U-Boot. U-Boot (or Linux) brings that GPIO high, USB0_ID goes low, AM335x behaves like a host and USB0_DRVVBUS goes high, enabling the USB-specific current source.
Is the above correct? Are there any logical fallacies?
We have no need of switching roles while in Linux, the only moment in which we need device functionality on the Sitara side is while programming the board for the first time (or subsequent times).
Thank you.