Another interpretation: "Now Joseph was brought down to Egypt" (Genesis 39:1). There were three qualities within him: he was a son of Torah, a prophet, and one who sustained his brothers. A son of Torah, for thus it is written, "because he was the son of his old age" (Genesis 37:3); and it is written, "Ask your father, and he will tell you, [your elders, and they will say to you]" (Deuteronomy 32:7). And from where do we know that he was a prophet? As it is said, "and he was a youth with the sons of Bilhah" (Genesis 37:2), and it is written, "and his attendant Joshua son of Nun, a youth" (Exodus 33:11), and it is written, "and the youth Samuel grew up" (1 Samuel 2:21). And from where do we know that he sustained his brothers? As it is said, "And now, do not fear; I myself will provide for you" (Genesis 50:21).
Joseph the Torah Scholar, Prophet, and Sustainer of His Brothers
Midrash Tanchuma Buber, Vayeshev 20:1
ד"א ויוסף הורד מצרימה. שלש מדות היו בו, בן תורה, ונביא, ואת אחיו מכלכל, בן תורה שכן כתיב כי בן זקונים הוא לו (בראשית לז ג), וכתיב שאל אביך ויגדך [זקניך ויאמרו לך] (דברים לב ז), ומנין שהוא נביא, שנאמר והוא נער את בני בלהה וגו' (בראשית לז ב), וכתיב ומשרתו יהושע בן נון נער וגו' (שמות לג יא), וכתיב ויגדל הנער שמואל (שמואל א ב כא). ומנין שהוא זן את אחיו, שנאמר ועתה אל תיראו אנכי אכלכל אתכם וגו' (בראשית נ כא).