I found this for a Tacuma with the same engine
4) RPM signal system
Camshaft position and crankshaft position are detected by the camshaft position sensor and crankshaft position sensor,
camshaft position is input as a control signal to TERMINAL G2 of the engine control module, and engine RPM is input to
TERMINAL NE+.
Have to say I cant find any reference to the TERMINAL G2 though, I will have a look at the truck tomorrow at both things