The Elon Musk-led companies plan to work with the semiconductor manufacturer at the Terafab project planned in Texas.