We present an ongoing project aimed at determining the thermodynamic Equation of State (EoS) of quark--gluon matter from lattice QCD with two generations of dynamical quarks. We employ the Wilson twisted mass implementation for the fermionic fields and the improved Iwasaki gauge action. Relying on $T=0$ data obtained by the ETM Collaboration the strange and charm quark masses are fixed at their physical values, while the pion mass takes four values in the range from 470 MeV down to 210 MeV. The temperature is varied within a fixed--lattice scale approach. The values for the pseudocritical temperature are obtained from various observables. For the EoS we show preliminary results for the pure gluonic contribution obtained at the pion mass value 370 MeV, where we can compare with previously obtained results with $N_f=2$ degenerate light flavours.