In 2010 Erdogan agreed to a proposal by Assad to create Schengen-like open borders with Turkey, Syria, Iraq and Iran. But then got his black ski mask.
Read here:
Turkish and Syrian government must resume talks - Turkish Lawmaker
I think good relations require Erdogan to stop his support for terrorists.