Origins of photosynthesis