Can't test this right now so forgive me if it isn't perfect, but it should give you at least an idea of what you need.
Code
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.english == 'Upheaval' then
if player.tp >= 2000 then
equip(sets.precast.WS.Upheaval.TP2000)
end
end
end
You'll need a new set called TP2000 (or just change the name to whatever you want). Your original Upheaval set should be equiped if this doesn't trigger.