I'd like to add to this DIY thread, as I just installed an autodimming mirror w/homelink in my 2007 E90 which did NOT come with the autodimming mirror originally and hence lacked the pre-wiring needed which would otherwise make this a plug-n-play easy change.
As others have said, you need to run some additional wires. The mirror I got off ebay did not come with the extra wire harness, so some more DIY cleverness is required.
You need to run 4 additional wires from the mirror to a plug in the overhead light console/panel. The problem is you need to tap into four points on the female recepticle in the panel, and there are no wires to splice into. I used solid-core 20 gauge copper wire, and folded the ends over twice (to give 4x thickness), then just jammed each end of the wire into the existing plug to make electrical contact. It worked fine, as the pin on each end is sticking into the plug. This is a bit tricky, and the plugs are deep. The wire needs to pushed into each plug quite a distance. I used needle-nose pliers to help push each wire into the respective plug.
You'll be running 4 more lines, from the mirror plug which is a 10-pin plug, labelled from the back side with numbers 1-10, to the BLACK 20-pin plug in the overhead console, also labelled. Note that three wires are already hooked up to the mirror-plug, leave these as they are.
So, here's the additional wiring you need to make to get this to work:
Mirror Plug # - Overhead Console Plug # (BLACK 20-pin plug in the console)
1 connected to 14
3 connected to 20
4 connected to 15
5 connected to 16
Note that the existing wires in the mirror plug connect to points 8, 9 and 10.
This wasn't an easy mod, and obviously you have to run wires through the rubber boot from the mirror, but it does work and you can hook up your mirror to an E90/92 that didn't come pre-wired for the homelink/autodim even if you didn't get the auxillary wire harness. For more details, see the link in the post just above this one, including the PDF that contains detailed wiring diagrams.