بسم الله الرحمن الرحيم
Each and every practice of the holy Prophet Muhammad (صلى الله عليه وسلم) was in accordance with wahi. Almighty Allah says in the holy Quran:
وَمَا يَنطِقُ عَنِ الْهَوَى [النجم : 3]
Thus the kissing of Hajr-e-Aswad at the time of tawaf shall be according to wahi.
Allah knows Best!
Darul Uloom Deoband