Tesla and its CEO Elon Musk have reached a settlement with the US Securities and Exchange Commission (SEC) that will see Musk step down as the company's chairman but retain his CEO position.