Yes, 'صبح بخیر' is both formal and informal. Sometimes, Iranian people use 'Hi' in the morning. In my family, we sometimes use 'Hi' and sometimes use 'Good morning.' Both are used in Farsi.