Skip to content

Commit 5b31213

Browse files
committed
soc/tegra: pmc: Add Tegra264 support
JIRA: https://issues.redhat.com/browse/RHEL-109772 commit 5273ada Author: Thierry Reding <treding@nvidia.com> Date: Tue, 6 May 2025 15:31:14 +0200 The PMC block on Tegra264 has undergone a few small changes since it's Tegra234 predecessor. Match on the new compatible string to select the updated SoC-specific data. Link: https://lore.kernel.org/r/20250506133118.1011777-8-thierry.reding@gmail.com Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
1 parent fb67d02 commit 5b31213

File tree

1 file changed

+121
-0
lines changed

1 file changed

+121
-0
lines changed

drivers/soc/tegra/pmc.c

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4246,7 +4246,128 @@ static const struct tegra_pmc_soc tegra234_pmc_soc = {
42464246
.has_single_mmio_aperture = false,
42474247
};
42484248

4249+
static const struct tegra_pmc_regs tegra264_pmc_regs = {
4250+
.scratch0 = 0x684,
4251+
.rst_status = 0x4,
4252+
.rst_source_shift = 0x2,
4253+
.rst_source_mask = 0x1fc,
4254+
.rst_level_shift = 0x0,
4255+
.rst_level_mask = 0x3,
4256+
};
4257+
4258+
static const char * const tegra264_reset_sources[] = {
4259+
"SYS_RESET_N", /* 0x0 */
4260+
"CSDC_RTC_XTAL",
4261+
"VREFRO_POWER_BAD",
4262+
"SCPM_SOC_XTAL",
4263+
"SCPM_RTC_XTAL",
4264+
"FMON_32K",
4265+
"FMON_OSC",
4266+
"POD_RTC",
4267+
"POD_IO", /* 0x8 */
4268+
"POD_PLUS_IO_SPLL",
4269+
"POD_PLUS_SOC",
4270+
"VMON_PLUS_UV",
4271+
"VMON_PLUS_OV",
4272+
"FUSECRC_FAULT",
4273+
"OSC_FAULT",
4274+
"BPMP_BOOT_FAULT",
4275+
"SCPM_BPMP_CORE_CLK", /* 0x10 */
4276+
"SCPM_PSC_SE_CLK",
4277+
"VMON_SOC_MIN",
4278+
"VMON_SOC_MAX",
4279+
"VMON_MSS_MIN",
4280+
"VMON_MSS_MAX",
4281+
"POD_PLUS_IO_VMON",
4282+
"NVJTAG_SEL_MONITOR",
4283+
"NV_THERM_FAULT", /* 0x18 */
4284+
"FSI_THERM_FAULT",
4285+
"PSC_SW",
4286+
"SCPM_OESP_SE_CLK",
4287+
"SCPM_SB_SE_CLK",
4288+
"POD_CPU",
4289+
"POD_GPU",
4290+
"DCLS_GPU",
4291+
"POD_MSS", /* 0x20 */
4292+
"FMON_FSI",
4293+
"POD_FSI",
4294+
"VMON_FSI_MIN",
4295+
"VMON_FSI_MAX",
4296+
"VMON_CPU0_MIN",
4297+
"VMON_CPU0_MAX",
4298+
"BPMP_FMON",
4299+
"AO_WDT_POR", /* 0x28 */
4300+
"BPMP_WDT_POR",
4301+
"AO_TKE_WDT_POR",
4302+
"RCE0_WDT_POR",
4303+
"RCE1_WDT_POR",
4304+
"DCE_WDT_POR",
4305+
"FSI_R5_WDT_POR",
4306+
"FSI_R52_0_WDT_POR",
4307+
"FSI_R52_1_WDT_POR", /* 0x30 */
4308+
"FSI_R52_2_WDT_POR",
4309+
"FSI_R52_3_WDT_POR",
4310+
"TOP_0_WDT_POR",
4311+
"TOP_1_WDT_POR",
4312+
"TOP_2_WDT_POR",
4313+
"APE_C0_WDT_POR",
4314+
"APE_C1_WDT_POR",
4315+
"GPU_TKE_WDT_POR", /* 0x38 */
4316+
"PSC_WDT_POR",
4317+
"OESP_WDT_POR",
4318+
"SB_WDT_POR",
4319+
"SW_MAIN",
4320+
"L0L1_RST_OUT_N",
4321+
"FSI_HSM",
4322+
"CSITE_SW",
4323+
"AO_WDT_DBG", /* 0x40 */
4324+
"BPMP_WDT_DBG",
4325+
"AO_TKE_WDT_DBG",
4326+
"RCE0_WDT_DBG",
4327+
"RCE1_WDT_DBG",
4328+
"DCE_WDT_DBG",
4329+
"FSI_R5_WDT_DBG",
4330+
"FSI_R52_0_WDT_DBG",
4331+
"FSI_R52_1_WDT_DBG", /* 0x48 */
4332+
"FSI_R52_2_WDT_DBG",
4333+
"FSI_R52_3_WDT_DBG",
4334+
"TOP_0_WDT_DBG",
4335+
"TOP_1_WDT_DBG",
4336+
"TOP_2_WDT_DBG",
4337+
"APE_C0_WDT_DBG",
4338+
"APE_C1_WDT_DBG",
4339+
"PSC_WDT_DBG", /* 0x50 */
4340+
"OESP_WDT_DBG",
4341+
"SB_WDT_DBG",
4342+
"TSC_0_WDT_DBG",
4343+
"TSC_1_WDT_DBG",
4344+
"L2_RST_OUT_N",
4345+
"SC7"
4346+
};
4347+
4348+
static const struct tegra_wake_event tegra264_wake_events[] = {
4349+
};
4350+
4351+
static const struct tegra_pmc_soc tegra264_pmc_soc = {
4352+
.has_impl_33v_pwr = true,
4353+
.regs = &tegra264_pmc_regs,
4354+
.init = tegra186_pmc_init,
4355+
.setup_irq_polarity = tegra186_pmc_setup_irq_polarity,
4356+
.set_wake_filters = tegra186_pmc_set_wake_filters,
4357+
.irq_set_wake = tegra186_pmc_irq_set_wake,
4358+
.irq_set_type = tegra186_pmc_irq_set_type,
4359+
.reset_sources = tegra264_reset_sources,
4360+
.num_reset_sources = ARRAY_SIZE(tegra264_reset_sources),
4361+
.reset_levels = tegra186_reset_levels,
4362+
.num_reset_levels = ARRAY_SIZE(tegra186_reset_levels),
4363+
.wake_events = tegra264_wake_events,
4364+
.num_wake_events = ARRAY_SIZE(tegra264_wake_events),
4365+
.max_wake_events = 128,
4366+
.max_wake_vectors = 4,
4367+
};
4368+
42494369
static const struct of_device_id tegra_pmc_match[] = {
4370+
{ .compatible = "nvidia,tegra264-pmc", .data = &tegra264_pmc_soc },
42504371
{ .compatible = "nvidia,tegra234-pmc", .data = &tegra234_pmc_soc },
42514372
{ .compatible = "nvidia,tegra194-pmc", .data = &tegra194_pmc_soc },
42524373
{ .compatible = "nvidia,tegra186-pmc", .data = &tegra186_pmc_soc },

0 commit comments

Comments
 (0)