Not saying it's illegal to use one's own music, just the means to get those songs onto the iPhone is a violation of the EULA, which is against forum rules to discuss. I shouldn't have said illegal, but rather not allowed to be discussed.
I personally have added songs from my own collection to my iPhone for use as ringtones. If you do a Google search or follow the links provided above, you'll find the information you're looking for. But again, I can't delve into specifics and I think I might be skirting the rules as I type this.