DC-DC converter bypass for VIN = VOUT question
You could save yourself a lot of messing around by using a buck-boost converter like this: -



The USB supply can be fed via a low-volt-drop schottky diode to the input (Vin) and if you have 12 volts also present at the input it will take over and power the converter.

Another option: -



You can get these types of devices from TI too like this: -