tegra: tegra124: Add a PMC syscon driver

The PMC can be modelled as a syscon peripheral. Add a driver for this
so that it can be accessed by drivers when needed. Enable it for tegra124
boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-on: Beaver, Jetson-TK1
Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
Simon Glass 2017-07-25 08:29:58 -06:00
parent 9b6b3c1b50
commit 66de3eee79
4 changed files with 27 additions and 0 deletions

View File

@ -97,6 +97,11 @@ enum {
TEGRA_SOC_UNKNOWN = -1,
};
/* Tegra system controller (SYSCON) devices */
enum {
TEGRA_SYSCON_PMC,
};
#else /* __ASSEMBLY__ */
#define PRM_RSTCTRL NV_PA_PMC_BASE
#endif

View File

@ -88,6 +88,8 @@ config TEGRA124
bool "Tegra124 family"
select TEGRA_ARMV7_COMMON
imply ENV_IS_IN_MMC
imply REGMAP
imply SYSCON
config TEGRA210
bool "Tegra210 family"

View File

@ -10,6 +10,7 @@ obj-$(CONFIG_SPL_BUILD) += cpu.o
obj-y += clock.o
obj-y += funcmux.o
obj-y += pinmux.o
obj-y += pmc.o
obj-y += xusb-padctl.o
obj-y += ../xusb-padctl-common.o

View File

@ -0,0 +1,19 @@
/*
* Copyright (C) 2017 Google, Inc
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <dm.h>
#include <syscon.h>
static const struct udevice_id tegra124_syscon_ids[] = {
{ .compatible = "nvidia,tegra124-pmc", .data = TEGRA_SYSCON_PMC },
};
U_BOOT_DRIVER(syscon_tegra124) = {
.name = "tegra124_syscon",
.id = UCLASS_SYSCON,
.of_match = tegra124_syscon_ids,
};