1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 245370e18SAlison Wang /* 345370e18SAlison Wang * MCF5441X Internal Memory Map 445370e18SAlison Wang * 545370e18SAlison Wang * Copyright 2010-2012 Freescale Semiconductor, Inc. 645370e18SAlison Wang * TsiChung Liew (Tsi-Chung.Liew@freescale.com) 745370e18SAlison Wang */ 845370e18SAlison Wang 945370e18SAlison Wang #ifndef __MCF5441X__ 1045370e18SAlison Wang #define __MCF5441X__ 1145370e18SAlison Wang 1245370e18SAlison Wang /* Interrupt Controller (INTC) */ 1345370e18SAlison Wang #define INT0_LO_RSVD0 (0) 1445370e18SAlison Wang #define INT0_LO_EPORT1 (1) 1545370e18SAlison Wang #define INT0_LO_EPORT2 (2) 1645370e18SAlison Wang #define INT0_LO_EPORT3 (3) 1745370e18SAlison Wang #define INT0_LO_EPORT4 (4) 1845370e18SAlison Wang #define INT0_LO_EPORT5 (5) 1945370e18SAlison Wang #define INT0_LO_EPORT6 (6) 2045370e18SAlison Wang #define INT0_LO_EPORT7 (7) 2145370e18SAlison Wang #define INT0_LO_EDMA_00 (8) 2245370e18SAlison Wang #define INT0_LO_EDMA_01 (9) 2345370e18SAlison Wang #define INT0_LO_EDMA_02 (10) 2445370e18SAlison Wang #define INT0_LO_EDMA_03 (11) 2545370e18SAlison Wang #define INT0_LO_EDMA_04 (12) 2645370e18SAlison Wang #define INT0_LO_EDMA_05 (13) 2745370e18SAlison Wang #define INT0_LO_EDMA_06 (14) 2845370e18SAlison Wang #define INT0_LO_EDMA_07 (15) 2945370e18SAlison Wang #define INT0_LO_EDMA_08 (16) 3045370e18SAlison Wang #define INT0_LO_EDMA_09 (17) 3145370e18SAlison Wang #define INT0_LO_EDMA_10 (18) 3245370e18SAlison Wang #define INT0_LO_EDMA_11 (19) 3345370e18SAlison Wang #define INT0_LO_EDMA_12 (20) 3445370e18SAlison Wang #define INT0_LO_EDMA_13 (21) 3545370e18SAlison Wang #define INT0_LO_EDMA_14 (22) 3645370e18SAlison Wang #define INT0_LO_EDMA_15 (23) 3745370e18SAlison Wang #define INT0_LO_EDMA_ERR (24) 3845370e18SAlison Wang #define INT0_LO_SCM (25) 3945370e18SAlison Wang #define INT0_LO_UART0 (26) 4045370e18SAlison Wang #define INT0_LO_UART1 (27) 4145370e18SAlison Wang #define INT0_LO_UART2 (28) 4245370e18SAlison Wang #define INT0_LO_UART3 (29) 4345370e18SAlison Wang #define INT0_LO_I2C0 (30) 4445370e18SAlison Wang #define INT0_LO_DSPI0 (31) 4545370e18SAlison Wang #define INT0_HI_DTMR0 (32) 4645370e18SAlison Wang #define INT0_HI_DTMR1 (33) 4745370e18SAlison Wang #define INT0_HI_DTMR2 (34) 4845370e18SAlison Wang #define INT0_HI_DTMR3 (35) 4945370e18SAlison Wang #define INT0_HI_MACNET0_TXF (36) 5045370e18SAlison Wang #define INT0_HI_MACNET0_TXB (37) 5145370e18SAlison Wang #define INT0_HI_MACNET0_UN (38) 5245370e18SAlison Wang #define INT0_HI_MACNET0_RL (39) 5345370e18SAlison Wang #define INT0_HI_MACNET0_RXF (40) 5445370e18SAlison Wang #define INT0_HI_MACNET0_RXB (41) 5545370e18SAlison Wang #define INT0_HI_MACNET0_MII (42) 5645370e18SAlison Wang #define INT0_HI_MACNET0_LC (43) 5745370e18SAlison Wang /* not used 44 */ 5845370e18SAlison Wang #define INT0_HI_MACNET0_GRA (45) 5945370e18SAlison Wang #define INT0_HI_MACNET0_EBERR (46) 6045370e18SAlison Wang #define INT0_HI_MACNET0_BABT (47) 6145370e18SAlison Wang #define INT0_HI_MACNET0_BABR (48) 6245370e18SAlison Wang #define INT0_HI_MACNET1_TXF (49) 6345370e18SAlison Wang #define INT0_HI_MACNET1_TXB (50) 6445370e18SAlison Wang #define INT0_HI_MACNET1_UN (51) 6545370e18SAlison Wang #define INT0_HI_MACNET1_RL (52) 6645370e18SAlison Wang #define INT0_HI_MACNET1_RXF (53) 6745370e18SAlison Wang #define INT0_HI_MACNET1_RXB (54) 6845370e18SAlison Wang #define INT0_HI_MACNET1_MII (55) 6945370e18SAlison Wang #define INT0_HI_MACNET1_LC (56) 7045370e18SAlison Wang /* not used 57 */ 7145370e18SAlison Wang #define INT0_HI_MACNET1_GRA (58) 7245370e18SAlison Wang #define INT0_HI_MACNET1_EBERR (59) 7345370e18SAlison Wang #define INT0_HI_MACNET1_BABT (60) 7445370e18SAlison Wang #define INT0_HI_MACNET1_BABR (61) 7545370e18SAlison Wang #define INT0_HI_SCMIR (62) 7645370e18SAlison Wang #define INT0_HI_OW (63) 7745370e18SAlison Wang 7845370e18SAlison Wang #define INT1_LO_CAN0_IFG (0) 7945370e18SAlison Wang #define INT1_LO_CAN0_BOFF (1) 8045370e18SAlison Wang /* not used 2 */ 8145370e18SAlison Wang #define INT1_LO_CAN0_TXRXWRN (3) 8245370e18SAlison Wang #define INT1_LO_CAN1_IFG (4) 8345370e18SAlison Wang #define INT1_LO_CAN1_BOFF (5) 8445370e18SAlison Wang /* not used 6 */ 8545370e18SAlison Wang #define INT1_LO_CAN1_TXRXWRN (7) 8645370e18SAlison Wang #define INT1_LO_EDMA_16 (8) 8745370e18SAlison Wang #define INT1_LO_EDMA_17 (9) 8845370e18SAlison Wang #define INT1_LO_EDMA_18 (10) 8945370e18SAlison Wang #define INT1_LO_EDMA_19 (11) 9045370e18SAlison Wang #define INT1_LO_EDMA_20 (12) 9145370e18SAlison Wang #define INT1_LO_EDMA_21 (13) 9245370e18SAlison Wang #define INT1_LO_EDMA_22 (14) 9345370e18SAlison Wang #define INT1_LO_EDMA_23 (15) 9445370e18SAlison Wang #define INT1_LO_EDMA_24 (16) 9545370e18SAlison Wang #define INT1_LO_EDMA_25 (17) 9645370e18SAlison Wang #define INT1_LO_EDMA_26 (18) 9745370e18SAlison Wang #define INT1_LO_EDMA_27 (19) 9845370e18SAlison Wang #define INT1_LO_EDMA_28 (20) 9945370e18SAlison Wang #define INT1_LO_EDMA_29 (21) 10045370e18SAlison Wang #define INT1_LO_EDMA_30 (22) 10145370e18SAlison Wang #define INT1_LO_EDMA_31 (23) 10245370e18SAlison Wang #define INT1_LO_EDMA_32 (24) 10345370e18SAlison Wang #define INT1_LO_EDMA_33 (25) 10445370e18SAlison Wang #define INT1_LO_EDMA_34 (26) 10545370e18SAlison Wang #define INT1_LO_EDMA_35 (27) 10645370e18SAlison Wang #define INT1_LO_EDMA_36 (28) 10745370e18SAlison Wang #define INT1_LO_EDMA_37 (29) 10845370e18SAlison Wang #define INT1_LO_EDMA_38 (30) 10945370e18SAlison Wang #define INT1_LO_EDMA_39 (31) 11045370e18SAlison Wang #define INT1_LO_EDMA_40 (32) 11145370e18SAlison Wang #define INT1_HI_EDMA_41 (33) 11245370e18SAlison Wang #define INT1_HI_EDMA_42 (34) 11345370e18SAlison Wang #define INT1_HI_EDMA_43 (35) 11445370e18SAlison Wang #define INT1_HI_EDMA_44 (36) 11545370e18SAlison Wang #define INT1_HI_EDMA_45 (37) 11645370e18SAlison Wang #define INT1_HI_EDMA_46 (38) 11745370e18SAlison Wang #define INT1_HI_EDMA_47 (39) 11845370e18SAlison Wang #define INT1_HI_EDMA_48 (40) 11945370e18SAlison Wang #define INT1_HI_EDMA_49 (41) 12045370e18SAlison Wang #define INT1_HI_EDMA_50 (42) 12145370e18SAlison Wang #define INT1_HI_EDMA_51 (43) 12245370e18SAlison Wang #define INT1_HI_EDMA_52 (44) 12345370e18SAlison Wang #define INT1_HI_EDMA_53 (45) 12445370e18SAlison Wang #define INT1_HI_EDMA_54 (46) 12545370e18SAlison Wang #define INT1_HI_EDMA_55 (47) 12645370e18SAlison Wang #define INT1_HI_UART4 (48) 12745370e18SAlison Wang #define INT1_HI_UART5 (49) 12845370e18SAlison Wang #define INT1_HI_UART6 (50) 12945370e18SAlison Wang #define INT1_HI_UART7 (51) 13045370e18SAlison Wang #define INT1_HI_UART8 (52) 13145370e18SAlison Wang #define INT1_HI_UART9 (53) 13245370e18SAlison Wang #define INT1_HI_DSPI1 (54) 13345370e18SAlison Wang #define INT1_HI_DSPI2 (55) 13445370e18SAlison Wang #define INT1_HI_DSPI3 (56) 13545370e18SAlison Wang #define INT1_HI_I2C1 (57) 13645370e18SAlison Wang #define INT1_HI_I2C2 (58) 13745370e18SAlison Wang #define INT1_HI_I2C3 (59) 13845370e18SAlison Wang #define INT1_HI_I2C4 (60) 13945370e18SAlison Wang #define INT1_HI_I2C5 (61) 14045370e18SAlison Wang 14145370e18SAlison Wang #define INT2_LO_EDMA56_63 (0) 14245370e18SAlison Wang #define INT2_LO_PWM_SM0SR_CF (1) 14345370e18SAlison Wang #define INT2_LO_PWM_SM1SR_CF (2) 14445370e18SAlison Wang #define INT2_LO_PWM_SM2SR_CF (3) 14545370e18SAlison Wang #define INT2_LO_PWM_SM3SR_CF (4) 14645370e18SAlison Wang #define INT2_LO_PWM_SM0SR_RF (5) 14745370e18SAlison Wang #define INT2_LO_PWM_SM1SR_RF (6) 14845370e18SAlison Wang #define INT2_LO_PWM_SM2SR_RF (7) 14945370e18SAlison Wang #define INT2_LO_PWM_SM3SR_RF (8) 15045370e18SAlison Wang #define INT2_LO_PWM_FSR (9) 15145370e18SAlison Wang #define INT2_LO_PWM_SMSR_REF (10) 15245370e18SAlison Wang #define INT2_LO_PLL_SR_LOCF (11) 15345370e18SAlison Wang #define INT2_LO_PLL_SR_LOLF (12) 15445370e18SAlison Wang #define INT2_LO_PIT0_PIF (13) 15545370e18SAlison Wang #define INT2_LO_PIT1_PIF (14) 15645370e18SAlison Wang #define INT2_LO_PIT2_PIF (15) 15745370e18SAlison Wang #define INT2_LO_PIT3_PIF (16) 15845370e18SAlison Wang #define INT2_LO_USBOTG_USBSTS (17) 15945370e18SAlison Wang #define INT2_LO_USBH_USBSTS (18) 16045370e18SAlison Wang /* not used 19-20 */ 16145370e18SAlison Wang #define INT2_LO_SSI0 (21) 16245370e18SAlison Wang #define INT2_LO_SSI1 (22) 16345370e18SAlison Wang #define INT2_LO_NFC (23) 16445370e18SAlison Wang /* not used 24-25 */ 16545370e18SAlison Wang #define INT2_LO_RTC (26) 16645370e18SAlison Wang #define INT2_LO_CCM_UOCSR (27) 16745370e18SAlison Wang #define INT2_LO_RNG_EI (28) 16845370e18SAlison Wang #define INT2_LO_SIM1_DATA (29) 16945370e18SAlison Wang #define INT2_LO_SIM1 (30) 17045370e18SAlison Wang #define INT2_LO_SDHC (31) 17145370e18SAlison Wang /* not used 32-37 */ 17245370e18SAlison Wang #define INT2_HI_L2SW_BERR (38) 17345370e18SAlison Wang #define INT2_HI_L2SW_RXB (39) 17445370e18SAlison Wang #define INT2_HI_L2SW_RXF (40) 17545370e18SAlison Wang #define INT2_HI_L2SW_TXB (41) 17645370e18SAlison Wang #define INT2_HI_L2SW_TXF (42) 17745370e18SAlison Wang #define INT2_HI_L2SW_QM (43) 17845370e18SAlison Wang #define INT2_HI_L2SW_OD0 (44) 17945370e18SAlison Wang #define INT2_HI_L2SW_OD1 (45) 18045370e18SAlison Wang #define INT2_HI_L2SW_OD2 (46) 18145370e18SAlison Wang #define INT2_HI_L2SW_LRN (47) 18245370e18SAlison Wang #define INT2_HI_MACNET0_TS (48) 18345370e18SAlison Wang #define INT2_HI_MACNET0_WAKE (49) 18445370e18SAlison Wang #define INT2_HI_MACNET0_PLR (50) 18545370e18SAlison Wang /* not used 51-54 */ 18645370e18SAlison Wang #define INT2_HI_MACNET1_TS (51) 18745370e18SAlison Wang #define INT2_HI_MACNET1_WAKE (52) 18845370e18SAlison Wang #define INT2_HI_MACNET1_PLR (53) 18945370e18SAlison Wang 19045370e18SAlison Wang /* Serial Boot Facility (SBF) */ 19145370e18SAlison Wang #define SBF_SBFCR_BLDIV(x) (((x)&0x000F)) 19245370e18SAlison Wang #define SBF_SBFCR_FR (0x0010) 19345370e18SAlison Wang 19445370e18SAlison Wang /* Reset Controller Module (RCM) */ 19545370e18SAlison Wang #define RCM_RCR_SOFTRST (0x80) 19645370e18SAlison Wang #define RCM_RCR_FRCRSTOUT (0x40) 19745370e18SAlison Wang 19845370e18SAlison Wang #define RCM_RSR_SOFT (0x20) 19945370e18SAlison Wang #define RCM_RSR_LOC (0x10) 20045370e18SAlison Wang #define RCM_RSR_POR (0x08) 20145370e18SAlison Wang #define RCM_RSR_EXT (0x04) 20245370e18SAlison Wang #define RCM_RSR_WDR_CORE (0x02) 20345370e18SAlison Wang #define RCM_RSR_LOL (0x01) 20445370e18SAlison Wang 20545370e18SAlison Wang /* Chip Configuration Module (CCM) */ 20645370e18SAlison Wang #define CCM_CCR_BOOTMOD (0xC000) 20745370e18SAlison Wang #define CCM_CCR_PLLMULT (0x0FC0) 20845370e18SAlison Wang #define CCM_CCR_BOOTPS (0x0030) 20945370e18SAlison Wang #define CCM_CCR_BOOTPS_32 (0x0000) 21045370e18SAlison Wang #define CCM_CCR_BOOTPS_16 (0x0020) 21145370e18SAlison Wang #define CCM_CCR_BOOTPS_8 (0x0010) 21245370e18SAlison Wang #define CCM_CCR_BOOTPS_ (0x0000) 21345370e18SAlison Wang #define CCM_CCR_ALESEL (0x0008) 21445370e18SAlison Wang #define CCM_CCR_OSCMOD (0x0004) 21545370e18SAlison Wang #define CCM_CCR_PLLMOD (0x0002) 21645370e18SAlison Wang #define CCM_CCR_BOOTMEM (0x0001) 21745370e18SAlison Wang 21845370e18SAlison Wang #define CCM_CIR_PIN_MASK (0xFFC0) 21945370e18SAlison Wang #define CCM_CIR_PRN_MASK (0x003F) 22045370e18SAlison Wang #define CCM_CIR_PIN_MCF54410 (0x9F<<6) 22145370e18SAlison Wang #define CCM_CIR_PIN_MCF54415 (0xA0<<6) 22245370e18SAlison Wang #define CCM_CIR_PIN_MCF54416 (0xA1<<6) 22345370e18SAlison Wang #define CCM_CIR_PIN_MCF54417 (0xA2<<6) 22445370e18SAlison Wang #define CCM_CIR_PIN_MCF54418 (0xA3<<6) 22545370e18SAlison Wang 22645370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK(x) (((x)&(0x0003)<<14) 22745370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_MASK (0x3FFF) 22845370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR0 (0x0000) 22945370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR1 (0x4000) 23045370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR2 (0x8000) 23145370e18SAlison Wang #define CCM_MISCCR_PWM_EXTCLK_TMR3 (0xC000) 23245370e18SAlison Wang #define CCM_MISCCR_LIMP (0x1000) 23345370e18SAlison Wang #define CCM_MISCCR_BME (0x0800) 23445370e18SAlison Wang #define CCM_MISCCR_BMT(x) (((x)&0x0007)<<8) 23545370e18SAlison Wang #define CCM_MISCCR_BMT_65536 (0) 23645370e18SAlison Wang #define CCM_MISCCR_BMT_32768 (1) 23745370e18SAlison Wang #define CCM_MISCCR_BMT_16384 (2) 23845370e18SAlison Wang #define CCM_MISCCR_BMT_8192 (3) 23945370e18SAlison Wang #define CCM_MISCCR_BMT_4096 (4) 24045370e18SAlison Wang #define CCM_MISCCR_BMT_2048 (5) 24145370e18SAlison Wang #define CCM_MISCCR_BMT_1024 (6) 24245370e18SAlison Wang #define CCM_MISCCR_BMT_512 (7) 24345370e18SAlison Wang #define CCM_MISCCR_SDHCSRC (0x0040) 24445370e18SAlison Wang #define CCM_MISCCR_SSI1SRC (0x0020) 24545370e18SAlison Wang #define CCM_MISCCR_SSI0SRC (0x0010) 24645370e18SAlison Wang #define CCM_MISCCR_USBHOC (0x0008) 24745370e18SAlison Wang #define CCM_MISCCR_USBOOC (0x0004) 24845370e18SAlison Wang #define CCM_MISCCR_USBPUE (0x0002) 24945370e18SAlison Wang #define CCM_MISCCR_USBSRC (0x0001) 25045370e18SAlison Wang 25145370e18SAlison Wang #define CCM_CDRH_SSI0DIV(x) (((x)&0x00FF)<<8) 25245370e18SAlison Wang #define CCM_CDRH_SSI0DIV_MASK (0x00FF) 25345370e18SAlison Wang #define CCM_CDRH_SSI1DIV(x) (((x)&0x00FF)) 25445370e18SAlison Wang #define CCM_CDRH_SSI1DIV_MASK (0xFF00) 25545370e18SAlison Wang #define CCM_CDRL_LPDIV(x) (((x)&0x000F)<<8) 25645370e18SAlison Wang #define CCM_CDRL_LPDIV_MASK (0xFF0F) 25745370e18SAlison Wang #define CCM_CDR_LPDIV(x) CCM_CDRL_LPDIV(x) 25845370e18SAlison Wang 25945370e18SAlison Wang #define CCM_UOCSR_DPPD (0x2000) 26045370e18SAlison Wang #define CCM_UOCSR_DMPD (0x1000) 26145370e18SAlison Wang #define CCM_UOCSR_DRV_VBUS (0x0800) 26245370e18SAlison Wang #define CCM_UOCSR_CRG_VBUS (0x0400) 26345370e18SAlison Wang #define CCM_UOCSR_DCR_VBUS (0x0200) 26445370e18SAlison Wang #define CCM_UOCSR_DPPU (0x0100) 26545370e18SAlison Wang #define CCM_UOCSR_AVLD (0x0080) 26645370e18SAlison Wang #define CCM_UOCSR_BVLD (0x0040) 26745370e18SAlison Wang #define CCM_UOCSR_VVLD (0x0020) 26845370e18SAlison Wang #define CCM_UOCSR_SEND (0x0010) 26945370e18SAlison Wang #define CCM_UOCSR_PWRFLT (0x0008) 27045370e18SAlison Wang #define CCM_UOCSR_WKUP (0x0004) 27145370e18SAlison Wang #define CCM_UOCSR_UOMIE (0x0002) 27245370e18SAlison Wang #define CCM_UOCSR_XPDE (0x0001) 27345370e18SAlison Wang 27445370e18SAlison Wang #define CCM_UHCSR_DRV_VBUS (0x0010) 27545370e18SAlison Wang #define CCM_UHCSR_PWRFLT (0x0008) 27645370e18SAlison Wang #define CCM_UHCSR_WKUP (0x0004) 27745370e18SAlison Wang #define CCM_UHCSR_UOMIE (0x0002) 27845370e18SAlison Wang #define CCM_UHCSR_XPDE (0x0001) 27945370e18SAlison Wang 28045370e18SAlison Wang #define CCM_MISCCR3_TMR_ENET (0x1000) 28145370e18SAlison Wang #define CCM_MISCCR3_ENETCLK(x) (((x)&7)<<8) 28245370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_MASK (0xF8FF) 28345370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_MII (0x0700) 28445370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_OSC (0x0600) 28545370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_USB (0x0500) 28645370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR3 (0x0400) 28745370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR2 (0x0300) 28845370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR1 (0x0200) 28945370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_TMR0 (0x0100) 29045370e18SAlison Wang #define CCM_MISCCR3_ENETCLK_INTBUS (0x0000) 29145370e18SAlison Wang 29245370e18SAlison Wang #define CCM_MISCCR2_EXTCLKBYP (0x8000) 29345370e18SAlison Wang #define CCM_MISCCR2_DDR2CLK (0x4000) 29445370e18SAlison Wang #define CCM_MISCCR2_RGPIO_HALF (0x2000) 29545370e18SAlison Wang #define CCM_MISCCR2_SWTSCR (0x1000) 29645370e18SAlison Wang #define CCM_MISCCR2_PLLMODE(x) (((x)&7)<<8) 29745370e18SAlison Wang #define CCM_MISCCR2_PLLMODE_MASK (0xF8FF) 29845370e18SAlison Wang #define CCM_MISCCR2_DCCBYP (0x0080) 29945370e18SAlison Wang #define CCM_MISCCR2_DAC1SEL (0x0040) 30045370e18SAlison Wang #define CCM_MISCCR2_DAC0SEL (0x0020) 30145370e18SAlison Wang #define CCM_MISCCR2_ADCEN (0x0010) 30245370e18SAlison Wang #define CCM_MISCCR2_ADC7SEL (0x0008) 30345370e18SAlison Wang #define CCM_MISCCR2_ADC3SEL (0x0004) 30445370e18SAlison Wang #define CCM_MISCCR2_FBHALF (0x0002) 30545370e18SAlison Wang #define CCM_MISCCR2_ULPI (0x0001) 30645370e18SAlison Wang 30745370e18SAlison Wang #define CCM_FNACR_PCR(x) (((x)&0x0F)<<24) 30845370e18SAlison Wang #define CCM_FNACR_PCR_MASK (0xF0FFFFFF) 30945370e18SAlison Wang #define CCM_FNACR_MCC(x) ((x)&0xFFFF) 31045370e18SAlison Wang #define CCM_FNACR_MCC_MASK (0xFFFF0000) 31145370e18SAlison Wang 31245370e18SAlison Wang /* General Purpose I/O Module (GPIO) */ 31345370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE(x) (((x)&3)<<6) 31445370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_MASK (0x3F) 31545370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_FB_ALE (0xC0) 31645370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_FB_TS (0x80) 31745370e18SAlison Wang #define GPIO_PAR_FBCTL_ALE_GPIO (0x00) 31845370e18SAlison Wang #define GPIO_PAR_FBCTL_OE(x) (((x)&3)<<4) 31945370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_MASK (0xCF) 32045370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_FB_OE (0x30) 32145370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_FB_TBST (0x20) 32245370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_NFC_RE (0x20) 32345370e18SAlison Wang #define GPIO_PAR_FBCTL_OE_GPIO (0x00) 32445370e18SAlison Wang #define GPIO_PAR_FBCTL_FBCLK (0x08) 32545370e18SAlison Wang #define GPIO_PAR_FBCTL_RW (0x04) 32645370e18SAlison Wang #define GPIO_PAR_FBCTL_TA(x) ((x)&3) 32745370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_MASK (0xFC) 32845370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_TA (0x03) 32945370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_NFC_RB (0x01) 33045370e18SAlison Wang #define GPIO_PAR_FBCTL_TA_GPIO (0x00) 33145370e18SAlison Wang 33245370e18SAlison Wang #define GPIO_PAR_BE_BS3(x) (((x)&0x03)<<6) 33345370e18SAlison Wang #define GPIO_PAR_BE_BE3_MASK (0x3F) 33445370e18SAlison Wang #define GPIO_PAR_BE_BE3_BE3 (0xC0) 33545370e18SAlison Wang #define GPIO_PAR_BE_BE3_CS3 (0x80) 33645370e18SAlison Wang #define GPIO_PAR_BE_BE3_FB_A1 (0x40) 33745370e18SAlison Wang #define GPIO_PAR_BE_BE3_NFC_ALE (0x40) 33845370e18SAlison Wang #define GPIO_PAR_BE_BE3_GPIO (0x00) 33945370e18SAlison Wang #define GPIO_PAR_BE_BS2(x) (((x)&0x03)<<4) 34045370e18SAlison Wang #define GPIO_PAR_BE_BE2_MASK (0xCF) 34145370e18SAlison Wang #define GPIO_PAR_BE_BE2_BE2 (0x30) 34245370e18SAlison Wang #define GPIO_PAR_BE_BE2_CS2 (0x20) 34345370e18SAlison Wang #define GPIO_PAR_BE_BE2_FB_A0 (0x10) 34445370e18SAlison Wang #define GPIO_PAR_BE_BE2_NFC_CLE (0x10) 34545370e18SAlison Wang #define GPIO_PAR_BE_BE2_GPIO (0x00) 34645370e18SAlison Wang #define GPIO_PAR_BE_BS1(x) (((x)&0x03)<<2) 34745370e18SAlison Wang #define GPIO_PAR_BE_BE1_MASK (0xF3) 34845370e18SAlison Wang #define GPIO_PAR_BE_BE1_BE1 (0x0C) 34945370e18SAlison Wang #define GPIO_PAR_BE_BE1_FB_TSZ1 (0x08) 35045370e18SAlison Wang #define GPIO_PAR_BE_BE1_GPIO (0x00) 35145370e18SAlison Wang #define GPIO_PAR_BE_BS0(x) ((x)&0x03) 35245370e18SAlison Wang #define GPIO_PAR_BE_BE0_MASK (0xFC) 35345370e18SAlison Wang #define GPIO_PAR_BE_BE0_BE0 (0x03) 35445370e18SAlison Wang #define GPIO_PAR_BE_BE0_FB_TSZ0 (0x02) 35545370e18SAlison Wang #define GPIO_PAR_BE_BE0_GPIO (0x00) 35645370e18SAlison Wang 35745370e18SAlison Wang #define GPIO_PAR_CS_CS5(x) (((x)&0x03)<<6) 35845370e18SAlison Wang #define GPIO_PAR_CS_CS5_MASK (0x3F) 35945370e18SAlison Wang #define GPIO_PAR_CS_CS5_CS5 (0xC0) 36045370e18SAlison Wang #define GPIO_PAR_CS_CS5_DACK1 (0x80) 36145370e18SAlison Wang #define GPIO_PAR_CS_CS5_GPIO (0x00) 36245370e18SAlison Wang #define GPIO_PAR_CS_CS4(x) (((x)&0x03)<<4) 36345370e18SAlison Wang #define GPIO_PAR_CS_CS4_MASK (0xCF) 36445370e18SAlison Wang #define GPIO_PAR_CS_CS4_CS4 (0x30) 36545370e18SAlison Wang #define GPIO_PAR_CS_CS4_DREQ1 (0x20) 36645370e18SAlison Wang #define GPIO_PAR_CS_CS4_GPIO (0x00) 36745370e18SAlison Wang #define GPIO_PAR_CS_CS1(x) (((x)&0x03)<<2) 36845370e18SAlison Wang #define GPIO_PAR_CS_CS1_MASK (0xF3) 36945370e18SAlison Wang #define GPIO_PAR_CS_CS1_CS1 (0x0C) 37045370e18SAlison Wang #define GPIO_PAR_CS_CS1_NFC_CE (0x04) 37145370e18SAlison Wang #define GPIO_PAR_CS_CS1_GPIO (0x00) 37245370e18SAlison Wang #define GPIO_PAR_CS_CS0_CS0 (0x01) 37345370e18SAlison Wang 37445370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL(x) (((x)&0x03)<<6) 37545370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_MASK (0x3F) 37645370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_I2C0SCL (0xC0) 37745370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_U8TXD (0x80) 37845370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_CAN0TX (0x40) 37945370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SCL_GPIO (0x00) 38045370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA(x) (((x)&0x03)<<4) 38145370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_MASK (0xCF) 38245370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_I2C0SDA (0x30) 38345370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_U8RXD (0x20) 38445370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_CAN0RX (0x10) 38545370e18SAlison Wang #define GPIO_PAR_CANI2C_I2C0SDA_GPIO (0x00) 38645370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX(x) (((x)&0x03)<<2) 38745370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_MASK (0xF3) 38845370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_CAN1TX (0x0C) 38945370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_U9TXD (0x08) 39045370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_I2C1SCL (0x04) 39145370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1TX_GPIO (0x00) 39245370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX(x) ((x)&0x03) 39345370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_MASK (0xFC) 39445370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_CAN1RX (0x03) 39545370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_U9RXD (0x02) 39645370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_I2C1SDA (0x01) 39745370e18SAlison Wang #define GPIO_PAR_CANI2C_CAN1RX_GPIO (0x00) 39845370e18SAlison Wang 39945370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ7 (0x10) 40045370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4(x) (((x)&0x03)<<2) 40145370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_MASK (0xF3) 40245370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_IRQ4 (0x0C) 40345370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_DREQ0 (0x08) 40445370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ4_GPIO (0x00) 40545370e18SAlison Wang #define GPIO_PAR_IRQH_IRQ1 (0x03) 40645370e18SAlison Wang 40745370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6(x) (((x)&0x03)<<6) 40845370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_MASK (0x3F) 40945370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_IRQ6 (0xC0) 41045370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_USBCLKIN (0x40) 41145370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ6_GPIO (0x00) 41245370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3(x) (((x)&0x03)<<4) 41345370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_MASK (0xCF) 41445370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_IRQ3 (0x30) 41545370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_DSPI0_PCS3 (0x20) 41645370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_USB1_VBUS_EN (0x10) 41745370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ3_GPIO (0x00) 41845370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2(x) (((x)&0x03)<<2) 41945370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_MASK (0xF3) 42045370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_IRQ2 (0x0C) 42145370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_DSPI0_PCS2 (0x08) 42245370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_USB1_VBUS_OC (0x04) 42345370e18SAlison Wang #define GPIO_PAR_IRQL_IRQ2_GPIO (0x00) 42445370e18SAlison Wang 42545370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN(x) (((x)&0x03)<<6) 42645370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_MASK (0x3F) 42745370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_DSPI0SIN (0xC0) 42845370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_SBF_DI (0xC0) 42945370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_U3RXD (0x80) 43045370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_SDHC_CMD (0x40) 43145370e18SAlison Wang #define GPIO_PAR_DSPI0_SIN_GPIO (0x00) 43245370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT(x) (((x)&0x03)<<4) 43345370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_MASK (0xCF) 43445370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_DSPI0SOUT (0x30) 43545370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_SBF_DO (0x30) 43645370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_U3TXD (0x20) 43745370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_SDHC_DAT0 (0x10) 43845370e18SAlison Wang #define GPIO_PAR_DSPI0_SOUT_GPIO (0x00) 43945370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK(x) (((x)&0x03)<<2) 44045370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_MASK (0xF3) 44145370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_DSPI0SCK (0x0C) 44245370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_SBF_CK (0x0C) 44345370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_I2C3SCL (0x08) 44445370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_SDHC_CLK (0x04) 44545370e18SAlison Wang #define GPIO_PAR_DSPI0_SCK_GPIO (0x00) 44645370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0(x) ((x)&0x03) 44745370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_MASK (0xFC) 44845370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_DSPI0PCS0 (0x03) 44945370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_SS (0x03) 45045370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_I2C3SDA (0x02) 45145370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_SDHC_DAT3 (0x01) 45245370e18SAlison Wang #define GPIO_PAR_DSPI0_PCS0_GPIO (0x00) 45345370e18SAlison Wang 45445370e18SAlison Wang #define GPIO_PAR_DSPIOW_DSPI0PSC1 (0x80) 45545370e18SAlison Wang #define GPIO_PAR_DSPIOW_SBF_CS (0x80) 45645370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT (((x)&0x03)<<4) 45745370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_MASK (0xCF) 45845370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_OWDAT (0x30) 45945370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_DACK0 (0x20) 46045370e18SAlison Wang #define GPIO_PAR_DSPIOW_OWDAT_GPIO (0x00) 46145370e18SAlison Wang 46245370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN(x) (((x)&0x03)<<6) 46345370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_MASK (0x3F) 46445370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_T3IN (0xC0) 46545370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_EXTA3 (0xC0) 46645370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_T3OUT (0x80) 46745370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_USB0_VBUSEN (0x40) 46845370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_ULIPI_DIR (0x40) 46945370e18SAlison Wang #define GPIO_PAR_TIMER_T3IN_GPIO (0x00) 47045370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN(x) (((x)&0x03)<<4) 47145370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_MASK (0xCF) 47245370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_T2IN (0x30) 47345370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_EXTA2 (0x30) 47445370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_T2OUT (0x20) 47545370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_SDHC_DAT2 (0x10) 47645370e18SAlison Wang #define GPIO_PAR_TIMER_T2IN_GPIO (0x00) 47745370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN(x) (((x)&0x03)<<2) 47845370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_MASK (0xF3) 47945370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_T1IN (0x0C) 48045370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_EXTA1 (0x0C) 48145370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_T1OUT (0x08) 48245370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_SDHC_DAT1 (0x04) 48345370e18SAlison Wang #define GPIO_PAR_TIMER_T1IN_GPIO (0x00) 48445370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN(x) ((x)&0x03) 48545370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_MASK (0xFC) 48645370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_T0IN (0x03) 48745370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_EXTA0 (0x03) 48845370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_T0OUT (0x02) 48945370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_USBO_VBUSOC (0x01) 49045370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_ULPI_NXT (0x01) 49145370e18SAlison Wang #define GPIO_PAR_TIMER_T0IN_GPIO (0x00) 49245370e18SAlison Wang 49345370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS(x) (((x)&0x03)<<6) 49445370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_MASK (0x3F) 49545370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_U2CTS (0xC0) 49645370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_U6TXD (0x80) 49745370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_SSI1_BCLK (0x40) 49845370e18SAlison Wang #define GPIO_PAR_UART2_U2CTS_GPIO (0x00) 49945370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS(x) (((x)&0x03)<<4) 50045370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_MASK (0xCF) 50145370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_U2RTS (0x30) 50245370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_U6RXD (0x20) 50345370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_SSI1_FS (0x10) 50445370e18SAlison Wang #define GPIO_PAR_UART2_U2RTS_GPIO (0x00) 50545370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD(x) (((x)&0x03)<<2) 50645370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_MASK (0xF3) 50745370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_U2RXD (0x0C) 50845370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_PWM_A3 (0x08) 50945370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_SSI1_RXD (0x04) 51045370e18SAlison Wang #define GPIO_PAR_UART2_U2RXD_GPIO (0x00) 51145370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD(x) ((x)&0x03) 51245370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_MASK (0xFC) 51345370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_U2TXD (0x03) 51445370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_PWM_B3 (0x02) 51545370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_SSI1_TXD (0x01) 51645370e18SAlison Wang #define GPIO_PAR_UART2_U2TXD_GPIO (0x00) 51745370e18SAlison Wang 51845370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS(x) (((x)&0x03)<<6) 51945370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_MASK (0x3F) 52045370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_U1CTS (0xC0) 52145370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_U5TXD (0x80) 52245370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_DSPI3_SCK (0x40) 52345370e18SAlison Wang #define GPIO_PAR_UART1_U1CTS_GPIO (0x00) 52445370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS(x) (((x)&0x03)<<4) 52545370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_MASK (0xCF) 52645370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_U1RTS (0x30) 52745370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_U5RXD (0x20) 52845370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_DSPI3_PCS0 (0x10) 52945370e18SAlison Wang #define GPIO_PAR_UART1_U1RTS_GPIO (0x00) 53045370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD(x) (((x)&0x03)<<2) 53145370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_MASK (0xF3) 53245370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_U1RXD (0x0C) 53345370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_I2C5SDA (0x08) 53445370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_DSPI3_SIN (0x04) 53545370e18SAlison Wang #define GPIO_PAR_UART1_U1RXD_GPIO (0x00) 53645370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD(x) ((x)&0x03) 53745370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_MASK (0xFC) 53845370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_U1TXD (0x03) 53945370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_I2C5SCL (0x02) 54045370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_DSPI3_SOUT (0x01) 54145370e18SAlison Wang #define GPIO_PAR_UART1_U1TXD_GPIO (0x00) 54245370e18SAlison Wang 54345370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS(x) (((x)&0x03)<<6) 54445370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_MASK (0x3F) 54545370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_U0CTS (0xC0) 54645370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_U4TXD (0x80) 54745370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_DSPI2_SCK (0x40) 54845370e18SAlison Wang #define GPIO_PAR_UART0_U0CTS_GPIO (0x00) 54945370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS(x) (((x)&0x03)<<4) 55045370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_MASK (0xCF) 55145370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_U0RTS (0x30) 55245370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_U4RXD (0x20) 55345370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_DSPI2_PCS0 (0x10) 55445370e18SAlison Wang #define GPIO_PAR_UART0_U0RTS_GPIO (0x00) 55545370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD(x) (((x)&0x03)<<2) 55645370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_MASK (0xF3) 55745370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_U0RXD (0x0C) 55845370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_I2C4SDA (0x08) 55945370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_DSPI2_SIN (0x04) 56045370e18SAlison Wang #define GPIO_PAR_UART0_U0RXD_GPIO (0x00) 56145370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD(x) ((x)&0x03) 56245370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_MASK (0xFC) 56345370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_U0TXD (0x03) 56445370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_I2C4SCL (0x02) 56545370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_DSPI2_SOUT (0x01) 56645370e18SAlison Wang #define GPIO_PAR_UART0_U0TXD_GPIO (0x00) 56745370e18SAlison Wang 56845370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3(x) (((x)&0x03)<<6) 56945370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_MASK (0x3F) 57045370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_DAT3 (0xC0) 57145370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_PWM_A1 (0x80) 57245370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_DSPI1_PCS0 (0x40) 57345370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT3_GPIO (0x00) 57445370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2(x) (((x)&0x03)<<4) 57545370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_MASK (0xCF) 57645370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_DAT2 (0x30) 57745370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_PWM_B1 (0x20) 57845370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_DSPI1_PCS2 (0x10) 57945370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT2_GPIO (0x00) 58045370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1(x) (((x)&0x03)<<2) 58145370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_MASK (0xF3) 58245370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_DAT1 (0x0C) 58345370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_PWM_A2 (0x08) 58445370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_DSPI1_PCS1 (0x04) 58545370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT1_GPIO (0x00) 58645370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0(x) ((x)&0x03) 58745370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_MASK (0xFC) 58845370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_DAT0 (0x03) 58945370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_PWM_B2 (0x02) 59045370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_DSPI1_SOUT (0x01) 59145370e18SAlison Wang #define GPIO_PAR_SDHCH_DAT0_GPIO (0x00) 59245370e18SAlison Wang 59345370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD(x) (((x)&0x03)<<2) 59445370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_MASK (0xF3) 59545370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_CMD (0x0C) 59645370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_PWM_A0 (0x08) 59745370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_DSPI1_SIN (0x04) 59845370e18SAlison Wang #define GPIO_PAR_SDHCL_CMD_GPIO (0x00) 59945370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK(x) ((x)&0x03) 60045370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_MASK (0xFC) 60145370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_CLK (0x03) 60245370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_PWM_B0 (0x02) 60345370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_DSPI1_SCK (0x01) 60445370e18SAlison Wang #define GPIO_PAR_SDHCL_CLK_GPIO (0x00) 60545370e18SAlison Wang 60645370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT(x) (((x)&0x03)<<6) 60745370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_MASK (0x3F) 60845370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_DAT (0xC0) 60945370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_PWM_FAULT2 (0x80) 61045370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_SDHC_DAT7 (0x40) 61145370e18SAlison Wang #define GPIO_PAR_SIMP0H_DAT_GPIO (0x00) 61245370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN(x) (((x)&0x03)<<4) 61345370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_MASK (0xCF) 61445370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_VEN (0x30) 61545370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_PWM_FAULT0 (0x20) 61645370e18SAlison Wang #define GPIO_PAR_SIMP0H_VEN_GPIO (0x00) 61745370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST(x) (((x)&0x03)<<2) 61845370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_MASK (0xF3) 61945370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_RST (0x0C) 62045370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_PWM_FORCE (0x08) 62145370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_SDHC_DAT6 (0x04) 62245370e18SAlison Wang #define GPIO_PAR_SIMP0H_RST_GPIO (0x00) 62345370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD(x) ((x)&0x03) 62445370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_MASK (0xFC) 62545370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_PD (0x03) 62645370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_PWM_SYNC (0x02) 62745370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_SDHC_DAT5 (0x01) 62845370e18SAlison Wang #define GPIO_PAR_SIMP0H_PD_GPIO (0x00) 62945370e18SAlison Wang 63045370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK(x) ((x)&0x03) 63145370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_MASK (0xFC) 63245370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_CLK (0x03) 63345370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_PWM_FAULT1 (0x02) 63445370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_SDHC_DAT4 (0x01) 63545370e18SAlison Wang #define GPIO_PAR_SIMP0L_CLK_GPIO (0x00) 63645370e18SAlison Wang 63745370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD(x) (((x)&0x03)<<6) 63845370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_MASK (0x3F) 63945370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_RXD (0xC0) 64045370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_I2C2SDA (0x80) 64145370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_SIM1_VEN (0x40) 64245370e18SAlison Wang #define GPIO_PAR_SSI0H_RXD_GPIO (0x00) 64345370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD(x) (((x)&0x03)<<4) 64445370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_MASK (0xCF) 64545370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_TXD (0x30) 64645370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_I2C2SCL (0x20) 64745370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_SIM1_DAT (0x10) 64845370e18SAlison Wang #define GPIO_PAR_SSI0H_TXD_GPIO (0x00) 64945370e18SAlison Wang #define GPIO_PAR_SSI0H_FS(x) (((x)&0x03)<<2) 65045370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_MASK (0xF3) 65145370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_FS (0x0C) 65245370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_U7TXD (0x08) 65345370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_SIM1_RST (0x04) 65445370e18SAlison Wang #define GPIO_PAR_SSI0H_FS_GPIO (0x00) 65545370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK(x) ((x)&0x03) 65645370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_MASK (0xFC) 65745370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_MCLK (0x03) 65845370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_SSI_CLKIN (0x02) 65945370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_SIM1_CLK (0x01) 66045370e18SAlison Wang #define GPIO_PAR_SSI0H_MCLK_GPIO (0x00) 66145370e18SAlison Wang 66245370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK(x) ((x)&0x03) 66345370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_MASK (0xFC) 66445370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_BCLK (0x03) 66545370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_U7RXD (0x02) 66645370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_SIM1_PD (0x01) 66745370e18SAlison Wang #define GPIO_PAR_SSI0L_BCLK_GPIO (0x00) 66845370e18SAlison Wang 66945370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT3 (0x40) 67045370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT2 (0x10) 67145370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT1 (0x04) 67245370e18SAlison Wang #define GPIO_PAR_DEBUGH1_DAT0 (0x01) 67345370e18SAlison Wang 67445370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST3 (0x40) 67545370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST2 (0x10) 67645370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST1 (0x04) 67745370e18SAlison Wang #define GPIO_PAR_DEBUGH0_PST0 (0x01) 67845370e18SAlison Wang 67945370e18SAlison Wang #define GPIO_PODR_G4_VAL (0x01 << 4) 68045370e18SAlison Wang #define GPIO_PODR_G4_MASK (0xff & ~GPIO_PODR_G4_VAL) 68145370e18SAlison Wang #define GPIO_PDDR_G4_OUTPUT (0x01 << 4) 68245370e18SAlison Wang #define GPIO_PDDR_G4_MASK (0xff & ~GPIO_PDDR_G4_OUTPUT) 68345370e18SAlison Wang 68445370e18SAlison Wang #define GPIO_PAR_DEBUGL_ALLPST (0x01) 68545370e18SAlison Wang 68645370e18SAlison Wang #define GPIO_PAR_FEC_FEC(x) ((x)&0x0F) 68745370e18SAlison Wang #define GPIO_PAR_FEC_FEC_MASK (0xF0) 68845370e18SAlison Wang #define GPIO_PAR_FEC_FEC_GPIO (0x0D) 68945370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII1 (0x0C) 69045370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII1FUL (0x0B) 69145370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII_ULPI (0x0A) 69245370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0 (0x09) 69345370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL_ULPI (0x08) 69445370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL (0x07) 69545370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0_1FUL (0x06) 69645370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL_1 (0x05) /* 0:Full 1: */ 69745370e18SAlison Wang /* Both 0&1: MDC, MDIO, COL & TXER - GPIO */ 69845370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0_1 (0x04) 69945370e18SAlison Wang #define GPIO_PAR_FEC_FEC_RMII0FUL_1FUL (0x03) 70045370e18SAlison Wang #define GPIO_PAR_FEC_FEC_MII (0x01) /* MDC & MDIO - GPIO */ 70145370e18SAlison Wang #define GPIO_PAR_FEC_FEC_MIIFUL (0x00) 70245370e18SAlison Wang 70345370e18SAlison Wang 70445370e18SAlison Wang /* TC: Need to edit here.... */ 70545370e18SAlison Wang 70645370e18SAlison Wang /* Mode Select Control */ 70745370e18SAlison Wang #define GPIO_MSCR_SDRAM_MSC(x) ((x)&0x03) 70845370e18SAlison Wang #define GPIO_MSCR_SDRAM_MSC_MASK (0xFC) 70945370e18SAlison Wang 71045370e18SAlison Wang /* Slew Rate Control */ 71145370e18SAlison Wang 71245370e18SAlison Wang #define GPIO_SRCR_FB3_FB3(x) ((x)&0x03) 71345370e18SAlison Wang #define GPIO_SRCR_FB3_FB3_MASK (0xFC) 71445370e18SAlison Wang 71545370e18SAlison Wang #define GPIO_SRCR_FB2_FB2(x) ((x)&0x03) 71645370e18SAlison Wang #define GPIO_SRCR_FB2_FB2_MASK (0xFC) 71745370e18SAlison Wang 71845370e18SAlison Wang #define GPIO_SRCR_FB1_FB1(x) ((x)&0x03) 71945370e18SAlison Wang #define GPIO_SRCR_FB1_FB1_MASK (0xFC) 72045370e18SAlison Wang 72145370e18SAlison Wang #define GPIO_SRCR_FB4_FB5(x) (((x)&0x03)<<2) 72245370e18SAlison Wang #define GPIO_SRCR_FB4_FB5_MASK (0xF3) 72345370e18SAlison Wang #define GPIO_SRCR_FB4_FB4(x) ((x)&0x03) 72445370e18SAlison Wang #define GPIO_SRCR_FB4_FB4_MASK (0xFC) 72545370e18SAlison Wang 72645370e18SAlison Wang #define GPIO_SRCR_DSPIOW_OWDAT(x) (((x)&0x03)<<4) 72745370e18SAlison Wang #define GPIO_SRCR_DSPIOW_OWDAT_MASK (0xCF) 72845370e18SAlison Wang #define GPIO_SRCR_DSPIOW_DSPI0(x) ((x)&0x03) 72945370e18SAlison Wang #define GPIO_SRCR_DSPIOW_DSPI0_MASK (0xFC) 73045370e18SAlison Wang 73145370e18SAlison Wang #define GPIO_SRCR_CANI2C_CAN1(x) (((x)&0x03)<<2) 73245370e18SAlison Wang #define GPIO_SRCR_CANI2C_CAN1_MASK (0xF3) 73345370e18SAlison Wang #define GPIO_SRCR_CANI2C_I2C0(x) ((x)&0x03) 73445370e18SAlison Wang #define GPIO_SRCR_CANI2C_I2C0_MASK (0xFC) 73545370e18SAlison Wang 73645370e18SAlison Wang #define GPIO_SRCR_IRQ0_IRQ0(x) ((x)&0x03) 73745370e18SAlison Wang #define GPIO_SRCR_IRQ0_IRQ0_MASK (0xFC) 73845370e18SAlison Wang 73945370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR3(x) (((x)&0x03)<<6) 74045370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR3_MASK (0x3F) 74145370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR2(x) (((x)&0x03)<<4) 74245370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR2_MASK (0xCF) 74345370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR1(x) (((x)&0x03)<<2) 74445370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR1_MASK (0xF3) 74545370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR0(x) ((x)&0x03) 74645370e18SAlison Wang #define GPIO_SRCR_TIMER_TMR0_MASK (0xFC) 74745370e18SAlison Wang 74845370e18SAlison Wang #define GPIO_SRCR_UART_U2(x) (((x)&0x03)<<4) 74945370e18SAlison Wang #define GPIO_SRCR_UART_U2_MASK (0xCF) 75045370e18SAlison Wang #define GPIO_SRCR_UART_U1(x) (((x)&0x03)<<2) 75145370e18SAlison Wang #define GPIO_SRCR_UART_U1_MASK (0xF3) 75245370e18SAlison Wang #define GPIO_SRCR_UART_U0(x) ((x)&0x03) 75345370e18SAlison Wang #define GPIO_SRCR_UART_U0_MASK (0xFC) 75445370e18SAlison Wang 75545370e18SAlison Wang #define GPIO_SRCR_FEC_RMII0(x) (((x)&0x03)<<2) 75645370e18SAlison Wang #define GPIO_SRCR_FEC_RMII0_MASK (0xF3) 75745370e18SAlison Wang #define GPIO_SRCR_FEC_RMII1(x) ((x)&0x03) 75845370e18SAlison Wang #define GPIO_SRCR_FEC_RMII1_MASK (0xFC) 75945370e18SAlison Wang 76045370e18SAlison Wang #define GPIO_SRCR_SDHC_SDHC(x) ((x)&0x03) 76145370e18SAlison Wang #define GPIO_SRCR_SDHC_SDHC_MASK (0xFC) 76245370e18SAlison Wang 76345370e18SAlison Wang #define GPIO_SRCR_SIM0_SIMP0(x) ((x)&0x03) 76445370e18SAlison Wang #define GPIO_SRCR_SIM0_SIMP0_MASK (0xFC) 76545370e18SAlison Wang 76645370e18SAlison Wang #define GPIO_SRCR_SSI0_SSI0(x) ((x)&0x03) 76745370e18SAlison Wang #define GPIO_SRCR_SSI0_SSI0_MASK (0xFC) 76845370e18SAlison Wang 76945370e18SAlison Wang #define GPIO_PCR_URTS_U2 (0x0004) 77045370e18SAlison Wang #define GPIO_PCR_URTS_U1 (0x0002) 77145370e18SAlison Wang #define GPIO_PCR_URTS_U0 (0x0001) 77245370e18SAlison Wang 77345370e18SAlison Wang #define GPIO_PCR_UCTS_U2 (0x0004) 77445370e18SAlison Wang #define GPIO_PCR_UCTS_U1 (0x0002) 77545370e18SAlison Wang #define GPIO_PCR_UCTS_U0 (0x0001) 77645370e18SAlison Wang 77745370e18SAlison Wang #define GPIO_UTXD_WOM_U9 (0x0200) 77845370e18SAlison Wang #define GPIO_UTXD_WOM_U8 (0x0100) 77945370e18SAlison Wang #define GPIO_UTXD_WOM_U7 (0x0080) 78045370e18SAlison Wang #define GPIO_UTXD_WOM_U6 (0x0040) 78145370e18SAlison Wang #define GPIO_UTXD_WOM_U5 (0x0020) 78245370e18SAlison Wang #define GPIO_UTXD_WOM_U4 (0x0010) 78345370e18SAlison Wang #define GPIO_UTXD_WOM_U3 (0x0008) 78445370e18SAlison Wang #define GPIO_UTXD_WOM_U2 (0x0004) 78545370e18SAlison Wang #define GPIO_UTXD_WOM_U1 (0x0002) 78645370e18SAlison Wang #define GPIO_UTXD_WOM_U0 (0x0001) 78745370e18SAlison Wang 78845370e18SAlison Wang #define GPIO_URXD_WOM_U9(x) (((x)&3)<<18) 78945370e18SAlison Wang #define GPIO_URXD_WOM_U9_MASK (0xFFF3FFFF) 79045370e18SAlison Wang #define GPIO_URXD_WOM_U8(x) (((x)&3)<<16) 79145370e18SAlison Wang #define GPIO_URXD_WOM_U8_MASK (0xFFFCFFFF) 79245370e18SAlison Wang #define GPIO_URXD_WOM_U7(x) (((x)&3)<<14) 79345370e18SAlison Wang #define GPIO_URXD_WOM_U7_MASK (0xFFFF3FFF) 79445370e18SAlison Wang #define GPIO_URXD_WOM_U6(x) (((x)&3)<<12) 79545370e18SAlison Wang #define GPIO_URXD_WOM_U6_MASK (0xFFFFCFFF) 79645370e18SAlison Wang #define GPIO_URXD_WOM_U5(x) (((x)&3)<<10) 79745370e18SAlison Wang #define GPIO_URXD_WOM_U5_MASK (0xFFFFF3FF) 79845370e18SAlison Wang #define GPIO_URXD_WOM_U4(x) (((x)&3)<<8) 79945370e18SAlison Wang #define GPIO_URXD_WOM_U4_MASK (0xFFFFFCFF) 80045370e18SAlison Wang #define GPIO_URXD_WOM_U3(x) (((x)&3)<<6) 80145370e18SAlison Wang #define GPIO_URXD_WOM_U3_MASK (0xFFFFFF3F) 80245370e18SAlison Wang #define GPIO_URXD_WOM_U2(x) (((x)&3)<<4) 80345370e18SAlison Wang #define GPIO_URXD_WOM_U2_MASK (0xFFFFFFCF) 80445370e18SAlison Wang #define GPIO_URXD_WOM_U1(x) (((x)&3)<<2) 80545370e18SAlison Wang #define GPIO_URXD_WOM_U1_MASK (0xFFFFFFF3) 80645370e18SAlison Wang #define GPIO_URXD_WOM_U0(x) ((x)&3) 80745370e18SAlison Wang #define GPIO_URXD_WOM_U0_MASK (0xFFFFFFFC) 80845370e18SAlison Wang 80945370e18SAlison Wang #define GPIO_HCR1_PG4_0(x) (((x)&0x1F)<<27) 81045370e18SAlison Wang #define GPIO_HCR1_PG4_0_MASK (0x07FFFFFF) 81145370e18SAlison Wang #define GPIO_HCR1_PF7_3(x) (((x)&0x1F)<<22) 81245370e18SAlison Wang #define GPIO_HCR1_PF7_3_MASK (0xF83FFFFF) 81345370e18SAlison Wang #define GPIO_HCR1_PE6_0(x) (((x)&0x7F)<<15) 81445370e18SAlison Wang #define GPIO_HCR1_PE6_0_MASK (0xFFC07FFF) 81545370e18SAlison Wang #define GPIO_HCR1_PD7_3(x) (((x)&0x1F)<<10) 81645370e18SAlison Wang #define GPIO_HCR1_PD7_3_MASK (0xFFFF83FF) 81745370e18SAlison Wang #define GPIO_HCR1_PC7_1(x) (((x)&0x7F)<<3) 81845370e18SAlison Wang #define GPIO_HCR1_PC7_1_MASK (0xFFFFFC07) 81945370e18SAlison Wang #define GPIO_HCR1_PB2_0(x) ((x)&7) 82045370e18SAlison Wang #define GPIO_HCR1_PB2_0_MASK (0xFFFFFFF8) 82145370e18SAlison Wang 82245370e18SAlison Wang #define GPIO_HCR0_PK3 (0x00000400) 82345370e18SAlison Wang #define GPIO_HCR0_PK0 (0x00000200) 82445370e18SAlison Wang #define GPIO_HCR0_PD2_0(x) (((x)&7)<<6) 82545370e18SAlison Wang #define GPIO_HCR0_PD2_0_MASK (0xFFFFFE3F) 82645370e18SAlison Wang #define GPIO_HCR0_PE7 (0x00000020) 82745370e18SAlison Wang #define GPIO_HCR0_PH7_3(x) ((x)&0x1F) 82845370e18SAlison Wang #define GPIO_HCR0_PH7_3_MASK(x) (0xFFFFFFE0) 82945370e18SAlison Wang 83045370e18SAlison Wang /* SDRAM Controller (SDRAMC) */ 83145370e18SAlison Wang 83245370e18SAlison Wang /* Phase Locked Loop (PLL) */ 83345370e18SAlison Wang #define PLL_CR_LOCIRQ (0x00040000) 83445370e18SAlison Wang #define PLL_CR_LOCRE (0x00020000) 83545370e18SAlison Wang #define PLL_CR_LOCEN (0x00010000) 83645370e18SAlison Wang #define PLL_CR_LOLIRQ (0x00004000) 83745370e18SAlison Wang #define PLL_CR_LOLRE (0x00002000) 83845370e18SAlison Wang #define PLL_CR_LOLEN (0x00001000) 83945370e18SAlison Wang #define PLL_CR_REFDIV(x) (((x)&7)<<8) 84045370e18SAlison Wang #define PLL_CR_REFDIV_MASK (0xFFFFF8FF) 84145370e18SAlison Wang #define PLL_CR_FBKDIV(x) ((x)&0x3F) 84245370e18SAlison Wang #define PLL_CR_FBKDIV_MASK (0xFFFFFFC0) 84345370e18SAlison Wang #define PLL_CR_FBKDIV_BITS (0x3F) 84445370e18SAlison Wang 84545370e18SAlison Wang #define PLL_DR_OUTDIV5(x) (((x)&0x1F)<<21) 84645370e18SAlison Wang #define PLL_DR_OUTDIV5_MASK (0xFC1FFFFF) 84745370e18SAlison Wang #define PLL_DR_OUTDIV5_BITS (0x03E00000) 84845370e18SAlison Wang #define PLL_DR_OUTDIV4(x) (((x)&0x1F)<<16) 84945370e18SAlison Wang #define PLL_DR_OUTDIV4_MASK (0xFFE0FFFF) 85045370e18SAlison Wang #define PLL_DR_OUTDIV4_BITS (0x001F0000) 85145370e18SAlison Wang #define PLL_DR_OUTDIV3(x) (((x)&0x1F)<<10) 85245370e18SAlison Wang #define PLL_DR_OUTDIV3_MASK (0xFFFF83FF) 85345370e18SAlison Wang #define PLL_DR_OUTDIV3_BITS (0x00007C00) 85445370e18SAlison Wang #define PLL_DR_OUTDIV2(x) (((x)&0x1F)<<5) 85545370e18SAlison Wang #define PLL_DR_OUTDIV2_MASK (0xFFFFFC1F) 85645370e18SAlison Wang #define PLL_DR_OUTDIV2_BITS (0x000003E0) 85745370e18SAlison Wang #define PLL_DR_OUTDIV1(x) ((x)&0x1F) 85845370e18SAlison Wang #define PLL_DR_OUTDIV1_MASK (0xFFFFFFE0) 85945370e18SAlison Wang #define PLL_DR_OUTDIV1_BITS (0x0000001F) 86045370e18SAlison Wang 86145370e18SAlison Wang #define PLL_SR_LOCF (0x00000200) 86245370e18SAlison Wang #define PLL_SR_LOC (0x00000100) 86345370e18SAlison Wang #define PLL_SR_LOLF (0x00000040) 86445370e18SAlison Wang #define PLL_SR_LOCKS (0x00000020) 86545370e18SAlison Wang #define PLL_SR_LOCK (0x00000010) 86645370e18SAlison Wang #define PLL_PSR_LOCK PLL_SR_LOCK /* compatible with 5x */ 86745370e18SAlison Wang #define PLL_SR_MODE(x) ((x)&7) 86845370e18SAlison Wang #define PLL_SR_MODE_MASK (0xFFFFFFF8) 86945370e18SAlison Wang 87045370e18SAlison Wang #endif /* __MCF5441X__ */ 871