I think you are approaching this from a bad angle. You shouldn't necessarily devote time to politics, you should take politics into account when making workplace decisions. For example when prioritizing work if you choose one person's project over another that has political implications even if you make your decision without considering politics. People who are successful in the workplace make good decisions when it comes to making others (especially decision makers) happy or at very least avoiding their ire.
Rather than thinking in terms of politics for the sake of being promoted, think of it in terms of being owed favors that may someday be repaid (in promotions, in keeping resources for projects you find important, in getting training opportunities, in having your projects taking priority over other people's, etc).
With respect to how much time to put into relationship building, that will vary a great deal based on your role. For example my primary role right now is a project facilitator with a lot of responsibility and not a lot of authority. In my role relationship building is huge and early on I spent a lot of time on developing relationships that are key to my success. This took the form of assisting beyond what is in my job description, friendly chatting, and treating people fairly and courteously. I did this both with team members as well as their supervisors (none answer to me as involvement on this project is a sideline for them). In most roles a much smaller investment is required but in almost every role in every company having friends (or at least friendly relationships with co-workers) will make your life easier eventually.