Homogeneous charge compression ignition steady state operation and mode switch with two-step cam and phasing system in metal and optical engine