1*150c2493STom Warren /* 2*150c2493STom Warren * (C) Copyright 2010,2011 3*150c2493STom Warren * NVIDIA Corporation <www.nvidia.com> 4*150c2493STom Warren * 5*150c2493STom Warren * See file CREDITS for list of people who contributed to this 6*150c2493STom Warren * project. 7*150c2493STom Warren * 8*150c2493STom Warren * This program is free software; you can redistribute it and/or 9*150c2493STom Warren * modify it under the terms of the GNU General Public License as 10*150c2493STom Warren * published by the Free Software Foundation; either version 2 of 11*150c2493STom Warren * the License, or (at your option) any later version. 12*150c2493STom Warren * 13*150c2493STom Warren * This program is distributed in the hope that it will be useful, 14*150c2493STom Warren * but WITHOUT ANY WARRANTY; without even the implied warranty of 15*150c2493STom Warren * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16*150c2493STom Warren * GNU General Public License for more details. 17*150c2493STom Warren * 18*150c2493STom Warren * You should have received a copy of the GNU General Public License 19*150c2493STom Warren * along with this program; if not, write to the Free Software 20*150c2493STom Warren * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21*150c2493STom Warren * MA 02111-1307 USA 22*150c2493STom Warren */ 23*150c2493STom Warren 24*150c2493STom Warren #ifndef _PMC_H_ 25*150c2493STom Warren #define _PMC_H_ 26*150c2493STom Warren 27*150c2493STom Warren /* Power Management Controller (APBDEV_PMC_) registers */ 28*150c2493STom Warren struct pmc_ctlr { 29*150c2493STom Warren uint pmc_cntrl; /* _CNTRL_0, offset 00 */ 30*150c2493STom Warren uint pmc_sec_disable; /* _SEC_DISABLE_0, offset 04 */ 31*150c2493STom Warren uint pmc_pmc_swrst; /* _PMC_SWRST_0, offset 08 */ 32*150c2493STom Warren uint pmc_wake_mask; /* _WAKE_MASK_0, offset 0C */ 33*150c2493STom Warren uint pmc_wake_lvl; /* _WAKE_LVL_0, offset 10 */ 34*150c2493STom Warren uint pmc_wake_status; /* _WAKE_STATUS_0, offset 14 */ 35*150c2493STom Warren uint pmc_sw_wake_status; /* _SW_WAKE_STATUS_0, offset 18 */ 36*150c2493STom Warren uint pmc_dpd_pads_oride; /* _DPD_PADS_ORIDE_0, offset 1C */ 37*150c2493STom Warren uint pmc_dpd_sample; /* _DPD_PADS_SAMPLE_0, offset 20 */ 38*150c2493STom Warren uint pmc_dpd_enable; /* _DPD_PADS_ENABLE_0, offset 24 */ 39*150c2493STom Warren uint pmc_pwrgate_timer_off; /* _PWRGATE_TIMER_OFF_0, offset 28 */ 40*150c2493STom Warren uint pmc_pwrgate_timer_on; /* _PWRGATE_TIMER_ON_0, offset 2C */ 41*150c2493STom Warren uint pmc_pwrgate_toggle; /* _PWRGATE_TOGGLE_0, offset 30 */ 42*150c2493STom Warren uint pmc_remove_clamping; /* _REMOVE_CLAMPING_CMD_0, offset 34 */ 43*150c2493STom Warren uint pmc_pwrgate_status; /* _PWRGATE_STATUS_0, offset 38 */ 44*150c2493STom Warren uint pmc_pwrgood_timer; /* _PWRGOOD_TIMER_0, offset 3C */ 45*150c2493STom Warren uint pmc_blink_timer; /* _BLINK_TIMER_0, offset 40 */ 46*150c2493STom Warren uint pmc_no_iopower; /* _NO_IOPOWER_0, offset 44 */ 47*150c2493STom Warren uint pmc_pwr_det; /* _PWR_DET_0, offset 48 */ 48*150c2493STom Warren uint pmc_pwr_det_latch; /* _PWR_DET_LATCH_0, offset 4C */ 49*150c2493STom Warren 50*150c2493STom Warren uint pmc_scratch0; /* _SCRATCH0_0, offset 50 */ 51*150c2493STom Warren uint pmc_scratch1; /* _SCRATCH1_0, offset 54 */ 52*150c2493STom Warren uint pmc_scratch2; /* _SCRATCH2_0, offset 58 */ 53*150c2493STom Warren uint pmc_scratch3; /* _SCRATCH3_0, offset 5C */ 54*150c2493STom Warren uint pmc_scratch4; /* _SCRATCH4_0, offset 60 */ 55*150c2493STom Warren uint pmc_scratch5; /* _SCRATCH5_0, offset 64 */ 56*150c2493STom Warren uint pmc_scratch6; /* _SCRATCH6_0, offset 68 */ 57*150c2493STom Warren uint pmc_scratch7; /* _SCRATCH7_0, offset 6C */ 58*150c2493STom Warren uint pmc_scratch8; /* _SCRATCH8_0, offset 70 */ 59*150c2493STom Warren uint pmc_scratch9; /* _SCRATCH9_0, offset 74 */ 60*150c2493STom Warren uint pmc_scratch10; /* _SCRATCH10_0, offset 78 */ 61*150c2493STom Warren uint pmc_scratch11; /* _SCRATCH11_0, offset 7C */ 62*150c2493STom Warren uint pmc_scratch12; /* _SCRATCH12_0, offset 80 */ 63*150c2493STom Warren uint pmc_scratch13; /* _SCRATCH13_0, offset 84 */ 64*150c2493STom Warren uint pmc_scratch14; /* _SCRATCH14_0, offset 88 */ 65*150c2493STom Warren uint pmc_scratch15; /* _SCRATCH15_0, offset 8C */ 66*150c2493STom Warren uint pmc_scratch16; /* _SCRATCH16_0, offset 90 */ 67*150c2493STom Warren uint pmc_scratch17; /* _SCRATCH17_0, offset 94 */ 68*150c2493STom Warren uint pmc_scratch18; /* _SCRATCH18_0, offset 98 */ 69*150c2493STom Warren uint pmc_scratch19; /* _SCRATCH19_0, offset 9C */ 70*150c2493STom Warren uint pmc_scratch20; /* _SCRATCH20_0, offset A0 */ 71*150c2493STom Warren uint pmc_scratch21; /* _SCRATCH21_0, offset A4 */ 72*150c2493STom Warren uint pmc_scratch22; /* _SCRATCH22_0, offset A8 */ 73*150c2493STom Warren uint pmc_scratch23; /* _SCRATCH23_0, offset AC */ 74*150c2493STom Warren 75*150c2493STom Warren uint pmc_secure_scratch0; /* _SECURE_SCRATCH0_0, offset B0 */ 76*150c2493STom Warren uint pmc_secure_scratch1; /* _SECURE_SCRATCH1_0, offset B4 */ 77*150c2493STom Warren uint pmc_secure_scratch2; /* _SECURE_SCRATCH2_0, offset B8 */ 78*150c2493STom Warren uint pmc_secure_scratch3; /* _SECURE_SCRATCH3_0, offset BC */ 79*150c2493STom Warren uint pmc_secure_scratch4; /* _SECURE_SCRATCH4_0, offset C0 */ 80*150c2493STom Warren uint pmc_secure_scratch5; /* _SECURE_SCRATCH5_0, offset C4 */ 81*150c2493STom Warren 82*150c2493STom Warren uint pmc_cpupwrgood_timer; /* _CPUPWRGOOD_TIMER_0, offset C8 */ 83*150c2493STom Warren uint pmc_cpupwroff_timer; /* _CPUPWROFF_TIMER_0, offset CC */ 84*150c2493STom Warren uint pmc_pg_mask; /* _PG_MASK_0, offset D0 */ 85*150c2493STom Warren uint pmc_pg_mask_1; /* _PG_MASK_1_0, offset D4 */ 86*150c2493STom Warren uint pmc_auto_wake_lvl; /* _AUTO_WAKE_LVL_0, offset D8 */ 87*150c2493STom Warren uint pmc_auto_wake_lvl_mask; /* _AUTO_WAKE_LVL_MASK_0, offset DC */ 88*150c2493STom Warren uint pmc_wake_delay; /* _WAKE_DELAY_0, offset E0 */ 89*150c2493STom Warren uint pmc_pwr_det_val; /* _PWR_DET_VAL_0, offset E4 */ 90*150c2493STom Warren uint pmc_ddr_pwr; /* _DDR_PWR_0, offset E8 */ 91*150c2493STom Warren uint pmc_usb_debounce_del; /* _USB_DEBOUNCE_DEL_0, offset EC */ 92*150c2493STom Warren uint pmc_usb_ao; /* _USB_AO_0, offset F0 */ 93*150c2493STom Warren uint pmc_crypto_op; /* _CRYPTO_OP__0, offset F4 */ 94*150c2493STom Warren uint pmc_pllp_wb0_override; /* _PLLP_WB0_OVERRIDE_0, offset F8 */ 95*150c2493STom Warren 96*150c2493STom Warren uint pmc_scratch24; /* _SCRATCH24_0, offset FC */ 97*150c2493STom Warren uint pmc_scratch25; /* _SCRATCH24_0, offset 100 */ 98*150c2493STom Warren uint pmc_scratch26; /* _SCRATCH24_0, offset 104 */ 99*150c2493STom Warren uint pmc_scratch27; /* _SCRATCH24_0, offset 108 */ 100*150c2493STom Warren uint pmc_scratch28; /* _SCRATCH24_0, offset 10C */ 101*150c2493STom Warren uint pmc_scratch29; /* _SCRATCH24_0, offset 110 */ 102*150c2493STom Warren uint pmc_scratch30; /* _SCRATCH24_0, offset 114 */ 103*150c2493STom Warren uint pmc_scratch31; /* _SCRATCH24_0, offset 118 */ 104*150c2493STom Warren uint pmc_scratch32; /* _SCRATCH24_0, offset 11C */ 105*150c2493STom Warren uint pmc_scratch33; /* _SCRATCH24_0, offset 120 */ 106*150c2493STom Warren uint pmc_scratch34; /* _SCRATCH24_0, offset 124 */ 107*150c2493STom Warren uint pmc_scratch35; /* _SCRATCH24_0, offset 128 */ 108*150c2493STom Warren uint pmc_scratch36; /* _SCRATCH24_0, offset 12C */ 109*150c2493STom Warren uint pmc_scratch37; /* _SCRATCH24_0, offset 130 */ 110*150c2493STom Warren uint pmc_scratch38; /* _SCRATCH24_0, offset 134 */ 111*150c2493STom Warren uint pmc_scratch39; /* _SCRATCH24_0, offset 138 */ 112*150c2493STom Warren uint pmc_scratch40; /* _SCRATCH24_0, offset 13C */ 113*150c2493STom Warren uint pmc_scratch41; /* _SCRATCH24_0, offset 140 */ 114*150c2493STom Warren uint pmc_scratch42; /* _SCRATCH24_0, offset 144 */ 115*150c2493STom Warren 116*150c2493STom Warren uint pmc_bo_mirror0; /* _BOUNDOUT_MIRROR0_0, offset 148 */ 117*150c2493STom Warren uint pmc_bo_mirror1; /* _BOUNDOUT_MIRROR1_0, offset 14C */ 118*150c2493STom Warren uint pmc_bo_mirror2; /* _BOUNDOUT_MIRROR2_0, offset 150 */ 119*150c2493STom Warren uint pmc_sys_33v_en; /* _SYS_33V_EN_0, offset 154 */ 120*150c2493STom Warren uint pmc_bo_mirror_access; /* _BOUNDOUT_MIRROR_ACCESS_0, off158 */ 121*150c2493STom Warren uint pmc_gate; /* _GATE_0, offset 15C */ 122*150c2493STom Warren }; 123*150c2493STom Warren 124*150c2493STom Warren #define CPU_PWRED 1 125*150c2493STom Warren #define CPU_CLMP 1 126*150c2493STom Warren 127*150c2493STom Warren #define PARTID_CP 0xFFFFFFF8 128*150c2493STom Warren #define START_CP (1 << 8) 129*150c2493STom Warren 130*150c2493STom Warren #define CPUPWRREQ_OE (1 << 16) 131*150c2493STom Warren 132*150c2493STom Warren #endif /* PMC_H */ 133