The Shulhan Aruch (O.H. 37:3) states that a father must purchase Tefilin for a minor who can control himself from falling asleep, passing gas or going into the bathroom while wearing them, in order to train him in this Mitzvah.
Based on this ruling, it was common in Morocco for boys to celebrate their Bar Mitzvah by wearing Tefilin and being called up to the Torah before the age of thirteen. This is echoed in Siddur Bet Oved (Hilchot Tefilin, § 4). Rabbi Yosef Messas (Otzar Hamichtavim, vol. III, § 843) writes that a boy could begin wearing Tefilin as early as age seven, although more commonly it was done at eleven years old or so. (c.f Rabbi Yosef Messas Mayim Haim, vol. II, § 1). Interestingly, in Morocco, one’s Bar Mitzvah was called simply “Tefilin”. It goes without saying that even though the rite of passage was observed at an earlier age, one only acquires the Halachic status of an adult as of age thirteen.
The Rama (ibid) mentions that one should wait until one is specifically thirteen years old before starting to wear Tefilin, and Rabbi Yitzhak Ben Oualid (Vayomer Yitzhak, Orah Haim, Hilchot Sefer Torah, § 15) writes that one should wait till this age before being called up to the Torah. Nonetheless, the custom was to allow it earlier as mentioned above.
Regarding “Sheheheyanu”, the Shulhan Aruch (O.H. 22:1) writes that one recites this blessing when donning a new Talit for the first time. Rabbi Yitzhak Ben Oualid (ibid., Hilchot Berachot, § 23) and Rabbi Shlomo Dayan (Ateret Shlomo, § 3) says that this blessing would be recited when placing Tefilin for the first time and this appears the custom. Rabbi Chaim Pinhas Scheinberg is of the opinion that “Sheheheyanu” is not recited since an animal had to die for the Tefilin to be made, which takes away from the requisite joy to recite this blessing. Rabbi Shalom Messas (approbation to Ateret Shlomo), writes that in Meknes, Morocco, the custom was to have the child don the Talit followed by the Tefilin and then to recite “Sheheheyanu” on the Talit and have in mind to exempt the Tefilin.
Summary: A child may begin wearing Tefilin with a blessing before the age of thirteen, so long as he knows how to control his bodily functions. A Bar Mitzvah boy recites “Sheheheyanu” over a new Talit and has in mind that the Tefilin is included in this blessing