1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2819833afSPeter Tyser /* 3819833afSPeter Tyser * MCF520x Internal Memory Map 4819833afSPeter Tyser * 5819833afSPeter Tyser * Copyright (C) 2004-2009 Freescale Semiconductor, Inc. 6819833afSPeter Tyser * TsiChung Liew (Tsi-Chung.Liew@freescale.com) 7819833afSPeter Tyser */ 8819833afSPeter Tyser 9819833afSPeter Tyser #ifndef __IMMAP_520X__ 10819833afSPeter Tyser #define __IMMAP_520X__ 11819833afSPeter Tyser 12819833afSPeter Tyser #define MMAP_SCM1 (CONFIG_SYS_MBAR + 0x00000000) 13819833afSPeter Tyser #define MMAP_XBS (CONFIG_SYS_MBAR + 0x00004000) 14819833afSPeter Tyser #define MMAP_FBCS (CONFIG_SYS_MBAR + 0x00008000) 15819833afSPeter Tyser #define MMAP_FEC0 (CONFIG_SYS_MBAR + 0x00030000) 16819833afSPeter Tyser #define MMAP_SCM2 (CONFIG_SYS_MBAR + 0x00040000) 17819833afSPeter Tyser #define MMAP_EDMA (CONFIG_SYS_MBAR + 0x00044000) 18819833afSPeter Tyser #define MMAP_INTC0 (CONFIG_SYS_MBAR + 0x00048000) 19819833afSPeter Tyser #define MMAP_INTCACK (CONFIG_SYS_MBAR + 0x00054000) 20819833afSPeter Tyser #define MMAP_I2C (CONFIG_SYS_MBAR + 0x00058000) 21819833afSPeter Tyser #define MMAP_QSPI (CONFIG_SYS_MBAR + 0x0005C000) 22819833afSPeter Tyser #define MMAP_UART0 (CONFIG_SYS_MBAR + 0x00060000) 23819833afSPeter Tyser #define MMAP_UART1 (CONFIG_SYS_MBAR + 0x00064000) 24819833afSPeter Tyser #define MMAP_UART2 (CONFIG_SYS_MBAR + 0x00068000) 25819833afSPeter Tyser #define MMAP_DTMR0 (CONFIG_SYS_MBAR + 0x00070000) 26819833afSPeter Tyser #define MMAP_DTMR1 (CONFIG_SYS_MBAR + 0x00074000) 27819833afSPeter Tyser #define MMAP_DTMR2 (CONFIG_SYS_MBAR + 0x00078000) 28819833afSPeter Tyser #define MMAP_DTMR3 (CONFIG_SYS_MBAR + 0x0007C000) 29819833afSPeter Tyser #define MMAP_PIT0 (CONFIG_SYS_MBAR + 0x00080000) 30819833afSPeter Tyser #define MMAP_PIT1 (CONFIG_SYS_MBAR + 0x00084000) 31819833afSPeter Tyser #define MMAP_EPORT0 (CONFIG_SYS_MBAR + 0x00088000) 32819833afSPeter Tyser #define MMAP_WDOG (CONFIG_SYS_MBAR + 0x0008C000) 33819833afSPeter Tyser #define MMAP_PLL (CONFIG_SYS_MBAR + 0x00090000) 34819833afSPeter Tyser #define MMAP_RCM (CONFIG_SYS_MBAR + 0x000A0000) 35819833afSPeter Tyser #define MMAP_CCM (CONFIG_SYS_MBAR + 0x000A0004) 36819833afSPeter Tyser #define MMAP_GPIO (CONFIG_SYS_MBAR + 0x000A4000) 37819833afSPeter Tyser #define MMAP_SDRAM (CONFIG_SYS_MBAR + 0x000A8000) 38819833afSPeter Tyser 39819833afSPeter Tyser #include <asm/coldfire/crossbar.h> 40819833afSPeter Tyser #include <asm/coldfire/edma.h> 41819833afSPeter Tyser #include <asm/coldfire/eport.h> 42819833afSPeter Tyser #include <asm/coldfire/flexbus.h> 43819833afSPeter Tyser #include <asm/coldfire/intctrl.h> 44819833afSPeter Tyser #include <asm/coldfire/qspi.h> 45819833afSPeter Tyser 46819833afSPeter Tyser /* System Controller Module */ 47819833afSPeter Tyser typedef struct scm1 { 48819833afSPeter Tyser u32 mpr; /* 0x00 Master Privilege */ 49819833afSPeter Tyser u32 rsvd1[7]; 50819833afSPeter Tyser u32 pacra; /* 0x20 Peripheral Access Ctrl A */ 51819833afSPeter Tyser u32 pacrb; /* 0x24 Peripheral Access Ctrl B */ 52819833afSPeter Tyser u32 pacrc; /* 0x28 Peripheral Access Ctrl C */ 53819833afSPeter Tyser u32 pacrd; /* 0x2C Peripheral Access Ctrl D */ 54819833afSPeter Tyser u32 rsvd2[4]; 55819833afSPeter Tyser u32 pacre; /* 0x40 Peripheral Access Ctrl E */ 56819833afSPeter Tyser u32 pacrf; /* 0x44 Peripheral Access Ctrl F */ 57819833afSPeter Tyser u32 rsvd3[3]; 58819833afSPeter Tyser u32 bmt; /* 0x50 bus monitor */ 59819833afSPeter Tyser } scm1_t; 60819833afSPeter Tyser 61819833afSPeter Tyser typedef struct scm2 { 62819833afSPeter Tyser u8 rsvd1[19]; /* 0x00 - 0x12 */ 63819833afSPeter Tyser u8 wcr; /* 0x13 */ 64819833afSPeter Tyser u16 rsvd2; /* 0x14 - 0x15 */ 65819833afSPeter Tyser u16 cwcr; /* 0x16 */ 66819833afSPeter Tyser u8 rsvd3[3]; /* 0x18 - 0x1A */ 67819833afSPeter Tyser u8 cwsr; /* 0x1B */ 68819833afSPeter Tyser u8 rsvd4[3]; /* 0x1C - 0x1E */ 69819833afSPeter Tyser u8 scmisr; /* 0x1F */ 70819833afSPeter Tyser u8 rsvd5[79]; /* 0x20 - 0x6F */ 71819833afSPeter Tyser u32 cfadr; /* 0x70 */ 72819833afSPeter Tyser u8 rsvd7; /* 0x74 */ 73819833afSPeter Tyser u8 cfier; /* 0x75 */ 74819833afSPeter Tyser u8 cfloc; /* 0x76 */ 75819833afSPeter Tyser u8 cfatr; /* 0x77 */ 76819833afSPeter Tyser u32 rsvd8; /* 0x78 - 0x7B */ 77819833afSPeter Tyser u32 cfdtr; /* 0x7C */ 78819833afSPeter Tyser } scm2_t; 79819833afSPeter Tyser 80819833afSPeter Tyser /* Chip configuration module */ 81819833afSPeter Tyser typedef struct rcm { 82819833afSPeter Tyser u8 rcr; 83819833afSPeter Tyser u8 rsr; 84819833afSPeter Tyser } rcm_t; 85819833afSPeter Tyser 86819833afSPeter Tyser typedef struct ccm_ctrl { 87819833afSPeter Tyser u16 ccr; /* 0x00 Chip Cfg */ 88819833afSPeter Tyser u16 res1; /* 0x02 */ 89819833afSPeter Tyser u16 rcon; /* 0x04 Reset Cfg */ 90819833afSPeter Tyser u16 cir; /* 0x06 Chip ID */ 91819833afSPeter Tyser } ccm_t; 92819833afSPeter Tyser 93819833afSPeter Tyser /* GPIO port */ 94819833afSPeter Tyser typedef struct gpio_ctrl { 95819833afSPeter Tyser /* Port Output Data */ 96819833afSPeter Tyser u8 podr_busctl; /* 0x00 */ 97819833afSPeter Tyser u8 podr_be; /* 0x01 */ 98819833afSPeter Tyser u8 podr_cs; /* 0x02 */ 99819833afSPeter Tyser u8 podr_feci2c; /* 0x03 */ 100819833afSPeter Tyser u8 podr_qspi; /* 0x04 */ 101819833afSPeter Tyser u8 podr_timer; /* 0x05 */ 102819833afSPeter Tyser u8 podr_uart; /* 0x06 */ 103819833afSPeter Tyser u8 podr_fech; /* 0x07 */ 104819833afSPeter Tyser u8 podr_fecl; /* 0x08 */ 105819833afSPeter Tyser u8 res01[3]; /* 0x9 - 0x0B */ 106819833afSPeter Tyser 107819833afSPeter Tyser /* Port Data Direction */ 108819833afSPeter Tyser u8 pddr_busctl; /* 0x0C */ 109819833afSPeter Tyser u8 pddr_be; /* 0x0D */ 110819833afSPeter Tyser u8 pddr_cs; /* 0x0E */ 111819833afSPeter Tyser u8 pddr_feci2c; /* 0x0F */ 112819833afSPeter Tyser u8 pddr_qspi; /* 0x10*/ 113819833afSPeter Tyser u8 pddr_timer; /* 0x11 */ 114819833afSPeter Tyser u8 pddr_uart; /* 0x12 */ 115819833afSPeter Tyser u8 pddr_fech; /* 0x13 */ 116819833afSPeter Tyser u8 pddr_fecl; /* 0x14 */ 117819833afSPeter Tyser u8 res02[5]; /* 0x15 - 0x19 */ 118819833afSPeter Tyser 119819833afSPeter Tyser /* Port Data Direction */ 120819833afSPeter Tyser u8 ppdr_cs; /* 0x1A */ 121819833afSPeter Tyser u8 ppdr_feci2c; /* 0x1B */ 122819833afSPeter Tyser u8 ppdr_qspi; /* 0x1C */ 123819833afSPeter Tyser u8 ppdr_timer; /* 0x1D */ 124819833afSPeter Tyser u8 ppdr_uart; /* 0x1E */ 125819833afSPeter Tyser u8 ppdr_fech; /* 0x1F */ 126819833afSPeter Tyser u8 ppdr_fecl; /* 0x20 */ 127819833afSPeter Tyser u8 res03[3]; /* 0x21 - 0x23 */ 128819833afSPeter Tyser 129819833afSPeter Tyser /* Port Clear Output Data */ 130819833afSPeter Tyser u8 pclrr_busctl; /* 0x24 */ 131819833afSPeter Tyser u8 pclrr_be; /* 0x25 */ 132819833afSPeter Tyser u8 pclrr_cs; /* 0x26 */ 133819833afSPeter Tyser u8 pclrr_feci2c; /* 0x27 */ 134819833afSPeter Tyser u8 pclrr_qspi; /* 0x28 */ 135819833afSPeter Tyser u8 pclrr_timer; /* 0x29 */ 136819833afSPeter Tyser u8 pclrr_uart; /* 0x2A */ 137819833afSPeter Tyser u8 pclrr_fech; /* 0x2B */ 138819833afSPeter Tyser u8 pclrr_fecl; /* 0x2C */ 139819833afSPeter Tyser u8 res04[3]; /* 0x2D - 0x2F */ 140819833afSPeter Tyser 141819833afSPeter Tyser /* Pin Assignment */ 142819833afSPeter Tyser u8 par_busctl; /* 0x30 */ 143819833afSPeter Tyser u8 par_be; /* 0x31 */ 144819833afSPeter Tyser u8 par_cs; /* 0x32 */ 145819833afSPeter Tyser u8 par_feci2c; /* 0x33 */ 146819833afSPeter Tyser u8 par_qspi; /* 0x34 */ 147819833afSPeter Tyser u8 par_timer; /* 0x35 */ 148819833afSPeter Tyser u16 par_uart; /* 0x36 */ 149819833afSPeter Tyser u8 par_fec; /* 0x38 */ 150819833afSPeter Tyser u8 par_irq; /* 0x39 */ 151819833afSPeter Tyser 152819833afSPeter Tyser /* Mode Select Control */ 153819833afSPeter Tyser /* Drive Strength Control */ 154819833afSPeter Tyser u8 mscr_fb; /* 0x3A */ 155819833afSPeter Tyser u8 mscr_sdram; /* 0x3B */ 156819833afSPeter Tyser 157819833afSPeter Tyser u8 dscr_i2c; /* 0x3C */ 158819833afSPeter Tyser u8 dscr_misc; /* 0x3D */ 159819833afSPeter Tyser u8 dscr_fec; /* 0x3E */ 160819833afSPeter Tyser u8 dscr_uart; /* 0x3F */ 161819833afSPeter Tyser u8 dscr_qspi; /* 0x40 */ 162819833afSPeter Tyser } gpio_t; 163819833afSPeter Tyser 164819833afSPeter Tyser /* SDRAM controller */ 165819833afSPeter Tyser typedef struct sdram_ctrl { 166819833afSPeter Tyser u32 mode; /* 0x00 Mode/Extended Mode */ 167819833afSPeter Tyser u32 ctrl; /* 0x04 Ctrl */ 168819833afSPeter Tyser u32 cfg1; /* 0x08 Cfg 1 */ 169819833afSPeter Tyser u32 cfg2; /* 0x0C Cfg 2 */ 170819833afSPeter Tyser u32 res1[64]; /* 0x10 - 0x10F */ 171819833afSPeter Tyser u32 cs0; /* 0x110 Chip Select 0 Cfg */ 172819833afSPeter Tyser u32 cs1; /* 0x114 Chip Select 1 Cfg */ 173819833afSPeter Tyser } sdram_t; 174819833afSPeter Tyser 175819833afSPeter Tyser /* Clock Module */ 176819833afSPeter Tyser typedef struct pll_ctrl { 177819833afSPeter Tyser u8 odr; /* 0x00 Output divider */ 178819833afSPeter Tyser u8 rsvd1; 179819833afSPeter Tyser u8 cr; /* 0x02 Control */ 180819833afSPeter Tyser u8 rsvd2; 181819833afSPeter Tyser u8 mdr; /* 0x04 Modulation Divider */ 182819833afSPeter Tyser u8 rsvd3; 183819833afSPeter Tyser u8 fdr; /* 0x06 Feedback Divider */ 184819833afSPeter Tyser u8 rsvd4; 185819833afSPeter Tyser } pll_t; 186819833afSPeter Tyser 187819833afSPeter Tyser /* Watchdog registers */ 188819833afSPeter Tyser typedef struct wdog_ctrl { 189819833afSPeter Tyser u16 cr; /* 0x00 Control */ 190819833afSPeter Tyser u16 mr; /* 0x02 Modulus */ 191819833afSPeter Tyser u16 cntr; /* 0x04 Count */ 192819833afSPeter Tyser u16 sr; /* 0x06 Service */ 193819833afSPeter Tyser } wdog_t; 194819833afSPeter Tyser 195819833afSPeter Tyser #endif /* __IMMAP_520X__ */ 196