All university libraries in Germany are open to the general public if you have an ID card/passport.
For some libraries you have to pay a small fee to get an access card. The mentioned Grimm Zentrum/HU library is free of charge:
"The Humboldt University Library is a scientific library open to the general public. Every person over sixteen years of age and resident in Germany may register to use it in accordance with the Library's Benutzungsordnung (Regulations of Use)." => see http://www.ub.hu-berlin.de/using-the-library/registration
Some libraries limit the borrowing of books (depends on the library) to university members (usually because of high demand) but you can almost always read the book while at the library.
Of course it's not allowed to do commercial work like coding on your startup, but if you don't annoy the people, probably nobody will care...
To work at Grimm Library, you don't even need an id or anything. Just go there. But they have some rules about main times of the day like 8-19 reserved for actual students - although I never experienced anybody controlling it.
I go there for anti-procrastination as well, it's great.
Some of the university libraries in Berlin are quite strict about what you're allowed to bring in (ie, no bags of any size). Fortunately, the Amerika-Gedenk-Bibliothek is close by and if they have such policies, they certainly don't enforce them.
Haven't been to the Grimm yet, but I remember passing by on the S-Bahn maybe a year ago and being excited about the huge new library under construction...I'm not in Mitte very often.
… and those rules are quite often not strictly enforced. It’s usually no problem for anyone to walk right in and start reading books. As long as you behave appropriately for a library it’s no problem.
For some libraries you have to pay a small fee to get an access card. The mentioned Grimm Zentrum/HU library is free of charge:
"The Humboldt University Library is a scientific library open to the general public. Every person over sixteen years of age and resident in Germany may register to use it in accordance with the Library's Benutzungsordnung (Regulations of Use)." => see http://www.ub.hu-berlin.de/using-the-library/registration
Some libraries limit the borrowing of books (depends on the library) to university members (usually because of high demand) but you can almost always read the book while at the library.
Of course it's not allowed to do commercial work like coding on your startup, but if you don't annoy the people, probably nobody will care...