All the mirror needs is power and ground to work as far as the electrochromatic feature goes. Also you could wire the reverse signal to it to disable it during reversing if you wanted to get technical. You have other pins for the output to the side mirrors and input for LED if fitted.
So what you need to do is Run power with the key on to pin #3 on the mirror (green and white wire) make sure it is fused with a 5 Amp fuse. And run ground to pin #10 (should be a brown/ black wire) and if desired run the reverse lamp signal (power) to pin #1 (blue/yellow wire.) From there the light sensors in the mirror will do the rest, there is a sensor in the front and a sensor in the back of the mirror that calculate the difference of light between the 2 and dim or undimm the mirror as necessary.
Any other questions just let me know. I had an electrochromatic mirror in my 1990 325i (e30) and an M5 electrochromatic RVmirror in my current BMW a 89 735i.
Pictures of the mirror in the 7 can be viewed on the pictures link from my webpage
My Webpage