1. A device comprising: a controller comprising: a processor; a memory interface; an interface state machine; and one-time programmable non-volatile storage coupled to the interface state machine, the one-time programmable non-volatile storage storing initialization parameters for training the memory interface; and a non-volatile memory module separate from the one-time programmable non-volatile storage, the non-volatile memory module storing firmware for the device, the non-volatile memory module coupled to the controller via the memory interface; wherein the controller is configured to: while the processor is held in reset: initialize the memory interface using the initialization parameters and the interface state machine; and train the memory interface using the initialization parameters and the interface state machine; release the processor from reset; and execute the firmware from the non-volatile memory module using the processor and the trained memory interface.