Freemasonry's history is a bit fuzzy in many details, but it almost certainly stems from medieval English and/or Scottish stone-workers.
As essentially 100% of those would have been Christian, there were no religions connected to it before Christianity. Putting it another way, as the earliest known historical reference to anything remotely like a masons' guild dates from the 14th century, Christianity had been around for over a millennium before Freemasonry's beginnings, so there could be no religions associated with Masonry before Christianity existed.