Toyota, Mazda and parts maker Denso were planning to set up a joint venture to develop electric vehicles, sources said.