I'm intetested in knowing where the idea of the 5 trees in Svarga or Devaloka (Pancavriksha, Kalpavriksha) is described in the Hindu scriptues. I'm especially interested in the earliest occurences mentioning 5 trees. Thank you for your help in advance.
The Devi Bhagavatam, in the verses given below, mentions the names of the five celestial trees namely -- Mandara, Parijata, Santana, Kalpa and Harichandana.
41-44. Indra said :-- “O Devî! True that I have no other powerful enemy, yet I do not find peace nor any happiness. I fear for the sin Brâhmahattyâ in my house. O Devî! This Nandana Garden, the city of Kuvera, the lord of riches, this nectar forest, the sweet music of the Gandbarbas, the beautiful dance of the Apsarâs, all these now do not give the least pleasure to me. What more can I say than this that the beautiful Lady like you, most beautiful amidst the three worlds, and other beautiful ladies, the Heavenly cow, the Mandâra tree (one of the five trees of the celestial region), the Pârijâta tree (the flower tree), the Santâna tree, the Kalpa tree (yielding all desires) and the Harichandan (saffron tree) and others cannot give pleasure to me. What to do, where to go, so that I get happiness, O Beloved! This thought makes me uneasy. And so I am not able to get happiness in my own thought.”
It's hard to say which śāstra is the earliest, because we don't see the mention of the pañcavr̥kṣa in śruti (Veda). So, we can only depend on other śāstras such as Purāṇas. The chronology and date of the Purāṇas is quite uncertain because these texts are accretionary in nature.
I checked Devī Bhāgavata Purāṇa (6.7.44) as @Rickross mentions in his answer.
The Saṁskr̥ta śloka goes as follows-
na tathā kāmadhenuśca devavr̥kṣaḥ sukhapradaḥ |
kiṁ karomi kva gacchāmi kva śarma mama jāyate ||44||
Here, we can clearly see that only devavr̥kṣa is mentioned, we don't see mention of any five trees. But the Eng. translation of Svāmī Vijñānanda, that is freely available online is:
the Heavenly cow, the Mandāra tree (one of the five trees of the celestial region), the Pārijāta tree (the flower tree), the Santāna tree, the Kalpa tree (yielding all desires) and the Haricandan (saffron tree) and others cannot give pleasure to me. What to do, where to go, so that I get happiness, O Beloved!
This translation is not literal because it adds the name of the five trees which have not been mentioned in the Sanskrit śloka. But thankfully, I found Skanda Purāṇa (220.127.116.11-119)
pañcapīyūṣadhārābhirviśveśaṁ snapayanti hi |
mandāraḥ pārijātaśca santāno haricandanaḥ ||118||
kalpadrumaśca pañcaite tarubhiḥ saha sarvadā ||119||
Here, each of the pañcavr̥kṣa of svarga are mentioned viz. mandāra, pārijāta. santāna, haricandana and kalpadruma.
- Devī Bhāgavata Purāṇa Vol.1 (Saṁskr̥ta with Hindī transl.by Gita Press): https://archive.org/details/DeviBhagavataWithHindiTranslationVolume1GitaPress/mode/2up?view=theater
- Devī Bhāgavata Purāṇa (Eng. transl. by Svāmī Vijñānanda): https://www.wisdomlib.org/hinduism/book/devi-bhagavata-purana
- Skanda Purāṇa (Saṁskr̥ta): https://sa.wikisource.org/wiki/%E0%A4%B8%E0%A5%8D%E0%A4%95%E0%A4%A8%E0%A5%8D%E0%A4%A6%E0%A4%AA%E0%A5%81%E0%A4%B0%E0%A4%BE%E0%A4%A3%E0%A4%AE%E0%A5%8D
- Skanda Purāṇa (Eng. transl. by G.V. Tagare):