Do you have an intercooler? Do you have a boost referenced fuel pressure regulator?
Your detonation could be caused by intake air temps too high and/or insufficient fuel under boost.