Edge states in graphene: From gapped flat-band to gapless chiral modes