D − shallow donor near a semiconductor–metal and a semiconductor–dielectric interface