Is this power switching circuit ok? Switching between VIN and USB
Your basic question statements seems to be "I have two potential power sources, 8V-30V, or 5Vin from USB, and I need 3.3V out -- what's the best way to do it?"

I would think of the problem as such:


What's a good part / module that can take in 4V-30V and output 3V3 stably?
How can I make sure I don't destroy an upstream USB host if I attach both supplies at once?


An easy way to do this, but not necessarily the cheapest way, is basically to Diode-OR the supplies together such that they cannot backfeed into each other. Using an actual diode of course will not be very power-efficient, due to the voltage-drop induced by it, but we can use devices known as 'ideal diode' ICs, which is just a marketing term for an integrated MOSFET-based solution.

An example of an IC that might work for you is the LTC4412HV -- take a look at the applications example section. This will take care of problem #2.



They don't have exactly what you need in that particular datasheet in terms of an example circuit, but the above is some food for thought.

Problem #1 can then turn into the general problem of 'find a buck regulator (or LDO) that can take in 4V-30V and output 3V3'. I would use a switching regulator here as 30V to 3V3 is quite the drop. I don't know what your current consumption is on 3V3, but if it's relatively low, the OKI-78SR series from Murata are simple 78xx footprint compatible drop-in replacements that are switching supplies.

In terms of meeting USB in-rush current requirements, I would only place 10uF max. directly on the USB line, and then put the rest of your capacitance on the 3V3 rail (where it's needed), and the VIN capacitors for your regulator will be behind the ideal-diode / PFET controller, which can have its turn-on time controlled to not cause an over-current event on the USB host.