nyan: Move Tegra GPIO/pinmux code into its own file

In dbddb70, GPIO twiddling code was added in a rushed effort to make
make "mosys platform" commands work on Nyan. The code mostly just got
ported over from coreboot and dumped into nyan.c.

This patch separates the low-level GPIO and pinmux twiddling code
from the high-level platform identification code. This makes the
SoC-specific code more reusable and simplifies the platform code.

The long-term plan is to make the devicetree expose the board ID
(which should get passed in by coreboot/depthcharge).

TEST=mosys platform {name,vendor,version} work the same as before
on Big and Blaze

Change-Id: Ifb1be0dc5591925d71d7e7624ee5aeb4b7e5db04
Reviewed-on: https://chromium-review.googlesource.com/216007
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
(cherry picked from commit c0c3d8c1ae5bb30a3259e4e50bd8ab2d8156d8a1)
Reviewed-on: https://chromium-review.googlesource.com/228450
Tested-by: Neil Chen <neilc@nvidia.com>
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Commit-Queue: Neil Chen <neilc@nvidia.com>
10 files changed