All you can do is be honest: tell him you feel like you've pissed him off, but aren't exactly sure in what way and that you want things to be better because you value him as a friend. Be simple, sincere and succinct.

If you know you've been overstepping boundaries, perhaps it's time to apologise. Equally he may need to learn to state those boundaries much sooner within friendships. Either way it's all a learning experience - don't beat yourself up about what was said or done too much - just be more aware going forwards.