Lines Matching +full:0 +full:x1c4

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()
1428 return 0; in tegra_pmc_core_pd_add()
1441 int err = 0; in tegra_powergate_init()
1457 return 0; in tegra_powergate_init()
1461 if (err < 0) { in tegra_powergate_init()
1468 0, &parent_args)) in tegra_powergate_init()
1472 child_args.args_count = 0; in tegra_powergate_init()
1536 for (i = 0; i < pmc->soc->num_io_pads; i++) in tegra_io_pad_find()
1573 return 0; in tegra_io_pad_prepare()
1586 return 0; in tegra_io_pad_poll()
1604 * Returns: 0 on success or a negative error code on failure.
1622 if (err < 0) { in tegra_io_pad_power_enable()
1629 err = tegra_io_pad_poll(pmc, status, mask, 0, 250); in tegra_io_pad_power_enable()
1630 if (err < 0) { in tegra_io_pad_power_enable()
1647 * Returns: 0 on success or a negative error code on failure.
1665 if (err < 0) { in tegra_io_pad_power_disable()
1673 if (err < 0) { in tegra_io_pad_power_disable()
1754 return 0; in tegra_io_pad_set_voltage()
1774 if ((value & BIT(pad->voltage)) == 0) in tegra_io_pad_get_voltage()
1820 unsigned long long rate = 0; in tegra_pmc_enter_suspend_mode()
1837 if (WARN_ON_ONCE(rate == 0)) in tegra_pmc_enter_suspend_mode()
1863 case 0: in tegra_pmc_parse_dt()
1897 pmc->core_osc_time = values[0]; in tegra_pmc_parse_dt()
1922 pmc->lp0_vec_phys = values[0]; in tegra_pmc_parse_dt()
1925 return 0; in tegra_pmc_parse_dt()
1930 if (pmc->soc->max_wake_events > 0) { in tegra_pmc_init()
1951 return 0; in tegra_pmc_init()
1992 pinmux = 0; in tegra_pmc_init_tsense_reset()
2011 checksum = reg_addr + reg_data + (value & 0xff) + ((value >> 8) & 0xff) in tegra_pmc_init_tsense_reset()
2012 + ((value >> 24) & 0xff); in tegra_pmc_init_tsense_reset()
2013 checksum &= 0xff; in tegra_pmc_init_tsense_reset()
2014 checksum = 0x100 - checksum; in tegra_pmc_init_tsense_reset()
2055 return 0; in tegra_io_pad_pinctrl_get_group_pins()
2082 if (ret < 0) in tegra_io_pad_pinconf_get()
2090 if (ret < 0) in tegra_io_pad_pinconf_get()
2102 return 0; in tegra_io_pad_pinconf_get()
2120 for (i = 0; i < num_configs; ++i) { in tegra_io_pad_pinconf_set()
2146 return 0; in tegra_io_pad_pinconf_set()
2165 return 0; in tegra_pmc_pinctrl_init()
2180 return 0; in tegra_pmc_pinctrl_init()
2220 int err = 0; in tegra_pmc_reset_sysfs_init()
2224 if (err < 0) in tegra_pmc_reset_sysfs_init()
2232 if (err < 0) in tegra_pmc_reset_sysfs_init()
2247 *hwirq = fwspec->param[0]; in tegra_pmc_irq_translate()
2250 return 0; in tegra_pmc_irq_translate()
2260 int err = 0; in tegra_pmc_irq_alloc()
2265 for (i = 0; i < soc->num_wake_events; i++) { in tegra_pmc_irq_alloc()
2272 if (event->id != fwspec->param[0]) in tegra_pmc_irq_alloc()
2278 if (err < 0) in tegra_pmc_irq_alloc()
2282 if (event->irq == 0) { in tegra_pmc_irq_alloc()
2289 spec.param[0] = GIC_SPI; in tegra_pmc_irq_alloc()
2301 if (event->gpio.instance != fwspec->param[0] || in tegra_pmc_irq_alloc()
2339 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2340 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2342 tegra_pmc_writel(pmc, 0, PMC_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2343 tegra_pmc_writel(pmc, 0, PMC_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2360 return 0; in tegra210_pmc_irq_set_wake()
2400 return 0; in tegra210_pmc_irq_set_type()
2411 dev_dbg(pmc->dev, "WAKE_AOWAKE_CNTRL_83 = 0x%x\n", value); in tegra186_pmc_set_wake_filters()
2424 writel(0x1, pmc->wake + WAKE_AOWAKE_STATUS_W(data->hwirq)); in tegra186_pmc_irq_set_wake()
2439 return 0; in tegra186_pmc_irq_set_wake()
2476 return 0; in tegra186_pmc_irq_set_type()
2519 return 0; in tegra_pmc_irq_init()
2529 pmc->domain = irq_domain_add_hierarchy(parent, 0, 96, pmc->dev->of_node, in tegra_pmc_irq_init()
2536 return 0; in tegra_pmc_irq_init()
2595 return 0; in pmc_clk_mux_set_parent()
2605 return val ? 1 : 0; in pmc_clk_is_enabled()
2624 return 0; in pmc_clk_enable()
2631 pmc_clk_set_state(clk->offs, clk->force_en_shift, 0); in pmc_clk_disable()
2674 return tegra_pmc_readl(pmc, gate->offs) & BIT(gate->shift) ? 1 : 0; in pmc_clk_gate_is_enabled()
2683 return 0; in pmc_clk_gate_enable()
2690 pmc_clk_set_state(gate->offs, gate->shift, 0); in pmc_clk_gate_disable()
2715 init.flags = 0; in tegra_pmc_clk_gate_register()
2750 for (i = 0; i < TEGRA_PMC_CLK_MAX; i++) in tegra_pmc_clock_register()
2753 for (i = 0; i < pmc->soc->num_pmc_clks; i++) { in tegra_pmc_clock_register()
2777 tegra_pmc_writel(pmc, 0x0, PMC_BLINK_TIMER); in tegra_pmc_clock_register()
2839 return 0; in tegra_pmc_regmap_readl()
2847 return 0; in tegra_pmc_regmap_writel()
2876 return 0; in tegra_pmc_regmap_init()
2899 if (err < 0) in tegra_pmc_probe()
2908 base = devm_platform_ioremap_resource(pdev, 0); in tegra_pmc_probe()
3001 if (err < 0) { in tegra_pmc_probe()
3015 if (err < 0) in tegra_pmc_probe()
3019 if (err < 0) in tegra_pmc_probe()
3023 if (err < 0) in tegra_pmc_probe()
3041 return 0; in tegra_pmc_probe()
3080 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_write_wake_levels()
3094 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3095 wke_write_wake_level(pmc, i, 0); in wke_read_sw_wake_status()
3104 * the polarity of the wake level from 0->1 while latching to force in wke_read_sw_wake_status()
3107 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3117 wke_32kwritel(pmc, 0, WAKE_LATCH_SW); in wke_read_sw_wake_status()
3121 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_read_sw_wake_status()
3135 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_clear_wake_status()
3140 wke_32kwritel(pmc, 0x1, WAKE_AOWAKE_STATUS_W((i * 32) + wake)); in wke_clear_wake_status()
3175 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in tegra186_pmc_wake_syscore_resume()
3199 return 0; in tegra186_pmc_wake_syscore_suspend()
3209 return 0; in tegra_pmc_suspend()
3216 tegra_pmc_writel(pmc, 0x0, PMC_SCRATCH41); in tegra_pmc_resume()
3218 return 0; in tegra_pmc_resume()
3236 .scratch0 = 0x50,
3237 .rst_status = 0x1b4,
3238 .rst_source_shift = 0x0,
3239 .rst_source_mask = 0x7,
3240 .rst_level_shift = 0x0,
3241 .rst_level_mask = 0x0,
3278 tegra_pmc_writel(pmc, ((osc << 8) & 0xff00) | (pmu & 0xff), in tegra20_pmc_init()
3304 .num_cpu_powergates = 0,
3311 .num_io_pads = 0,
3313 .num_pin_descs = 0,
3320 .num_reset_sources = 0,
3322 .num_reset_levels = 0,
3324 .num_pmc_clks = 0,
3372 .num_io_pads = 0,
3374 .num_pin_descs = 0,
3383 .num_reset_levels = 0,
3429 .num_io_pads = 0,
3431 .num_pin_descs = 0,
3440 .num_reset_levels = 0,
3497 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, UINT_MAX, "audio"),
3498 TEGRA_IO_PAD(TEGRA_IO_PAD_BB, 15, 0x1b8, 0x1bc, UINT_MAX, "bb"),
3499 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, UINT_MAX, "cam"),
3500 TEGRA_IO_PAD(TEGRA_IO_PAD_COMP, 22, 0x1b8, 0x1bc, UINT_MAX, "comp"),
3501 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3502 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3503 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3504 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3505 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3506 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3507 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3508 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3509 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3510 TEGRA_IO_PAD(TEGRA_IO_PAD_HV, 6, 0x1c0, 0x1c4, UINT_MAX, "hv"),
3511 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3512 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3513 TEGRA_IO_PAD(TEGRA_IO_PAD_NAND, 13, 0x1b8, 0x1bc, UINT_MAX, "nand"),
3514 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3515 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3516 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3517 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x1c0, 0x1c4, UINT_MAX, "pex-cntrl"),
3518 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, UINT_MAX, "sdmmc1"),
3519 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, UINT_MAX, "sdmmc3"),
3520 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 3, 0x1c0, 0x1c4, UINT_MAX, "sdmmc4"),
3521 TEGRA_IO_PAD(TEGRA_IO_PAD_SYS_DDC, 26, 0x1c0, 0x1c4, UINT_MAX, "sys_ddc"),
3522 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, UINT_MAX, "uart"),
3523 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3524 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3525 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3526 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb_bias"),
3584 .num_reset_levels = 0,
3626 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, 5, "audio"),
3627 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x1c0, 0x1c4, 18, "audio-hv"),
3628 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, 10, "cam"),
3629 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3630 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3631 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 10, 0x1c0, 0x1c4, UINT_MAX, "csic"),
3632 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 11, 0x1c0, 0x1c4, UINT_MAX, "csid"),
3633 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3634 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 13, 0x1c0, 0x1c4, UINT_MAX, "csif"),
3635 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x1b8, 0x1bc, 19, "dbg"),
3636 TEGRA_IO_PAD(TEGRA_IO_PAD_DEBUG_NONAO, 26, 0x1b8, 0x1bc, UINT_MAX, "debug-nonao"),
3637 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC, 18, 0x1c0, 0x1c4, 20, "dmic"),
3638 TEGRA_IO_PAD(TEGRA_IO_PAD_DP, 19, 0x1c0, 0x1c4, UINT_MAX, "dp"),
3639 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3640 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3641 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3642 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3643 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC, 3, 0x1c0, 0x1c4, UINT_MAX, "emmc"),
3644 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC2, 5, 0x1c0, 0x1c4, UINT_MAX, "emmc2"),
3645 TEGRA_IO_PAD(TEGRA_IO_PAD_GPIO, 27, 0x1b8, 0x1bc, 21, "gpio"),
3646 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3647 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3648 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3649 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3650 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3651 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3652 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3654 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, 12, "sdmmc1"),
3655 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, 13, "sdmmc3"),
3656 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 14, 0x1c0, 0x1c4, 22, "spi"),
3657 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI_HV, 15, 0x1c0, 0x1c4, 23, "spi-hv"),
3658 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, 2, "uart"),
3659 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3660 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3661 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3662 TEGRA_IO_PAD(TEGRA_IO_PAD_USB3, 18, 0x1b8, 0x1bc, UINT_MAX, "usb3"),
3663 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb-bias"),
3745 .num_reset_levels = 0,
3755 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3756 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3757 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x74, 0x78, UINT_MAX, "dsi"),
3758 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3759 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3760 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3761 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3762 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3763 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x74, 0x78, UINT_MAX, "usb0"),
3764 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x74, 0x78, UINT_MAX, "usb1"),
3765 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x74, 0x78, UINT_MAX, "usb2"),
3766 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x74, 0x78, UINT_MAX, "usb-bias"),
3767 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3768 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3769 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x74, 0x78, UINT_MAX, "hsic"),
3770 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3771 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3772 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3773 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3774 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC2_HV, 2, 0x7c, 0x80, 5, "sdmmc2-hv"),
3775 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3776 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3777 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 8, 0x7c, 0x80, UINT_MAX, "dsib"),
3778 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 9, 0x7c, 0x80, UINT_MAX, "dsic"),
3779 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 10, 0x7c, 0x80, UINT_MAX, "dsid"),
3780 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3781 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3782 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3783 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3784 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
3785 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
3786 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC_HV, 20, 0x7c, 0x80, 2, "dmic-hv"),
3787 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
3788 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
3789 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
3790 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
3791 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
3792 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
3837 .scratch0 = 0x2000,
3838 .rst_status = 0x70,
3839 .rst_source_shift = 0x2,
3840 .rst_source_mask = 0x3c,
3841 .rst_level_shift = 0x0,
3842 .rst_level_mask = 0x3,
3863 if (index < 0) { in tegra186_pmc_setup_irq_polarity()
3912 TEGRA_WAKE_GPIO("power", 29, 1, TEGRA186_AON_GPIO(FF, 0)),
3918 .num_powergates = 0,
3920 .num_cpu_powergates = 0,
3946 .num_pmc_clks = 0,
3952 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3953 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3954 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3955 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3956 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3957 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3958 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3959 TEGRA_IO_PAD(TEGRA_IO_PAD_EQOS, 8, 0x74, 0x78, UINT_MAX, "eqos"),
3960 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2_BIAS, 9, 0x74, 0x78, UINT_MAX, "pex-clk-2-bias"),
3961 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2, 10, 0x74, 0x78, UINT_MAX, "pex-clk-2"),
3962 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP3, 11, 0x74, 0x78, UINT_MAX, "dap3"),
3963 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP5, 12, 0x74, 0x78, UINT_MAX, "dap5"),
3964 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3965 TEGRA_IO_PAD(TEGRA_IO_PAD_PWR_CTL, 15, 0x74, 0x78, UINT_MAX, "pwr-ctl"),
3966 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO53, 16, 0x74, 0x78, UINT_MAX, "soc-gpio53"),
3967 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3968 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM2, 18, 0x74, 0x78, UINT_MAX, "gp-pwm2"),
3969 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM3, 19, 0x74, 0x78, UINT_MAX, "gp-pwm3"),
3970 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO12, 20, 0x74, 0x78, UINT_MAX, "soc-gpio12"),
3971 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO13, 21, 0x74, 0x78, UINT_MAX, "soc-gpio13"),
3972 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO10, 22, 0x74, 0x78, UINT_MAX, "soc-gpio10"),
3973 TEGRA_IO_PAD(TEGRA_IO_PAD_UART4, 23, 0x74, 0x78, UINT_MAX, "uart4"),
3974 TEGRA_IO_PAD(TEGRA_IO_PAD_UART5, 24, 0x74, 0x78, UINT_MAX, "uart5"),
3975 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3976 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP3, 26, 0x74, 0x78, UINT_MAX, "hdmi-dp3"),
3977 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP2, 27, 0x74, 0x78, UINT_MAX, "hdmi-dp2"),
3978 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3979 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3980 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3981 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CTL2, 1, 0x7c, 0x80, UINT_MAX, "pex-ctl2"),
3982 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L0_RST, 2, 0x7c, 0x80, UINT_MAX, "pex-l0-rst"),
3983 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L1_RST, 3, 0x7c, 0x80, UINT_MAX, "pex-l1-rst"),
3984 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3985 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L5_RST, 5, 0x7c, 0x80, UINT_MAX, "pex-l5-rst"),
3986 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3987 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3988 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3989 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3990 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3991 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
3992 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
3993 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 18, 0x7c, 0x80, UINT_MAX, "csig"),
3994 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 19, 0x7c, 0x80, UINT_MAX, "csih"),
3995 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
3996 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
3997 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
3998 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
3999 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
4000 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4056 .scratch0 = 0x2000,
4057 .rst_status = 0x70,
4058 .rst_source_shift = 0x2,
4059 .rst_source_mask = 0x7c,
4060 .rst_level_shift = 0x0,
4061 .rst_level_mask = 0x3,
4092 TEGRA_WAKE_SIMPLE("usb3-port-0", 76),
4095 TEGRA_WAKE_SIMPLE("usb2-port-0", 79),
4103 .num_powergates = 0,
4105 .num_cpu_powergates = 0,
4131 .num_pmc_clks = 0,
4137 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0xe0c0, 0xe0c4, UINT_MAX, "csia"),
4138 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0xe0c0, 0xe0c4, UINT_MAX, "csib"),
4139 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 0, 0xe0d0, 0xe0d4, UINT_MAX, "hdmi-dp0"),
4140 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 2, 0xe0c0, 0xe0c4, UINT_MAX, "csic"),
4141 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 3, 0xe0c0, 0xe0c4, UINT_MAX, "csid"),
4142 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 4, 0xe0c0, 0xe0c4, UINT_MAX, "csie"),
4143 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 5, 0xe0c0, 0xe0c4, UINT_MAX, "csif"),
4144 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 0, 0xe064, 0xe068, UINT_MAX, "ufs"),
4145 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 1, 0xe05c, 0xe060, UINT_MAX, "edp"),
4146 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 0, 0xe054, 0xe058, 4, "sdmmc1-hv"),
4149 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4150 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 6, 0xe0c0, 0xe0c4, UINT_MAX, "csig"),
4151 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 7, 0xe0c0, 0xe0c4, UINT_MAX, "csih"),
4173 .scratch0 = 0x2000,
4174 .rst_status = 0x70,
4175 .rst_source_shift = 0x2,
4176 .rst_source_mask = 0xfc,
4177 .rst_level_shift = 0x0,
4178 .rst_level_mask = 0x3,
4182 "SYS_RESET_N", /* 0x0 */
4190 "SENSOR", /* 0x8 */
4198 NULL, /* 0x10 */
4206 "CSITE_SW", /* 0x18 */
4214 "FSI_R52C0WDT", /* 0x20 */
4219 "FSI_VMON", /* 0x25 */
4225 TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
4232 .num_powergates = 0,
4234 .num_cpu_powergates = 0,
4260 .num_pmc_clks = 0,
4327 value = saved ^ 0xffffffff; in tegra_pmc_detect_tz_only()
4329 if (value == 0xffffffff) in tegra_pmc_detect_tz_only()
4330 value = 0xdeadbeef; in tegra_pmc_detect_tz_only()
4337 if (value == 0) { in tegra_pmc_detect_tz_only()
4377 regs.start = 0x7000e400; in tegra_pmc_early_init()
4378 regs.end = 0x7000e7ff; in tegra_pmc_early_init()
4387 return 0; in tegra_pmc_early_init()
4394 if (of_address_to_resource(np, 0, &regs) < 0) { in tegra_pmc_early_init()
4415 for (i = 0; i < pmc->soc->num_powergates; i++) in tegra_pmc_early_init()
4430 return 0; in tegra_pmc_early_init()