Both photophosphorylation and chemiosmosis are linked in creating the ATP. There are two different ways of getting ATP through either cyclic or noncyclic phospohorylation. For example, in noncyclic phosphorylation: the electrons in PS2 are excited by light (photophospohorylation) and then these electrons are accepted by a primary acceptor and then shuttled through the ETC. As these electrons move down the ETC the cytochrome is moving more protons from the stroma into the thylakoid lumen (creating the basis of chemiosmosis). These protons are then free to move from the lumen through the ATP synthase back into the stroma and thus produce ATP. The two electrons from before end at PS1 and are then re-excited by light and are once again accepted by a primary acceptor but this time taken to NADP to form NADPH.
The second way of getting ATP is through cyclic photophosphorylation which again involves making a chemiosmotic potential but this time the electrons from PS1 are not shuttled to NADP but rather back through the ETC to make more ATP by once again moving protons to the lumen and creating a concentration gradient/voltage gradient.