I was looking at the design of Adafruit M4 Feather board. The board can charge a battery via USB (and power the board). When USB is disconnected, the battery take over automatically. What I don't understand his how Q3, a P-Channel MOSFET, can be turned on when USB connector is disconnected.
My understanding is that
Vgs must be negative to turn on a PMOS. Normally, in some other circuit, the source is connected to the power and the load to the drain, like the circuit below.
In the first circuit (Feather M4), when USB is disconnected, Vg = 0V, Vd = VBAT, Vs = ??? How does the whole thing work?