The Portugal left-back struggled for first-team football at the Spanish club last season.
Former Manchester United manager David Moyes tried to bring him to Old Trafford in September 2013 but a transfer deadline day loan move fell through.
The 27-year-old joined Real from Benfica for a reported £25m in 2011.
Find all the latest football transfers on our dedicated page.
Real Madrid defender Fabio Coentrao has joined French side Monaco on a season-long loan deal.