1*45370e18SAlison Wang /* 2*45370e18SAlison Wang * MCF5441X Internal Memory Map 3*45370e18SAlison Wang * 4*45370e18SAlison Wang * Copyright 2010-2012 Freescale Semiconductor, Inc. 5*45370e18SAlison Wang * TsiChung Liew (Tsi-Chung.Liew@freescale.com) 6*45370e18SAlison Wang * 7*45370e18SAlison Wang * See file CREDITS for list of people who contributed to this 8*45370e18SAlison Wang * project. 9*45370e18SAlison Wang * 10*45370e18SAlison Wang * This program is free software; you can redistribute it and/or 11*45370e18SAlison Wang * modify it under the terms of the GNU General Public License as 12*45370e18SAlison Wang * published by the Free Software Foundation; either version 2 of 13*45370e18SAlison Wang * the License, or (at your option) any later version. 14*45370e18SAlison Wang * 15*45370e18SAlison Wang * This program is distributed in the hope that it will be useful, 16*45370e18SAlison Wang * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*45370e18SAlison Wang * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*45370e18SAlison Wang * GNU General Public License for more details. 19*45370e18SAlison Wang * 20*45370e18SAlison Wang * You should have received a copy of the GNU General Public License 21*45370e18SAlison Wang * along with this program; if not, write to the Free Software 22*45370e18SAlison Wang * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23*45370e18SAlison Wang * MA 02111-1307 USA 24*45370e18SAlison Wang */ 25*45370e18SAlison Wang 26*45370e18SAlison Wang #ifndef __MCF5441X__ 27*45370e18SAlison Wang #define __MCF5441X__ 28*45370e18SAlison Wang 29*45370e18SAlison Wang /* Interrupt Controller (INTC) */ 30*45370e18SAlison Wang #define INT0_LO_RSVD0 (0) 31*45370e18SAlison Wang #define INT0_LO_EPORT1 (1) 32*45370e18SAlison Wang #define INT0_LO_EPORT2 (2) 33*45370e18SAlison Wang #define INT0_LO_EPORT3 (3) 34*45370e18SAlison Wang #define INT0_LO_EPORT4 (4) 35*45370e18SAlison Wang #define INT0_LO_EPORT5 (5) 36*45370e18SAlison Wang #define INT0_LO_EPORT6 (6) 37*45370e18SAlison Wang #define INT0_LO_EPORT7 (7) 38*45370e18SAlison Wang #define INT0_LO_EDMA_00 (8) 39*45370e18SAlison Wang #define INT0_LO_EDMA_01 (9) 40*45370e18SAlison Wang #define INT0_LO_EDMA_02 (10) 41*45370e18SAlison Wang #define INT0_LO_EDMA_03 (11) 42*45370e18SAlison Wang #define INT0_LO_EDMA_04 (12) 43*45370e18SAlison Wang #define INT0_LO_EDMA_05 (13) 44*45370e18SAlison Wang #define INT0_LO_EDMA_06 (14) 45*45370e18SAlison Wang #define INT0_LO_EDMA_07 (15) 46*45370e18SAlison Wang #define INT0_LO_EDMA_08 (16) 47*45370e18SAlison Wang #define INT0_LO_EDMA_09 (17) 48*45370e18SAlison Wang #define INT0_LO_EDMA_10 (18) 49*45370e18SAlison Wang #define INT0_LO_EDMA_11 (19) 50*45370e18SAlison Wang #define INT0_LO_EDMA_12 (20) 51*45370e18SAlison Wang #define INT0_LO_EDMA_13 (21) 52*45370e18SAlison Wang #define INT0_LO_EDMA_14 (22) 53*45370e18SAlison Wang #define INT0_LO_EDMA_15 (23) 54*45370e18SAlison Wang #define INT0_LO_EDMA_ERR (24) 55*45370e18SAlison Wang #define INT0_LO_SCM (25) 56*45370e18SAlison Wang #define INT0_LO_UART0 (26) 57*45370e18SAlison Wang #define INT0_LO_UART1 (27) 58*45370e18SAlison Wang #define INT0_LO_UART2 (28) 59*45370e18SAlison Wang #define INT0_LO_UART3 (29) 60*45370e18SAlison Wang #define INT0_LO_I2C0 (30) 61*45370e18SAlison Wang #define INT0_LO_DSPI0 (31) 62*45370e18SAlison Wang #define INT0_HI_DTMR0 (32) 63*45370e18SAlison Wang #define INT0_HI_DTMR1 (33) 64*45370e18SAlison Wang #define INT0_HI_DTMR2 (34) 65*45370e18SAlison Wang #define INT0_HI_DTMR3 (35) 66*45370e18SAlison Wang #define INT0_HI_MACNET0_TXF (36) 67*45370e18SAlison Wang #define INT0_HI_MACNET0_TXB (37) 68*45370e18SAlison Wang #define INT0_HI_MACNET0_UN (38) 69*45370e18SAlison Wang #define INT0_HI_MACNET0_RL (39) 70*45370e18SAlison Wang #define INT0_HI_MACNET0_RXF (40) 71*45370e18SAlison Wang #define INT0_HI_MACNET0_RXB (41) 72*45370e18SAlison Wang #define INT0_HI_MACNET0_MII (42) 73*45370e18SAlison Wang #define INT0_HI_MACNET0_LC (43) 74*45370e18SAlison Wang /* not used 44 */ 75*45370e18SAlison Wang #define INT0_HI_MACNET0_GRA (45) 76*45370e18SAlison Wang #define INT0_HI_MACNET0_EBERR (46) 77*45370e18SAlison Wang #define INT0_HI_MACNET0_BABT (47) 78*45370e18SAlison Wang #define INT0_HI_MACNET0_BABR (48) 79*45370e18SAlison Wang #define INT0_HI_MACNET1_TXF (49) 80*45370e18SAlison Wang #define INT0_HI_MACNET1_TXB (50) 81*45370e18SAlison Wang #define INT0_HI_MACNET1_UN (51) 82*45370e18SAlison Wang #define INT0_HI_MACNET1_RL (52) 83*45370e18SAlison Wang #define INT0_HI_MACNET1_RXF (53) 84*45370e18SAlison Wang #define INT0_HI_MACNET1_RXB (54) 85*45370e18SAlison Wang #define INT0_HI_MACNET1_MII (55) 86*45370e18SAlison Wang #define INT0_HI_MACNET1_LC (56) 87*45370e18SAlison Wang /* not used 57 */ 88*45370e18SAlison Wang #define INT0_HI_MACNET1_GRA (58) 89*45370e18SAlison Wang #define INT0_HI_MACNET1_EBERR (59) 90*45370e18SAlison Wang #define INT0_HI_MACNET1_BABT (60) 91*45370e18SAlison Wang #define INT0_HI_MACNET1_BABR (61) 92*45370e18SAlison Wang #define INT0_HI_SCMIR (62) 93*45370e18SAlison Wang #define INT0_HI_OW (63) 94*45370e18SAlison Wang 95*45370e18SAlison Wang #define INT1_LO_CAN0_IFG (0) 96*45370e18SAlison Wang #define INT1_LO_CAN0_BOFF (1) 97*45370e18SAlison Wang /* not used 2 */ 98*45370e18SAlison Wang #define INT1_LO_CAN0_TXRXWRN (3) 99*45370e18SAlison Wang #define INT1_LO_CAN1_IFG (4) 100*45370e18SAlison Wang #define INT1_LO_CAN1_BOFF (5) 101*45370e18SAlison Wang /* not used 6 */ 102*45370e18SAlison Wang #define INT1_LO_CAN1_TXRXWRN (7) 103*45370e18SAlison Wang #define INT1_LO_EDMA_16 (8) 104*45370e18SAlison Wang #define INT1_LO_EDMA_17 (9) 105*45370e18SAlison Wang #define INT1_LO_EDMA_18 (10) 106*45370e18SAlison Wang #define INT1_LO_EDMA_19 (11) 107*45370e18SAlison Wang #define INT1_LO_EDMA_20 (12) 108*45370e18SAlison Wang #define INT1_LO_EDMA_21 (13) 109*45370e18SAlison Wang #define INT1_LO_EDMA_22 (14) 110*45370e18SAlison Wang #define INT1_LO_EDMA_23 (15) 111*45370e18SAlison Wang #define INT1_LO_EDMA_24 (16) 112*45370e18SAlison Wang #define INT1_LO_EDMA_25 (17) 113*45370e18SAlison Wang #define INT1_LO_EDMA_26 (18) 114*45370e18SAlison Wang #define INT1_LO_EDMA_27 (19) 115*45370e18SAlison Wang #define INT1_LO_EDMA_28 (20) 116*45370e18SAlison Wang #define INT1_LO_EDMA_29 (21) 117*45370e18SAlison Wang #define INT1_LO_EDMA_30 (22) 118*45370e18SAlison Wang #define INT1_LO_EDMA_31 (23) 119*45370e18SAlison Wang #define INT1_LO_EDMA_32 (24) 120*45370e18SAlison Wang #define INT1_LO_EDMA_33 (25) 121*45370e18SAlison Wang #define INT1_LO_EDMA_34 (26) 122*45370e18SAlison Wang #define INT1_LO_EDMA_35 (27) 123*45370e18SAlison Wang #define INT1_LO_EDMA_36 (28) 124*45370e18SAlison Wang #define INT1_LO_EDMA_37 (29) 125*45370e18SAlison Wang #define INT1_LO_EDMA_38 (30) 126*45370e18SAlison Wang #define INT1_LO_EDMA_39 (31) 127*45370e18SAlison Wang #define INT1_LO_EDMA_40 (32) 128*45370e18SAlison Wang #define INT1_HI_EDMA_41 (33) 129*45370e18SAlison Wang #define INT1_HI_EDMA_42 (34) 130*45370e18SAlison Wang #define INT1_HI_EDMA_43 (35) 131*45370e18SAlison Wang #define INT1_HI_EDMA_44 (36) 132*45370e18SAlison Wang #define INT1_HI_EDMA_45 (37) 133*45370e18SAlison Wang #define INT1_HI_EDMA_46 (38) 134*45370e18SAlison Wang #define INT1_HI_EDMA_47 (39) 135*45370e18SAlison Wang #define INT1_HI_EDMA_48 (40) 136*45370e18SAlison Wang #define INT1_HI_EDMA_49 (41) 137*45370e18SAlison Wang #define INT1_HI_EDMA_50 (42) 138*45370e18SAlison Wang #define INT1_HI_EDMA_51 (43) 139*45370e18SAlison Wang #define INT1_HI_EDMA_52 (44) 140*45370e18SAlison Wang #define INT1_HI_EDMA_53 (45) 141*45370e18SAlison Wang #define INT1_HI_EDMA_54 (46) 142*45370e18SAlison Wang #define INT1_HI_EDMA_55 (47) 143*45370e18SAlison Wang #define INT1_HI_UART4 (48) 144*45370e18SAlison Wang #define INT1_HI_UART5 (49) 145*45370e18SAlison Wang #define INT1_HI_UART6 (50) 146*45370e18SAlison Wang #define INT1_HI_UART7 (51) 147*45370e18SAlison Wang #define INT1_HI_UART8 (52) 148*45370e18SAlison Wang #define INT1_HI_UART9 (53) 149*45370e18SAlison Wang #define INT1_HI_DSPI1 (54) 150*45370e18SAlison Wang #define INT1_HI_DSPI2 (55) 151*45370e18SAlison Wang #define INT1_HI_DSPI3 (56) 152*45370e18SAlison Wang #define INT1_HI_I2C1 (57) 153*45370e18SAlison Wang #define INT1_HI_I2C2 (58) 154*45370e18SAlison Wang #define INT1_HI_I2C3 (59) 155*45370e18SAlison Wang #define INT1_HI_I2C4 (60) 156*45370e18SAlison Wang #define INT1_HI_I2C5 (61) 157*45370e18SAlison Wang 158*45370e18SAlison Wang #define INT2_LO_EDMA56_63 (0) 159*45370e18SAlison Wang #define INT2_LO_PWM_SM0SR_CF (1) 160*45370e18SAlison Wang #define INT2_LO_PWM_SM1SR_CF (2) 161*45370e18SAlison Wang #define INT2_LO_PWM_SM2SR_CF (3) 162*45370e18SAlison Wang #define INT2_LO_PWM_SM3SR_CF (4) 163*45370e18SAlison Wang #define INT2_LO_PWM_SM0SR_RF (5) 164*45370e18SAlison Wang #define INT2_LO_PWM_SM1SR_RF (6) 165*45370e18SAlison Wang #define INT2_LO_PWM_SM2SR_RF (7) 166*45370e18SAlison Wang #define INT2_LO_PWM_SM3SR_RF (8) 167*45370e18SAlison Wang #define INT2_LO_PWM_FSR (9) 168*45370e18SAlison Wang #define INT2_LO_PWM_SMSR_REF (10) 169*45370e18SAlison Wang #define INT2_LO_PLL_SR_LOCF (11) 170*45370e18SAlison Wang #define INT2_LO_PLL_SR_LOLF (12) 171*45370e18SAlison Wang #define INT2_LO_PIT0_PIF (13) 172*45370e18SAlison Wang #define INT2_LO_PIT1_PIF (14) 173*45370e18SAlison Wang #define INT2_LO_PIT2_PIF (15) 174*45370e18SAlison Wang #define INT2_LO_PIT3_PIF (16) 175*45370e18SAlison Wang #define INT2_LO_USBOTG_USBSTS (17) 176*45370e18SAlison Wang #define INT2_LO_USBH_USBSTS (18) 177*45370e18SAlison Wang /* not used 19-20 */ 178*45370e18SAlison Wang #define INT2_LO_SSI0 (21) 179*45370e18SAlison Wang #define INT2_LO_SSI1 (22) 180*45370e18SAlison Wang #define INT2_LO_NFC (23) 181*45370e18SAlison Wang /* not used 24-25 */ 182*45370e18SAlison Wang #define INT2_LO_RTC (26) 183*45370e18SAlison Wang #define INT2_LO_CCM_UOCSR (27) 184*45370e18SAlison Wang #define INT2_LO_RNG_EI (28) 185*45370e18SAlison Wang #define INT2_LO_SIM1_DATA (29) 186*45370e18SAlison Wang #define INT2_LO_SIM1 (30) 187*45370e18SAlison Wang #define INT2_LO_SDHC (31) 188*45370e18SAlison Wang /* not used 32-37 */ 189*45370e18SAlison Wang #define INT2_HI_L2SW_BERR (38) 190*45370e18SAlison Wang #define INT2_HI_L2SW_RXB (39) 191*45370e18SAlison Wang #define INT2_HI_L2SW_RXF (40) 192*45370e18SAlison Wang #define INT2_HI_L2SW_TXB (41) 193*45370e18SAlison Wang #define INT2_HI_L2SW_TXF (42) 194*45370e18SAlison Wang #define INT2_HI_L2SW_QM (43) 195*45370e18SAlison Wang #define INT2_HI_L2SW_OD0 (44) 196*45370e18SAlison Wang #define INT2_HI_L2SW_OD1 (45) 197*45370e18SAlison Wang #define INT2_HI_L2SW_OD2 (46) 198*45370e18SAlison Wang #define INT2_HI_L2SW_LRN (47) 199*45370e18SAlison Wang #define INT2_HI_MACNET0_TS (48) 200*45370e18SAlison Wang #define INT2_HI_MACNET0_WAKE (49) 201*45370e18SAlison Wang #define INT2_HI_MACNET0_PLR (50) 202*45370e18SAlison Wang /* not used 51-54 */ 203*45370e18SAlison Wang #define INT2_HI_MACNET1_TS (51) 204*45370e18SAlison Wang #define INT2_HI_MACNET1_WAKE (52) 205*45370e18SAlison Wang #define INT2_HI_MACNET1_PLR (53) 206*45370e18SAlison Wang 207*45370e18SAlison Wang /* Serial Boot Facility (SBF) */ 208*45370e18SAlison Wang #define SBF_SBFCR_BLDIV(x) (((x)&0x000F)) 209*45370e18SAlison Wang #define SBF_SBFCR_FR (0x0010) 210*45370e18SAlison Wang 211*45370e18SAlison Wang /* Reset Controller Module (RCM) */ 212*45370e18SAlison Wang #define RCM_RCR_SOFTRST (0x80) 213*45370e18SAlison Wang #define RCM_RCR_FRCRSTOUT (0x40) 214*45370e18SAlison Wang 215*45370e18SAlison Wang #define RCM_RSR_SOFT (0x20) 216*45370e18SAlison Wang #define RCM_RSR_LOC (0x10) 217*45370e18SAlison Wang #define RCM_RSR_POR (0x08) 218*45370e18SAlison Wang #define RCM_RSR_EXT (0x04) 219*45370e18SAlison Wang #define RCM_RSR_WDR_CORE (0x02) 220*45370e18SAlison Wang #define RCM_RSR_LOL (0x01) 221*45370e18SAlison Wang 222*45370e18SAlison Wang /* Chip Configuration Module (CCM) */ 223*45370e18SAlison Wang #define CCM_CCR_BOOTMOD (0xC000) 224*45370e18SAlison Wang #define CCM_CCR_PLLMULT (0x0FC0) 225*45370e18SAlison Wang #define CCM_CCR_BOOTPS (0x0030) 226*45370e18SAlison Wang #define CCM_CCR_BOOTPS_32 (0x0000) 227*45370e18SAlison Wang #define CCM_CCR_BOOTPS_16 (0x0020) 228*45370e18SAlison Wang #define CCM_CCR_BOOTPS_8 (0x0010) 229*45370e18SAlison Wang #define CCM_CCR_BOOTPS_ (0x0000) 230*45370e18SAlison Wang #define CCM_CCR_ALESEL (0x0008) 231*45370e18SAlison Wang #define CCM_CCR_OSCMOD (0x0004) 232*45370e18SAlison Wang #define CCM_CCR_PLLMOD (0x0002) 233*45370e18SAlison Wang #define CCM_CCR_BOOTMEM (0x0001) 234*45370e18SAlison Wang 235*45370e18SAlison Wang #define CCM_CIR_PIN_MASK (0xFFC0) 236*45370e18SAlison Wang #define CCM_CIR_PRN_MASK (0x003F) 237*45370e18SAlison Wang #define CCM_CIR_PIN_MCF54410 (0x9F<<6) 238*45370e18SAlison Wang #define CCM_CIR_PIN_MCF54415 (0xA0<<6) 239*45370e18SAlison Wang #define CCM_CIR_PIN_MCF54416 (0xA1<<6) 240*45370e18SAlison Wang #define CCM_CIR_PIN_MCF54417 (0xA2<<6) 241*45370e18SAlison Wang #define CCM_CIR_PIN_MCF54418 (0xA3<<6) 242*45370e18SAlison Wang 243*45370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK(x) (((x)&(0x0003)<<14) 244*45370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_MASK (0x3FFF) 245*45370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR0 (0x0000) 246*45370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR1 (0x4000) 247*45370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR2 (0x8000) 248*45370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR3 (0xC000) 249*45370e18SAlison Wang #define CCM_MISCCR_LIMP (0x1000) 250*45370e18SAlison Wang #define CCM_MISCCR_BME (0x0800) 251*45370e18SAlison Wang #define CCM_MISCCR_BMT(x) (((x)&0x0007)<<8) 252*45370e18SAlison Wang #define CCM_MISCCR_BMT_65536 (0) 253*45370e18SAlison Wang #define CCM_MISCCR_BMT_32768 (1) 254*45370e18SAlison Wang #define CCM_MISCCR_BMT_16384 (2) 255*45370e18SAlison Wang #define CCM_MISCCR_BMT_8192 (3) 256*45370e18SAlison Wang #define CCM_MISCCR_BMT_4096 (4) 257*45370e18SAlison Wang #define CCM_MISCCR_BMT_2048 (5) 258*45370e18SAlison Wang #define CCM_MISCCR_BMT_1024 (6) 259*45370e18SAlison Wang #define CCM_MISCCR_BMT_512 (7) 260*45370e18SAlison Wang #define CCM_MISCCR_SDHCSRC (0x0040) 261*45370e18SAlison Wang #define CCM_MISCCR_SSI1SRC (0x0020) 262*45370e18SAlison Wang #define CCM_MISCCR_SSI0SRC (0x0010) 263*45370e18SAlison Wang #define CCM_MISCCR_USBHOC (0x0008) 264*45370e18SAlison Wang #define CCM_MISCCR_USBOOC (0x0004) 265*45370e18SAlison Wang #define CCM_MISCCR_USBPUE (0x0002) 266*45370e18SAlison Wang #define CCM_MISCCR_USBSRC (0x0001) 267*45370e18SAlison Wang 268*45370e18SAlison Wang #define CCM_CDRH_SSI0DIV(x) (((x)&0x00FF)<<8) 269*45370e18SAlison Wang #define CCM_CDRH_SSI0DIV_MASK (0x00FF) 270*45370e18SAlison Wang #define CCM_CDRH_SSI1DIV(x) (((x)&0x00FF)) 271*45370e18SAlison Wang #define CCM_CDRH_SSI1DIV_MASK (0xFF00) 272*45370e18SAlison Wang #define CCM_CDRL_LPDIV(x) (((x)&0x000F)<<8) 273*45370e18SAlison Wang #define CCM_CDRL_LPDIV_MASK (0xFF0F) 274*45370e18SAlison Wang #define CCM_CDR_LPDIV(x) CCM_CDRL_LPDIV(x) 275*45370e18SAlison Wang 276*45370e18SAlison Wang #define CCM_UOCSR_DPPD (0x2000) 277*45370e18SAlison Wang #define CCM_UOCSR_DMPD (0x1000) 278*45370e18SAlison Wang #define CCM_UOCSR_DRV_VBUS (0x0800) 279*45370e18SAlison Wang #define CCM_UOCSR_CRG_VBUS (0x0400) 280*45370e18SAlison Wang #define CCM_UOCSR_DCR_VBUS (0x0200) 281*45370e18SAlison Wang #define CCM_UOCSR_DPPU (0x0100) 282*45370e18SAlison Wang #define CCM_UOCSR_AVLD (0x0080) 283*45370e18SAlison Wang #define CCM_UOCSR_BVLD (0x0040) 284*45370e18SAlison Wang #define CCM_UOCSR_VVLD (0x0020) 285*45370e18SAlison Wang #define CCM_UOCSR_SEND (0x0010) 286*45370e18SAlison Wang #define CCM_UOCSR_PWRFLT (0x0008) 287*45370e18SAlison Wang #define CCM_UOCSR_WKUP (0x0004) 288*45370e18SAlison Wang #define CCM_UOCSR_UOMIE (0x0002) 289*45370e18SAlison Wang #define CCM_UOCSR_XPDE (0x0001) 290*45370e18SAlison Wang 291*45370e18SAlison Wang #define CCM_UHCSR_DRV_VBUS (0x0010) 292*45370e18SAlison Wang #define CCM_UHCSR_PWRFLT (0x0008) 293*45370e18SAlison Wang #define CCM_UHCSR_WKUP (0x0004) 294*45370e18SAlison Wang #define CCM_UHCSR_UOMIE (0x0002) 295*45370e18SAlison Wang #define CCM_UHCSR_XPDE (0x0001) 296*45370e18SAlison Wang 297*45370e18SAlison Wang #define CCM_MISCCR3_TMR_ENET (0x1000) 298*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK(x) (((x)&7)<<8) 299*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_MASK (0xF8FF) 300*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_MII (0x0700) 301*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_OSC (0x0600) 302*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_USB (0x0500) 303*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR3 (0x0400) 304*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR2 (0x0300) 305*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR1 (0x0200) 306*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR0 (0x0100) 307*45370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_INTBUS (0x0000) 308*45370e18SAlison Wang 309*45370e18SAlison Wang #define CCM_MISCCR2_EXTCLKBYP (0x8000) 310*45370e18SAlison Wang #define CCM_MISCCR2_DDR2CLK (0x4000) 311*45370e18SAlison Wang #define CCM_MISCCR2_RGPIO_HALF (0x2000) 312*45370e18SAlison Wang #define CCM_MISCCR2_SWTSCR (0x1000) 313*45370e18SAlison Wang #define CCM_MISCCR2_PLLMODE(x) (((x)&7)<<8) 314*45370e18SAlison Wang #define CCM_MISCCR2_PLLMODE_MASK (0xF8FF) 315*45370e18SAlison Wang #define CCM_MISCCR2_DCCBYP (0x0080) 316*45370e18SAlison Wang #define CCM_MISCCR2_DAC1SEL (0x0040) 317*45370e18SAlison Wang #define CCM_MISCCR2_DAC0SEL (0x0020) 318*45370e18SAlison Wang #define CCM_MISCCR2_ADCEN (0x0010) 319*45370e18SAlison Wang #define CCM_MISCCR2_ADC7SEL (0x0008) 320*45370e18SAlison Wang #define CCM_MISCCR2_ADC3SEL (0x0004) 321*45370e18SAlison Wang #define CCM_MISCCR2_FBHALF (0x0002) 322*45370e18SAlison Wang #define CCM_MISCCR2_ULPI (0x0001) 323*45370e18SAlison Wang 324*45370e18SAlison Wang #define CCM_FNACR_PCR(x) (((x)&0x0F)<<24) 325*45370e18SAlison Wang #define CCM_FNACR_PCR_MASK (0xF0FFFFFF) 326*45370e18SAlison Wang #define CCM_FNACR_MCC(x) ((x)&0xFFFF) 327*45370e18SAlison Wang #define CCM_FNACR_MCC_MASK (0xFFFF0000) 328*45370e18SAlison Wang 329*45370e18SAlison Wang /* General Purpose I/O Module (GPIO) */ 330*45370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE(x) (((x)&3)<<6) 331*45370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_MASK (0x3F) 332*45370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_FB_ALE (0xC0) 333*45370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_FB_TS (0x80) 334*45370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_GPIO (0x00) 335*45370e18SAlison Wang #define GPIO_PAR_FBCTL_OE(x) (((x)&3)<<4) 336*45370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_MASK (0xCF) 337*45370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_FB_OE (0x30) 338*45370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_FB_TBST (0x20) 339*45370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_NFC_RE (0x20) 340*45370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_GPIO (0x00) 341*45370e18SAlison Wang #define GPIO_PAR_FBCTL_FBCLK (0x08) 342*45370e18SAlison Wang #define GPIO_PAR_FBCTL_RW (0x04) 343*45370e18SAlison Wang #define GPIO_PAR_FBCTL_TA(x) ((x)&3) 344*45370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_MASK (0xFC) 345*45370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_TA (0x03) 346*45370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_NFC_RB (0x01) 347*45370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_GPIO (0x00) 348*45370e18SAlison Wang 349*45370e18SAlison Wang #define GPIO_PAR_BE_BS3(x) (((x)&0x03)<<6) 350*45370e18SAlison Wang #define GPIO_PAR_BE_BE3_MASK (0x3F) 351*45370e18SAlison Wang #define GPIO_PAR_BE_BE3_BE3 (0xC0) 352*45370e18SAlison Wang #define GPIO_PAR_BE_BE3_CS3 (0x80) 353*45370e18SAlison Wang #define GPIO_PAR_BE_BE3_FB_A1 (0x40) 354*45370e18SAlison Wang #define GPIO_PAR_BE_BE3_NFC_ALE (0x40) 355*45370e18SAlison Wang #define GPIO_PAR_BE_BE3_GPIO (0x00) 356*45370e18SAlison Wang #define GPIO_PAR_BE_BS2(x) (((x)&0x03)<<4) 357*45370e18SAlison Wang #define GPIO_PAR_BE_BE2_MASK (0xCF) 358*45370e18SAlison Wang #define GPIO_PAR_BE_BE2_BE2 (0x30) 359*45370e18SAlison Wang #define GPIO_PAR_BE_BE2_CS2 (0x20) 360*45370e18SAlison Wang #define GPIO_PAR_BE_BE2_FB_A0 (0x10) 361*45370e18SAlison Wang #define GPIO_PAR_BE_BE2_NFC_CLE (0x10) 362*45370e18SAlison Wang #define GPIO_PAR_BE_BE2_GPIO (0x00) 363*45370e18SAlison Wang #define GPIO_PAR_BE_BS1(x) (((x)&0x03)<<2) 364*45370e18SAlison Wang #define GPIO_PAR_BE_BE1_MASK (0xF3) 365*45370e18SAlison Wang #define GPIO_PAR_BE_BE1_BE1 (0x0C) 366*45370e18SAlison Wang #define GPIO_PAR_BE_BE1_FB_TSZ1 (0x08) 367*45370e18SAlison Wang #define GPIO_PAR_BE_BE1_GPIO (0x00) 368*45370e18SAlison Wang #define GPIO_PAR_BE_BS0(x) ((x)&0x03) 369*45370e18SAlison Wang #define GPIO_PAR_BE_BE0_MASK (0xFC) 370*45370e18SAlison Wang #define GPIO_PAR_BE_BE0_BE0 (0x03) 371*45370e18SAlison Wang #define GPIO_PAR_BE_BE0_FB_TSZ0 (0x02) 372*45370e18SAlison Wang #define GPIO_PAR_BE_BE0_GPIO (0x00) 373*45370e18SAlison Wang 374*45370e18SAlison Wang #define GPIO_PAR_CS_CS5(x) (((x)&0x03)<<6) 375*45370e18SAlison Wang #define GPIO_PAR_CS_CS5_MASK (0x3F) 376*45370e18SAlison Wang #define GPIO_PAR_CS_CS5_CS5 (0xC0) 377*45370e18SAlison Wang #define GPIO_PAR_CS_CS5_DACK1 (0x80) 378*45370e18SAlison Wang #define GPIO_PAR_CS_CS5_GPIO (0x00) 379*45370e18SAlison Wang #define GPIO_PAR_CS_CS4(x) (((x)&0x03)<<4) 380*45370e18SAlison Wang #define GPIO_PAR_CS_CS4_MASK (0xCF) 381*45370e18SAlison Wang #define GPIO_PAR_CS_CS4_CS4 (0x30) 382*45370e18SAlison Wang #define GPIO_PAR_CS_CS4_DREQ1 (0x20) 383*45370e18SAlison Wang #define GPIO_PAR_CS_CS4_GPIO (0x00) 384*45370e18SAlison Wang #define GPIO_PAR_CS_CS1(x) (((x)&0x03)<<2) 385*45370e18SAlison Wang #define GPIO_PAR_CS_CS1_MASK (0xF3) 386*45370e18SAlison Wang #define GPIO_PAR_CS_CS1_CS1 (0x0C) 387*45370e18SAlison Wang #define GPIO_PAR_CS_CS1_NFC_CE (0x04) 388*45370e18SAlison Wang #define GPIO_PAR_CS_CS1_GPIO (0x00) 389*45370e18SAlison Wang #define GPIO_PAR_CS_CS0_CS0 (0x01) 390*45370e18SAlison Wang 391*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL(x) (((x)&0x03)<<6) 392*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_MASK (0x3F) 393*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_I2C0SCL (0xC0) 394*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_U8TXD (0x80) 395*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_CAN0TX (0x40) 396*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_GPIO (0x00) 397*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA(x) (((x)&0x03)<<4) 398*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_MASK (0xCF) 399*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_I2C0SDA (0x30) 400*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_U8RXD (0x20) 401*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_CAN0RX (0x10) 402*45370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_GPIO (0x00) 403*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX(x) (((x)&0x03)<<2) 404*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_MASK (0xF3) 405*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_CAN1TX (0x0C) 406*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_U9TXD (0x08) 407*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_I2C1SCL (0x04) 408*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_GPIO (0x00) 409*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX(x) ((x)&0x03) 410*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_MASK (0xFC) 411*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_CAN1RX (0x03) 412*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_U9RXD (0x02) 413*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_I2C1SDA (0x01) 414*45370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_GPIO (0x00) 415*45370e18SAlison Wang 416*45370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ7 (0x10) 417*45370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4(x) (((x)&0x03)<<2) 418*45370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_MASK (0xF3) 419*45370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_IRQ4 (0x0C) 420*45370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_DREQ0 (0x08) 421*45370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_GPIO (0x00) 422*45370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ1 (0x03) 423*45370e18SAlison Wang 424*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6(x) (((x)&0x03)<<6) 425*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_MASK (0x3F) 426*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_IRQ6 (0xC0) 427*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_USBCLKIN (0x40) 428*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_GPIO (0x00) 429*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3(x) (((x)&0x03)<<4) 430*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_MASK (0xCF) 431*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_IRQ3 (0x30) 432*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_DSPI0_PCS3 (0x20) 433*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_USB1_VBUS_EN (0x10) 434*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_GPIO (0x00) 435*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2(x) (((x)&0x03)<<2) 436*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_MASK (0xF3) 437*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_IRQ2 (0x0C) 438*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_DSPI0_PCS2 (0x08) 439*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_USB1_VBUS_OC (0x04) 440*45370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_GPIO (0x00) 441*45370e18SAlison Wang 442*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN(x) (((x)&0x03)<<6) 443*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_MASK (0x3F) 444*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_DSPI0SIN (0xC0) 445*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_SBF_DI (0xC0) 446*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_U3RXD (0x80) 447*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_SDHC_CMD (0x40) 448*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_GPIO (0x00) 449*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT(x) (((x)&0x03)<<4) 450*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_MASK (0xCF) 451*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_DSPI0SOUT (0x30) 452*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_SBF_DO (0x30) 453*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_U3TXD (0x20) 454*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_SDHC_DAT0 (0x10) 455*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_GPIO (0x00) 456*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK(x) (((x)&0x03)<<2) 457*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_MASK (0xF3) 458*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_DSPI0SCK (0x0C) 459*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_SBF_CK (0x0C) 460*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_I2C3SCL (0x08) 461*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_SDHC_CLK (0x04) 462*45370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_GPIO (0x00) 463*45370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0(x) ((x)&0x03) 464*45370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_MASK (0xFC) 465*45370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_DSPI0PCS0 (0x03) 466*45370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_SS (0x03) 467*45370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_I2C3SDA (0x02) 468*45370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_SDHC_DAT3 (0x01) 469*45370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_GPIO (0x00) 470*45370e18SAlison Wang 471*45370e18SAlison Wang #define GPIO_PAR_DSPIOW_DSPI0PSC1 (0x80) 472*45370e18SAlison Wang #define GPIO_PAR_DSPIOW_SBF_CS (0x80) 473*45370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT (((x)&0x03)<<4) 474*45370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_MASK (0xCF) 475*45370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_OWDAT (0x30) 476*45370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_DACK0 (0x20) 477*45370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_GPIO (0x00) 478*45370e18SAlison Wang 479*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN(x) (((x)&0x03)<<6) 480*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_MASK (0x3F) 481*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_T3IN (0xC0) 482*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_EXTA3 (0xC0) 483*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_T3OUT (0x80) 484*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_USB0_VBUSEN (0x40) 485*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_ULIPI_DIR (0x40) 486*45370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_GPIO (0x00) 487*45370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN(x) (((x)&0x03)<<4) 488*45370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_MASK (0xCF) 489*45370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_T2IN (0x30) 490*45370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_EXTA2 (0x30) 491*45370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_T2OUT (0x20) 492*45370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_SDHC_DAT2 (0x10) 493*45370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_GPIO (0x00) 494*45370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN(x) (((x)&0x03)<<2) 495*45370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_MASK (0xF3) 496*45370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_T1IN (0x0C) 497*45370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_EXTA1 (0x0C) 498*45370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_T1OUT (0x08) 499*45370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_SDHC_DAT1 (0x04) 500*45370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_GPIO (0x00) 501*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN(x) ((x)&0x03) 502*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_MASK (0xFC) 503*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_T0IN (0x03) 504*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_EXTA0 (0x03) 505*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_T0OUT (0x02) 506*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_USBO_VBUSOC (0x01) 507*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_ULPI_NXT (0x01) 508*45370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_GPIO (0x00) 509*45370e18SAlison Wang 510*45370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS(x) (((x)&0x03)<<6) 511*45370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_MASK (0x3F) 512*45370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_U2CTS (0xC0) 513*45370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_U6TXD (0x80) 514*45370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_SSI1_BCLK (0x40) 515*45370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_GPIO (0x00) 516*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS(x) (((x)&0x03)<<4) 517*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_MASK (0xCF) 518*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_U2RTS (0x30) 519*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_U6RXD (0x20) 520*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_SSI1_FS (0x10) 521*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_GPIO (0x00) 522*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD(x) (((x)&0x03)<<2) 523*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_MASK (0xF3) 524*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_U2RXD (0x0C) 525*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_PWM_A3 (0x08) 526*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_SSI1_RXD (0x04) 527*45370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_GPIO (0x00) 528*45370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD(x) ((x)&0x03) 529*45370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_MASK (0xFC) 530*45370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_U2TXD (0x03) 531*45370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_PWM_B3 (0x02) 532*45370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_SSI1_TXD (0x01) 533*45370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_GPIO (0x00) 534*45370e18SAlison Wang 535*45370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS(x) (((x)&0x03)<<6) 536*45370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_MASK (0x3F) 537*45370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_U1CTS (0xC0) 538*45370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_U5TXD (0x80) 539*45370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_DSPI3_SCK (0x40) 540*45370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_GPIO (0x00) 541*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS(x) (((x)&0x03)<<4) 542*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_MASK (0xCF) 543*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_U1RTS (0x30) 544*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_U5RXD (0x20) 545*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_DSPI3_PCS0 (0x10) 546*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_GPIO (0x00) 547*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD(x) (((x)&0x03)<<2) 548*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_MASK (0xF3) 549*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_U1RXD (0x0C) 550*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_I2C5SDA (0x08) 551*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_DSPI3_SIN (0x04) 552*45370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_GPIO (0x00) 553*45370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD(x) ((x)&0x03) 554*45370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_MASK (0xFC) 555*45370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_U1TXD (0x03) 556*45370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_I2C5SCL (0x02) 557*45370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_DSPI3_SOUT (0x01) 558*45370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_GPIO (0x00) 559*45370e18SAlison Wang 560*45370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS(x) (((x)&0x03)<<6) 561*45370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_MASK (0x3F) 562*45370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_U0CTS (0xC0) 563*45370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_U4TXD (0x80) 564*45370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_DSPI2_SCK (0x40) 565*45370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_GPIO (0x00) 566*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS(x) (((x)&0x03)<<4) 567*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_MASK (0xCF) 568*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_U0RTS (0x30) 569*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_U4RXD (0x20) 570*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_DSPI2_PCS0 (0x10) 571*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_GPIO (0x00) 572*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD(x) (((x)&0x03)<<2) 573*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_MASK (0xF3) 574*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_U0RXD (0x0C) 575*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_I2C4SDA (0x08) 576*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_DSPI2_SIN (0x04) 577*45370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_GPIO (0x00) 578*45370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD(x) ((x)&0x03) 579*45370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_MASK (0xFC) 580*45370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_U0TXD (0x03) 581*45370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_I2C4SCL (0x02) 582*45370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_DSPI2_SOUT (0x01) 583*45370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_GPIO (0x00) 584*45370e18SAlison Wang 585*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3(x) (((x)&0x03)<<6) 586*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_MASK (0x3F) 587*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_DAT3 (0xC0) 588*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_PWM_A1 (0x80) 589*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_DSPI1_PCS0 (0x40) 590*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_GPIO (0x00) 591*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2(x) (((x)&0x03)<<4) 592*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_MASK (0xCF) 593*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_DAT2 (0x30) 594*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_PWM_B1 (0x20) 595*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_DSPI1_PCS2 (0x10) 596*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_GPIO (0x00) 597*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1(x) (((x)&0x03)<<2) 598*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_MASK (0xF3) 599*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_DAT1 (0x0C) 600*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_PWM_A2 (0x08) 601*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_DSPI1_PCS1 (0x04) 602*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_GPIO (0x00) 603*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0(x) ((x)&0x03) 604*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_MASK (0xFC) 605*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_DAT0 (0x03) 606*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_PWM_B2 (0x02) 607*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_DSPI1_SOUT (0x01) 608*45370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_GPIO (0x00) 609*45370e18SAlison Wang 610*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD(x) (((x)&0x03)<<2) 611*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_MASK (0xF3) 612*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_CMD (0x0C) 613*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_PWM_A0 (0x08) 614*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_DSPI1_SIN (0x04) 615*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_GPIO (0x00) 616*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK(x) ((x)&0x03) 617*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_MASK (0xFC) 618*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_CLK (0x03) 619*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_PWM_B0 (0x02) 620*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_DSPI1_SCK (0x01) 621*45370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_GPIO (0x00) 622*45370e18SAlison Wang 623*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT(x) (((x)&0x03)<<6) 624*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_MASK (0x3F) 625*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_DAT (0xC0) 626*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_PWM_FAULT2 (0x80) 627*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_SDHC_DAT7 (0x40) 628*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_GPIO (0x00) 629*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN(x) (((x)&0x03)<<4) 630*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_MASK (0xCF) 631*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_VEN (0x30) 632*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_PWM_FAULT0 (0x20) 633*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_GPIO (0x00) 634*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST(x) (((x)&0x03)<<2) 635*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_MASK (0xF3) 636*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_RST (0x0C) 637*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_PWM_FORCE (0x08) 638*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_SDHC_DAT6 (0x04) 639*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_GPIO (0x00) 640*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD(x) ((x)&0x03) 641*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_MASK (0xFC) 642*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_PD (0x03) 643*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_PWM_SYNC (0x02) 644*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_SDHC_DAT5 (0x01) 645*45370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_GPIO (0x00) 646*45370e18SAlison Wang 647*45370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK(x) ((x)&0x03) 648*45370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_MASK (0xFC) 649*45370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_CLK (0x03) 650*45370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_PWM_FAULT1 (0x02) 651*45370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_SDHC_DAT4 (0x01) 652*45370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_GPIO (0x00) 653*45370e18SAlison Wang 654*45370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD(x) (((x)&0x03)<<6) 655*45370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_MASK (0x3F) 656*45370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_RXD (0xC0) 657*45370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_I2C2SDA (0x80) 658*45370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_SIM1_VEN (0x40) 659*45370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_GPIO (0x00) 660*45370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD(x) (((x)&0x03)<<4) 661*45370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_MASK (0xCF) 662*45370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_TXD (0x30) 663*45370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_I2C2SCL (0x20) 664*45370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_SIM1_DAT (0x10) 665*45370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_GPIO (0x00) 666*45370e18SAlison Wang #define GPIO_PAR_SSI0H_FS(x) (((x)&0x03)<<2) 667*45370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_MASK (0xF3) 668*45370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_FS (0x0C) 669*45370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_U7TXD (0x08) 670*45370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_SIM1_RST (0x04) 671*45370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_GPIO (0x00) 672*45370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK(x) ((x)&0x03) 673*45370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_MASK (0xFC) 674*45370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_MCLK (0x03) 675*45370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_SSI_CLKIN (0x02) 676*45370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_SIM1_CLK (0x01) 677*45370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_GPIO (0x00) 678*45370e18SAlison Wang 679*45370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK(x) ((x)&0x03) 680*45370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_MASK (0xFC) 681*45370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_BCLK (0x03) 682*45370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_U7RXD (0x02) 683*45370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_SIM1_PD (0x01) 684*45370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_GPIO (0x00) 685*45370e18SAlison Wang 686*45370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT3 (0x40) 687*45370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT2 (0x10) 688*45370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT1 (0x04) 689*45370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT0 (0x01) 690*45370e18SAlison Wang 691*45370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST3 (0x40) 692*45370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST2 (0x10) 693*45370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST1 (0x04) 694*45370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST0 (0x01) 695*45370e18SAlison Wang 696*45370e18SAlison Wang #define GPIO_PODR_G4_VAL (0x01 << 4) 697*45370e18SAlison Wang #define GPIO_PODR_G4_MASK (0xff & ~GPIO_PODR_G4_VAL) 698*45370e18SAlison Wang #define GPIO_PDDR_G4_OUTPUT (0x01 << 4) 699*45370e18SAlison Wang #define GPIO_PDDR_G4_MASK (0xff & ~GPIO_PDDR_G4_OUTPUT) 700*45370e18SAlison Wang 701*45370e18SAlison Wang #define GPIO_PAR_DEBUGL_ALLPST (0x01) 702*45370e18SAlison Wang 703*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC(x) ((x)&0x0F) 704*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_MASK (0xF0) 705*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_GPIO (0x0D) 706*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII1 (0x0C) 707*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII1FUL (0x0B) 708*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII_ULPI (0x0A) 709*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0 (0x09) 710*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL_ULPI (0x08) 711*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL (0x07) 712*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0_1FUL (0x06) 713*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL_1 (0x05) /* 0:Full 1: */ 714*45370e18SAlison Wang /* Both 0&1: MDC, MDIO, COL & TXER - GPIO */ 715*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0_1 (0x04) 716*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL_1FUL (0x03) 717*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_MII (0x01) /* MDC & MDIO - GPIO */ 718*45370e18SAlison Wang #define GPIO_PAR_FEC_FEC_MIIFUL (0x00) 719*45370e18SAlison Wang 720*45370e18SAlison Wang 721*45370e18SAlison Wang /* TC: Need to edit here.... */ 722*45370e18SAlison Wang 723*45370e18SAlison Wang /* Mode Select Control */ 724*45370e18SAlison Wang #define GPIO_MSCR_SDRAM_MSC(x) ((x)&0x03) 725*45370e18SAlison Wang #define GPIO_MSCR_SDRAM_MSC_MASK (0xFC) 726*45370e18SAlison Wang 727*45370e18SAlison Wang /* Slew Rate Control */ 728*45370e18SAlison Wang 729*45370e18SAlison Wang #define GPIO_SRCR_FB3_FB3(x) ((x)&0x03) 730*45370e18SAlison Wang #define GPIO_SRCR_FB3_FB3_MASK (0xFC) 731*45370e18SAlison Wang 732*45370e18SAlison Wang #define GPIO_SRCR_FB2_FB2(x) ((x)&0x03) 733*45370e18SAlison Wang #define GPIO_SRCR_FB2_FB2_MASK (0xFC) 734*45370e18SAlison Wang 735*45370e18SAlison Wang #define GPIO_SRCR_FB1_FB1(x) ((x)&0x03) 736*45370e18SAlison Wang #define GPIO_SRCR_FB1_FB1_MASK (0xFC) 737*45370e18SAlison Wang 738*45370e18SAlison Wang #define GPIO_SRCR_FB4_FB5(x) (((x)&0x03)<<2) 739*45370e18SAlison Wang #define GPIO_SRCR_FB4_FB5_MASK (0xF3) 740*45370e18SAlison Wang #define GPIO_SRCR_FB4_FB4(x) ((x)&0x03) 741*45370e18SAlison Wang #define GPIO_SRCR_FB4_FB4_MASK (0xFC) 742*45370e18SAlison Wang 743*45370e18SAlison Wang #define GPIO_SRCR_DSPIOW_OWDAT(x) (((x)&0x03)<<4) 744*45370e18SAlison Wang #define GPIO_SRCR_DSPIOW_OWDAT_MASK (0xCF) 745*45370e18SAlison Wang #define GPIO_SRCR_DSPIOW_DSPI0(x) ((x)&0x03) 746*45370e18SAlison Wang #define GPIO_SRCR_DSPIOW_DSPI0_MASK (0xFC) 747*45370e18SAlison Wang 748*45370e18SAlison Wang #define GPIO_SRCR_CANI2C_CAN1(x) (((x)&0x03)<<2) 749*45370e18SAlison Wang #define GPIO_SRCR_CANI2C_CAN1_MASK (0xF3) 750*45370e18SAlison Wang #define GPIO_SRCR_CANI2C_I2C0(x) ((x)&0x03) 751*45370e18SAlison Wang #define GPIO_SRCR_CANI2C_I2C0_MASK (0xFC) 752*45370e18SAlison Wang 753*45370e18SAlison Wang #define GPIO_SRCR_IRQ0_IRQ0(x) ((x)&0x03) 754*45370e18SAlison Wang #define GPIO_SRCR_IRQ0_IRQ0_MASK (0xFC) 755*45370e18SAlison Wang 756*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR3(x) (((x)&0x03)<<6) 757*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR3_MASK (0x3F) 758*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR2(x) (((x)&0x03)<<4) 759*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR2_MASK (0xCF) 760*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR1(x) (((x)&0x03)<<2) 761*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR1_MASK (0xF3) 762*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR0(x) ((x)&0x03) 763*45370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR0_MASK (0xFC) 764*45370e18SAlison Wang 765*45370e18SAlison Wang #define GPIO_SRCR_UART_U2(x) (((x)&0x03)<<4) 766*45370e18SAlison Wang #define GPIO_SRCR_UART_U2_MASK (0xCF) 767*45370e18SAlison Wang #define GPIO_SRCR_UART_U1(x) (((x)&0x03)<<2) 768*45370e18SAlison Wang #define GPIO_SRCR_UART_U1_MASK (0xF3) 769*45370e18SAlison Wang #define GPIO_SRCR_UART_U0(x) ((x)&0x03) 770*45370e18SAlison Wang #define GPIO_SRCR_UART_U0_MASK (0xFC) 771*45370e18SAlison Wang 772*45370e18SAlison Wang #define GPIO_SRCR_FEC_RMII0(x) (((x)&0x03)<<2) 773*45370e18SAlison Wang #define GPIO_SRCR_FEC_RMII0_MASK (0xF3) 774*45370e18SAlison Wang #define GPIO_SRCR_FEC_RMII1(x) ((x)&0x03) 775*45370e18SAlison Wang #define GPIO_SRCR_FEC_RMII1_MASK (0xFC) 776*45370e18SAlison Wang 777*45370e18SAlison Wang #define GPIO_SRCR_SDHC_SDHC(x) ((x)&0x03) 778*45370e18SAlison Wang #define GPIO_SRCR_SDHC_SDHC_MASK (0xFC) 779*45370e18SAlison Wang 780*45370e18SAlison Wang #define GPIO_SRCR_SIM0_SIMP0(x) ((x)&0x03) 781*45370e18SAlison Wang #define GPIO_SRCR_SIM0_SIMP0_MASK (0xFC) 782*45370e18SAlison Wang 783*45370e18SAlison Wang #define GPIO_SRCR_SSI0_SSI0(x) ((x)&0x03) 784*45370e18SAlison Wang #define GPIO_SRCR_SSI0_SSI0_MASK (0xFC) 785*45370e18SAlison Wang 786*45370e18SAlison Wang #define GPIO_PCR_URTS_U2 (0x0004) 787*45370e18SAlison Wang #define GPIO_PCR_URTS_U1 (0x0002) 788*45370e18SAlison Wang #define GPIO_PCR_URTS_U0 (0x0001) 789*45370e18SAlison Wang 790*45370e18SAlison Wang #define GPIO_PCR_UCTS_U2 (0x0004) 791*45370e18SAlison Wang #define GPIO_PCR_UCTS_U1 (0x0002) 792*45370e18SAlison Wang #define GPIO_PCR_UCTS_U0 (0x0001) 793*45370e18SAlison Wang 794*45370e18SAlison Wang #define GPIO_UTXD_WOM_U9 (0x0200) 795*45370e18SAlison Wang #define GPIO_UTXD_WOM_U8 (0x0100) 796*45370e18SAlison Wang #define GPIO_UTXD_WOM_U7 (0x0080) 797*45370e18SAlison Wang #define GPIO_UTXD_WOM_U6 (0x0040) 798*45370e18SAlison Wang #define GPIO_UTXD_WOM_U5 (0x0020) 799*45370e18SAlison Wang #define GPIO_UTXD_WOM_U4 (0x0010) 800*45370e18SAlison Wang #define GPIO_UTXD_WOM_U3 (0x0008) 801*45370e18SAlison Wang #define GPIO_UTXD_WOM_U2 (0x0004) 802*45370e18SAlison Wang #define GPIO_UTXD_WOM_U1 (0x0002) 803*45370e18SAlison Wang #define GPIO_UTXD_WOM_U0 (0x0001) 804*45370e18SAlison Wang 805*45370e18SAlison Wang #define GPIO_URXD_WOM_U9(x) (((x)&3)<<18) 806*45370e18SAlison Wang #define GPIO_URXD_WOM_U9_MASK (0xFFF3FFFF) 807*45370e18SAlison Wang #define GPIO_URXD_WOM_U8(x) (((x)&3)<<16) 808*45370e18SAlison Wang #define GPIO_URXD_WOM_U8_MASK (0xFFFCFFFF) 809*45370e18SAlison Wang #define GPIO_URXD_WOM_U7(x) (((x)&3)<<14) 810*45370e18SAlison Wang #define GPIO_URXD_WOM_U7_MASK (0xFFFF3FFF) 811*45370e18SAlison Wang #define GPIO_URXD_WOM_U6(x) (((x)&3)<<12) 812*45370e18SAlison Wang #define GPIO_URXD_WOM_U6_MASK (0xFFFFCFFF) 813*45370e18SAlison Wang #define GPIO_URXD_WOM_U5(x) (((x)&3)<<10) 814*45370e18SAlison Wang #define GPIO_URXD_WOM_U5_MASK (0xFFFFF3FF) 815*45370e18SAlison Wang #define GPIO_URXD_WOM_U4(x) (((x)&3)<<8) 816*45370e18SAlison Wang #define GPIO_URXD_WOM_U4_MASK (0xFFFFFCFF) 817*45370e18SAlison Wang #define GPIO_URXD_WOM_U3(x) (((x)&3)<<6) 818*45370e18SAlison Wang #define GPIO_URXD_WOM_U3_MASK (0xFFFFFF3F) 819*45370e18SAlison Wang #define GPIO_URXD_WOM_U2(x) (((x)&3)<<4) 820*45370e18SAlison Wang #define GPIO_URXD_WOM_U2_MASK (0xFFFFFFCF) 821*45370e18SAlison Wang #define GPIO_URXD_WOM_U1(x) (((x)&3)<<2) 822*45370e18SAlison Wang #define GPIO_URXD_WOM_U1_MASK (0xFFFFFFF3) 823*45370e18SAlison Wang #define GPIO_URXD_WOM_U0(x) ((x)&3) 824*45370e18SAlison Wang #define GPIO_URXD_WOM_U0_MASK (0xFFFFFFFC) 825*45370e18SAlison Wang 826*45370e18SAlison Wang #define GPIO_HCR1_PG4_0(x) (((x)&0x1F)<<27) 827*45370e18SAlison Wang #define GPIO_HCR1_PG4_0_MASK (0x07FFFFFF) 828*45370e18SAlison Wang #define GPIO_HCR1_PF7_3(x) (((x)&0x1F)<<22) 829*45370e18SAlison Wang #define GPIO_HCR1_PF7_3_MASK (0xF83FFFFF) 830*45370e18SAlison Wang #define GPIO_HCR1_PE6_0(x) (((x)&0x7F)<<15) 831*45370e18SAlison Wang #define GPIO_HCR1_PE6_0_MASK (0xFFC07FFF) 832*45370e18SAlison Wang #define GPIO_HCR1_PD7_3(x) (((x)&0x1F)<<10) 833*45370e18SAlison Wang #define GPIO_HCR1_PD7_3_MASK (0xFFFF83FF) 834*45370e18SAlison Wang #define GPIO_HCR1_PC7_1(x) (((x)&0x7F)<<3) 835*45370e18SAlison Wang #define GPIO_HCR1_PC7_1_MASK (0xFFFFFC07) 836*45370e18SAlison Wang #define GPIO_HCR1_PB2_0(x) ((x)&7) 837*45370e18SAlison Wang #define GPIO_HCR1_PB2_0_MASK (0xFFFFFFF8) 838*45370e18SAlison Wang 839*45370e18SAlison Wang #define GPIO_HCR0_PK3 (0x00000400) 840*45370e18SAlison Wang #define GPIO_HCR0_PK0 (0x00000200) 841*45370e18SAlison Wang #define GPIO_HCR0_PD2_0(x) (((x)&7)<<6) 842*45370e18SAlison Wang #define GPIO_HCR0_PD2_0_MASK (0xFFFFFE3F) 843*45370e18SAlison Wang #define GPIO_HCR0_PE7 (0x00000020) 844*45370e18SAlison Wang #define GPIO_HCR0_PH7_3(x) ((x)&0x1F) 845*45370e18SAlison Wang #define GPIO_HCR0_PH7_3_MASK(x) (0xFFFFFFE0) 846*45370e18SAlison Wang 847*45370e18SAlison Wang /* SDRAM Controller (SDRAMC) */ 848*45370e18SAlison Wang 849*45370e18SAlison Wang /* Phase Locked Loop (PLL) */ 850*45370e18SAlison Wang #define PLL_CR_LOCIRQ (0x00040000) 851*45370e18SAlison Wang #define PLL_CR_LOCRE (0x00020000) 852*45370e18SAlison Wang #define PLL_CR_LOCEN (0x00010000) 853*45370e18SAlison Wang #define PLL_CR_LOLIRQ (0x00004000) 854*45370e18SAlison Wang #define PLL_CR_LOLRE (0x00002000) 855*45370e18SAlison Wang #define PLL_CR_LOLEN (0x00001000) 856*45370e18SAlison Wang #define PLL_CR_REFDIV(x) (((x)&7)<<8) 857*45370e18SAlison Wang #define PLL_CR_REFDIV_MASK (0xFFFFF8FF) 858*45370e18SAlison Wang #define PLL_CR_FBKDIV(x) ((x)&0x3F) 859*45370e18SAlison Wang #define PLL_CR_FBKDIV_MASK (0xFFFFFFC0) 860*45370e18SAlison Wang #define PLL_CR_FBKDIV_BITS (0x3F) 861*45370e18SAlison Wang 862*45370e18SAlison Wang #define PLL_DR_OUTDIV5(x) (((x)&0x1F)<<21) 863*45370e18SAlison Wang #define PLL_DR_OUTDIV5_MASK (0xFC1FFFFF) 864*45370e18SAlison Wang #define PLL_DR_OUTDIV5_BITS (0x03E00000) 865*45370e18SAlison Wang #define PLL_DR_OUTDIV4(x) (((x)&0x1F)<<16) 866*45370e18SAlison Wang #define PLL_DR_OUTDIV4_MASK (0xFFE0FFFF) 867*45370e18SAlison Wang #define PLL_DR_OUTDIV4_BITS (0x001F0000) 868*45370e18SAlison Wang #define PLL_DR_OUTDIV3(x) (((x)&0x1F)<<10) 869*45370e18SAlison Wang #define PLL_DR_OUTDIV3_MASK (0xFFFF83FF) 870*45370e18SAlison Wang #define PLL_DR_OUTDIV3_BITS (0x00007C00) 871*45370e18SAlison Wang #define PLL_DR_OUTDIV2(x) (((x)&0x1F)<<5) 872*45370e18SAlison Wang #define PLL_DR_OUTDIV2_MASK (0xFFFFFC1F) 873*45370e18SAlison Wang #define PLL_DR_OUTDIV2_BITS (0x000003E0) 874*45370e18SAlison Wang #define PLL_DR_OUTDIV1(x) ((x)&0x1F) 875*45370e18SAlison Wang #define PLL_DR_OUTDIV1_MASK (0xFFFFFFE0) 876*45370e18SAlison Wang #define PLL_DR_OUTDIV1_BITS (0x0000001F) 877*45370e18SAlison Wang 878*45370e18SAlison Wang #define PLL_SR_LOCF (0x00000200) 879*45370e18SAlison Wang #define PLL_SR_LOC (0x00000100) 880*45370e18SAlison Wang #define PLL_SR_LOLF (0x00000040) 881*45370e18SAlison Wang #define PLL_SR_LOCKS (0x00000020) 882*45370e18SAlison Wang #define PLL_SR_LOCK (0x00000010) 883*45370e18SAlison Wang #define PLL_PSR_LOCK PLL_SR_LOCK /* compatible with 5x */ 884*45370e18SAlison Wang #define PLL_SR_MODE(x) ((x)&7) 885*45370e18SAlison Wang #define PLL_SR_MODE_MASK (0xFFFFFFF8) 886*45370e18SAlison Wang 887*45370e18SAlison Wang #endif /* __MCF5441X__ */ 888