Popup headlights

I’m working on wiring up my 83 Celica and have come to the headlights. Like most 80’s Japanese cars it has popup headlights. I’m struggling to figure out how to get the pop up motor to stop at the top. Currently I have the power hooked up to O1 in the PMU. When I press the keypad on the motor just keeps going so the headlights continue to go up and down. Wiring diagram for the factory below. Thoughts?

You need to add an input for the limit switches, which would eat up 4 PMU inputs. The factory used whats essentially 2 relays in the same casing, they share a power feed.

Pin 6 and 2 on the headlight motors are the limit switch outputs, wire this to PMU and use 10k pull ups.
pin 3 is the feed, so that can be connected to ground.
You’ll then need to make logic to turn the motor output off when ‘x’ input is no longer true

If you’re only using 1 output for both headlight motors you run the risk of one headlight being all the way up and the other stopping where ever it was (rarely do they operate at exactly the same speed)

Keeping the dual coil OEM relay (or making one out of 2 normal relays) might be the most I/O effiecent route unless you have plenty to spare