There are many definitions, ranging from those found in poetry to those found in real estate listings. Those cooking and toilet facilities can be in a conventional structure made of brick, plaster, wood, wattle, or whatever, or they can be on wheels, or even on the water. There is an exception, however, and it's a profitable one that you can take advantage of even if you are not a millionaire. You can write it off regardless of what you use the money from that line of credit for. All you need is a line of credit that is secured by your home.
Many lenders offer home equity loans.
Some even offer home equity credit cards. For that matter, both homes can be RVs, trailers, campers, or boats, as long as they have the IRS-mandated permanent cooking and toilet facilities. How you use the property is also important. If you rent it out then it becomes vacation or rental property, and you get into a whole new set of tax laws. The tax advantage to having rental property is that the upkeep becomes a business expense.