Which of the following is correct?
- Only after he came home did I go to bed.
- Only after he came home, I went to bed.
Is the second clause correct?
Or is inversion compulsory in that case too?
only after I came home is a negative adverb phrase. You are right that it is necessary to invert the subject and the auxiliary verb after a negative adverb: you can read more about that here.
Adverbs of frequency can be separated from the sentence by a comma:
Usually, I have lunch at the cafe on the corner.
Negative adverbs cannot separated from the sentence by a comma- for example
Never, have I seen such a mess. - wrong
Your second sentence is therefore incorrect.