Rabbeinu Tam was Rashi’s grandson. It is reasonable to assume that the tefillin he donned in his youth followed his grandfather’s arrangement of the parshiyos.
How then, suddenly, did he come to disagree with Rashi, and depart from the tradition?
In truth, the disagreement over the order of the parshiyos long predates both of them. In fact, both opinions already appear in the Zohar.
For many generations, numerous communities followed according to what later became known as the view of Rabbeinu Tam. When Rabbeinu Tam derived from the gemara that this is the correct order, he disagreed with his grandfather, and joined in this issue, aligning himself with the view of the authorities who preceded him.
Among those who support Rashi’s opinion are the Mechilta, the Shimusha Rabba, the Rambam and the Rashba. Among those who support Rabbeinu Tam’s opinion is Rabbeinu Chananel, Rav Hai Gaon and the Rif.
The disagreement between Rashi and Rabbeinu Tam is regarding the order of the four parshiyos (Torah passages) inside the tefillin.
See Aruch Hashulchan, Orach Chaim, 34:6-9.
Rashi tefillin are invalid according to Rabbeinu Tam and Rabbeinu Tam tefillin are invalid according to Rashi.
The Beis Yosef (Orach Chaim, 34, s.v. umah she’kasav Rabbeinu bshem Ha’Rosh) relates that an ancient pair of tefillin was once discovered at the burial place of Yechezkel Hanavi, and its parshiyos were arranged according to Rashi’s opinion.
Hilchos Tefillin, 3:4.
Shu”t HaRashba, 234.
See Tosafos Menachos 34b, s.v. v’hakorei.