Lines Matching +full:0 +full:x78

63 #define PMC_CNTRL			0x0
74 #define PMC_WAKE_MASK 0x0c
75 #define PMC_WAKE_LEVEL 0x10
76 #define PMC_WAKE_STATUS 0x14
77 #define PMC_SW_WAKE_STATUS 0x18
78 #define PMC_DPD_PADS_ORIDE 0x1c
81 #define DPD_SAMPLE 0x020
82 #define DPD_SAMPLE_ENABLE BIT(0)
83 #define DPD_SAMPLE_DISABLE (0 << 0)
85 #define PWRGATE_TOGGLE 0x30
88 #define REMOVE_CLAMPING 0x34
90 #define PWRGATE_STATUS 0x38
92 #define PMC_BLINK_TIMER 0x40
93 #define PMC_IMPL_E_33V_PWR 0x40
95 #define PMC_PWR_DET 0x48
104 #define PMC_CPUPWRGOOD_TIMER 0xc8
105 #define PMC_CPUPWROFF_TIMER 0xcc
106 #define PMC_COREPWRGOOD_TIMER 0x3c
107 #define PMC_COREPWROFF_TIMER 0xe0
109 #define PMC_PWR_DET_VALUE 0xe4
111 #define PMC_USB_DEBOUNCE_DEL 0xec
112 #define PMC_USB_AO 0xf0
114 #define PMC_SCRATCH37 0x130
115 #define PMC_SCRATCH41 0x140
117 #define PMC_WAKE2_MASK 0x160
118 #define PMC_WAKE2_LEVEL 0x164
119 #define PMC_WAKE2_STATUS 0x168
120 #define PMC_SW_WAKE2_STATUS 0x16c
122 #define PMC_CLK_OUT_CNTRL 0x1a8
123 #define PMC_CLK_OUT_MUX_MASK GENMASK(1, 0)
124 #define PMC_SENSOR_CTRL 0x1b0
128 #define PMC_RST_STATUS_POR 0
135 #define IO_DPD_REQ 0x1b8
136 #define IO_DPD_REQ_CODE_IDLE (0U << 30)
141 #define IO_DPD_STATUS 0x1bc
142 #define IO_DPD2_REQ 0x1c0
143 #define IO_DPD2_STATUS 0x1c4
144 #define SEL_DPD_TIM 0x1c8
146 #define PMC_UTMIP_UHSIC_TRIGGERS 0x1ec
147 #define PMC_UTMIP_UHSIC_SAVED_STATE 0x1f0
149 #define PMC_UTMIP_TERM_PAD_CFG 0x1f8
150 #define PMC_UTMIP_UHSIC_SLEEP_CFG 0x1fc
151 #define PMC_UTMIP_UHSIC_FAKE 0x218
153 #define PMC_SCRATCH54 0x258
155 #define PMC_SCRATCH54_ADDR_SHIFT 0
157 #define PMC_SCRATCH55 0x25c
163 #define PMC_SCRATCH55_I2CSLV1_SHIFT 0
165 #define PMC_UTMIP_UHSIC_LINE_WAKEUP 0x26c
167 #define PMC_UTMIP_BIAS_MASTER_CNTRL 0x270
168 #define PMC_UTMIP_MASTER_CONFIG 0x274
169 #define PMC_UTMIP_UHSIC2_TRIGGERS 0x27c
170 #define PMC_UTMIP_MASTER2_CONFIG 0x29c
172 #define GPU_RG_CNTRL 0x2d4
174 #define PMC_UTMIP_PAD_CFG0 0x4c0
175 #define PMC_UTMIP_UHSIC_SLEEP_CFG1 0x4d0
176 #define PMC_UTMIP_SLEEPWALK_P3 0x4e0
178 #define WAKE_AOWAKE_CNTRL(x) (0x000 + ((x) << 2))
181 #define WAKE_AOWAKE_MASK_W(x) (0x180 + ((x) << 2))
182 #define WAKE_AOWAKE_MASK_R(x) (0x300 + ((x) << 2))
183 #define WAKE_AOWAKE_STATUS_W(x) (0x30c + ((x) << 2))
184 #define WAKE_AOWAKE_STATUS_R(x) (0x48c + ((x) << 2))
185 #define WAKE_AOWAKE_TIER0_ROUTING(x) (0x4b4 + ((x) << 2))
186 #define WAKE_AOWAKE_TIER1_ROUTING(x) (0x4c0 + ((x) << 2))
187 #define WAKE_AOWAKE_TIER2_ROUTING(x) (0x4cc + ((x) << 2))
188 #define WAKE_AOWAKE_SW_STATUS_W_0 0x49c
189 #define WAKE_AOWAKE_SW_STATUS(x) (0x4a0 + ((x) << 2))
190 #define WAKE_LATCH_SW 0x498
192 #define WAKE_AOWAKE_CTRL 0x4f4
193 #define WAKE_AOWAKE_CTRL_INTR_POLARITY BIT(0)
198 #define TEGRA_SMC_PMC 0xc2fffe00
199 #define TEGRA_SMC_PMC_READ 0xaa
200 #define TEGRA_SMC_PMC_WRITE 0xbb
309 .irq = 0, \
331 .irq = 0, \
488 arm_smccc_smc(TEGRA_SMC_PMC, TEGRA_SMC_PMC_READ, offset, 0, 0, in tegra_pmc_readl()
489 0, 0, 0, &res); in tegra_pmc_readl()
512 value, 0, 0, 0, 0, &res); in tegra_pmc_writel()
551 return (tegra_pmc_readl(pmc, GPU_RG_CNTRL) & 0x1) == 0; in tegra_powergate_state()
553 return (tegra_pmc_readl(pmc, PWRGATE_STATUS) & BIT(id)) != 0; in tegra_powergate_state()
573 for (i = 0; i < pmc->soc->num_powergates; i++) { in tegra_powergate_lookup()
638 return 0; in tegra114_powergate_set()
659 return 0; in tegra_powergate_set()
682 tegra_pmc_writel(pmc, 0, GPU_RG_CNTRL); in __tegra_powergate_remove_clamping()
703 return 0; in __tegra_powergate_remove_clamping()
712 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_prepare_clocks()
734 return 0; in tegra_powergate_prepare_clocks()
748 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_unprepare_clocks()
754 return 0; in tegra_powergate_unprepare_clocks()
761 for (i = 0; i < pg->num_clks; i++) in tegra_powergate_disable_clocks()
770 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_enable_clocks()
776 return 0; in tegra_powergate_enable_clocks()
797 if (err < 0) in tegra_powergate_power_up()
836 return 0; in tegra_powergate_power_up()
883 return 0; in tegra_powergate_power_down()
926 if (err < 0) { in tegra_genpd_power_off()
1065 if (id < 0) in tegra_pmc_cpu_is_powered()
1080 if (id < 0) in tegra_pmc_cpu_power_on()
1095 if (id < 0) in tegra_pmc_cpu_remove_clamping()
1109 if (strcmp(cmd, "recovery") == 0) in tegra_pmc_program_reboot_reason()
1112 if (strcmp(cmd, "bootloader") == 0) in tegra_pmc_program_reboot_reason()
1115 if (strcmp(cmd, "forced-recovery") == 0) in tegra_pmc_program_reboot_reason()
1160 const u32 go_to_charger_mode = 0xa5a55a5a; in tegra_pmc_power_off_handler()
1177 for (i = 0; i < pmc->soc->num_powergates; i++) { in powergate_show()
1179 if (status < 0) in powergate_show()
1186 return 0; in powergate_show()
1199 if (count == 0) in tegra_powergate_of_get_clks()
1212 for (i = 0; i < count; i++) { in tegra_powergate_of_get_clks()
1222 return 0; in tegra_powergate_of_get_clks()
1248 if (err < 0) { in tegra_powergate_of_get_resets()
1257 if (err < 0) in tegra_powergate_of_get_resets()
1276 int id, err = 0; in tegra_powergate_add()
1284 if (id < 0) { in tegra_powergate_add()
1305 if (err < 0) { in tegra_powergate_add()
1311 if (err < 0) { in tegra_powergate_add()
1324 if (err < 0) { in tegra_powergate_add()
1331 if (err < 0) { in tegra_powergate_add()
1339 return 0; in tegra_powergate_add()
1393 return 0; in tegra_pmc_core_pd_set_performance_state()
1436 return 0; in tegra_pmc_core_pd_add()
1449 int err = 0; in tegra_powergate_init()
1465 return 0; in tegra_powergate_init()
1469 if (err < 0) { in tegra_powergate_init()
1476 0, &parent_args)) in tegra_powergate_init()
1480 child_args.args_count = 0; in tegra_powergate_init()
1544 for (i = 0; i < pmc->soc->num_io_pads; i++) in tegra_io_pad_find()
1581 return 0; in tegra_io_pad_prepare()
1594 return 0; in tegra_io_pad_poll()
1612 * Returns: 0 on success or a negative error code on failure.
1630 if (err < 0) { in tegra_io_pad_power_enable()
1637 err = tegra_io_pad_poll(pmc, status, mask, 0, 250); in tegra_io_pad_power_enable()
1638 if (err < 0) { in tegra_io_pad_power_enable()
1655 * Returns: 0 on success or a negative error code on failure.
1673 if (err < 0) { in tegra_io_pad_power_disable()
1681 if (err < 0) { in tegra_io_pad_power_disable()
1762 return 0; in tegra_io_pad_set_voltage()
1782 if ((value & BIT(pad->voltage)) == 0) in tegra_io_pad_get_voltage()
1828 unsigned long long rate = 0; in tegra_pmc_enter_suspend_mode()
1845 if (WARN_ON_ONCE(rate == 0)) in tegra_pmc_enter_suspend_mode()
1871 case 0: in tegra_pmc_parse_dt()
1905 pmc->core_osc_time = values[0]; in tegra_pmc_parse_dt()
1930 pmc->lp0_vec_phys = values[0]; in tegra_pmc_parse_dt()
1933 return 0; in tegra_pmc_parse_dt()
1938 if (pmc->soc->max_wake_events > 0) { in tegra_pmc_init()
1959 return 0; in tegra_pmc_init()
2000 pinmux = 0; in tegra_pmc_init_tsense_reset()
2019 checksum = reg_addr + reg_data + (value & 0xff) + ((value >> 8) & 0xff) in tegra_pmc_init_tsense_reset()
2020 + ((value >> 24) & 0xff); in tegra_pmc_init_tsense_reset()
2021 checksum &= 0xff; in tegra_pmc_init_tsense_reset()
2022 checksum = 0x100 - checksum; in tegra_pmc_init_tsense_reset()
2063 return 0; in tegra_io_pad_pinctrl_get_group_pins()
2090 if (ret < 0) in tegra_io_pad_pinconf_get()
2098 if (ret < 0) in tegra_io_pad_pinconf_get()
2110 return 0; in tegra_io_pad_pinconf_get()
2128 for (i = 0; i < num_configs; ++i) { in tegra_io_pad_pinconf_set()
2154 return 0; in tegra_io_pad_pinconf_set()
2173 return 0; in tegra_pmc_pinctrl_init()
2188 return 0; in tegra_pmc_pinctrl_init()
2228 int err = 0; in tegra_pmc_reset_sysfs_init()
2232 if (err < 0) in tegra_pmc_reset_sysfs_init()
2240 if (err < 0) in tegra_pmc_reset_sysfs_init()
2255 *hwirq = fwspec->param[0]; in tegra_pmc_irq_translate()
2258 return 0; in tegra_pmc_irq_translate()
2268 int err = 0; in tegra_pmc_irq_alloc()
2273 for (i = 0; i < soc->num_wake_events; i++) { in tegra_pmc_irq_alloc()
2280 if (event->id != fwspec->param[0]) in tegra_pmc_irq_alloc()
2286 if (err < 0) in tegra_pmc_irq_alloc()
2290 if (event->irq == 0) { in tegra_pmc_irq_alloc()
2297 spec.param[0] = GIC_SPI; in tegra_pmc_irq_alloc()
2309 if (event->gpio.instance != fwspec->param[0] || in tegra_pmc_irq_alloc()
2347 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2348 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2350 tegra_pmc_writel(pmc, 0, PMC_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2351 tegra_pmc_writel(pmc, 0, PMC_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2368 return 0; in tegra210_pmc_irq_set_wake()
2408 return 0; in tegra210_pmc_irq_set_type()
2419 dev_dbg(pmc->dev, "WAKE_AOWAKE_CNTRL_83 = 0x%x\n", value); in tegra186_pmc_set_wake_filters()
2432 writel(0x1, pmc->wake + WAKE_AOWAKE_STATUS_W(data->hwirq)); in tegra186_pmc_irq_set_wake()
2447 return 0; in tegra186_pmc_irq_set_wake()
2484 return 0; in tegra186_pmc_irq_set_type()
2527 return 0; in tegra_pmc_irq_init()
2537 pmc->domain = irq_domain_add_hierarchy(parent, 0, 96, pmc->dev->of_node, in tegra_pmc_irq_init()
2544 return 0; in tegra_pmc_irq_init()
2603 return 0; in pmc_clk_mux_set_parent()
2613 return val ? 1 : 0; in pmc_clk_is_enabled()
2632 return 0; in pmc_clk_enable()
2639 pmc_clk_set_state(clk->offs, clk->force_en_shift, 0); in pmc_clk_disable()
2682 return tegra_pmc_readl(pmc, gate->offs) & BIT(gate->shift) ? 1 : 0; in pmc_clk_gate_is_enabled()
2691 return 0; in pmc_clk_gate_enable()
2698 pmc_clk_set_state(gate->offs, gate->shift, 0); in pmc_clk_gate_disable()
2723 init.flags = 0; in tegra_pmc_clk_gate_register()
2758 for (i = 0; i < TEGRA_PMC_CLK_MAX; i++) in tegra_pmc_clock_register()
2761 for (i = 0; i < pmc->soc->num_pmc_clks; i++) { in tegra_pmc_clock_register()
2785 tegra_pmc_writel(pmc, 0x0, PMC_BLINK_TIMER); in tegra_pmc_clock_register()
2847 return 0; in tegra_pmc_regmap_readl()
2855 return 0; in tegra_pmc_regmap_writel()
2884 return 0; in tegra_pmc_regmap_init()
2907 if (err < 0) in tegra_pmc_probe()
2916 base = devm_platform_ioremap_resource(pdev, 0); in tegra_pmc_probe()
3009 if (err < 0) { in tegra_pmc_probe()
3023 if (err < 0) in tegra_pmc_probe()
3027 if (err < 0) in tegra_pmc_probe()
3031 if (err < 0) in tegra_pmc_probe()
3049 return 0; in tegra_pmc_probe()
3088 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_write_wake_levels()
3102 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3103 wke_write_wake_level(pmc, i, 0); in wke_read_sw_wake_status()
3112 * the polarity of the wake level from 0->1 while latching to force in wke_read_sw_wake_status()
3115 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3125 wke_32kwritel(pmc, 0, WAKE_LATCH_SW); in wke_read_sw_wake_status()
3129 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_read_sw_wake_status()
3143 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_clear_wake_status()
3148 wke_32kwritel(pmc, 0x1, WAKE_AOWAKE_STATUS_W((i * 32) + wake)); in wke_clear_wake_status()
3183 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in tegra186_pmc_wake_syscore_resume()
3207 return 0; in tegra186_pmc_wake_syscore_suspend()
3217 return 0; in tegra_pmc_suspend()
3224 tegra_pmc_writel(pmc, 0x0, PMC_SCRATCH41); in tegra_pmc_resume()
3226 return 0; in tegra_pmc_resume()
3244 .scratch0 = 0x50,
3245 .rst_status = 0x1b4,
3246 .rst_source_shift = 0x0,
3247 .rst_source_mask = 0x7,
3248 .rst_level_shift = 0x0,
3249 .rst_level_mask = 0x0,
3286 tegra_pmc_writel(pmc, ((osc << 8) & 0xff00) | (pmu & 0xff), in tegra20_pmc_init()
3312 .num_cpu_powergates = 0,
3319 .num_io_pads = 0,
3321 .num_pin_descs = 0,
3328 .num_reset_sources = 0,
3330 .num_reset_levels = 0,
3332 .num_pmc_clks = 0,
3380 .num_io_pads = 0,
3382 .num_pin_descs = 0,
3391 .num_reset_levels = 0,
3437 .num_io_pads = 0,
3439 .num_pin_descs = 0,
3448 .num_reset_levels = 0,
3505 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, UINT_MAX, "audio"),
3506 TEGRA_IO_PAD(TEGRA_IO_PAD_BB, 15, 0x1b8, 0x1bc, UINT_MAX, "bb"),
3507 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, UINT_MAX, "cam"),
3508 TEGRA_IO_PAD(TEGRA_IO_PAD_COMP, 22, 0x1b8, 0x1bc, UINT_MAX, "comp"),
3509 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3510 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3511 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3512 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3513 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3514 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3515 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3516 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3517 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3518 TEGRA_IO_PAD(TEGRA_IO_PAD_HV, 6, 0x1c0, 0x1c4, UINT_MAX, "hv"),
3519 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3520 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3521 TEGRA_IO_PAD(TEGRA_IO_PAD_NAND, 13, 0x1b8, 0x1bc, UINT_MAX, "nand"),
3522 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3523 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3524 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3525 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x1c0, 0x1c4, UINT_MAX, "pex-cntrl"),
3526 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, UINT_MAX, "sdmmc1"),
3527 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, UINT_MAX, "sdmmc3"),
3528 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 3, 0x1c0, 0x1c4, UINT_MAX, "sdmmc4"),
3529 TEGRA_IO_PAD(TEGRA_IO_PAD_SYS_DDC, 26, 0x1c0, 0x1c4, UINT_MAX, "sys_ddc"),
3530 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, UINT_MAX, "uart"),
3531 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3532 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3533 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3534 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb_bias"),
3592 .num_reset_levels = 0,
3634 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, 5, "audio"),
3635 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x1c0, 0x1c4, 18, "audio-hv"),
3636 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, 10, "cam"),
3637 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3638 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3639 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 10, 0x1c0, 0x1c4, UINT_MAX, "csic"),
3640 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 11, 0x1c0, 0x1c4, UINT_MAX, "csid"),
3641 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3642 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 13, 0x1c0, 0x1c4, UINT_MAX, "csif"),
3643 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x1b8, 0x1bc, 19, "dbg"),
3644 TEGRA_IO_PAD(TEGRA_IO_PAD_DEBUG_NONAO, 26, 0x1b8, 0x1bc, UINT_MAX, "debug-nonao"),
3645 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC, 18, 0x1c0, 0x1c4, 20, "dmic"),
3646 TEGRA_IO_PAD(TEGRA_IO_PAD_DP, 19, 0x1c0, 0x1c4, UINT_MAX, "dp"),
3647 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3648 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3649 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3650 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3651 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC, 3, 0x1c0, 0x1c4, UINT_MAX, "emmc"),
3652 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC2, 5, 0x1c0, 0x1c4, UINT_MAX, "emmc2"),
3653 TEGRA_IO_PAD(TEGRA_IO_PAD_GPIO, 27, 0x1b8, 0x1bc, 21, "gpio"),
3654 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3655 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3656 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3657 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3658 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3659 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3660 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3662 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, 12, "sdmmc1"),
3663 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, 13, "sdmmc3"),
3664 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 14, 0x1c0, 0x1c4, 22, "spi"),
3665 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI_HV, 15, 0x1c0, 0x1c4, 23, "spi-hv"),
3666 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, 2, "uart"),
3667 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3668 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3669 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3670 TEGRA_IO_PAD(TEGRA_IO_PAD_USB3, 18, 0x1b8, 0x1bc, UINT_MAX, "usb3"),
3671 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb-bias"),
3753 .num_reset_levels = 0,
3763 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3764 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3765 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x74, 0x78, UINT_MAX, "dsi"),
3766 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3767 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3768 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3769 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3770 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3771 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x74, 0x78, UINT_MAX, "usb0"),
3772 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x74, 0x78, UINT_MAX, "usb1"),
3773 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x74, 0x78, UINT_MAX, "usb2"),
3774 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x74, 0x78, UINT_MAX, "usb-bias"),
3775 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3776 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3777 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x74, 0x78, UINT_MAX, "hsic"),
3778 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3779 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3780 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3781 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3782 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC2_HV, 2, 0x7c, 0x80, 5, "sdmmc2-hv"),
3783 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3784 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3785 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 8, 0x7c, 0x80, UINT_MAX, "dsib"),
3786 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 9, 0x7c, 0x80, UINT_MAX, "dsic"),
3787 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 10, 0x7c, 0x80, UINT_MAX, "dsid"),
3788 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3789 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3790 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3791 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3792 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
3793 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
3794 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC_HV, 20, 0x7c, 0x80, 2, "dmic-hv"),
3795 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
3796 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
3797 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
3798 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
3799 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
3800 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
3845 .scratch0 = 0x2000,
3846 .rst_status = 0x70,
3847 .rst_source_shift = 0x2,
3848 .rst_source_mask = 0x3c,
3849 .rst_level_shift = 0x0,
3850 .rst_level_mask = 0x3,
3871 if (index < 0) { in tegra186_pmc_setup_irq_polarity()
3920 TEGRA_WAKE_GPIO("power", 29, 1, TEGRA186_AON_GPIO(FF, 0)),
3926 .num_powergates = 0,
3928 .num_cpu_powergates = 0,
3954 .num_pmc_clks = 0,
3960 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3961 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3962 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3963 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3964 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3965 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3966 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3967 TEGRA_IO_PAD(TEGRA_IO_PAD_EQOS, 8, 0x74, 0x78, UINT_MAX, "eqos"),
3968 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2_BIAS, 9, 0x74, 0x78, UINT_MAX, "pex-clk-2-bias"),
3969 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2, 10, 0x74, 0x78, UINT_MAX, "pex-clk-2"),
3970 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP3, 11, 0x74, 0x78, UINT_MAX, "dap3"),
3971 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP5, 12, 0x74, 0x78, UINT_MAX, "dap5"),
3972 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3973 TEGRA_IO_PAD(TEGRA_IO_PAD_PWR_CTL, 15, 0x74, 0x78, UINT_MAX, "pwr-ctl"),
3974 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO53, 16, 0x74, 0x78, UINT_MAX, "soc-gpio53"),
3975 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3976 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM2, 18, 0x74, 0x78, UINT_MAX, "gp-pwm2"),
3977 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM3, 19, 0x74, 0x78, UINT_MAX, "gp-pwm3"),
3978 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO12, 20, 0x74, 0x78, UINT_MAX, "soc-gpio12"),
3979 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO13, 21, 0x74, 0x78, UINT_MAX, "soc-gpio13"),
3980 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO10, 22, 0x74, 0x78, UINT_MAX, "soc-gpio10"),
3981 TEGRA_IO_PAD(TEGRA_IO_PAD_UART4, 23, 0x74, 0x78, UINT_MAX, "uart4"),
3982 TEGRA_IO_PAD(TEGRA_IO_PAD_UART5, 24, 0x74, 0x78, UINT_MAX, "uart5"),
3983 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3984 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP3, 26, 0x74, 0x78, UINT_MAX, "hdmi-dp3"),
3985 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP2, 27, 0x74, 0x78, UINT_MAX, "hdmi-dp2"),
3986 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3987 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3988 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3989 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CTL2, 1, 0x7c, 0x80, UINT_MAX, "pex-ctl2"),
3990 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L0_RST, 2, 0x7c, 0x80, UINT_MAX, "pex-l0-rst"),
3991 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L1_RST, 3, 0x7c, 0x80, UINT_MAX, "pex-l1-rst"),
3992 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3993 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L5_RST, 5, 0x7c, 0x80, UINT_MAX, "pex-l5-rst"),
3994 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3995 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3996 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3997 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3998 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3999 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
4000 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
4001 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 18, 0x7c, 0x80, UINT_MAX, "csig"),
4002 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 19, 0x7c, 0x80, UINT_MAX, "csih"),
4003 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
4004 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
4005 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
4006 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
4007 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
4008 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4064 .scratch0 = 0x2000,
4065 .rst_status = 0x70,
4066 .rst_source_shift = 0x2,
4067 .rst_source_mask = 0x7c,
4068 .rst_level_shift = 0x0,
4069 .rst_level_mask = 0x3,
4100 TEGRA_WAKE_SIMPLE("usb3-port-0", 76),
4103 TEGRA_WAKE_SIMPLE("usb2-port-0", 79),
4111 .num_powergates = 0,
4113 .num_cpu_powergates = 0,
4139 .num_pmc_clks = 0,
4145 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0xe0c0, 0xe0c4, UINT_MAX, "csia"),
4146 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0xe0c0, 0xe0c4, UINT_MAX, "csib"),
4147 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 0, 0xe0d0, 0xe0d4, UINT_MAX, "hdmi-dp0"),
4148 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 2, 0xe0c0, 0xe0c4, UINT_MAX, "csic"),
4149 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 3, 0xe0c0, 0xe0c4, UINT_MAX, "csid"),
4150 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 4, 0xe0c0, 0xe0c4, UINT_MAX, "csie"),
4151 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 5, 0xe0c0, 0xe0c4, UINT_MAX, "csif"),
4152 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 0, 0xe064, 0xe068, UINT_MAX, "ufs"),
4153 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 1, 0xe05c, 0xe060, UINT_MAX, "edp"),
4154 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 0, 0xe054, 0xe058, 4, "sdmmc1-hv"),
4157 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4158 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 6, 0xe0c0, 0xe0c4, UINT_MAX, "csig"),
4159 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 7, 0xe0c0, 0xe0c4, UINT_MAX, "csih"),
4181 .scratch0 = 0x2000,
4182 .rst_status = 0x70,
4183 .rst_source_shift = 0x2,
4184 .rst_source_mask = 0xfc,
4185 .rst_level_shift = 0x0,
4186 .rst_level_mask = 0x3,
4190 "SYS_RESET_N", /* 0x0 */
4198 "SENSOR", /* 0x8 */
4206 NULL, /* 0x10 */
4214 "CSITE_SW", /* 0x18 */
4222 "FSI_R52C0WDT", /* 0x20 */
4227 "FSI_VMON", /* 0x25 */
4233 TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
4240 .num_powergates = 0,
4242 .num_cpu_powergates = 0,
4268 .num_pmc_clks = 0,
4335 value = saved ^ 0xffffffff; in tegra_pmc_detect_tz_only()
4337 if (value == 0xffffffff) in tegra_pmc_detect_tz_only()
4338 value = 0xdeadbeef; in tegra_pmc_detect_tz_only()
4345 if (value == 0) { in tegra_pmc_detect_tz_only()
4385 regs.start = 0x7000e400; in tegra_pmc_early_init()
4386 regs.end = 0x7000e7ff; in tegra_pmc_early_init()
4395 return 0; in tegra_pmc_early_init()
4402 if (of_address_to_resource(np, 0, &regs) < 0) { in tegra_pmc_early_init()
4423 for (i = 0; i < pmc->soc->num_powergates; i++) in tegra_pmc_early_init()
4438 return 0; in tegra_pmc_early_init()