From Old Galician-Portuguese -ỹo, from Latin -īnus (“of or relating to”). Compare Italian -ino, French -in, both diminutive suffixes. Doublet of -ino.
Practice speaking and memorizing "-inho" and many other words and sentences in Portuguese.