DTC P0976, P0977: Shift Solenoid "B" Control Circuit Low/High (Shift Solenoid Valve S2): Wiring Diagram
WARNING: This page is about a different car, the 2004 Toyota Corolla. However, it is still accessible from the selected car via links, so may be relevant.