How much of your home equity is protected in a Chapter 7 bankruptcy is determined by the state you live in. A limited number of states protect the entire value of your home, while others protect very little. If you do meet your state’s homestead/equity exemptions, you would continue to pay your mortgage as usual and keep your home.
Chapter 13 would typically allow you to keep your home.