Let's simulate this thing:
simulate this circuit – Schematic created using CircuitLab
Here's the "truth table" for the Q19's gate-to-ground voltage:
GP7 |
P0.1 |
P0.2 |
Q19.G |
0V |
open |
open |
5.1V |
0V |
12V |
open |
9.4V |
0V |
open |
24V |
8.7V |
0V |
12V |
24V |
10.2V |
0V |
0V |
open |
1.3V |
0V |
open |
0V |
4.0V |
0V |
0V |
0V |
1.2V |
3.3V |
x |
x |
0.0V |
Since Q19 is a P-MOS, and the RST1 is the source potential, then none of those voltages will fully turn it on. The voltages would have to be negative for that. And, not knowing what the RST1 voltage range is, it's hard to even tell whether Q19 will ever get open. For example, at idle, if RST1 is above about 8V, it'll not be floating anymore.
Furthermore, Q19's drain will not reach ground, but about 1/2 of Q6's Vbe, so, let's say 0.3V.
So nothing much in this circuit is the way you'd want it to be.
Here's something that would work:
simulate this circuit
Q1 grounds the gate of the NMOS transistor M1, and floats RST1, whenever any of the inputs are high: be it GP7, P0.1 or P0.2.
The R6-R7 divider sets the gate voltage+0.6V when RST1 is to be grounded. The gate charges until no more current can flow through Q2.
Q1 is in series with Q2. When Q1 is on, Q2 turns on as well, turning the led D4 on whenever the NMOS is off and RST1 floats.
R5 sets the LED current.
R10, V10 and AM1 are only used in simulation, to indicate whether RST1 is grounded or open.