SANTA CLARA — Not long before he died, Tom Martinez took Tom Brady out for one last practice session, running him through the type of demanding drills they’d been doing since Brady was a San Mateo teenager.

Martinez was in a wheelchair and clearly struggling with his health, so Tom Brady Sr. suggested that they call it a day.

“It’s time to go home,” Brady’s father said.

“No, it’s not,” Martinez replied. “We’re not finished yet.”

Only later did the Brady family find out that Martinez, the longtime College of San Mateo coach, had battled his way out of a hospital bed to spend one of his dwindling days with his favorite pupil.

Tom Martinez died Feb. 21, 2012.

He lives on in every Tom Brady pass.

“Absolutely,” the New England quarterback said this week. “I still have notes. His voice. He was a great teacher. A great instructor. And he always got the best out of everybody.”

Brady returns to face his childhood team Sunday when the Patriots (7-2) play the 49ers (1-8) at Levi’s Stadium.

Because it’s a homecoming for the Bay Area kid, much has been made about Brady’s early love of the 49ers. But that bond is long gone, forever fractured after San Francisco snubbed him in the 2000 Draft in favor of quarterback Gio Carmazzi, a third-round pick who never threw a pass in the NFL.

“We don’t talk about the 49ers anymore,” Brady cracked on a conference call with local writers Wednesday. “That’s all we used to talk about. … We were part of the 49ers Faithful for a long time.”

The bond with the Martinez family, though, remains as strong as ever. The relationship began in 1992, when Tom Brady Sr. took his son to CSM for some pointers. The lessons never stopped. As Brady blossomed into one of the greatest quarterbacks in NFL history, he kept Martinez close at hand. The coach became a national cult figure known as the “quarterback whisperer.”

Even after Brady won multiple Super Bowls, he continued to summon Martinez whenever he felt out of whack. That sometimes meant flying him out to Boston on short notice so the coach could find whatever microscopic flaw in Brady’s delivery was causing the trouble.

“He is a huge reason that I fell in love with the game,” Brady said. “I learned so much about how to play quarterback, and the mechanics and techniques.

“He was so committed to me. And I’m forever grateful to him and his family. He was a special man. A very special man. He touched a lot of people’s lives.”

Hired at College of San Mateo in 1974, the former San Francisco State quarterback coached women’s basketball, softball and football — becoming the first person in community college history to coach three major sports at the same time.

The school credits him with 1,100 career victories and 32 combined championships. Not one of his players, in any sport, ever experienced a losing season so long as Martinez was their head coach.

Martinez died on his 67th birthday when he suffered a heart attack during dialysis. He’d been rapidly declining from diabetes and kidney failure for about a year, and Brady launched a public plea for a kidney donation through matchingdonors.com.

These days Brady still posts sweet Facebook messages on his late mentor’s birthday, keeps tabs on Olivia Martinez (the coach’s wife of 46 years) and stays in touch with his three children, Tom Jr., Lisa and Linda.

Tom Martinez at the College of San Mateo’s Hall of Fame induction ceremony in 2011. (Courtesy: College of San Mateo.)

The Martinez family’s access remains frequent and immediate, no matter the insanity of Brady’s celebrity status. A few years ago, before the Patriots faced the Seattle Seahawks in the Super Bowl, Olivia sent the quarterback a good luck message about a half-hour before kickoff.

“I sent him a quick text so he’d see it after the game,” Olivia said. “I said, ‘Good luck, Tom Brady! The whole Martinez clan is here cheering for you.'”

Her phone pinged back immediately.

“He wrote right back and said: ‘We’re going to kick their ass.”’

Olivia howled with laughter at the memory. The prediction was a little off, but the Patriots won 28-24 as Brady threw for 328 yards and four touchdowns. He was selected as the Super Bowl MVP for the third time.

Brady heads into Sunday’s game at Levi’s Stadium fresh off his 75th career 300-yard passing game. He did so last week in a 31-24 defeat to Seattle, but Brady also stumbled a bit with an interception and a mere 66.0 passer rating.

Those are the type of games that make Olivia miss her husband even more. She was in the crowd that night, attending the game as Brady’s guest, and couldn’t help but think that the quarterback could have used a few minutes with Tom Martinez.

“As the years pass, it gets more and more painful in many ways,” she said. “I just felt like, ‘If Tom were still around, I know he’d still be working with him. He’d still be helping him out.’ I feel a loss for Tommy for that reason.”

Because he sat next to his father for so many years, Tom Martinez Jr. also watches Brady’s games with a critical eye.

Are the quarterback’s feet too far apart? Where is his release point? What angle is the front shoulder?

“As far as a pure pocket passer, I think Brady is still the most fundamentally sound quarterback that’s maybe ever played the game,” Martinez Jr. said.

“I see all of the things that my dad taught him — and taught me when I played. The footwork. The elbow. The shoulder position. All of those things Brady does on a weekly basis.”

For many years, Brady kept a crinkled page of notes from Martinez in his wallet. The quarterback later transferred the information to his Blackberry, and he’d scroll through the list of the coach’s commandments just before kickoff.

Throw it down hall. … Keep your hips closed. … Keep your elbow high.

“The last time I spoke to him, he told me that he thinks about him every single day and every single time he steps on the field,” Olivia said.

Brady also reminds himself of Martinez’s ultimate lesson: The way he lived his life. You play hard and you fight all the way to the end.

The Martinez family is scattered away from the Bay Area now, and by Friday it was still unclear whether any of them would be able to be at Levi’s Stadium. Olivia lives in Dallas with daughter, Lisa; Tom Jr. lives in Southern California, where he works at the Hollywood K&L Wines; Linda lives with her family in Del Mar.

But regardless of geography, they all have the same gameplan for Sunday. They’ll watch Tom Brady fire pinpoint darts around the field and hear echoes of the quarterback whisperer.

“Tom always used to be so proud,” Olivia said. “Of all the things that have happened to (Brady) — the fame and fortune and adulation — he’s never, ever, ever changed. He’s still the same humble, honest, sincere and kind person he ever was. Tom used to marvel at that all the time.”