A good rule of thumb is that a consumer electronics product should retail for about 2.5x the COGS (cost of goods sold). That's pretty much where the iPhone sits.
I don't see evidence of excessive margins on hardware; I see a company that's planned for and executed on proper margins.