Habib, Samar. 2009. Arabo-Islamic Texts on Female Homosexuality: 850-1780 A.D. Teneo Press, Youngstown. ISBN 978-1-934844-11-3
This book makes a good companion volume to Habib's other works as it provides a comprehensive set of the texts she's working with. (The relevant parts of them, at least.) It also includes the text of two lectures that provide background and context for the texts themselves.
Historic Texts: From “Nihayat Al-Arb Fi Funoon al-Adab by Al-Nuwayri (c. 1241)
Although the earliest texts that Habib covers tend to focus primarily on classification--on cataloging different types of sexual preference and activity--texts from the 12-14th century often focus on looking for causes. Why might a woman take up "grinding" and why might she prefer that to sex with men? This isn't to say that the shift represents a chronological development in world-view. (Keep in mind that earlier texts often come down to us as incorporations into later discussions. So the 12-14th century writers may have felt that the cataloging aspect was already covered. And the catalogs of rationales from this era often are variants of causes discussed earlier.) During this era, the texts start sounding more negatively judgmental, e.g., attributing the origin of "grinding" to demonic influence. The earlier material was not devoid of disapproval, but there's a definite shift in tone.
* * *
An “origin story” whereby men turned away from God and began treating women badly, at which a devil came to the women disguised as a woman and taught them grinding. (With the implication that they wouldn’t have been tempted if the men had treated them better.)