Lithium phosphate battery charging with solar energy