Hi,
I copy the circuit from the schematics of HVP, when the Brake_gate logic is high, the Q4 MOSFET will turn on, you can replace D21 diode with a bulb, the bulb will light.
The chip tests the voltage of DCB_brake_voltage_sense signal, when it exceeds a threshold, the Brake_gate will be high with firmware

Hope it can help you
BR
XiangJun Rong