We present a study of the effect of charm quarks on the QCD equation of state using partially-quenched p4 charm quarks on a dynamically generated 2+1 flavor background, at zero chemical potential. We show preliminary results for the charm quark contribution to the energy density and pressure in the high temperature region (Tc<T<4Tc) and compare it to the free-field calculation. The charm quark mass is determined by measuring the charmonium spectrum.