The protons (H+) needed to produce ATP in photosynthesis comes from:
Glycolysis yields a net energy profit of ATP molecules per molecule of glucose
Imported from external platform