Phelps has won 14 career Olympic gold medals
American swimming star Michael Phelps says he expects to compete at the London 2012 Olympics, a month after threatening that he could retire.
Phelps, 23, considered quitting after the publication of a photo appearing to show him smoking marijuana at a party.
"It's a little painful getting back into shape. But I like it, I'm ready to go another four years," he said.
He will also compete in the World Championships in Rome in July, after his three-month ban comes to an end.
I've been out of the water for about five months so it will take about 10 months to really get back to where I was
Phelps became the most successful Olympian in history when he won eight gold medals in Beijing in August to add to the six he claimed in Athens four years previously.
In an interview with American TV station NBC, he explained: "Ever since the Olympics, I've had a hard time really finding the passion to get back in the pool.
"I woke up one Sunday and there was a blink of an eye where I was just like, 'Why would I ever be questioning that?'
"It's literally something in my body just completely turned. And from right then and there, I had a passion for getting back in the pool and doing what I wanted to do."
Phelps's ban from competition will end in time for him to prepare for the US Championships on 7 July, which act as a trial for the World Championships two weeks later.
He does not expect to be in the same peak condition as last year but said: "I think I can get back to some kind of racing form.
"For every day you miss, it takes you twice as long to get back and I've been out of the water for about five months so it will take about 10 months to really get back to where I was."
Phelps also admitted he had made a huge error of judgement when he was pictured with a pipe at a party last November, although he has always stopped short of admitting smoking cannabis.
When asked directly if he was smoking cannabis, Phelps ignored the question but went on: "It was a bad mistake. I mean, we all know what you and I are talking about. It's a stupid mistake."