So I was researching Iberian surnames, and from what I got, by the high Middle Ages both noblemen and commoners were using only patronyms, but starting in this period nobles started adopting into their names the names of their manors or of the lands they controled - so Pero Gomez who controled the lands of Souza would become Pero Gomez de Souza.
But the thing is - surnames of this kind are among the most common surnames in Spanish and Portuguese speaking countries - especially Portuguese ones. If you search for the origin of a Portuguese toponymic surname you'll often find sites saying that it comes from a homonymous manor in some small village in Portugal or Galicia.
So how did these surnames adopted by nobles from some manor somewhere became so popular? Did the villains from these manors adopt them and then they spread through pure chance? Or did the common folk just start adopting surnames in a way that would fit them? For instance, Costa, Oliveira, Pereira, are all very common and have "literal" meanings. However, Andrade, Araújo, Almeida are also common and they mean nothing except the manors they originate from. How did it work?
There are many things going on with surnames in Spain in the Late Middle Ages and early Modern Age.
Patronymics were a very common form of surname for both noblemen and commoners alike. Nobles, however, were commonly referred to by their titles (conde de Tendilla, duque de Frías, marqués de Aguilar, etc), although a more formal way of referring to them can be found like Gonzalo Fernández, duque de Sessa (this one is the Great Captain more notably known as Gonzalo Fernández de Córdoba). Sometimes their fiefdoms or manors would get fused into the surnames, creating the classic combination of patronymic + place (López de Mendoza, Suárez de Figueroa, Álvarez de Toledo).
With the nobility there is a strong irregularity in the usage of surnames, due to different familial customs. A good example of this are the children of the marquess of Santillana: Diego Hurtado de Mendoza, Íñigo López de Mendoza, Lorenzo Suárez de Mendoza, Pedro González de Mendoza, Leonor de la Vega... In that case it has to do with a certain sense of the appropriate names for the bearers of the titles bestowed upon them.
Another good case of this is the dual mayorazgo set up by Gonzalo Fernández de Oviedo and his long-time friend and collaborator Rodrigo de Bastidas. They would constitute two mayorazgos, one under the name of Oviedo or Valdés, and the other one to the name of Bastidas. In case one of the mayorazgos ended up without succession, it would pass to the other line, and as soon as two heirs were available, both mayorazgos under the aforementioned names would come back to existence.
Then there are the toponymic surnames, which sometimes ended up added to the regular names, despite lack of nobility, or the nobility being dubious. There are plenty of examples of this, which I have come to call "the vanishing comma". Cases in point: Pedro Menéndez de Avilés, a man whose name was Pedro Menéndez and who was from Avilés. Other instances include Francisco López de Gómara, Diego Velázquez de Cuéllar, or Francisco López de Villalobos. In the province of Álava this was actually the custom, making alavese names stand out: García de Cortázar, Ruiz de Aguirre, Ortiz de Zárate, López de Mendoza, etc.
Toponymic surnames were excedingly common among the populace, which is a reason for the popularity. They were especially common among people from outside a given place. Say, for instance, an ordinary man migrates from Villafranca to Toledo. In Toledo, he will be known by the people as Juan de Villafranca, because that is a very clear way of identification, it is a well known characteristic of that man.
Finally, you have to take into account the massive conversions of moriscos, and later on of the American peoples. It was relatively common for conversos to take the names of their godfathers, which in mass baptisms would mean a lot of people taking surnames like Mendoza, Toledo, Figueroa, Cisneros, or the like, without making them related to any nobility.