Carmakers switch to direct deals with miners to power electric vehicles