Refactor device tree

It's quite a mess right now - this commit makes it a lot cleaner.

Change-Id: I95ada87ddfb0a7e9b207571320ba94fcf24e5b62