Till 2012 for sure.
But I think once (if) he's reversed his H2H against his main rivals, say Murray and Rafa, and if he wins a couple more GS, he might wanna retire before...
I wouldn't be surprised if he gets positive balance with Nadal, who is very likely on a way down, so would be finally available for beating earlier then in finals. With Murray it's gonna be not easy, but not impossible. In any case I think he won't retire until understands that can't win one more Slam. And very probably this year to happen much later then 2012.