1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2150c2493STom Warren /* 37aaa5a60STom Warren * (C) Copyright 2010-2015 4150c2493STom Warren * NVIDIA Corporation <www.nvidia.com> 5150c2493STom Warren */ 6150c2493STom Warren 7150c2493STom Warren #ifndef _PMC_H_ 8150c2493STom Warren #define _PMC_H_ 9150c2493STom Warren 10150c2493STom Warren /* Power Management Controller (APBDEV_PMC_) registers */ 11150c2493STom Warren struct pmc_ctlr { 12150c2493STom Warren uint pmc_cntrl; /* _CNTRL_0, offset 00 */ 13150c2493STom Warren uint pmc_sec_disable; /* _SEC_DISABLE_0, offset 04 */ 14150c2493STom Warren uint pmc_pmc_swrst; /* _PMC_SWRST_0, offset 08 */ 15150c2493STom Warren uint pmc_wake_mask; /* _WAKE_MASK_0, offset 0C */ 16150c2493STom Warren uint pmc_wake_lvl; /* _WAKE_LVL_0, offset 10 */ 17150c2493STom Warren uint pmc_wake_status; /* _WAKE_STATUS_0, offset 14 */ 18150c2493STom Warren uint pmc_sw_wake_status; /* _SW_WAKE_STATUS_0, offset 18 */ 19150c2493STom Warren uint pmc_dpd_pads_oride; /* _DPD_PADS_ORIDE_0, offset 1C */ 20150c2493STom Warren uint pmc_dpd_sample; /* _DPD_PADS_SAMPLE_0, offset 20 */ 21150c2493STom Warren uint pmc_dpd_enable; /* _DPD_PADS_ENABLE_0, offset 24 */ 22150c2493STom Warren uint pmc_pwrgate_timer_off; /* _PWRGATE_TIMER_OFF_0, offset 28 */ 239399e540SStephen Warren #if defined(CONFIG_TEGRA20) || defined(CONFIG_TEGRA30) 24150c2493STom Warren uint pmc_pwrgate_timer_on; /* _PWRGATE_TIMER_ON_0, offset 2C */ 259399e540SStephen Warren #else 269399e540SStephen Warren uint pmc_clamp_status; /* _CLAMP_STATUS_0, offset 2C */ 279399e540SStephen Warren #endif 28150c2493STom Warren uint pmc_pwrgate_toggle; /* _PWRGATE_TOGGLE_0, offset 30 */ 29150c2493STom Warren uint pmc_remove_clamping; /* _REMOVE_CLAMPING_CMD_0, offset 34 */ 30150c2493STom Warren uint pmc_pwrgate_status; /* _PWRGATE_STATUS_0, offset 38 */ 31150c2493STom Warren uint pmc_pwrgood_timer; /* _PWRGOOD_TIMER_0, offset 3C */ 32150c2493STom Warren uint pmc_blink_timer; /* _BLINK_TIMER_0, offset 40 */ 33150c2493STom Warren uint pmc_no_iopower; /* _NO_IOPOWER_0, offset 44 */ 34150c2493STom Warren uint pmc_pwr_det; /* _PWR_DET_0, offset 48 */ 35150c2493STom Warren uint pmc_pwr_det_latch; /* _PWR_DET_LATCH_0, offset 4C */ 36150c2493STom Warren 37150c2493STom Warren uint pmc_scratch0; /* _SCRATCH0_0, offset 50 */ 38150c2493STom Warren uint pmc_scratch1; /* _SCRATCH1_0, offset 54 */ 39150c2493STom Warren uint pmc_scratch2; /* _SCRATCH2_0, offset 58 */ 40150c2493STom Warren uint pmc_scratch3; /* _SCRATCH3_0, offset 5C */ 41150c2493STom Warren uint pmc_scratch4; /* _SCRATCH4_0, offset 60 */ 42150c2493STom Warren uint pmc_scratch5; /* _SCRATCH5_0, offset 64 */ 43150c2493STom Warren uint pmc_scratch6; /* _SCRATCH6_0, offset 68 */ 44150c2493STom Warren uint pmc_scratch7; /* _SCRATCH7_0, offset 6C */ 45150c2493STom Warren uint pmc_scratch8; /* _SCRATCH8_0, offset 70 */ 46150c2493STom Warren uint pmc_scratch9; /* _SCRATCH9_0, offset 74 */ 47150c2493STom Warren uint pmc_scratch10; /* _SCRATCH10_0, offset 78 */ 48150c2493STom Warren uint pmc_scratch11; /* _SCRATCH11_0, offset 7C */ 49150c2493STom Warren uint pmc_scratch12; /* _SCRATCH12_0, offset 80 */ 50150c2493STom Warren uint pmc_scratch13; /* _SCRATCH13_0, offset 84 */ 51150c2493STom Warren uint pmc_scratch14; /* _SCRATCH14_0, offset 88 */ 52150c2493STom Warren uint pmc_scratch15; /* _SCRATCH15_0, offset 8C */ 53150c2493STom Warren uint pmc_scratch16; /* _SCRATCH16_0, offset 90 */ 54150c2493STom Warren uint pmc_scratch17; /* _SCRATCH17_0, offset 94 */ 55150c2493STom Warren uint pmc_scratch18; /* _SCRATCH18_0, offset 98 */ 56150c2493STom Warren uint pmc_scratch19; /* _SCRATCH19_0, offset 9C */ 57150c2493STom Warren uint pmc_scratch20; /* _SCRATCH20_0, offset A0 */ 58150c2493STom Warren uint pmc_scratch21; /* _SCRATCH21_0, offset A4 */ 59150c2493STom Warren uint pmc_scratch22; /* _SCRATCH22_0, offset A8 */ 60150c2493STom Warren uint pmc_scratch23; /* _SCRATCH23_0, offset AC */ 61150c2493STom Warren 62150c2493STom Warren uint pmc_secure_scratch0; /* _SECURE_SCRATCH0_0, offset B0 */ 63150c2493STom Warren uint pmc_secure_scratch1; /* _SECURE_SCRATCH1_0, offset B4 */ 64150c2493STom Warren uint pmc_secure_scratch2; /* _SECURE_SCRATCH2_0, offset B8 */ 65150c2493STom Warren uint pmc_secure_scratch3; /* _SECURE_SCRATCH3_0, offset BC */ 66150c2493STom Warren uint pmc_secure_scratch4; /* _SECURE_SCRATCH4_0, offset C0 */ 67150c2493STom Warren uint pmc_secure_scratch5; /* _SECURE_SCRATCH5_0, offset C4 */ 68150c2493STom Warren 69150c2493STom Warren uint pmc_cpupwrgood_timer; /* _CPUPWRGOOD_TIMER_0, offset C8 */ 70150c2493STom Warren uint pmc_cpupwroff_timer; /* _CPUPWROFF_TIMER_0, offset CC */ 71150c2493STom Warren uint pmc_pg_mask; /* _PG_MASK_0, offset D0 */ 72150c2493STom Warren uint pmc_pg_mask_1; /* _PG_MASK_1_0, offset D4 */ 73150c2493STom Warren uint pmc_auto_wake_lvl; /* _AUTO_WAKE_LVL_0, offset D8 */ 74150c2493STom Warren uint pmc_auto_wake_lvl_mask; /* _AUTO_WAKE_LVL_MASK_0, offset DC */ 75150c2493STom Warren uint pmc_wake_delay; /* _WAKE_DELAY_0, offset E0 */ 76150c2493STom Warren uint pmc_pwr_det_val; /* _PWR_DET_VAL_0, offset E4 */ 77150c2493STom Warren uint pmc_ddr_pwr; /* _DDR_PWR_0, offset E8 */ 78150c2493STom Warren uint pmc_usb_debounce_del; /* _USB_DEBOUNCE_DEL_0, offset EC */ 79150c2493STom Warren uint pmc_usb_ao; /* _USB_AO_0, offset F0 */ 80150c2493STom Warren uint pmc_crypto_op; /* _CRYPTO_OP__0, offset F4 */ 81150c2493STom Warren uint pmc_pllp_wb0_override; /* _PLLP_WB0_OVERRIDE_0, offset F8 */ 82150c2493STom Warren 83150c2493STom Warren uint pmc_scratch24; /* _SCRATCH24_0, offset FC */ 84150c2493STom Warren uint pmc_scratch25; /* _SCRATCH24_0, offset 100 */ 85150c2493STom Warren uint pmc_scratch26; /* _SCRATCH24_0, offset 104 */ 86150c2493STom Warren uint pmc_scratch27; /* _SCRATCH24_0, offset 108 */ 87150c2493STom Warren uint pmc_scratch28; /* _SCRATCH24_0, offset 10C */ 88150c2493STom Warren uint pmc_scratch29; /* _SCRATCH24_0, offset 110 */ 89150c2493STom Warren uint pmc_scratch30; /* _SCRATCH24_0, offset 114 */ 90150c2493STom Warren uint pmc_scratch31; /* _SCRATCH24_0, offset 118 */ 91150c2493STom Warren uint pmc_scratch32; /* _SCRATCH24_0, offset 11C */ 92150c2493STom Warren uint pmc_scratch33; /* _SCRATCH24_0, offset 120 */ 93150c2493STom Warren uint pmc_scratch34; /* _SCRATCH24_0, offset 124 */ 94150c2493STom Warren uint pmc_scratch35; /* _SCRATCH24_0, offset 128 */ 95150c2493STom Warren uint pmc_scratch36; /* _SCRATCH24_0, offset 12C */ 96150c2493STom Warren uint pmc_scratch37; /* _SCRATCH24_0, offset 130 */ 97150c2493STom Warren uint pmc_scratch38; /* _SCRATCH24_0, offset 134 */ 98150c2493STom Warren uint pmc_scratch39; /* _SCRATCH24_0, offset 138 */ 99150c2493STom Warren uint pmc_scratch40; /* _SCRATCH24_0, offset 13C */ 100150c2493STom Warren uint pmc_scratch41; /* _SCRATCH24_0, offset 140 */ 101150c2493STom Warren uint pmc_scratch42; /* _SCRATCH24_0, offset 144 */ 102150c2493STom Warren 103150c2493STom Warren uint pmc_bo_mirror0; /* _BOUNDOUT_MIRROR0_0, offset 148 */ 104150c2493STom Warren uint pmc_bo_mirror1; /* _BOUNDOUT_MIRROR1_0, offset 14C */ 105150c2493STom Warren uint pmc_bo_mirror2; /* _BOUNDOUT_MIRROR2_0, offset 150 */ 106150c2493STom Warren uint pmc_sys_33v_en; /* _SYS_33V_EN_0, offset 154 */ 107150c2493STom Warren uint pmc_bo_mirror_access; /* _BOUNDOUT_MIRROR_ACCESS_0, off158 */ 108150c2493STom Warren uint pmc_gate; /* _GATE_0, offset 15C */ 109999c6bafSTom Warren /* The following fields are in Tegra124 and later only */ 110999c6bafSTom Warren uint pmc_wake2_mask; /* _WAKE2_MASK_0, offset 160 */ 111999c6bafSTom Warren uint pmc_wake2_lvl; /* _WAKE2_LVL_0, offset 164 */ 112999c6bafSTom Warren uint pmc_wake2_stat; /* _WAKE2_STATUS_0, offset 168 */ 113999c6bafSTom Warren uint pmc_sw_wake2_stat; /* _SW_WAKE2_STATUS_0, offset 16C */ 114999c6bafSTom Warren uint pmc_auto_wake2_lvl_mask; /* _AUTO_WAKE2_LVL_MASK_0, offset 170 */ 115999c6bafSTom Warren uint pmc_pg_mask2; /* _PG_MASK_2_0, offset 174 */ 116999c6bafSTom Warren uint pmc_pg_mask_ce1; /* _PG_MASK_CE1_0, offset 178 */ 117999c6bafSTom Warren uint pmc_pg_mask_ce2; /* _PG_MASK_CE2_0, offset 17C */ 118999c6bafSTom Warren uint pmc_pg_mask_ce3; /* _PG_MASK_CE3_0, offset 180 */ 119999c6bafSTom Warren uint pmc_pwrgate_timer_ce0; /* _PWRGATE_TIMER_CE_0_0, offset 184 */ 120999c6bafSTom Warren uint pmc_pwrgate_timer_ce1; /* _PWRGATE_TIMER_CE_1_0, offset 188 */ 121999c6bafSTom Warren uint pmc_pwrgate_timer_ce2; /* _PWRGATE_TIMER_CE_2_0, offset 18C */ 122999c6bafSTom Warren uint pmc_pwrgate_timer_ce3; /* _PWRGATE_TIMER_CE_3_0, offset 190 */ 123999c6bafSTom Warren uint pmc_pwrgate_timer_ce4; /* _PWRGATE_TIMER_CE_4_0, offset 194 */ 124999c6bafSTom Warren uint pmc_pwrgate_timer_ce5; /* _PWRGATE_TIMER_CE_5_0, offset 198 */ 125999c6bafSTom Warren uint pmc_pwrgate_timer_ce6; /* _PWRGATE_TIMER_CE_6_0, offset 19C */ 126999c6bafSTom Warren uint pmc_pcx_edpd_cntrl; /* _PCX_EDPD_CNTRL_0, offset 1A0 */ 127999c6bafSTom Warren uint pmc_osc_edpd_over; /* _OSC_EDPD_OVER_0, offset 1A4 */ 128999c6bafSTom Warren uint pmc_clk_out_cntrl; /* _CLK_OUT_CNTRL_0, offset 1A8 */ 129999c6bafSTom Warren uint pmc_sata_pwrgate; /* _SATA_PWRGT_0, offset 1AC */ 130999c6bafSTom Warren uint pmc_sensor_ctrl; /* _SENSOR_CTRL_0, offset 1B0 */ 131999c6bafSTom Warren uint pmc_reset_status; /* _RTS_STATUS_0, offset 1B4 */ 132999c6bafSTom Warren uint pmc_io_dpd_req; /* _IO_DPD_REQ_0, offset 1B8 */ 133999c6bafSTom Warren uint pmc_io_dpd_stat; /* _IO_DPD_STATUS_0, offset 1BC */ 134999c6bafSTom Warren uint pmc_io_dpd2_req; /* _IO_DPD2_REQ_0, offset 1C0 */ 135999c6bafSTom Warren uint pmc_io_dpd2_stat; /* _IO_DPD2_STATUS_0, offset 1C4 */ 136999c6bafSTom Warren uint pmc_sel_dpd_tim; /* _SEL_DPD_TIM_0, offset 1C8 */ 137999c6bafSTom Warren uint pmc_vddp_sel; /* _VDDP_SEL_0, offset 1CC */ 138999c6bafSTom Warren 139999c6bafSTom Warren uint pmc_ddr_cfg; /* _DDR_CFG_0, offset 1D0 */ 140999c6bafSTom Warren uint pmc_e_no_vttgen; /* _E_NO_VTTGEN_0, offset 1D4 */ 141999c6bafSTom Warren uint pmc_reserved0; /* _RESERVED, offset 1D8 */ 142999c6bafSTom Warren uint pmc_pllm_wb0_ovrride_frq; /* _PLLM_WB0_OVERRIDE_FREQ_0, off 1DC */ 143999c6bafSTom Warren uint pmc_test_pwrgate; /* _TEST_PWRGATE_0, offset 1E0 */ 144999c6bafSTom Warren uint pmc_pwrgate_timer_mult; /* _PWRGATE_TIMER_MULT_0, offset 1E4 */ 145999c6bafSTom Warren uint pmc_dsi_sel_dpd; /* _DSI_SEL_DPD_0, offset 1E8 */ 146999c6bafSTom Warren uint pmc_utmip_uhsic_triggers; /* _UTMIP_UHSIC_TRIGGERS_0, off 1EC */ 147999c6bafSTom Warren uint pmc_utmip_uhsic_saved_st; /* _UTMIP_UHSIC_SAVED_STATE_0, off1F0 */ 148999c6bafSTom Warren uint pmc_utmip_pad_cfg; /* _UTMIP_PAD_CFG_0, offset 1F4 */ 149999c6bafSTom Warren uint pmc_utmip_term_pad_cfg; /* _UTMIP_TERM_PAD_CFG_0, offset 1F8 */ 150999c6bafSTom Warren uint pmc_utmip_uhsic_sleep_cfg; /* _UTMIP_UHSIC_SLEEP_CFG_0, off 1FC */ 151999c6bafSTom Warren 152999c6bafSTom Warren uint pmc_todo_0[9]; /* offset 200-220 */ 153999c6bafSTom Warren uint pmc_secure_scratch6; /* _SECURE_SCRATCH6_0, offset 224 */ 154999c6bafSTom Warren uint pmc_secure_scratch7; /* _SECURE_SCRATCH7_0, offset 228 */ 155999c6bafSTom Warren uint pmc_scratch43; /* _SCRATCH43_0, offset 22C */ 156999c6bafSTom Warren uint pmc_scratch44; /* _SCRATCH44_0, offset 230 */ 157999c6bafSTom Warren uint pmc_scratch45; 158999c6bafSTom Warren uint pmc_scratch46; 159999c6bafSTom Warren uint pmc_scratch47; 160999c6bafSTom Warren uint pmc_scratch48; 161999c6bafSTom Warren uint pmc_scratch49; 162999c6bafSTom Warren uint pmc_scratch50; 163999c6bafSTom Warren uint pmc_scratch51; 164999c6bafSTom Warren uint pmc_scratch52; 165999c6bafSTom Warren uint pmc_scratch53; 166999c6bafSTom Warren uint pmc_scratch54; 167999c6bafSTom Warren uint pmc_scratch55; /* _SCRATCH55_0, offset 25C */ 168999c6bafSTom Warren uint pmc_scratch0_eco; /* _SCRATCH0_ECO_0, offset 260 */ 169999c6bafSTom Warren uint pmc_por_dpd_ctrl; /* _POR_DPD_CTRL_0, offset 264 */ 170999c6bafSTom Warren uint pmc_scratch2_eco; /* _SCRATCH2_ECO_0, offset 268 */ 171999c6bafSTom Warren uint pmc_todo_1[17]; /* TODO: 26C ~ 2AC */ 172999c6bafSTom Warren uint pmc_pllm_wb0_override2; /* _PLLM_WB0_OVERRIDE2, offset 2B0 */ 173999c6bafSTom Warren uint pmc_tsc_mult; /* _TSC_MULT_0, offset 2B4 */ 174999c6bafSTom Warren uint pmc_cpu_vsense_override; /* _CPU_VSENSE_OVERRIDE_0, offset 2B8 */ 175999c6bafSTom Warren uint pmc_glb_amap_cfg; /* _GLB_AMAP_CFG_0, offset 2BC */ 176999c6bafSTom Warren uint pmc_sticky_bits; /* _STICKY_BITS_0, offset 2C0 */ 177999c6bafSTom Warren uint pmc_sec_disable2; /* _SEC_DISALBE2, offset 2C4 */ 178999c6bafSTom Warren uint pmc_weak_bias; /* _WEAK_BIAS_0, offset 2C8 */ 179999c6bafSTom Warren uint pmc_todo_3[13]; /* TODO: 2CC ~ 2FC */ 180999c6bafSTom Warren uint pmc_secure_scratch8; /* _SECURE_SCRATCH8_0, offset 300 */ 181999c6bafSTom Warren uint pmc_secure_scratch9; 182999c6bafSTom Warren uint pmc_secure_scratch10; 183999c6bafSTom Warren uint pmc_secure_scratch11; 184999c6bafSTom Warren uint pmc_secure_scratch12; 185999c6bafSTom Warren uint pmc_secure_scratch13; 186999c6bafSTom Warren uint pmc_secure_scratch14; 187999c6bafSTom Warren uint pmc_secure_scratch15; 188999c6bafSTom Warren uint pmc_secure_scratch16; 189999c6bafSTom Warren uint pmc_secure_scratch17; 190999c6bafSTom Warren uint pmc_secure_scratch18; 191999c6bafSTom Warren uint pmc_secure_scratch19; 192999c6bafSTom Warren uint pmc_secure_scratch20; 193999c6bafSTom Warren uint pmc_secure_scratch21; 194999c6bafSTom Warren uint pmc_secure_scratch22; 195999c6bafSTom Warren uint pmc_secure_scratch23; 196999c6bafSTom Warren uint pmc_secure_scratch24; /* _SECURE_SCRATCH24_0, offset 340 */ 197999c6bafSTom Warren uint pmc_secure_scratch25; 198999c6bafSTom Warren uint pmc_secure_scratch26; 199999c6bafSTom Warren uint pmc_secure_scratch27; 200999c6bafSTom Warren uint pmc_secure_scratch28; 201999c6bafSTom Warren uint pmc_secure_scratch29; 202999c6bafSTom Warren uint pmc_secure_scratch30; 203999c6bafSTom Warren uint pmc_secure_scratch31; 204999c6bafSTom Warren uint pmc_secure_scratch32; 205999c6bafSTom Warren uint pmc_secure_scratch33; 206999c6bafSTom Warren uint pmc_secure_scratch34; 207999c6bafSTom Warren uint pmc_secure_scratch35; /* _SECURE_SCRATCH35_0, offset 36C */ 208999c6bafSTom Warren 209999c6bafSTom Warren uint pmc_reserved1[52]; /* RESERVED: 370 ~ 43C */ 210999c6bafSTom Warren uint pmc_cntrl2; /* _CNTRL2_0, offset 440 */ 211999c6bafSTom Warren uint pmc_reserved2[6]; /* RESERVED: 444 ~ 458 */ 212999c6bafSTom Warren uint pmc_io_dpd3_req; /* _IO_DPD3_REQ_0, offset 45c */ 213999c6bafSTom Warren uint pmc_io_dpd3_stat; /* _IO_DPD3_STATUS_0, offset 460 */ 214999c6bafSTom Warren uint pmc_strap_opt_a; /* _STRAPPING_OPT_A_0, offset 464 */ 215999c6bafSTom Warren uint pmc_reserved3[102]; /* RESERVED: 468 ~ 5FC */ 216999c6bafSTom Warren 217999c6bafSTom Warren uint pmc_scratch56; /* _SCRATCH56_0, offset 600 */ 218999c6bafSTom Warren uint pmc_scratch57; 219999c6bafSTom Warren uint pmc_scratch58; 220999c6bafSTom Warren uint pmc_scratch59; 221999c6bafSTom Warren uint pmc_scratch60; 222999c6bafSTom Warren uint pmc_scratch61; 223999c6bafSTom Warren uint pmc_scratch62; 224999c6bafSTom Warren uint pmc_scratch63; 225999c6bafSTom Warren uint pmc_scratch64; 226999c6bafSTom Warren uint pmc_scratch65; 227999c6bafSTom Warren uint pmc_scratch66; 228999c6bafSTom Warren uint pmc_scratch67; 229999c6bafSTom Warren uint pmc_scratch68; 230999c6bafSTom Warren uint pmc_scratch69; 231999c6bafSTom Warren uint pmc_scratch70; 232999c6bafSTom Warren uint pmc_scratch71; 233999c6bafSTom Warren uint pmc_scratch72; 234999c6bafSTom Warren uint pmc_scratch73; 235999c6bafSTom Warren uint pmc_scratch74; 236999c6bafSTom Warren uint pmc_scratch75; 237999c6bafSTom Warren uint pmc_scratch76; 238999c6bafSTom Warren uint pmc_scratch77; 239999c6bafSTom Warren uint pmc_scratch78; 240999c6bafSTom Warren uint pmc_scratch79; 241999c6bafSTom Warren uint pmc_scratch80; 242999c6bafSTom Warren uint pmc_scratch81; 243999c6bafSTom Warren uint pmc_scratch82; 244999c6bafSTom Warren uint pmc_scratch83; 245999c6bafSTom Warren uint pmc_scratch84; 246999c6bafSTom Warren uint pmc_scratch85; 247999c6bafSTom Warren uint pmc_scratch86; 248999c6bafSTom Warren uint pmc_scratch87; 249999c6bafSTom Warren uint pmc_scratch88; 250999c6bafSTom Warren uint pmc_scratch89; 251999c6bafSTom Warren uint pmc_scratch90; 252999c6bafSTom Warren uint pmc_scratch91; 253999c6bafSTom Warren uint pmc_scratch92; 254999c6bafSTom Warren uint pmc_scratch93; 255999c6bafSTom Warren uint pmc_scratch94; 256999c6bafSTom Warren uint pmc_scratch95; 257999c6bafSTom Warren uint pmc_scratch96; 258999c6bafSTom Warren uint pmc_scratch97; 259999c6bafSTom Warren uint pmc_scratch98; 260999c6bafSTom Warren uint pmc_scratch99; 261999c6bafSTom Warren uint pmc_scratch100; 262999c6bafSTom Warren uint pmc_scratch101; 263999c6bafSTom Warren uint pmc_scratch102; 264999c6bafSTom Warren uint pmc_scratch103; 265999c6bafSTom Warren uint pmc_scratch104; 266999c6bafSTom Warren uint pmc_scratch105; 267999c6bafSTom Warren uint pmc_scratch106; 268999c6bafSTom Warren uint pmc_scratch107; 269999c6bafSTom Warren uint pmc_scratch108; 270999c6bafSTom Warren uint pmc_scratch109; 271999c6bafSTom Warren uint pmc_scratch110; 272999c6bafSTom Warren uint pmc_scratch111; 273999c6bafSTom Warren uint pmc_scratch112; 274999c6bafSTom Warren uint pmc_scratch113; 275999c6bafSTom Warren uint pmc_scratch114; 276999c6bafSTom Warren uint pmc_scratch115; 277999c6bafSTom Warren uint pmc_scratch116; 278999c6bafSTom Warren uint pmc_scratch117; 279999c6bafSTom Warren uint pmc_scratch118; 280999c6bafSTom Warren uint pmc_scratch119; 281999c6bafSTom Warren uint pmc_scratch1_eco; /* offset 700 */ 282150c2493STom Warren }; 283150c2493STom Warren 284150c2493STom Warren #define CPU_PWRED 1 285150c2493STom Warren #define CPU_CLMP 1 286150c2493STom Warren 287150c2493STom Warren #define PARTID_CP 0xFFFFFFF8 288150c2493STom Warren #define START_CP (1 << 8) 289150c2493STom Warren 290150c2493STom Warren #define CPUPWRREQ_OE (1 << 16) 2912fc65e28STom Warren #define CPUPWRREQ_POL (1 << 15) 2922fc65e28STom Warren 293cad38a57SStephen Warren #define CRAIL 0 294cad38a57SStephen Warren #define CE0 14 295cad38a57SStephen Warren #define C0NC 15 2967aaa5a60STom Warren #define SOR 17 297150c2493STom Warren 298999c6bafSTom Warren #define PMC_XOFS_SHIFT 1 299999c6bafSTom Warren #define PMC_XOFS_MASK (0x3F << PMC_XOFS_SHIFT) 300999c6bafSTom Warren 301f3026c16SStephen Warren #if defined(CONFIG_TEGRA114) 302999c6bafSTom Warren #define TIMER_MULT_SHIFT 0 303999c6bafSTom Warren #define TIMER_MULT_MASK (3 << TIMER_MULT_SHIFT) 304999c6bafSTom Warren #define TIMER_MULT_CPU_SHIFT 2 305999c6bafSTom Warren #define TIMER_MULT_CPU_MASK (3 << TIMER_MULT_CPU_SHIFT) 3067aaa5a60STom Warren #elif defined(CONFIG_TEGRA124) || defined(CONFIG_TEGRA210) 307f3026c16SStephen Warren #define TIMER_MULT_SHIFT 0 308f3026c16SStephen Warren #define TIMER_MULT_MASK (7 << TIMER_MULT_SHIFT) 309f3026c16SStephen Warren #define TIMER_MULT_CPU_SHIFT 3 310f3026c16SStephen Warren #define TIMER_MULT_CPU_MASK (7 << TIMER_MULT_CPU_SHIFT) 311f3026c16SStephen Warren #endif 312f3026c16SStephen Warren 313999c6bafSTom Warren #define MULT_1 0 314999c6bafSTom Warren #define MULT_2 1 315999c6bafSTom Warren #define MULT_4 2 316999c6bafSTom Warren #define MULT_8 3 3177aaa5a60STom Warren #if defined(CONFIG_TEGRA124) || defined(CONFIG_TEGRA210) 318f3026c16SStephen Warren #define MULT_16 4 319f3026c16SStephen Warren #endif 320999c6bafSTom Warren 321999c6bafSTom Warren #define AMAP_WRITE_SHIFT 20 322999c6bafSTom Warren #define AMAP_WRITE_ON (1 << AMAP_WRITE_SHIFT) 323999c6bafSTom Warren 324999c6bafSTom Warren /* SEC_DISABLE_0, 0x04 */ 325999c6bafSTom Warren #define SEC_DISABLE_WRITE0_ON (1 << 4) 326999c6bafSTom Warren #define SEC_DISABLE_READ0_ON (1 << 5) 327999c6bafSTom Warren #define SEC_DISABLE_WRITE1_ON (1 << 6) 328999c6bafSTom Warren #define SEC_DISABLE_READ1_ON (1 << 7) 329999c6bafSTom Warren #define SEC_DISABLE_WRITE2_ON (1 << 8) 330999c6bafSTom Warren #define SEC_DISABLE_READ2_ON (1 << 9) 331999c6bafSTom Warren #define SEC_DISABLE_WRITE3_ON (1 << 10) 332999c6bafSTom Warren #define SEC_DISABLE_READ3_ON (1 << 11) 333999c6bafSTom Warren #define SEC_DISABLE_AMAP_WRITE_ON (1 << 20) 334999c6bafSTom Warren 335999c6bafSTom Warren /* APBDEV_PMC_PWRGATE_TOGGLE_0 0x30 */ 336999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_CRAIL 0 337999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_TD 1 338999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_VE 2 339999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_PCX 3 340999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_VDE 4 341999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_L2C 5 342999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_MPE 6 343999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_HEG 7 344999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_SAX 8 345999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_CE1 9 346999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_CE2 10 347999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_CE3 11 348999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_CELP 12 349999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_CE0 14 350999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_C0NC 15 351999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_C1NC 16 352999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_SOR 17 353999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_DIS 18 354999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_DISB 19 355999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_XUSBA 20 356999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_XUSBB 21 357999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_XUSBC 22 358999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_VIC 23 359999c6bafSTom Warren #define PWRGATE_TOGGLE_PARTID_IRAM 24 360999c6bafSTom Warren #define PWRGATE_TOGGLE_START (1 << 8) 361999c6bafSTom Warren 362999c6bafSTom Warren /* APBDEV_PMC_PWRGATE_STATUS_0 0x38 */ 363999c6bafSTom Warren #define PWRGATE_STATUS_CRAIL_ENABLE (1 << 0) 364999c6bafSTom Warren #define PWRGATE_STATUS_TD_ENABLE (1 << 1) 365999c6bafSTom Warren #define PWRGATE_STATUS_VE_ENABLE (1 << 2) 366999c6bafSTom Warren #define PWRGATE_STATUS_PCX_ENABLE (1 << 3) 367999c6bafSTom Warren #define PWRGATE_STATUS_VDE_ENABLE (1 << 4) 368999c6bafSTom Warren #define PWRGATE_STATUS_L2C_ENABLE (1 << 5) 369999c6bafSTom Warren #define PWRGATE_STATUS_MPE_ENABLE (1 << 6) 370999c6bafSTom Warren #define PWRGATE_STATUS_HEG_ENABLE (1 << 7) 371999c6bafSTom Warren #define PWRGATE_STATUS_SAX_ENABLE (1 << 8) 372999c6bafSTom Warren #define PWRGATE_STATUS_CE1_ENABLE (1 << 9) 373999c6bafSTom Warren #define PWRGATE_STATUS_CE2_ENABLE (1 << 10) 374999c6bafSTom Warren #define PWRGATE_STATUS_CE3_ENABLE (1 << 11) 375999c6bafSTom Warren #define PWRGATE_STATUS_CELP_ENABLE (1 << 12) 376999c6bafSTom Warren #define PWRGATE_STATUS_CE0_ENABLE (1 << 14) 377999c6bafSTom Warren #define PWRGATE_STATUS_C0NC_ENABLE (1 << 15) 378999c6bafSTom Warren #define PWRGATE_STATUS_C1NC_ENABLE (1 << 16) 379999c6bafSTom Warren #define PWRGATE_STATUS_SOR_ENABLE (1 << 17) 380999c6bafSTom Warren #define PWRGATE_STATUS_DIS_ENABLE (1 << 18) 381999c6bafSTom Warren #define PWRGATE_STATUS_DISB_ENABLE (1 << 19) 382999c6bafSTom Warren #define PWRGATE_STATUS_XUSBA_ENABLE (1 << 20) 383999c6bafSTom Warren #define PWRGATE_STATUS_XUSBB_ENABLE (1 << 21) 384999c6bafSTom Warren #define PWRGATE_STATUS_XUSBC_ENABLE (1 << 22) 385999c6bafSTom Warren #define PWRGATE_STATUS_VIC_ENABLE (1 << 23) 386999c6bafSTom Warren #define PWRGATE_STATUS_IRAM_ENABLE (1 << 24) 387999c6bafSTom Warren 388999c6bafSTom Warren /* APBDEV_PMC_CNTRL2_0 0x440 */ 389999c6bafSTom Warren #define HOLD_CKE_LOW_EN (1 << 12) 390999c6bafSTom Warren 391150c2493STom Warren #endif /* PMC_H */ 392