Lines Matching +full:0 +full:x1c0

64 #define PMC_CNTRL			0x0
75 #define PMC_WAKE_MASK 0x0c
76 #define PMC_WAKE_LEVEL 0x10
77 #define PMC_WAKE_STATUS 0x14
78 #define PMC_SW_WAKE_STATUS 0x18
79 #define PMC_DPD_PADS_ORIDE 0x1c
82 #define DPD_SAMPLE 0x020
83 #define DPD_SAMPLE_ENABLE BIT(0)
84 #define DPD_SAMPLE_DISABLE (0 << 0)
86 #define PWRGATE_TOGGLE 0x30
89 #define REMOVE_CLAMPING 0x34
91 #define PWRGATE_STATUS 0x38
93 #define PMC_BLINK_TIMER 0x40
94 #define PMC_IMPL_E_33V_PWR 0x40
96 #define PMC_PWR_DET 0x48
105 #define PMC_CPUPWRGOOD_TIMER 0xc8
106 #define PMC_CPUPWROFF_TIMER 0xcc
107 #define PMC_COREPWRGOOD_TIMER 0x3c
108 #define PMC_COREPWROFF_TIMER 0xe0
110 #define PMC_PWR_DET_VALUE 0xe4
112 #define PMC_USB_DEBOUNCE_DEL 0xec
113 #define PMC_USB_AO 0xf0
115 #define PMC_SCRATCH37 0x130
116 #define PMC_SCRATCH41 0x140
118 #define PMC_WAKE2_MASK 0x160
119 #define PMC_WAKE2_LEVEL 0x164
120 #define PMC_WAKE2_STATUS 0x168
121 #define PMC_SW_WAKE2_STATUS 0x16c
123 #define PMC_CLK_OUT_CNTRL 0x1a8
124 #define PMC_CLK_OUT_MUX_MASK GENMASK(1, 0)
125 #define PMC_SENSOR_CTRL 0x1b0
129 #define PMC_RST_STATUS_POR 0
136 #define IO_DPD_REQ 0x1b8
137 #define IO_DPD_REQ_CODE_IDLE (0U << 30)
142 #define IO_DPD_STATUS 0x1bc
143 #define IO_DPD2_REQ 0x1c0
144 #define IO_DPD2_STATUS 0x1c4
145 #define SEL_DPD_TIM 0x1c8
147 #define PMC_UTMIP_UHSIC_TRIGGERS 0x1ec
148 #define PMC_UTMIP_UHSIC_SAVED_STATE 0x1f0
150 #define PMC_UTMIP_TERM_PAD_CFG 0x1f8
151 #define PMC_UTMIP_UHSIC_SLEEP_CFG 0x1fc
152 #define PMC_UTMIP_UHSIC_FAKE 0x218
154 #define PMC_SCRATCH54 0x258
156 #define PMC_SCRATCH54_ADDR_SHIFT 0
158 #define PMC_SCRATCH55 0x25c
164 #define PMC_SCRATCH55_I2CSLV1_SHIFT 0
166 #define PMC_UTMIP_UHSIC_LINE_WAKEUP 0x26c
168 #define PMC_UTMIP_BIAS_MASTER_CNTRL 0x270
169 #define PMC_UTMIP_MASTER_CONFIG 0x274
170 #define PMC_UTMIP_UHSIC2_TRIGGERS 0x27c
171 #define PMC_UTMIP_MASTER2_CONFIG 0x29c
173 #define GPU_RG_CNTRL 0x2d4
175 #define PMC_UTMIP_PAD_CFG0 0x4c0
176 #define PMC_UTMIP_UHSIC_SLEEP_CFG1 0x4d0
177 #define PMC_UTMIP_SLEEPWALK_P3 0x4e0
179 #define WAKE_AOWAKE_CNTRL(x) (0x000 + ((x) << 2))
182 #define WAKE_AOWAKE_MASK_W(x) (0x180 + ((x) << 2))
183 #define WAKE_AOWAKE_MASK_R(x) (0x300 + ((x) << 2))
184 #define WAKE_AOWAKE_STATUS_W(x) (0x30c + ((x) << 2))
185 #define WAKE_AOWAKE_STATUS_R(x) (0x48c + ((x) << 2))
186 #define WAKE_AOWAKE_TIER0_ROUTING(x) (0x4b4 + ((x) << 2))
187 #define WAKE_AOWAKE_TIER1_ROUTING(x) (0x4c0 + ((x) << 2))
188 #define WAKE_AOWAKE_TIER2_ROUTING(x) (0x4cc + ((x) << 2))
189 #define WAKE_AOWAKE_SW_STATUS_W_0 0x49c
190 #define WAKE_AOWAKE_SW_STATUS(x) (0x4a0 + ((x) << 2))
191 #define WAKE_LATCH_SW 0x498
193 #define WAKE_AOWAKE_CTRL 0x4f4
194 #define WAKE_AOWAKE_CTRL_INTR_POLARITY BIT(0)
199 #define TEGRA_SMC_PMC 0xc2fffe00
200 #define TEGRA_SMC_PMC_READ 0xaa
201 #define TEGRA_SMC_PMC_WRITE 0xbb
310 .irq = 0, \
332 .irq = 0, \
490 arm_smccc_smc(TEGRA_SMC_PMC, TEGRA_SMC_PMC_READ, offset, 0, 0, in tegra_pmc_readl()
491 0, 0, 0, &res); in tegra_pmc_readl()
514 value, 0, 0, 0, 0, &res); in tegra_pmc_writel()
553 return (tegra_pmc_readl(pmc, GPU_RG_CNTRL) & 0x1) == 0; in tegra_powergate_state()
555 return (tegra_pmc_readl(pmc, PWRGATE_STATUS) & BIT(id)) != 0; in tegra_powergate_state()
575 for (i = 0; i < pmc->soc->num_powergates; i++) { in tegra_powergate_lookup()
640 return 0; in tegra114_powergate_set()
661 return 0; in tegra_powergate_set()
684 tegra_pmc_writel(pmc, 0, GPU_RG_CNTRL); in __tegra_powergate_remove_clamping()
705 return 0; in __tegra_powergate_remove_clamping()
714 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_prepare_clocks()
736 return 0; in tegra_powergate_prepare_clocks()
750 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_unprepare_clocks()
756 return 0; in tegra_powergate_unprepare_clocks()
763 for (i = 0; i < pg->num_clks; i++) in tegra_powergate_disable_clocks()
772 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_enable_clocks()
778 return 0; in tegra_powergate_enable_clocks()
799 if (err < 0) in tegra_powergate_power_up()
838 return 0; in tegra_powergate_power_up()
885 return 0; in tegra_powergate_power_down()
928 if (err < 0) { in tegra_genpd_power_off()
1067 if (id < 0) in tegra_pmc_cpu_is_powered()
1082 if (id < 0) in tegra_pmc_cpu_power_on()
1097 if (id < 0) in tegra_pmc_cpu_remove_clamping()
1111 if (strcmp(cmd, "recovery") == 0) in tegra_pmc_program_reboot_reason()
1114 if (strcmp(cmd, "bootloader") == 0) in tegra_pmc_program_reboot_reason()
1117 if (strcmp(cmd, "forced-recovery") == 0) in tegra_pmc_program_reboot_reason()
1162 const u32 go_to_charger_mode = 0xa5a55a5a; in tegra_pmc_power_off_handler()
1179 for (i = 0; i < pmc->soc->num_powergates; i++) { in powergate_show()
1181 if (status < 0) in powergate_show()
1188 return 0; in powergate_show()
1201 if (count == 0) in tegra_powergate_of_get_clks()
1214 for (i = 0; i < count; i++) { in tegra_powergate_of_get_clks()
1224 return 0; in tegra_powergate_of_get_clks()
1250 if (err < 0) { in tegra_powergate_of_get_resets()
1259 if (err < 0) in tegra_powergate_of_get_resets()
1278 int id, err = 0; in tegra_powergate_add()
1286 if (id < 0) { in tegra_powergate_add()
1307 if (err < 0) { in tegra_powergate_add()
1313 if (err < 0) { in tegra_powergate_add()
1326 if (err < 0) { in tegra_powergate_add()
1333 if (err < 0) { in tegra_powergate_add()
1341 return 0; in tegra_powergate_add()
1395 return 0; in tegra_pmc_core_pd_set_performance_state()
1430 return 0; in tegra_pmc_core_pd_add()
1443 int err = 0; in tegra_powergate_init()
1459 return 0; in tegra_powergate_init()
1463 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()
1534 for (i = 0; i < pmc->soc->num_io_pads; i++) in tegra_io_pad_find()
1571 return 0; in tegra_io_pad_prepare()
1584 return 0; in tegra_io_pad_poll()
1602 * Returns: 0 on success or a negative error code on failure.
1620 if (err < 0) { in tegra_io_pad_power_enable()
1627 err = tegra_io_pad_poll(pmc, status, mask, 0, 250); in tegra_io_pad_power_enable()
1628 if (err < 0) { in tegra_io_pad_power_enable()
1645 * Returns: 0 on success or a negative error code on failure.
1663 if (err < 0) { in tegra_io_pad_power_disable()
1671 if (err < 0) { in tegra_io_pad_power_disable()
1752 return 0; in tegra_io_pad_set_voltage()
1772 if ((value & BIT(pad->voltage)) == 0) in tegra_io_pad_get_voltage()
1794 unsigned long long rate = 0; in tegra_pmc_enter_suspend_mode()
1811 if (WARN_ON_ONCE(rate == 0)) in tegra_pmc_enter_suspend_mode()
1837 case 0: in tegra_pmc_parse_dt()
1871 pmc->core_osc_time = values[0]; in tegra_pmc_parse_dt()
1896 pmc->lp0_vec_phys = values[0]; in tegra_pmc_parse_dt()
1899 return 0; in tegra_pmc_parse_dt()
1904 if (pmc->soc->max_wake_events > 0) { in tegra_pmc_init()
1925 return 0; in tegra_pmc_init()
1966 pinmux = 0; in tegra_pmc_init_tsense_reset()
1985 checksum = reg_addr + reg_data + (value & 0xff) + ((value >> 8) & 0xff) in tegra_pmc_init_tsense_reset()
1986 + ((value >> 24) & 0xff); in tegra_pmc_init_tsense_reset()
1987 checksum &= 0xff; in tegra_pmc_init_tsense_reset()
1988 checksum = 0x100 - checksum; in tegra_pmc_init_tsense_reset()
2029 return 0; in tegra_io_pad_pinctrl_get_group_pins()
2056 if (ret < 0) in tegra_io_pad_pinconf_get()
2064 if (ret < 0) in tegra_io_pad_pinconf_get()
2076 return 0; in tegra_io_pad_pinconf_get()
2094 for (i = 0; i < num_configs; ++i) { in tegra_io_pad_pinconf_set()
2120 return 0; in tegra_io_pad_pinconf_set()
2139 return 0; in tegra_pmc_pinctrl_init()
2154 return 0; in tegra_pmc_pinctrl_init()
2194 int err = 0; in tegra_pmc_reset_sysfs_init()
2198 if (err < 0) in tegra_pmc_reset_sysfs_init()
2206 if (err < 0) in tegra_pmc_reset_sysfs_init()
2221 *hwirq = fwspec->param[0]; in tegra_pmc_irq_translate()
2224 return 0; in tegra_pmc_irq_translate()
2234 int err = 0; in tegra_pmc_irq_alloc()
2239 for (i = 0; i < soc->num_wake_events; i++) { in tegra_pmc_irq_alloc()
2246 if (event->id != fwspec->param[0]) in tegra_pmc_irq_alloc()
2252 if (err < 0) in tegra_pmc_irq_alloc()
2256 if (event->irq == 0) { in tegra_pmc_irq_alloc()
2263 spec.param[0] = GIC_SPI; in tegra_pmc_irq_alloc()
2275 if (event->gpio.instance != fwspec->param[0] || in tegra_pmc_irq_alloc()
2313 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2314 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2316 tegra_pmc_writel(pmc, 0, PMC_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2317 tegra_pmc_writel(pmc, 0, PMC_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2334 return 0; in tegra210_pmc_irq_set_wake()
2374 return 0; in tegra210_pmc_irq_set_type()
2385 dev_dbg(pmc->dev, "WAKE_AOWAKE_CNTRL_83 = 0x%x\n", value); in tegra186_pmc_set_wake_filters()
2398 writel(0x1, pmc->wake + WAKE_AOWAKE_STATUS_W(data->hwirq)); in tegra186_pmc_irq_set_wake()
2413 return 0; in tegra186_pmc_irq_set_wake()
2450 return 0; in tegra186_pmc_irq_set_type()
2493 return 0; in tegra_pmc_irq_init()
2503 pmc->domain = irq_domain_add_hierarchy(parent, 0, 96, pmc->dev->of_node, in tegra_pmc_irq_init()
2510 return 0; in tegra_pmc_irq_init()
2569 return 0; in pmc_clk_mux_set_parent()
2579 return val ? 1 : 0; in pmc_clk_is_enabled()
2598 return 0; in pmc_clk_enable()
2605 pmc_clk_set_state(clk->offs, clk->force_en_shift, 0); in pmc_clk_disable()
2648 return tegra_pmc_readl(pmc, gate->offs) & BIT(gate->shift) ? 1 : 0; in pmc_clk_gate_is_enabled()
2657 return 0; in pmc_clk_gate_enable()
2664 pmc_clk_set_state(gate->offs, gate->shift, 0); in pmc_clk_gate_disable()
2689 init.flags = 0; in tegra_pmc_clk_gate_register()
2724 for (i = 0; i < TEGRA_PMC_CLK_MAX; i++) in tegra_pmc_clock_register()
2727 for (i = 0; i < pmc->soc->num_pmc_clks; i++) { in tegra_pmc_clock_register()
2751 tegra_pmc_writel(pmc, 0x0, PMC_BLINK_TIMER); in tegra_pmc_clock_register()
2813 return 0; in tegra_pmc_regmap_readl()
2821 return 0; in tegra_pmc_regmap_writel()
2850 return 0; in tegra_pmc_regmap_init()
2873 if (err < 0) in tegra_pmc_probe()
2882 base = devm_platform_ioremap_resource(pdev, 0); in tegra_pmc_probe()
2976 if (err < 0) { in tegra_pmc_probe()
2990 if (err < 0) in tegra_pmc_probe()
2994 if (err < 0) in tegra_pmc_probe()
2998 if (err < 0) in tegra_pmc_probe()
3016 return 0; in tegra_pmc_probe()
3055 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_write_wake_levels()
3069 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3070 wke_write_wake_level(pmc, i, 0); in wke_read_sw_wake_status()
3079 * the polarity of the wake level from 0->1 while latching to force in wke_read_sw_wake_status()
3082 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3092 wke_32kwritel(pmc, 0, WAKE_LATCH_SW); in wke_read_sw_wake_status()
3096 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_read_sw_wake_status()
3110 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_clear_wake_status()
3115 wke_32kwritel(pmc, 0x1, WAKE_AOWAKE_STATUS_W((i * 32) + wake)); in wke_clear_wake_status()
3150 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in tegra186_pmc_wake_syscore_resume()
3174 return 0; in tegra186_pmc_wake_syscore_suspend()
3184 return 0; in tegra_pmc_suspend()
3191 tegra_pmc_writel(pmc, 0x0, PMC_SCRATCH41); in tegra_pmc_resume()
3193 return 0; in tegra_pmc_resume()
3211 .scratch0 = 0x50,
3212 .rst_status = 0x1b4,
3213 .rst_source_shift = 0x0,
3214 .rst_source_mask = 0x7,
3215 .rst_level_shift = 0x0,
3216 .rst_level_mask = 0x0,
3253 tegra_pmc_writel(pmc, ((osc << 8) & 0xff00) | (pmu & 0xff), in tegra20_pmc_init()
3279 .num_cpu_powergates = 0,
3286 .num_io_pads = 0,
3288 .num_pin_descs = 0,
3295 .num_reset_sources = 0,
3297 .num_reset_levels = 0,
3299 .num_pmc_clks = 0,
3348 .num_io_pads = 0,
3350 .num_pin_descs = 0,
3359 .num_reset_levels = 0,
3406 .num_io_pads = 0,
3408 .num_pin_descs = 0,
3417 .num_reset_levels = 0,
3475 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, UINT_MAX, "audio"),
3476 TEGRA_IO_PAD(TEGRA_IO_PAD_BB, 15, 0x1b8, 0x1bc, UINT_MAX, "bb"),
3477 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, UINT_MAX, "cam"),
3478 TEGRA_IO_PAD(TEGRA_IO_PAD_COMP, 22, 0x1b8, 0x1bc, UINT_MAX, "comp"),
3479 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3480 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3481 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3482 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3483 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3484 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3485 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3486 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3487 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3488 TEGRA_IO_PAD(TEGRA_IO_PAD_HV, 6, 0x1c0, 0x1c4, UINT_MAX, "hv"),
3489 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3490 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3491 TEGRA_IO_PAD(TEGRA_IO_PAD_NAND, 13, 0x1b8, 0x1bc, UINT_MAX, "nand"),
3492 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3493 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3494 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3495 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x1c0, 0x1c4, UINT_MAX, "pex-cntrl"),
3496 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, UINT_MAX, "sdmmc1"),
3497 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, UINT_MAX, "sdmmc3"),
3498 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 3, 0x1c0, 0x1c4, UINT_MAX, "sdmmc4"),
3499 TEGRA_IO_PAD(TEGRA_IO_PAD_SYS_DDC, 26, 0x1c0, 0x1c4, UINT_MAX, "sys_ddc"),
3500 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, UINT_MAX, "uart"),
3501 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3502 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3503 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3504 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb_bias"),
3562 .num_reset_levels = 0,
3605 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, 5, "audio"),
3606 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x1c0, 0x1c4, 18, "audio-hv"),
3607 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, 10, "cam"),
3608 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3609 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3610 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 10, 0x1c0, 0x1c4, UINT_MAX, "csic"),
3611 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 11, 0x1c0, 0x1c4, UINT_MAX, "csid"),
3612 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3613 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 13, 0x1c0, 0x1c4, UINT_MAX, "csif"),
3614 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x1b8, 0x1bc, 19, "dbg"),
3615 TEGRA_IO_PAD(TEGRA_IO_PAD_DEBUG_NONAO, 26, 0x1b8, 0x1bc, UINT_MAX, "debug-nonao"),
3616 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC, 18, 0x1c0, 0x1c4, 20, "dmic"),
3617 TEGRA_IO_PAD(TEGRA_IO_PAD_DP, 19, 0x1c0, 0x1c4, UINT_MAX, "dp"),
3618 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3619 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3620 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3621 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3622 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC, 3, 0x1c0, 0x1c4, UINT_MAX, "emmc"),
3623 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC2, 5, 0x1c0, 0x1c4, UINT_MAX, "emmc2"),
3624 TEGRA_IO_PAD(TEGRA_IO_PAD_GPIO, 27, 0x1b8, 0x1bc, 21, "gpio"),
3625 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3626 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3627 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3628 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3629 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3630 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3631 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3633 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, 12, "sdmmc1"),
3634 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, 13, "sdmmc3"),
3635 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 14, 0x1c0, 0x1c4, 22, "spi"),
3636 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI_HV, 15, 0x1c0, 0x1c4, 23, "spi-hv"),
3637 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, 2, "uart"),
3638 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3639 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3640 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3641 TEGRA_IO_PAD(TEGRA_IO_PAD_USB3, 18, 0x1b8, 0x1bc, UINT_MAX, "usb3"),
3642 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb-bias"),
3724 .num_reset_levels = 0,
3735 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3736 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3737 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x74, 0x78, UINT_MAX, "dsi"),
3738 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3739 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3740 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3741 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3742 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3743 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x74, 0x78, UINT_MAX, "usb0"),
3744 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x74, 0x78, UINT_MAX, "usb1"),
3745 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x74, 0x78, UINT_MAX, "usb2"),
3746 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x74, 0x78, UINT_MAX, "usb-bias"),
3747 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3748 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3749 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x74, 0x78, UINT_MAX, "hsic"),
3750 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3751 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3752 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3753 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3754 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC2_HV, 2, 0x7c, 0x80, 5, "sdmmc2-hv"),
3755 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3756 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3757 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 8, 0x7c, 0x80, UINT_MAX, "dsib"),
3758 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 9, 0x7c, 0x80, UINT_MAX, "dsic"),
3759 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 10, 0x7c, 0x80, UINT_MAX, "dsid"),
3760 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3761 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3762 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3763 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3764 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
3765 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
3766 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC_HV, 20, 0x7c, 0x80, 2, "dmic-hv"),
3767 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
3768 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
3769 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
3770 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
3771 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
3772 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
3817 .scratch0 = 0x2000,
3818 .rst_status = 0x70,
3819 .rst_source_shift = 0x2,
3820 .rst_source_mask = 0x3c,
3821 .rst_level_shift = 0x0,
3822 .rst_level_mask = 0x3,
3843 if (index < 0) { in tegra186_pmc_setup_irq_polarity()
3892 TEGRA_WAKE_GPIO("power", 29, 1, TEGRA186_AON_GPIO(FF, 0)),
3898 .num_powergates = 0,
3900 .num_cpu_powergates = 0,
3926 .num_pmc_clks = 0,
3933 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3934 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3935 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3936 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3937 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3938 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3939 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3940 TEGRA_IO_PAD(TEGRA_IO_PAD_EQOS, 8, 0x74, 0x78, UINT_MAX, "eqos"),
3941 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2_BIAS, 9, 0x74, 0x78, UINT_MAX, "pex-clk-2-bias"),
3942 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2, 10, 0x74, 0x78, UINT_MAX, "pex-clk-2"),
3943 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP3, 11, 0x74, 0x78, UINT_MAX, "dap3"),
3944 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP5, 12, 0x74, 0x78, UINT_MAX, "dap5"),
3945 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3946 TEGRA_IO_PAD(TEGRA_IO_PAD_PWR_CTL, 15, 0x74, 0x78, UINT_MAX, "pwr-ctl"),
3947 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO53, 16, 0x74, 0x78, UINT_MAX, "soc-gpio53"),
3948 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3949 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM2, 18, 0x74, 0x78, UINT_MAX, "gp-pwm2"),
3950 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM3, 19, 0x74, 0x78, UINT_MAX, "gp-pwm3"),
3951 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO12, 20, 0x74, 0x78, UINT_MAX, "soc-gpio12"),
3952 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO13, 21, 0x74, 0x78, UINT_MAX, "soc-gpio13"),
3953 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO10, 22, 0x74, 0x78, UINT_MAX, "soc-gpio10"),
3954 TEGRA_IO_PAD(TEGRA_IO_PAD_UART4, 23, 0x74, 0x78, UINT_MAX, "uart4"),
3955 TEGRA_IO_PAD(TEGRA_IO_PAD_UART5, 24, 0x74, 0x78, UINT_MAX, "uart5"),
3956 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3957 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP3, 26, 0x74, 0x78, UINT_MAX, "hdmi-dp3"),
3958 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP2, 27, 0x74, 0x78, UINT_MAX, "hdmi-dp2"),
3959 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3960 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3961 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3962 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CTL2, 1, 0x7c, 0x80, UINT_MAX, "pex-ctl2"),
3963 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L0_RST, 2, 0x7c, 0x80, UINT_MAX, "pex-l0-rst"),
3964 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L1_RST, 3, 0x7c, 0x80, UINT_MAX, "pex-l1-rst"),
3965 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3966 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L5_RST, 5, 0x7c, 0x80, UINT_MAX, "pex-l5-rst"),
3967 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3968 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3969 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3970 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3971 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3972 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
3973 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
3974 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 18, 0x7c, 0x80, UINT_MAX, "csig"),
3975 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 19, 0x7c, 0x80, UINT_MAX, "csih"),
3976 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
3977 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
3978 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
3979 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
3980 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
3981 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4037 .scratch0 = 0x2000,
4038 .rst_status = 0x70,
4039 .rst_source_shift = 0x2,
4040 .rst_source_mask = 0x7c,
4041 .rst_level_shift = 0x0,
4042 .rst_level_mask = 0x3,
4070 TEGRA_WAKE_GPIO("eqos", 20, 0, TEGRA194_MAIN_GPIO(G, 4)),
4074 TEGRA_WAKE_SIMPLE("usb3-port-0", 76),
4077 TEGRA_WAKE_SIMPLE("usb2-port-0", 79),
4085 .num_powergates = 0,
4087 .num_cpu_powergates = 0,
4113 .num_pmc_clks = 0,
4120 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0xe0c0, 0xe0c4, UINT_MAX, "csia"),
4121 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0xe0c0, 0xe0c4, UINT_MAX, "csib"),
4122 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 0, 0xe0d0, 0xe0d4, UINT_MAX, "hdmi-dp0"),
4123 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 2, 0xe0c0, 0xe0c4, UINT_MAX, "csic"),
4124 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 3, 0xe0c0, 0xe0c4, UINT_MAX, "csid"),
4125 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 4, 0xe0c0, 0xe0c4, UINT_MAX, "csie"),
4126 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 5, 0xe0c0, 0xe0c4, UINT_MAX, "csif"),
4127 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 0, 0xe064, 0xe068, UINT_MAX, "ufs"),
4128 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 1, 0xe05c, 0xe060, UINT_MAX, "edp"),
4129 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 0, 0xe054, 0xe058, 4, "sdmmc1-hv"),
4132 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4133 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 6, 0xe0c0, 0xe0c4, UINT_MAX, "csig"),
4134 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 7, 0xe0c0, 0xe0c4, UINT_MAX, "csih"),
4156 .scratch0 = 0x2000,
4157 .rst_status = 0x70,
4158 .rst_source_shift = 0x2,
4159 .rst_source_mask = 0xfc,
4160 .rst_level_shift = 0x0,
4161 .rst_level_mask = 0x3,
4165 "SYS_RESET_N", /* 0x0 */
4173 "SENSOR", /* 0x8 */
4181 NULL, /* 0x10 */
4189 "CSITE_SW", /* 0x18 */
4197 "FSI_R52C0WDT", /* 0x20 */
4202 "FSI_VMON", /* 0x25 */
4206 TEGRA_WAKE_GPIO("sd-wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),
4207 TEGRA_WAKE_GPIO("eqos", 20, 0, TEGRA234_MAIN_GPIO(G, 4)),
4210 TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
4217 .num_powergates = 0,
4219 .num_cpu_powergates = 0,
4245 .num_pmc_clks = 0,
4313 value = saved ^ 0xffffffff; in tegra_pmc_detect_tz_only()
4315 if (value == 0xffffffff) in tegra_pmc_detect_tz_only()
4316 value = 0xdeadbeef; in tegra_pmc_detect_tz_only()
4323 if (value == 0) { in tegra_pmc_detect_tz_only()
4363 regs.start = 0x7000e400; in tegra_pmc_early_init()
4364 regs.end = 0x7000e7ff; in tegra_pmc_early_init()
4373 return 0; in tegra_pmc_early_init()
4380 if (of_address_to_resource(np, 0, &regs) < 0) { in tegra_pmc_early_init()
4401 for (i = 0; i < pmc->soc->num_powergates; i++) in tegra_pmc_early_init()
4416 return 0; in tegra_pmc_early_init()