Soak navy and kidney beans in a bowl overnight.
Chop onion, carrots, and celery. Mince the garlic.
Heat oil in a large pot. Add onion, carrots, and celery.
Add minced garlic and sauté for 5 minutes.
Drain soaked beans and add them to the pot.
Pour in vegetable or chicken broth. Add 2 cups of water.
Add thyme, salt, and black pepper. Add ham or bacon if desired.
Bring the soup to a boil. Reduce heat and simmer.
Simmer for 2-3 hours until beans are soft.
If the soup is too thick, add more water or broth.
Stir occasionally and check the consistency.
Once the beans are soft, serve the soup in bowls.