Any straight cut router bit. Its only a matter of setting the depth. Keep in mind the density and type of foam you are cutting . This process might tear out something like XPS foam due to the router speed, but you obviously wouldn’t attempt to trim acoustic foam as it would catch on the router bit and be a dangerous situation.