1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2819833afSPeter Tyser /* 3819833afSPeter Tyser * MCF5329 Internal Memory Map 4819833afSPeter Tyser * 5819833afSPeter Tyser * Copyright (C) 2004-2007 Freescale Semiconductor, Inc. 6819833afSPeter Tyser * TsiChung Liew (Tsi-Chung.Liew@freescale.com) 7819833afSPeter Tyser */ 8819833afSPeter Tyser 9819833afSPeter Tyser #ifndef __IMMAP_5235__ 10819833afSPeter Tyser #define __IMMAP_5235__ 11819833afSPeter Tyser 12819833afSPeter Tyser #define MMAP_SCM (CONFIG_SYS_MBAR + 0x00000000) 13819833afSPeter Tyser #define MMAP_SDRAM (CONFIG_SYS_MBAR + 0x00000040) 14819833afSPeter Tyser #define MMAP_FBCS (CONFIG_SYS_MBAR + 0x00000080) 15819833afSPeter Tyser #define MMAP_DMA0 (CONFIG_SYS_MBAR + 0x00000100) 16819833afSPeter Tyser #define MMAP_DMA1 (CONFIG_SYS_MBAR + 0x00000110) 17819833afSPeter Tyser #define MMAP_DMA2 (CONFIG_SYS_MBAR + 0x00000120) 18819833afSPeter Tyser #define MMAP_DMA3 (CONFIG_SYS_MBAR + 0x00000130) 19819833afSPeter Tyser #define MMAP_UART0 (CONFIG_SYS_MBAR + 0x00000200) 20819833afSPeter Tyser #define MMAP_UART1 (CONFIG_SYS_MBAR + 0x00000240) 21819833afSPeter Tyser #define MMAP_UART2 (CONFIG_SYS_MBAR + 0x00000280) 22819833afSPeter Tyser #define MMAP_I2C (CONFIG_SYS_MBAR + 0x00000300) 23819833afSPeter Tyser #define MMAP_QSPI (CONFIG_SYS_MBAR + 0x00000340) 24819833afSPeter Tyser #define MMAP_DTMR0 (CONFIG_SYS_MBAR + 0x00000400) 25819833afSPeter Tyser #define MMAP_DTMR1 (CONFIG_SYS_MBAR + 0x00000440) 26819833afSPeter Tyser #define MMAP_DTMR2 (CONFIG_SYS_MBAR + 0x00000480) 27819833afSPeter Tyser #define MMAP_DTMR3 (CONFIG_SYS_MBAR + 0x000004C0) 28819833afSPeter Tyser #define MMAP_INTC0 (CONFIG_SYS_MBAR + 0x00000C00) 29819833afSPeter Tyser #define MMAP_INTC1 (CONFIG_SYS_MBAR + 0x00000D00) 30819833afSPeter Tyser #define MMAP_INTCACK (CONFIG_SYS_MBAR + 0x00000F00) 31819833afSPeter Tyser #define MMAP_FEC (CONFIG_SYS_MBAR + 0x00001000) 32819833afSPeter Tyser #define MMAP_FECFIFO (CONFIG_SYS_MBAR + 0x00001400) 33819833afSPeter Tyser #define MMAP_GPIO (CONFIG_SYS_MBAR + 0x00100000) 34819833afSPeter Tyser #define MMAP_CCM (CONFIG_SYS_MBAR + 0x00110000) 35819833afSPeter Tyser #define MMAP_PLL (CONFIG_SYS_MBAR + 0x00120000) 36819833afSPeter Tyser #define MMAP_EPORT (CONFIG_SYS_MBAR + 0x00130000) 37819833afSPeter Tyser #define MMAP_WDOG (CONFIG_SYS_MBAR + 0x00140000) 38819833afSPeter Tyser #define MMAP_PIT0 (CONFIG_SYS_MBAR + 0x00150000) 39819833afSPeter Tyser #define MMAP_PIT1 (CONFIG_SYS_MBAR + 0x00160000) 40819833afSPeter Tyser #define MMAP_PIT2 (CONFIG_SYS_MBAR + 0x00170000) 41819833afSPeter Tyser #define MMAP_PIT3 (CONFIG_SYS_MBAR + 0x00180000) 42819833afSPeter Tyser #define MMAP_MDHA (CONFIG_SYS_MBAR + 0x00190000) 43819833afSPeter Tyser #define MMAP_RNG (CONFIG_SYS_MBAR + 0x001A0000) 44819833afSPeter Tyser #define MMAP_SKHA (CONFIG_SYS_MBAR + 0x001B0000) 45819833afSPeter Tyser #define MMAP_CAN1 (CONFIG_SYS_MBAR + 0x001C0000) 46819833afSPeter Tyser #define MMAP_ETPU (CONFIG_SYS_MBAR + 0x001D0000) 47819833afSPeter Tyser #define MMAP_CAN2 (CONFIG_SYS_MBAR + 0x001F0000) 48819833afSPeter Tyser 49819833afSPeter Tyser #include <asm/coldfire/eport.h> 50819833afSPeter Tyser #include <asm/coldfire/flexbus.h> 51819833afSPeter Tyser #include <asm/coldfire/flexcan.h> 52819833afSPeter Tyser #include <asm/coldfire/intctrl.h> 53819833afSPeter Tyser #include <asm/coldfire/mdha.h> 54819833afSPeter Tyser #include <asm/coldfire/qspi.h> 55819833afSPeter Tyser #include <asm/coldfire/rng.h> 56819833afSPeter Tyser #include <asm/coldfire/skha.h> 57819833afSPeter Tyser 58819833afSPeter Tyser /* System Control Module register */ 59819833afSPeter Tyser typedef struct scm_ctrl { 60819833afSPeter Tyser u32 ipsbar; /* 0x00 - MBAR */ 61819833afSPeter Tyser u32 res1; /* 0x04 */ 62819833afSPeter Tyser u32 rambar; /* 0x08 - RAMBAR */ 63819833afSPeter Tyser u32 res2; /* 0x0C */ 64819833afSPeter Tyser u8 crsr; /* 0x10 Core Reset Status Register */ 65819833afSPeter Tyser u8 cwcr; /* 0x11 Core Watchdog Control Register */ 66819833afSPeter Tyser u8 lpicr; /* 0x12 Low-Power Interrupt Control Register */ 67819833afSPeter Tyser u8 cwsr; /* 0x13 Core Watchdog Service Register */ 68819833afSPeter Tyser u32 dmareqc; /* 0x14 */ 69819833afSPeter Tyser u32 res3; /* 0x18 */ 70819833afSPeter Tyser u32 mpark; /* 0x1C */ 71819833afSPeter Tyser u8 mpr; /* 0x20 */ 72819833afSPeter Tyser u8 res4[3]; /* 0x21 - 0x23 */ 73819833afSPeter Tyser u8 pacr0; /* 0x24 */ 74819833afSPeter Tyser u8 pacr1; /* 0x25 */ 75819833afSPeter Tyser u8 pacr2; /* 0x26 */ 76819833afSPeter Tyser u8 pacr3; /* 0x27 */ 77819833afSPeter Tyser u8 pacr4; /* 0x28 */ 78819833afSPeter Tyser u32 res5; /* 0x29 */ 79819833afSPeter Tyser u8 pacr5; /* 0x2a */ 80819833afSPeter Tyser u8 pacr6; /* 0x2b */ 81819833afSPeter Tyser u8 pacr7; /* 0x2c */ 82819833afSPeter Tyser u32 res6; /* 0x2d */ 83819833afSPeter Tyser u8 pacr8; /* 0x2e */ 84819833afSPeter Tyser u32 res7; /* 0x2f */ 85819833afSPeter Tyser u8 gpacr; /* 0x30 */ 86819833afSPeter Tyser u8 res8[3]; /* 0x31 - 0x33 */ 87819833afSPeter Tyser } scm_t; 88819833afSPeter Tyser 89819833afSPeter Tyser /* SDRAM controller registers */ 90819833afSPeter Tyser typedef struct sdram_ctrl { 91819833afSPeter Tyser u16 dcr; /* 0x00 Control register */ 92819833afSPeter Tyser u16 res1[3]; /* 0x02 - 0x07 */ 93819833afSPeter Tyser u32 dacr0; /* 0x08 address and control register 0 */ 94819833afSPeter Tyser u32 dmr0; /* 0x0C mask register block 0 */ 95819833afSPeter Tyser u32 dacr1; /* 0x10 address and control register 1 */ 96819833afSPeter Tyser u32 dmr1; /* 0x14 mask register block 1 */ 97819833afSPeter Tyser } sdram_t; 98819833afSPeter Tyser 99819833afSPeter Tyser typedef struct canex_ctrl { 100819833afSPeter Tyser can_msg_t msg[16]; /* 0x00 Message Buffer 0-15 */ 101819833afSPeter Tyser } canex_t; 102819833afSPeter Tyser 103819833afSPeter Tyser /* GPIO port registers */ 104819833afSPeter Tyser typedef struct gpio_ctrl { 105819833afSPeter Tyser /* Port Output Data Registers */ 106819833afSPeter Tyser u8 podr_addr; /* 0x00 */ 107819833afSPeter Tyser u8 podr_datah; /* 0x01 */ 108819833afSPeter Tyser u8 podr_datal; /* 0x02 */ 109819833afSPeter Tyser u8 podr_busctl; /* 0x03 */ 110819833afSPeter Tyser u8 podr_bs; /* 0x04 */ 111819833afSPeter Tyser u8 podr_cs; /* 0x05 */ 112819833afSPeter Tyser u8 podr_sdram; /* 0x06 */ 113819833afSPeter Tyser u8 podr_feci2c; /* 0x07 */ 114819833afSPeter Tyser u8 podr_uarth; /* 0x08 */ 115819833afSPeter Tyser u8 podr_uartl; /* 0x09 */ 116819833afSPeter Tyser u8 podr_qspi; /* 0x0A */ 117819833afSPeter Tyser u8 podr_timer; /* 0x0B */ 118819833afSPeter Tyser u8 podr_etpu; /* 0x0C */ 119819833afSPeter Tyser u8 res1[3]; /* 0x0D - 0x0F */ 120819833afSPeter Tyser 121819833afSPeter Tyser /* Port Data Direction Registers */ 122819833afSPeter Tyser u8 pddr_addr; /* 0x10 */ 123819833afSPeter Tyser u8 pddr_datah; /* 0x11 */ 124819833afSPeter Tyser u8 pddr_datal; /* 0x12 */ 125819833afSPeter Tyser u8 pddr_busctl; /* 0x13 */ 126819833afSPeter Tyser u8 pddr_bs; /* 0x14 */ 127819833afSPeter Tyser u8 pddr_cs; /* 0x15 */ 128819833afSPeter Tyser u8 pddr_sdram; /* 0x16 */ 129819833afSPeter Tyser u8 pddr_feci2c; /* 0x17 */ 130819833afSPeter Tyser u8 pddr_uarth; /* 0x18 */ 131819833afSPeter Tyser u8 pddr_uartl; /* 0x19 */ 132819833afSPeter Tyser u8 pddr_qspi; /* 0x1A */ 133819833afSPeter Tyser u8 pddr_timer; /* 0x1B */ 134819833afSPeter Tyser u8 pddr_etpu; /* 0x1C */ 135819833afSPeter Tyser u8 res2[3]; /* 0x1D - 0x1F */ 136819833afSPeter Tyser 137819833afSPeter Tyser /* Port Data Direction Registers */ 138819833afSPeter Tyser u8 ppdsdr_addr; /* 0x20 */ 139819833afSPeter Tyser u8 ppdsdr_datah; /* 0x21 */ 140819833afSPeter Tyser u8 ppdsdr_datal; /* 0x22 */ 141819833afSPeter Tyser u8 ppdsdr_busctl; /* 0x23 */ 142819833afSPeter Tyser u8 ppdsdr_bs; /* 0x24 */ 143819833afSPeter Tyser u8 ppdsdr_cs; /* 0x25 */ 144819833afSPeter Tyser u8 ppdsdr_sdram; /* 0x26 */ 145819833afSPeter Tyser u8 ppdsdr_feci2c; /* 0x27 */ 146819833afSPeter Tyser u8 ppdsdr_uarth; /* 0x28 */ 147819833afSPeter Tyser u8 ppdsdr_uartl; /* 0x29 */ 148819833afSPeter Tyser u8 ppdsdr_qspi; /* 0x2A */ 149819833afSPeter Tyser u8 ppdsdr_timer; /* 0x2B */ 150819833afSPeter Tyser u8 ppdsdr_etpu; /* 0x2C */ 151819833afSPeter Tyser u8 res3[3]; /* 0x2D - 0x2F */ 152819833afSPeter Tyser 153819833afSPeter Tyser /* Port Clear Output Data Registers */ 154819833afSPeter Tyser u8 pclrr_addr; /* 0x30 */ 155819833afSPeter Tyser u8 pclrr_datah; /* 0x31 */ 156819833afSPeter Tyser u8 pclrr_datal; /* 0x32 */ 157819833afSPeter Tyser u8 pclrr_busctl; /* 0x33 */ 158819833afSPeter Tyser u8 pclrr_bs; /* 0x34 */ 159819833afSPeter Tyser u8 pclrr_cs; /* 0x35 */ 160819833afSPeter Tyser u8 pclrr_sdram; /* 0x36 */ 161819833afSPeter Tyser u8 pclrr_feci2c; /* 0x37 */ 162819833afSPeter Tyser u8 pclrr_uarth; /* 0x38 */ 163819833afSPeter Tyser u8 pclrr_uartl; /* 0x39 */ 164819833afSPeter Tyser u8 pclrr_qspi; /* 0x3A */ 165819833afSPeter Tyser u8 pclrr_timer; /* 0x3B */ 166819833afSPeter Tyser u8 pclrr_etpu; /* 0x3C */ 167819833afSPeter Tyser u8 res4[3]; /* 0x3D - 0x3F */ 168819833afSPeter Tyser 169819833afSPeter Tyser /* Pin Assignment Registers */ 170819833afSPeter Tyser u8 par_ad; /* 0x40 */ 171819833afSPeter Tyser u8 res5; /* 0x41 */ 172819833afSPeter Tyser u16 par_busctl; /* 0x42 */ 173819833afSPeter Tyser u8 par_bs; /* 0x44 */ 174819833afSPeter Tyser u8 par_cs; /* 0x45 */ 175819833afSPeter Tyser u8 par_sdram; /* 0x46 */ 176819833afSPeter Tyser u8 par_feci2c; /* 0x47 */ 177819833afSPeter Tyser u16 par_uart; /* 0x48 */ 178819833afSPeter Tyser u8 par_qspi; /* 0x4A */ 179819833afSPeter Tyser u8 res6; /* 0x4B */ 180819833afSPeter Tyser u16 par_timer; /* 0x4C */ 181819833afSPeter Tyser u8 par_etpu; /* 0x4E */ 182819833afSPeter Tyser u8 res7; /* 0x4F */ 183819833afSPeter Tyser 184819833afSPeter Tyser /* Drive Strength Control Registers */ 185819833afSPeter Tyser u8 dscr_eim; /* 0x50 */ 186819833afSPeter Tyser u8 dscr_etpu; /* 0x51 */ 187819833afSPeter Tyser u8 dscr_feci2c; /* 0x52 */ 188819833afSPeter Tyser u8 dscr_uart; /* 0x53 */ 189819833afSPeter Tyser u8 dscr_qspi; /* 0x54 */ 190819833afSPeter Tyser u8 dscr_timer; /* 0x55 */ 191819833afSPeter Tyser u16 res8; /* 0x56 */ 192819833afSPeter Tyser } gpio_t; 193819833afSPeter Tyser 194819833afSPeter Tyser /*Chip configuration module registers */ 195819833afSPeter Tyser typedef struct ccm_ctrl { 196819833afSPeter Tyser u8 rcr; /* 0x01 */ 197819833afSPeter Tyser u8 rsr; /* 0x02 */ 198819833afSPeter Tyser u16 res1; /* 0x03 */ 199819833afSPeter Tyser u16 ccr; /* 0x04 Chip configuration register */ 200819833afSPeter Tyser u16 lpcr; /* 0x06 Low-power Control register */ 201819833afSPeter Tyser u16 rcon; /* 0x08 Rreset configuration register */ 202819833afSPeter Tyser u16 cir; /* 0x0a Chip identification register */ 203819833afSPeter Tyser } ccm_t; 204819833afSPeter Tyser 205819833afSPeter Tyser /* Clock Module registers */ 206819833afSPeter Tyser typedef struct pll_ctrl { 207819833afSPeter Tyser u32 syncr; /* 0x00 synthesizer control register */ 208819833afSPeter Tyser u32 synsr; /* 0x04 synthesizer status register */ 209819833afSPeter Tyser } pll_t; 210819833afSPeter Tyser 211819833afSPeter Tyser /* Watchdog registers */ 212819833afSPeter Tyser typedef struct wdog_ctrl { 213819833afSPeter Tyser u16 cr; /* 0x00 Control register */ 214819833afSPeter Tyser u16 mr; /* 0x02 Modulus register */ 215819833afSPeter Tyser u16 cntr; /* 0x04 Count register */ 216819833afSPeter Tyser u16 sr; /* 0x06 Service register */ 217819833afSPeter Tyser } wdog_t; 218819833afSPeter Tyser 219819833afSPeter Tyser #endif /* __IMMAP_5235__ */ 220