Al-Anbiyaa • BN-TAFSEER-IBN-E-KASEER
﴿ فَفَهَّمْنَٰهَا سُلَيْمَٰنَ ۚ وَكُلًّا ءَاتَيْنَا حُكْمًۭا وَعِلْمًۭا ۚ وَسَخَّرْنَا مَعَ دَاوُۥدَ ٱلْجِبَالَ يُسَبِّحْنَ وَٱلطَّيْرَ ۚ وَكُنَّا فَٰعِلِينَ ﴾
“for, [though] We made Solomon understand the case [more profoundly] yet We vouchsafed unto both of them sound judgment and knowledge [of right and wrong]. And We caused the mountains to join David in extolling Our limitless glory, and likewise the birds: for We are able to do [all things].”
Please check ayah 21:82 for complete tafsir.