TOKYO (Reuters) - Panasonic Corp 6752.T will invest more than 30 billion yen ($256 million) in a New York production facility of Elon Musk's Tesla Motors TSLA.O to make photovoltaic (PV) cells and modules, deepening a partnership of the two companies.

Tesla’s shares were up 3.5 percent at $220.75 in early trading on Tuesday.

Japan’s Panasonic, which has been retreating from low-margin consumer electronics to focus more on automotive components and other businesses targeting corporate clients, will make the investment in Tesla’s factory in Buffalo, New York.

The U.S. electric car maker is making a long-term purchase commitment from Panasonic as part of the deal, besides providing factory buildings and infrastructure.

In a statement on Tuesday, the two companies said they plan to start production of PV modules in the summer of 2017 and increase to one gigawatt of module production by 2019.

The plan is part of the solar partnership that the two companies first announced in October, but which did not disclose investment details.

Tesla is working exclusively with longtime partner Panasonic to supply batteries for its upcoming Model 3, the company’s first mass-market car. Panasonic is also the exclusive supplier of batteries to Tesla’s Model S and Model X.