Early Nokia smartphones (notably the classic N900 from 2009, see over there on the right) shipped with a Linux-based OS called Maemo. Maemo was largely based on open source projects, but included some proprietary code. The community was key to developing it, under Nokia’s stewardship, and it fuelled the vision that one day our phones could run free software without compromise. That may not have fructified yet, but there is hope. Today, long after Nokia largely abandoned Maemo (being forced by Microsoft to sell Windows Phones in 2011), there is still a community dedicated to Maemo. Namely Maemo Leste, which runs an upstream kernel and is based on Devuan (the distro that most has it in for Systemd).
You may not be interested in running Linux on hardware quite as old as the N900,