Skip to content

Commit 48914c4

Browse files
committed
soc/tegra: pmc: Add reset sources and levels on Tegra194
Tegra194 supports the same reset levels as Tegra186 but extends the set of reset sources. Provide custom PMC register definitions to account for the larger field for the reset sources as well as the updated list of reset sources. Signed-off-by: Thierry Reding <[email protected]> --- Changes in v2: - use the new Tegra194 register definitions
1 parent cd4a709 commit 48914c4

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

drivers/soc/tegra/pmc.c

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2926,6 +2926,43 @@ static const struct tegra_io_pad_soc tegra194_io_pads[] = {
29262926
{ .id = TEGRA_IO_PAD_AUDIO_HV, .dpd = 61, .voltage = UINT_MAX },
29272927
};
29282928

2929+
static const struct tegra_pmc_regs tegra194_pmc_regs = {
2930+
.scratch0 = 0x2000,
2931+
.dpd_req = 0x74,
2932+
.dpd_status = 0x78,
2933+
.dpd2_req = 0x7c,
2934+
.dpd2_status = 0x80,
2935+
.rst_status = 0x70,
2936+
.rst_source_shift = 0x2,
2937+
.rst_source_mask = 0x7c,
2938+
.rst_level_shift = 0x0,
2939+
.rst_level_mask = 0x3,
2940+
};
2941+
2942+
static const char * const tegra194_reset_sources[] = {
2943+
"SYS_RESET_N",
2944+
"AOWDT",
2945+
"BCCPLEXWDT",
2946+
"BPMPWDT",
2947+
"SCEWDT",
2948+
"SPEWDT",
2949+
"APEWDT",
2950+
"LCCPLEXWDT",
2951+
"SENSOR",
2952+
"AOTAG",
2953+
"VFSENSOR",
2954+
"MAINSWRST",
2955+
"SC7",
2956+
"HSM",
2957+
"CSITE",
2958+
"RCEWDT",
2959+
"PVA0WDT",
2960+
"PVA1WDT",
2961+
"L1A_ASYNC",
2962+
"BPMPBOOT",
2963+
"FUSECRC",
2964+
};
2965+
29292966
static const struct tegra_wake_event tegra194_wake_events[] = {
29302967
TEGRA_WAKE_GPIO("power", 29, 1, TEGRA194_AON_GPIO(EE, 4)),
29312968
TEGRA_WAKE_IRQ("rtc", 73, 10),
@@ -2943,11 +2980,15 @@ static const struct tegra_pmc_soc tegra194_pmc_soc = {
29432980
.maybe_tz_only = false,
29442981
.num_io_pads = ARRAY_SIZE(tegra194_io_pads),
29452982
.io_pads = tegra194_io_pads,
2946-
.regs = &tegra186_pmc_regs,
2983+
.regs = &tegra194_pmc_regs,
29472984
.init = NULL,
29482985
.setup_irq_polarity = tegra186_pmc_setup_irq_polarity,
29492986
.irq_set_wake = tegra186_pmc_irq_set_wake,
29502987
.irq_set_type = tegra186_pmc_irq_set_type,
2988+
.reset_sources = tegra194_reset_sources,
2989+
.num_reset_sources = ARRAY_SIZE(tegra194_reset_sources),
2990+
.reset_levels = tegra186_reset_levels,
2991+
.num_reset_levels = ARRAY_SIZE(tegra186_reset_levels),
29512992
.num_wake_events = ARRAY_SIZE(tegra194_wake_events),
29522993
.wake_events = tegra194_wake_events,
29532994
};

0 commit comments

Comments
 (0)