Taxable residency

I spent all of 2021 in SC (non-resident state) due to medical reasons. Income was from pensions, social security, IRA, Roth & $46 MI (perm resident) 2020 state tax refund. Do I have to file a SC return?  Do I have to file a MI return?