@@ -336,45 +336,6 @@ struct tegra_pmc_soc {
336336 bool has_blink_output ;
337337};
338338
339- static const char * const tegra186_reset_sources [] = {
340- "SYS_RESET" ,
341- "AOWDT" ,
342- "MCCPLEXWDT" ,
343- "BPMPWDT" ,
344- "SCEWDT" ,
345- "SPEWDT" ,
346- "APEWDT" ,
347- "BCCPLEXWDT" ,
348- "SENSOR" ,
349- "AOTAG" ,
350- "VFSENSOR" ,
351- "SWREST" ,
352- "SC7" ,
353- "HSM" ,
354- "CORESIGHT"
355- };
356-
357- static const char * const tegra186_reset_levels [] = {
358- "L0" , "L1" , "L2" , "WARM"
359- };
360-
361- static const char * const tegra30_reset_sources [] = {
362- "POWER_ON_RESET" ,
363- "WATCHDOG" ,
364- "SENSOR" ,
365- "SW_MAIN" ,
366- "LP0"
367- };
368-
369- static const char * const tegra210_reset_sources [] = {
370- "POWER_ON_RESET" ,
371- "WATCHDOG" ,
372- "SENSOR" ,
373- "SW_MAIN" ,
374- "LP0" ,
375- "AOTAG"
376- };
377-
378339/**
379340 * struct tegra_pmc - NVIDIA Tegra PMC
380341 * @dev: pointer to PMC device structure
@@ -2784,6 +2745,14 @@ static const u8 tegra30_cpu_powergates[] = {
27842745 TEGRA_POWERGATE_CPU3 ,
27852746};
27862747
2748+ static const char * const tegra30_reset_sources [] = {
2749+ "POWER_ON_RESET" ,
2750+ "WATCHDOG" ,
2751+ "SENSOR" ,
2752+ "SW_MAIN" ,
2753+ "LP0"
2754+ };
2755+
27872756static const struct tegra_pmc_soc tegra30_pmc_soc = {
27882757 .num_powergates = ARRAY_SIZE (tegra30_powergates ),
27892758 .powergates = tegra30_powergates ,
@@ -3061,6 +3030,15 @@ static const struct pinctrl_pin_desc tegra210_pin_descs[] = {
30613030 TEGRA210_IO_PAD_TABLE (TEGRA_IO_PIN_DESC )
30623031};
30633032
3033+ static const char * const tegra210_reset_sources [] = {
3034+ "POWER_ON_RESET" ,
3035+ "WATCHDOG" ,
3036+ "SENSOR" ,
3037+ "SW_MAIN" ,
3038+ "LP0" ,
3039+ "AOTAG"
3040+ };
3041+
30643042static const struct tegra_wake_event tegra210_wake_events [] = {
30653043 TEGRA_WAKE_IRQ ("rtc" , 16 , 2 ),
30663044 TEGRA_WAKE_IRQ ("pmu" , 51 , 86 ),
@@ -3193,6 +3171,28 @@ static void tegra186_pmc_setup_irq_polarity(struct tegra_pmc *pmc,
31933171 iounmap (wake );
31943172}
31953173
3174+ static const char * const tegra186_reset_sources [] = {
3175+ "SYS_RESET" ,
3176+ "AOWDT" ,
3177+ "MCCPLEXWDT" ,
3178+ "BPMPWDT" ,
3179+ "SCEWDT" ,
3180+ "SPEWDT" ,
3181+ "APEWDT" ,
3182+ "BCCPLEXWDT" ,
3183+ "SENSOR" ,
3184+ "AOTAG" ,
3185+ "VFSENSOR" ,
3186+ "SWREST" ,
3187+ "SC7" ,
3188+ "HSM" ,
3189+ "CORESIGHT"
3190+ };
3191+
3192+ static const char * const tegra186_reset_levels [] = {
3193+ "L0" , "L1" , "L2" , "WARM"
3194+ };
3195+
31963196static const struct tegra_wake_event tegra186_wake_events [] = {
31973197 TEGRA_WAKE_IRQ ("pmu" , 24 , 209 ),
31983198 TEGRA_WAKE_GPIO ("power" , 29 , 1 , TEGRA186_AON_GPIO (FF , 0 )),
@@ -3362,7 +3362,75 @@ static const struct tegra_pmc_soc tegra194_pmc_soc = {
33623362 .has_blink_output = false,
33633363};
33643364
3365+ static const struct tegra_pmc_regs tegra234_pmc_regs = {
3366+ .scratch0 = 0x2000 ,
3367+ .dpd_req = 0 ,
3368+ .dpd_status = 0 ,
3369+ .dpd2_req = 0 ,
3370+ .dpd2_status = 0 ,
3371+ .rst_status = 0x70 ,
3372+ .rst_source_shift = 0x2 ,
3373+ .rst_source_mask = 0xfc ,
3374+ .rst_level_shift = 0x0 ,
3375+ .rst_level_mask = 0x3 ,
3376+ };
3377+
3378+ static const char * const tegra234_reset_sources [] = {
3379+ "SYS_RESET_N" ,
3380+ "AOWDT" ,
3381+ "BCCPLEXWDT" ,
3382+ "BPMPWDT" ,
3383+ "SCEWDT" ,
3384+ "SPEWDT" ,
3385+ "APEWDT" ,
3386+ "LCCPLEXWDT" ,
3387+ "SENSOR" ,
3388+ "AOTAG" ,
3389+ "VFSENSOR" ,
3390+ "MAINSWRST" ,
3391+ "SC7" ,
3392+ "HSM" ,
3393+ "CSITE" ,
3394+ "RCEWDT" ,
3395+ "PVA0WDT" ,
3396+ "PVA1WDT" ,
3397+ "L1A_ASYNC" ,
3398+ "BPMPBOOT" ,
3399+ "FUSECRC" ,
3400+ };
3401+
3402+ static const struct tegra_pmc_soc tegra234_pmc_soc = {
3403+ .num_powergates = 0 ,
3404+ .powergates = NULL ,
3405+ .num_cpu_powergates = 0 ,
3406+ .cpu_powergates = NULL ,
3407+ .has_tsense_reset = false,
3408+ .has_gpu_clamps = false,
3409+ .needs_mbist_war = false,
3410+ .has_impl_33v_pwr = true,
3411+ .maybe_tz_only = false,
3412+ .num_io_pads = 0 ,
3413+ .io_pads = NULL ,
3414+ .num_pin_descs = 0 ,
3415+ .pin_descs = NULL ,
3416+ .regs = & tegra234_pmc_regs ,
3417+ .init = NULL ,
3418+ .setup_irq_polarity = tegra186_pmc_setup_irq_polarity ,
3419+ .irq_set_wake = tegra186_pmc_irq_set_wake ,
3420+ .irq_set_type = tegra186_pmc_irq_set_type ,
3421+ .reset_sources = tegra234_reset_sources ,
3422+ .num_reset_sources = ARRAY_SIZE (tegra234_reset_sources ),
3423+ .reset_levels = tegra186_reset_levels ,
3424+ .num_reset_levels = ARRAY_SIZE (tegra186_reset_levels ),
3425+ .num_wake_events = 0 ,
3426+ .wake_events = NULL ,
3427+ .pmc_clks_data = NULL ,
3428+ .num_pmc_clks = 0 ,
3429+ .has_blink_output = false,
3430+ };
3431+
33653432static const struct of_device_id tegra_pmc_match [] = {
3433+ { .compatible = "nvidia,tegra234-pmc" , .data = & tegra234_pmc_soc },
33663434 { .compatible = "nvidia,tegra194-pmc" , .data = & tegra194_pmc_soc },
33673435 { .compatible = "nvidia,tegra186-pmc" , .data = & tegra186_pmc_soc },
33683436 { .compatible = "nvidia,tegra210-pmc" , .data = & tegra210_pmc_soc },
0 commit comments