We report studies of vibron, libron, and combined two-libron excitations of solid oxygen in the pressure range up to 8 GPa using Raman scattering and infrared absorption at low temperatures. We took care to ensure that our samples have been close to thermodynamic equilibrium, as confirmed by additional measurements. On the basis of these results we present a revised phase diagram of thermodynamically stable oxygen. There the ␣ phase exists up to temperatures of the  phase and up to a pressure of about 6 GPa, where a clear first-order transition to the ␦ phase occurs. Our spectroscopically determined phase diagram is in accordance with the structurally determined one by Gorelli et al. ͓Phys. Rev. B 65, 172106 ͑2002͔͒. Inconsistencies with other reported phase diagrams can be attributed to the fact that those samples were not at equilibrium. Furthermore, we provide an indirect proof, using Raman spectroscopy, of the antiferromagnetic order of ␦-O 2 . The present Raman and infrared investigations together with spectroscopic, x-ray, and neutron data provide a consistent picture of oxygen in the p-T range investigated here.