Lines Matching +full:0 +full:x78
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, \
489 arm_smccc_smc(TEGRA_SMC_PMC, TEGRA_SMC_PMC_READ, offset, 0, 0, in tegra_pmc_readl()
490 0, 0, 0, &res); in tegra_pmc_readl()
513 value, 0, 0, 0, 0, &res); in tegra_pmc_writel()
552 return (tegra_pmc_readl(pmc, GPU_RG_CNTRL) & 0x1) == 0; in tegra_powergate_state()
554 return (tegra_pmc_readl(pmc, PWRGATE_STATUS) & BIT(id)) != 0; in tegra_powergate_state()
574 for (i = 0; i < pmc->soc->num_powergates; i++) { in tegra_powergate_lookup()
639 return 0; in tegra114_powergate_set()
660 return 0; in tegra_powergate_set()
683 tegra_pmc_writel(pmc, 0, GPU_RG_CNTRL); in __tegra_powergate_remove_clamping()
704 return 0; in __tegra_powergate_remove_clamping()
713 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_prepare_clocks()
735 return 0; in tegra_powergate_prepare_clocks()
749 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_unprepare_clocks()
755 return 0; in tegra_powergate_unprepare_clocks()
762 for (i = 0; i < pg->num_clks; i++) in tegra_powergate_disable_clocks()
771 for (i = 0; i < pg->num_clks; i++) { in tegra_powergate_enable_clocks()
777 return 0; in tegra_powergate_enable_clocks()
798 if (err < 0) in tegra_powergate_power_up()
837 return 0; in tegra_powergate_power_up()
884 return 0; in tegra_powergate_power_down()
927 if (err < 0) { in tegra_genpd_power_off()
1066 if (id < 0) in tegra_pmc_cpu_is_powered()
1081 if (id < 0) in tegra_pmc_cpu_power_on()
1096 if (id < 0) in tegra_pmc_cpu_remove_clamping()
1110 if (strcmp(cmd, "recovery") == 0) in tegra_pmc_program_reboot_reason()
1113 if (strcmp(cmd, "bootloader") == 0) in tegra_pmc_program_reboot_reason()
1116 if (strcmp(cmd, "forced-recovery") == 0) in tegra_pmc_program_reboot_reason()
1161 const u32 go_to_charger_mode = 0xa5a55a5a; in tegra_pmc_power_off_handler()
1178 for (i = 0; i < pmc->soc->num_powergates; i++) { in powergate_show()
1180 if (status < 0) in powergate_show()
1187 return 0; in powergate_show()
1200 if (count == 0) in tegra_powergate_of_get_clks()
1213 for (i = 0; i < count; i++) { in tegra_powergate_of_get_clks()
1223 return 0; in tegra_powergate_of_get_clks()
1249 if (err < 0) { in tegra_powergate_of_get_resets()
1261 int id, err = 0; in tegra_powergate_add()
1269 if (id < 0) { in tegra_powergate_add()
1291 if (err < 0) { in tegra_powergate_add()
1297 if (err < 0) { in tegra_powergate_add()
1333 if (err < 0) { in tegra_powergate_add()
1340 if (err < 0) { in tegra_powergate_add()
1348 return 0; in tegra_powergate_add()
1402 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()
1474 0, &parent_args)) in tegra_powergate_init()
1478 child_args.args_count = 0; in tegra_powergate_init()
1540 for (i = 0; i < pmc->soc->num_io_pads; i++) in tegra_io_pad_find()
1577 return 0; in tegra_io_pad_prepare()
1590 return 0; in tegra_io_pad_poll()
1608 * Returns: 0 on success or a negative error code on failure.
1626 if (err < 0) { in tegra_io_pad_power_enable()
1633 err = tegra_io_pad_poll(pmc, status, mask, 0, 250); in tegra_io_pad_power_enable()
1634 if (err < 0) { in tegra_io_pad_power_enable()
1651 * Returns: 0 on success or a negative error code on failure.
1669 if (err < 0) { in tegra_io_pad_power_disable()
1677 if (err < 0) { in tegra_io_pad_power_disable()
1758 return 0; in tegra_io_pad_set_voltage()
1778 if ((value & BIT(pad->voltage)) == 0) in tegra_io_pad_get_voltage()
1800 unsigned long long rate = 0; in tegra_pmc_enter_suspend_mode()
1817 if (WARN_ON_ONCE(rate == 0)) in tegra_pmc_enter_suspend_mode()
1843 case 0: in tegra_pmc_parse_dt()
1877 pmc->core_osc_time = values[0]; in tegra_pmc_parse_dt()
1902 pmc->lp0_vec_phys = values[0]; in tegra_pmc_parse_dt()
1905 return 0; in tegra_pmc_parse_dt()
1910 if (pmc->soc->max_wake_events > 0) { in tegra_pmc_init()
1931 return 0; in tegra_pmc_init()
1972 pinmux = 0; in tegra_pmc_init_tsense_reset()
1991 checksum = reg_addr + reg_data + (value & 0xff) + ((value >> 8) & 0xff) in tegra_pmc_init_tsense_reset()
1992 + ((value >> 24) & 0xff); in tegra_pmc_init_tsense_reset()
1993 checksum &= 0xff; in tegra_pmc_init_tsense_reset()
1994 checksum = 0x100 - checksum; in tegra_pmc_init_tsense_reset()
2035 return 0; in tegra_io_pad_pinctrl_get_group_pins()
2062 if (ret < 0) in tegra_io_pad_pinconf_get()
2070 if (ret < 0) in tegra_io_pad_pinconf_get()
2082 return 0; in tegra_io_pad_pinconf_get()
2100 for (i = 0; i < num_configs; ++i) { in tegra_io_pad_pinconf_set()
2126 return 0; in tegra_io_pad_pinconf_set()
2145 return 0; in tegra_pmc_pinctrl_init()
2160 return 0; in tegra_pmc_pinctrl_init()
2200 int err = 0; in tegra_pmc_reset_sysfs_init()
2204 if (err < 0) in tegra_pmc_reset_sysfs_init()
2212 if (err < 0) in tegra_pmc_reset_sysfs_init()
2227 *hwirq = fwspec->param[0]; in tegra_pmc_irq_translate()
2230 return 0; in tegra_pmc_irq_translate()
2240 int err = 0; in tegra_pmc_irq_alloc()
2245 for (i = 0; i < soc->num_wake_events; i++) { in tegra_pmc_irq_alloc()
2252 if (event->id != fwspec->param[0]) in tegra_pmc_irq_alloc()
2258 if (err < 0) in tegra_pmc_irq_alloc()
2262 if (event->irq == 0) { in tegra_pmc_irq_alloc()
2269 spec.param[0] = GIC_SPI; in tegra_pmc_irq_alloc()
2281 if (event->gpio.instance != fwspec->param[0] || in tegra_pmc_irq_alloc()
2319 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2320 tegra_pmc_writel(pmc, 0, PMC_SW_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2322 tegra_pmc_writel(pmc, 0, PMC_WAKE_STATUS); in tegra210_pmc_irq_set_wake()
2323 tegra_pmc_writel(pmc, 0, PMC_WAKE2_STATUS); in tegra210_pmc_irq_set_wake()
2340 return 0; in tegra210_pmc_irq_set_wake()
2380 return 0; in tegra210_pmc_irq_set_type()
2391 dev_dbg(pmc->dev, "WAKE_AOWAKE_CNTRL_83 = 0x%x\n", value); in tegra186_pmc_set_wake_filters()
2404 writel(0x1, pmc->wake + WAKE_AOWAKE_STATUS_W(data->hwirq)); in tegra186_pmc_irq_set_wake()
2419 return 0; in tegra186_pmc_irq_set_wake()
2456 return 0; in tegra186_pmc_irq_set_type()
2499 return 0; in tegra_pmc_irq_init()
2509 pmc->domain = irq_domain_create_hierarchy(parent, 0, 96, dev_fwnode(pmc->dev), in tegra_pmc_irq_init()
2516 return 0; in tegra_pmc_irq_init()
2575 return 0; in pmc_clk_mux_set_parent()
2585 return val ? 1 : 0; in pmc_clk_is_enabled()
2604 return 0; in pmc_clk_enable()
2611 pmc_clk_set_state(clk->offs, clk->force_en_shift, 0); in pmc_clk_disable()
2654 return tegra_pmc_readl(pmc, gate->offs) & BIT(gate->shift) ? 1 : 0; in pmc_clk_gate_is_enabled()
2663 return 0; in pmc_clk_gate_enable()
2670 pmc_clk_set_state(gate->offs, gate->shift, 0); in pmc_clk_gate_disable()
2695 init.flags = 0; in tegra_pmc_clk_gate_register()
2730 for (i = 0; i < TEGRA_PMC_CLK_MAX; i++) in tegra_pmc_clock_register()
2733 for (i = 0; i < pmc->soc->num_pmc_clks; i++) { in tegra_pmc_clock_register()
2757 tegra_pmc_writel(pmc, 0x0, PMC_BLINK_TIMER); in tegra_pmc_clock_register()
2819 return 0; in tegra_pmc_regmap_readl()
2827 return 0; in tegra_pmc_regmap_writel()
2856 return 0; in tegra_pmc_regmap_init()
2879 if (err < 0) in tegra_pmc_probe()
2888 base = devm_platform_ioremap_resource(pdev, 0); in tegra_pmc_probe()
2989 if (err < 0) { in tegra_pmc_probe()
3003 if (err < 0) in tegra_pmc_probe()
3007 if (err < 0) in tegra_pmc_probe()
3011 if (err < 0) in tegra_pmc_probe()
3029 return 0; in tegra_pmc_probe()
3068 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_write_wake_levels()
3082 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3083 wke_write_wake_level(pmc, i, 0); in wke_read_sw_wake_status()
3092 * the polarity of the wake level from 0->1 while latching to force in wke_read_sw_wake_status()
3095 for (i = 0; i < pmc->soc->max_wake_events; i++) in wke_read_sw_wake_status()
3105 wke_32kwritel(pmc, 0, WAKE_LATCH_SW); in wke_read_sw_wake_status()
3109 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_read_sw_wake_status()
3123 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in wke_clear_wake_status()
3128 wke_32kwritel(pmc, 0x1, WAKE_AOWAKE_STATUS_W((i * 32) + wake)); in wke_clear_wake_status()
3163 for (i = 0; i < pmc->soc->max_wake_vectors; i++) { in tegra186_pmc_wake_syscore_resume()
3187 return 0; in tegra186_pmc_wake_syscore_suspend()
3202 return 0; in tegra_pmc_suspend()
3209 tegra_pmc_writel(pmc, 0x0, PMC_SCRATCH41); in tegra_pmc_resume()
3211 return 0; in tegra_pmc_resume()
3229 .scratch0 = 0x50,
3230 .rst_status = 0x1b4,
3231 .rst_source_shift = 0x0,
3232 .rst_source_mask = 0x7,
3233 .rst_level_shift = 0x0,
3234 .rst_level_mask = 0x0,
3271 tegra_pmc_writel(pmc, ((osc << 8) & 0xff00) | (pmu & 0xff), in tegra20_pmc_init()
3297 .num_cpu_powergates = 0,
3304 .num_io_pads = 0,
3306 .num_pin_descs = 0,
3313 .num_reset_sources = 0,
3315 .num_reset_levels = 0,
3317 .num_pmc_clks = 0,
3366 .num_io_pads = 0,
3368 .num_pin_descs = 0,
3377 .num_reset_levels = 0,
3424 .num_io_pads = 0,
3426 .num_pin_descs = 0,
3435 .num_reset_levels = 0,
3493 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, UINT_MAX, "audio"),
3494 TEGRA_IO_PAD(TEGRA_IO_PAD_BB, 15, 0x1b8, 0x1bc, UINT_MAX, "bb"),
3495 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, UINT_MAX, "cam"),
3496 TEGRA_IO_PAD(TEGRA_IO_PAD_COMP, 22, 0x1b8, 0x1bc, UINT_MAX, "comp"),
3497 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3498 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3499 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3500 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3501 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3502 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3503 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3504 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3505 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3506 TEGRA_IO_PAD(TEGRA_IO_PAD_HV, 6, 0x1c0, 0x1c4, UINT_MAX, "hv"),
3507 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3508 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3509 TEGRA_IO_PAD(TEGRA_IO_PAD_NAND, 13, 0x1b8, 0x1bc, UINT_MAX, "nand"),
3510 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3511 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3512 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3513 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x1c0, 0x1c4, UINT_MAX, "pex-cntrl"),
3514 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, UINT_MAX, "sdmmc1"),
3515 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, UINT_MAX, "sdmmc3"),
3516 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 3, 0x1c0, 0x1c4, UINT_MAX, "sdmmc4"),
3517 TEGRA_IO_PAD(TEGRA_IO_PAD_SYS_DDC, 26, 0x1c0, 0x1c4, UINT_MAX, "sys_ddc"),
3518 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, UINT_MAX, "uart"),
3519 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3520 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3521 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3522 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb_bias"),
3580 .num_reset_levels = 0,
3623 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x1b8, 0x1bc, 5, "audio"),
3624 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x1c0, 0x1c4, 18, "audio-hv"),
3625 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 4, 0x1c0, 0x1c4, 10, "cam"),
3626 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x1b8, 0x1bc, UINT_MAX, "csia"),
3627 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x1b8, 0x1bc, UINT_MAX, "csib"),
3628 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 10, 0x1c0, 0x1c4, UINT_MAX, "csic"),
3629 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 11, 0x1c0, 0x1c4, UINT_MAX, "csid"),
3630 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 12, 0x1c0, 0x1c4, UINT_MAX, "csie"),
3631 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 13, 0x1c0, 0x1c4, UINT_MAX, "csif"),
3632 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x1b8, 0x1bc, 19, "dbg"),
3633 TEGRA_IO_PAD(TEGRA_IO_PAD_DEBUG_NONAO, 26, 0x1b8, 0x1bc, UINT_MAX, "debug-nonao"),
3634 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC, 18, 0x1c0, 0x1c4, 20, "dmic"),
3635 TEGRA_IO_PAD(TEGRA_IO_PAD_DP, 19, 0x1c0, 0x1c4, UINT_MAX, "dp"),
3636 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x1b8, 0x1bc, UINT_MAX, "dsi"),
3637 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 7, 0x1c0, 0x1c4, UINT_MAX, "dsib"),
3638 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 8, 0x1c0, 0x1c4, UINT_MAX, "dsic"),
3639 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 9, 0x1c0, 0x1c4, UINT_MAX, "dsid"),
3640 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC, 3, 0x1c0, 0x1c4, UINT_MAX, "emmc"),
3641 TEGRA_IO_PAD(TEGRA_IO_PAD_EMMC2, 5, 0x1c0, 0x1c4, UINT_MAX, "emmc2"),
3642 TEGRA_IO_PAD(TEGRA_IO_PAD_GPIO, 27, 0x1b8, 0x1bc, 21, "gpio"),
3643 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI, 28, 0x1b8, 0x1bc, UINT_MAX, "hdmi"),
3644 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x1b8, 0x1bc, UINT_MAX, "hsic"),
3645 TEGRA_IO_PAD(TEGRA_IO_PAD_LVDS, 25, 0x1c0, 0x1c4, UINT_MAX, "lvds"),
3646 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x1b8, 0x1bc, UINT_MAX, "mipi-bias"),
3647 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_BIAS, 4, 0x1b8, 0x1bc, UINT_MAX, "pex-bias"),
3648 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 5, 0x1b8, 0x1bc, UINT_MAX, "pex-clk1"),
3649 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x1b8, 0x1bc, UINT_MAX, "pex-clk2"),
3651 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1, 1, 0x1c0, 0x1c4, 12, "sdmmc1"),
3652 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3, 2, 0x1c0, 0x1c4, 13, "sdmmc3"),
3653 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 14, 0x1c0, 0x1c4, 22, "spi"),
3654 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI_HV, 15, 0x1c0, 0x1c4, 23, "spi-hv"),
3655 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x1b8, 0x1bc, 2, "uart"),
3656 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x1b8, 0x1bc, UINT_MAX, "usb0"),
3657 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x1b8, 0x1bc, UINT_MAX, "usb1"),
3658 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x1b8, 0x1bc, UINT_MAX, "usb2"),
3659 TEGRA_IO_PAD(TEGRA_IO_PAD_USB3, 18, 0x1b8, 0x1bc, UINT_MAX, "usb3"),
3660 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x1b8, 0x1bc, UINT_MAX, "usb-bias"),
3742 .num_reset_levels = 0,
3753 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3754 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3755 TEGRA_IO_PAD(TEGRA_IO_PAD_DSI, 2, 0x74, 0x78, UINT_MAX, "dsi"),
3756 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3757 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3758 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3759 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3760 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3761 TEGRA_IO_PAD(TEGRA_IO_PAD_USB0, 9, 0x74, 0x78, UINT_MAX, "usb0"),
3762 TEGRA_IO_PAD(TEGRA_IO_PAD_USB1, 10, 0x74, 0x78, UINT_MAX, "usb1"),
3763 TEGRA_IO_PAD(TEGRA_IO_PAD_USB2, 11, 0x74, 0x78, UINT_MAX, "usb2"),
3764 TEGRA_IO_PAD(TEGRA_IO_PAD_USB_BIAS, 12, 0x74, 0x78, UINT_MAX, "usb-bias"),
3765 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3766 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3767 TEGRA_IO_PAD(TEGRA_IO_PAD_HSIC, 19, 0x74, 0x78, UINT_MAX, "hsic"),
3768 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3769 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3770 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3771 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3772 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC2_HV, 2, 0x7c, 0x80, 5, "sdmmc2-hv"),
3773 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3774 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3775 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIB, 8, 0x7c, 0x80, UINT_MAX, "dsib"),
3776 TEGRA_IO_PAD(TEGRA_IO_PAD_DSIC, 9, 0x7c, 0x80, UINT_MAX, "dsic"),
3777 TEGRA_IO_PAD(TEGRA_IO_PAD_DSID, 10, 0x7c, 0x80, UINT_MAX, "dsid"),
3778 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3779 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3780 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3781 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3782 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
3783 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
3784 TEGRA_IO_PAD(TEGRA_IO_PAD_DMIC_HV, 20, 0x7c, 0x80, 2, "dmic-hv"),
3785 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
3786 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
3787 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
3788 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
3789 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
3790 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
3835 .scratch0 = 0x2000,
3836 .rst_status = 0x70,
3837 .rst_source_shift = 0x2,
3838 .rst_source_mask = 0x3c,
3839 .rst_level_shift = 0x0,
3840 .rst_level_mask = 0x3,
3859 if (index < 0) { in tegra186_pmc_setup_irq_polarity()
3908 TEGRA_WAKE_GPIO("power", 29, 1, TEGRA186_AON_GPIO(FF, 0)),
3914 .num_powergates = 0,
3916 .num_cpu_powergates = 0,
3942 .num_pmc_clks = 0,
3949 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0x74, 0x78, UINT_MAX, "csia"),
3950 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0x74, 0x78, UINT_MAX, "csib"),
3951 TEGRA_IO_PAD(TEGRA_IO_PAD_MIPI_BIAS, 3, 0x74, 0x78, UINT_MAX, "mipi-bias"),
3952 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_BIAS, 4, 0x74, 0x78, UINT_MAX, "pex-clk-bias"),
3953 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK3, 5, 0x74, 0x78, UINT_MAX, "pex-clk3"),
3954 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK2, 6, 0x74, 0x78, UINT_MAX, "pex-clk2"),
3955 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK1, 7, 0x74, 0x78, UINT_MAX, "pex-clk1"),
3956 TEGRA_IO_PAD(TEGRA_IO_PAD_EQOS, 8, 0x74, 0x78, UINT_MAX, "eqos"),
3957 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2_BIAS, 9, 0x74, 0x78, UINT_MAX, "pex-clk-2-bias"),
3958 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CLK_2, 10, 0x74, 0x78, UINT_MAX, "pex-clk-2"),
3959 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP3, 11, 0x74, 0x78, UINT_MAX, "dap3"),
3960 TEGRA_IO_PAD(TEGRA_IO_PAD_DAP5, 12, 0x74, 0x78, UINT_MAX, "dap5"),
3961 TEGRA_IO_PAD(TEGRA_IO_PAD_UART, 14, 0x74, 0x78, UINT_MAX, "uart"),
3962 TEGRA_IO_PAD(TEGRA_IO_PAD_PWR_CTL, 15, 0x74, 0x78, UINT_MAX, "pwr-ctl"),
3963 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO53, 16, 0x74, 0x78, UINT_MAX, "soc-gpio53"),
3964 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO, 17, 0x74, 0x78, UINT_MAX, "audio"),
3965 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM2, 18, 0x74, 0x78, UINT_MAX, "gp-pwm2"),
3966 TEGRA_IO_PAD(TEGRA_IO_PAD_GP_PWM3, 19, 0x74, 0x78, UINT_MAX, "gp-pwm3"),
3967 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO12, 20, 0x74, 0x78, UINT_MAX, "soc-gpio12"),
3968 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO13, 21, 0x74, 0x78, UINT_MAX, "soc-gpio13"),
3969 TEGRA_IO_PAD(TEGRA_IO_PAD_SOC_GPIO10, 22, 0x74, 0x78, UINT_MAX, "soc-gpio10"),
3970 TEGRA_IO_PAD(TEGRA_IO_PAD_UART4, 23, 0x74, 0x78, UINT_MAX, "uart4"),
3971 TEGRA_IO_PAD(TEGRA_IO_PAD_UART5, 24, 0x74, 0x78, UINT_MAX, "uart5"),
3972 TEGRA_IO_PAD(TEGRA_IO_PAD_DBG, 25, 0x74, 0x78, UINT_MAX, "dbg"),
3973 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP3, 26, 0x74, 0x78, UINT_MAX, "hdmi-dp3"),
3974 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP2, 27, 0x74, 0x78, UINT_MAX, "hdmi-dp2"),
3975 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 28, 0x74, 0x78, UINT_MAX, "hdmi-dp0"),
3976 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP1, 29, 0x74, 0x78, UINT_MAX, "hdmi-dp1"),
3977 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CNTRL, 0, 0x7c, 0x80, UINT_MAX, "pex-cntrl"),
3978 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_CTL2, 1, 0x7c, 0x80, UINT_MAX, "pex-ctl2"),
3979 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L0_RST, 2, 0x7c, 0x80, UINT_MAX, "pex-l0-rst"),
3980 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L1_RST, 3, 0x7c, 0x80, UINT_MAX, "pex-l1-rst"),
3981 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC4, 4, 0x7c, 0x80, UINT_MAX, "sdmmc4"),
3982 TEGRA_IO_PAD(TEGRA_IO_PAD_PEX_L5_RST, 5, 0x7c, 0x80, UINT_MAX, "pex-l5-rst"),
3983 TEGRA_IO_PAD(TEGRA_IO_PAD_CAM, 6, 0x7c, 0x80, UINT_MAX, "cam"),
3984 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 11, 0x7c, 0x80, UINT_MAX, "csic"),
3985 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 12, 0x7c, 0x80, UINT_MAX, "csid"),
3986 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 13, 0x7c, 0x80, UINT_MAX, "csie"),
3987 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 14, 0x7c, 0x80, UINT_MAX, "csif"),
3988 TEGRA_IO_PAD(TEGRA_IO_PAD_SPI, 15, 0x7c, 0x80, UINT_MAX, "spi"),
3989 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 17, 0x7c, 0x80, UINT_MAX, "ufs"),
3990 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 18, 0x7c, 0x80, UINT_MAX, "csig"),
3991 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 19, 0x7c, 0x80, UINT_MAX, "csih"),
3992 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 21, 0x7c, 0x80, UINT_MAX, "edp"),
3993 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 23, 0x7c, 0x80, 4, "sdmmc1-hv"),
3994 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC3_HV, 24, 0x7c, 0x80, 6, "sdmmc3-hv"),
3995 TEGRA_IO_PAD(TEGRA_IO_PAD_CONN, 28, 0x7c, 0x80, UINT_MAX, "conn"),
3996 TEGRA_IO_PAD(TEGRA_IO_PAD_AUDIO_HV, 29, 0x7c, 0x80, 1, "audio-hv"),
3997 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4053 .scratch0 = 0x2000,
4054 .rst_status = 0x70,
4055 .rst_source_shift = 0x2,
4056 .rst_source_mask = 0x7c,
4057 .rst_level_shift = 0x0,
4058 .rst_level_mask = 0x3,
4086 TEGRA_WAKE_GPIO("eqos", 20, 0, TEGRA194_MAIN_GPIO(G, 4)),
4090 TEGRA_WAKE_SIMPLE("usb3-port-0", 76),
4093 TEGRA_WAKE_SIMPLE("usb2-port-0", 79),
4101 .num_powergates = 0,
4103 .num_cpu_powergates = 0,
4129 .num_pmc_clks = 0,
4136 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIA, 0, 0xe0c0, 0xe0c4, UINT_MAX, "csia"),
4137 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIB, 1, 0xe0c0, 0xe0c4, UINT_MAX, "csib"),
4138 TEGRA_IO_PAD(TEGRA_IO_PAD_HDMI_DP0, 0, 0xe0d0, 0xe0d4, UINT_MAX, "hdmi-dp0"),
4139 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIC, 2, 0xe0c0, 0xe0c4, UINT_MAX, "csic"),
4140 TEGRA_IO_PAD(TEGRA_IO_PAD_CSID, 3, 0xe0c0, 0xe0c4, UINT_MAX, "csid"),
4141 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIE, 4, 0xe0c0, 0xe0c4, UINT_MAX, "csie"),
4142 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIF, 5, 0xe0c0, 0xe0c4, UINT_MAX, "csif"),
4143 TEGRA_IO_PAD(TEGRA_IO_PAD_UFS, 0, 0xe064, 0xe068, UINT_MAX, "ufs"),
4144 TEGRA_IO_PAD(TEGRA_IO_PAD_EDP, 1, 0xe05c, 0xe060, UINT_MAX, "edp"),
4145 TEGRA_IO_PAD(TEGRA_IO_PAD_SDMMC1_HV, 0, 0xe054, 0xe058, 4, "sdmmc1-hv"),
4148 TEGRA_IO_PAD(TEGRA_IO_PAD_AO_HV, UINT_MAX, UINT_MAX, UINT_MAX, 0, "ao-hv"),
4149 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIG, 6, 0xe0c0, 0xe0c4, UINT_MAX, "csig"),
4150 TEGRA_IO_PAD(TEGRA_IO_PAD_CSIH, 7, 0xe0c0, 0xe0c4, UINT_MAX, "csih"),
4172 .scratch0 = 0x2000,
4173 .rst_status = 0x70,
4174 .rst_source_shift = 0x2,
4175 .rst_source_mask = 0xfc,
4176 .rst_level_shift = 0x0,
4177 .rst_level_mask = 0x3,
4181 "SYS_RESET_N", /* 0x0 */
4189 "SENSOR", /* 0x8 */
4197 NULL, /* 0x10 */
4205 "CSITE_SW", /* 0x18 */
4213 "FSI_R52C0WDT", /* 0x20 */
4218 "FSI_VMON", /* 0x25 */
4222 TEGRA_WAKE_GPIO("sd-wake", 8, 0, TEGRA234_MAIN_GPIO(G, 7)),
4223 TEGRA_WAKE_GPIO("eqos", 20, 0, TEGRA234_MAIN_GPIO(G, 4)),
4226 TEGRA_WAKE_GPIO("mgbe", 56, 0, TEGRA234_MAIN_GPIO(Y, 3)),
4228 TEGRA_WAKE_IRQ("usb3-port-0", 76, 167),
4231 TEGRA_WAKE_IRQ("usb2-port-0", 79, 167),
4240 .num_powergates = 0,
4242 .num_cpu_powergates = 0,
4268 .num_pmc_clks = 0,
4274 .scratch0 = 0x684,
4275 .rst_status = 0x4,
4276 .rst_source_shift = 0x2,
4277 .rst_source_mask = 0x1fc,
4278 .rst_level_shift = 0x0,
4279 .rst_level_mask = 0x3,
4283 "SYS_RESET_N", /* 0x0 */
4291 "POD_IO", /* 0x8 */
4299 "SCPM_BPMP_CORE_CLK", /* 0x10 */
4307 "NV_THERM_FAULT", /* 0x18 */
4315 "POD_MSS", /* 0x20 */
4323 "AO_WDT_POR", /* 0x28 */
4331 "FSI_R52_1_WDT_POR", /* 0x30 */
4339 "GPU_TKE_WDT_POR", /* 0x38 */
4347 "AO_WDT_DBG", /* 0x40 */
4355 "FSI_R52_1_WDT_DBG", /* 0x48 */
4363 "PSC_WDT_DBG", /* 0x50 */
4471 value = saved ^ 0xffffffff; in tegra_pmc_detect_tz_only()
4473 if (value == 0xffffffff) in tegra_pmc_detect_tz_only()
4474 value = 0xdeadbeef; in tegra_pmc_detect_tz_only()
4481 if (value == 0) { in tegra_pmc_detect_tz_only()
4521 regs.start = 0x7000e400; in tegra_pmc_early_init()
4522 regs.end = 0x7000e7ff; in tegra_pmc_early_init()
4531 return 0; in tegra_pmc_early_init()
4538 if (of_address_to_resource(np, 0, ®s) < 0) { in tegra_pmc_early_init()
4559 for (i = 0; i < pmc->soc->num_powergates; i++) in tegra_pmc_early_init()
4574 return 0; in tegra_pmc_early_init()