1 1.4 rin /* $NetBSD: dcr4xx.h,v 1.4 2021/04/02 03:20:53 rin Exp $ */ 2 1.1 kiyohara 3 1.1 kiyohara /* 4 1.1 kiyohara * Copyright 2002 Wasabi Systems, Inc. 5 1.1 kiyohara * All rights reserved. 6 1.1 kiyohara * 7 1.1 kiyohara * Written by Eduardo Horvath for Wasabi Systems, Inc. 8 1.1 kiyohara * 9 1.1 kiyohara * Redistribution and use in source and binary forms, with or without 10 1.1 kiyohara * modification, are permitted provided that the following conditions 11 1.1 kiyohara * are met: 12 1.1 kiyohara * 1. Redistributions of source code must retain the above copyright 13 1.1 kiyohara * notice, this list of conditions and the following disclaimer. 14 1.1 kiyohara * 2. Redistributions in binary form must reproduce the above copyright 15 1.1 kiyohara * notice, this list of conditions and the following disclaimer in the 16 1.1 kiyohara * documentation and/or other materials provided with the distribution. 17 1.1 kiyohara * 3. All advertising materials mentioning features or use of this software 18 1.1 kiyohara * must display the following acknowledgement: 19 1.1 kiyohara * This product includes software developed for the NetBSD Project by 20 1.1 kiyohara * Wasabi Systems, Inc. 21 1.1 kiyohara * 4. The name of Wasabi Systems, Inc. may not be used to endorse 22 1.1 kiyohara * or promote products derived from this software without specific prior 23 1.1 kiyohara * written permission. 24 1.1 kiyohara * 25 1.1 kiyohara * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 26 1.1 kiyohara * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27 1.1 kiyohara * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 1.1 kiyohara * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 29 1.1 kiyohara * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 1.1 kiyohara * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 1.1 kiyohara * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 1.1 kiyohara * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 1.1 kiyohara * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 1.1 kiyohara * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 1.1 kiyohara * POSSIBILITY OF SUCH DAMAGE. 36 1.1 kiyohara */ 37 1.1 kiyohara 38 1.1 kiyohara #ifndef _DCR405GP_H_ 39 1.1 kiyohara #define _DCR405GP_H_ 40 1.1 kiyohara 41 1.1 kiyohara /* Device Control Register declarations */ 42 1.1 kiyohara 43 1.1 kiyohara /* DCRs used for indirect access */ 44 1.1 kiyohara #define DCR_CPR0_CFGADDR 0x00c /* Clocking Configuration Address Register */ 45 1.1 kiyohara #define DCR_CPR0_CFGDATA 0x00d /* Clocking Configuration Data Register */ 46 1.1 kiyohara #define DCR_SDR0_CFGADDR 0x00e /* System DCR Configuration Address Register */ 47 1.1 kiyohara #define DCR_SDR0_CFGDATA 0x00f /* System DCR Configuration Data Register */ 48 1.1 kiyohara #define DCR_SDRAM0_CFGADDR 0x010 /* Memory Controller Address Register */ 49 1.1 kiyohara #define DCR_SDRAM0_CFGDATA 0x011 /* Memory Controller Data Register */ 50 1.1 kiyohara #define DCR_EBC0_CFGADDR 0x012 /* Peripheral Controller Address Register */ 51 1.1 kiyohara #define DCR_EBC0_CFGDATA 0x013 /* Peripheral Controller Data Register */ 52 1.1 kiyohara #define DCR_DCP0_CFGADDR 0x014 /* Decompression Controller Address Register */ 53 1.1 kiyohara #define DCR_DCP0_CFGDATA 0x015 /* Decompression Controller Data Register */ 54 1.1 kiyohara 55 1.1 kiyohara /* On-Chip memory */ 56 1.1 kiyohara #define DCR_OCM0_ISARC 0x018 /* OCM Instruction-Side Address Range Compare Register */ 57 1.1 kiyohara #define DCR_OCM0_ISCNTL 0x019 /* OCM Instruction-Side Control Register */ 58 1.1 kiyohara #define DCR_OCM0_DSARC 0x01a /* OCM Data-Side Address Range Compare Register */ 59 1.1 kiyohara #define DCR_OCM0_DSCNTL 0x01b /* OCM Data-Side Control Register */ 60 1.1 kiyohara 61 1.1 kiyohara /* On-Chip busses */ 62 1.1 kiyohara #define DCR_PLB0_BESR 0x084 /* PLB Bus Error Status Register */ 63 1.1 kiyohara #define DCR_PLB0_BEAR 0x086 /* PLB Bus Error Address Register */ 64 1.1 kiyohara #define DCR_PLB0_ACR 0x087 /* PLB Arbiter Control Register */ 65 1.1 kiyohara #define DCR_POB0_BESR0 0x0a0 /* PLB to OPB Bus Error Status Register 0 */ 66 1.1 kiyohara #define DCR_POB0_BEAR 0x0a2 /* PLB to OPB Bus Error Address Register */ 67 1.1 kiyohara #define DCR_POB0_BESR1 0x0a4 /* PLB to OPB Bus Error Status Register 1 */ 68 1.1 kiyohara 69 1.1 kiyohara /* Clocking, Power management and Chip Control */ 70 1.1 kiyohara #define DCR_CPC0_PLLMR 0x0b0 /* PLL Mode Register */ 71 1.1 kiyohara #define CPC0_PLLMR_CBDV(pllmr) ((((pllmr) & 0x00060000) >> 17) + 1) 72 1.1 kiyohara #define CPC0_PLLMR_OPDV(pllmr) ((((pllmr) & 0x00018000) >> 15) + 1) 73 1.1 kiyohara #define DCR_CPC0_CR0 0x0b1 /* Chip Control Register 0 */ 74 1.1 kiyohara #define DCR_CPC0_CR1 0x0b2 /* Chip Control Register 1 */ 75 1.1 kiyohara #define CPC0_CR1_CETE 0x00800000 /* CPU External Timer Enable */ 76 1.1 kiyohara #define DCR_CPC0_PSR 0x0b4 /* Chip Pin Strapping Register */ 77 1.1 kiyohara #define DCR_CPC0_JTAGID 0x0b5 /* JTAG ID Register */ 78 1.1 kiyohara #define DCR_CPC0_SR 0x0b8 /* CPM Status Register */ 79 1.1 kiyohara #define DCR_CPC0_ER 0x0b9 /* CPM Enable Register */ 80 1.1 kiyohara #define DCR_CPC0_FR 0x0ba /* CPM Force Register */ 81 1.1 kiyohara 82 1.1 kiyohara /* Universal Interrupt Controllers */ 83 1.1 kiyohara #define DCR_UIC0_BASE 0x0c0 /* UIC0 Registers Base */ 84 1.1 kiyohara #define DCR_UIC1_BASE 0x0d0 /* UIC1 Registers Base */ 85 1.1 kiyohara #define DCR_UIC2_BASE 0x0e0 /* UIC2 Registers Base */ 86 1.1 kiyohara #define DCR_UIC3_BASE 0x0f0 /* UIC3 Registers Base */ 87 1.1 kiyohara #define DCR_UICB_BASE 0x200 /* UICB Registers Base */ 88 1.1 kiyohara #define DCR_UIC2_BASE_440GX 0x210 /* UIC2 Registers Base (440GX only) */ 89 1.1 kiyohara 90 1.1 kiyohara #define DCR_UIC_SR 0x000 /* UIC Status Register */ 91 1.1 kiyohara #define DCR_UIC_ER 0x002 /* UIC Enable Register */ 92 1.1 kiyohara #define DCR_UIC_CR 0x003 /* UIC Critical Register */ 93 1.1 kiyohara #define DCR_UIC_PR 0x004 /* UIC Polarity Register */ 94 1.1 kiyohara #define DCR_UIC_TR 0x005 /* UIC Triggering Register */ 95 1.1 kiyohara #define DCR_UIC_MSR 0x006 /* UIC Masked Status Register */ 96 1.1 kiyohara #define DCR_UIC_VR 0x007 /* UIC Vector Register */ 97 1.1 kiyohara #define DCR_UIC_VCR 0x008 /* UIC Vector Configuration Register */ 98 1.1 kiyohara 99 1.1 kiyohara /* Direct Memory Access */ 100 1.1 kiyohara #define DCR_DMA0_CR0 0x100 /* DMA Channel Control Register 0 */ 101 1.1 kiyohara #define DCR_DMA0_CT0 0x101 /* DMA Count Register 0 */ 102 1.1 kiyohara #define DCR_DMA0_DA0 0x102 /* DMA Destination Address Register 0 */ 103 1.1 kiyohara #define DCR_DMA0_SA0 0x103 /* DMA Source Address Register 0 */ 104 1.1 kiyohara #define DCR_DMA0_SG0 0x104 /* DMA Scatter/Gather Descriptor Address Register 0 */ 105 1.1 kiyohara 106 1.1 kiyohara #define DCR_DMA0_CR1 0x108 /* DMA Channel Control Register 1 */ 107 1.1 kiyohara #define DCR_DMA0_CT1 0x109 /* DMA Count Register 1 */ 108 1.1 kiyohara #define DCR_DMA0_DA1 0x10a /* DMA Destination Address Register 1 */ 109 1.1 kiyohara #define DCR_DMA0_SA1 0x10b /* DMA Source Address Register 1 */ 110 1.1 kiyohara #define DCR_DMA0_SG1 0x10c /* DMA Scatter/Gather Descriptor Address Register 1 */ 111 1.1 kiyohara 112 1.1 kiyohara #define DCR_DMA0_CR2 0x110 /* DMA Channel Control Register 2 */ 113 1.1 kiyohara #define DCR_DMA0_CT2 0x111 /* DMA Count Register 2 */ 114 1.1 kiyohara #define DCR_DMA0_DA2 0x112 /* DMA Destination Address Register 2 */ 115 1.1 kiyohara #define DCR_DMA0_SA2 0x113 /* DMA Source Address Register 2 */ 116 1.1 kiyohara #define DCR_DMA0_SG2 0x114 /* DMA Scatter/Gather Descriptor Address Register 2 */ 117 1.1 kiyohara 118 1.1 kiyohara #define DCR_DMA0_CR3 0x118 /* DMA Channel Control Register 3 */ 119 1.1 kiyohara #define DCR_DMA0_CT3 0x119 /* DMA Count Register 3 */ 120 1.1 kiyohara #define DCR_DMA0_DA3 0x11a /* DMA Destination Address Register 3 */ 121 1.1 kiyohara #define DCR_DMA0_SA3 0x11b /* DMA Source Address Register 3 */ 122 1.1 kiyohara #define DCR_DMA0_SG3 0x11c /* DMA Scatter/Gather Descriptor Address Register 3 */ 123 1.1 kiyohara 124 1.1 kiyohara #define DCR_DMA0_SR 0x120 /* DMA Status Register */ 125 1.1 kiyohara #define DCR_DMA0_SGC 0x123 /* DMA Scatter/Gather Control Register */ 126 1.1 kiyohara #define DCR_DMA0_SLP 0x125 /* DMA Sleep Mode Register */ 127 1.1 kiyohara #define DCR_DMA0_POL 0x126 /* DMA Polarity Configuration Register */ 128 1.1 kiyohara 129 1.1 kiyohara /* Memory Access Layer */ 130 1.1 kiyohara #define DCR_MAL0_CFG 0x180 /* MAL Configuration Register */ 131 1.1 kiyohara #define MAL0_CFG_SR 0x80000000 /* Software Reset */ 132 1.1 kiyohara #define MAL0_CFG_PLBP_MASK 0x00c00000 /* PLB priority mask */ 133 1.1 kiyohara #define MAL0_CFG_PLBP_0 0x00000000 /* PLB priority 0 */ 134 1.1 kiyohara #define MAL0_CFG_PLBP_1 0x00400000 /* PLB priority 1 */ 135 1.1 kiyohara #define MAL0_CFG_PLBP_2 0x00800000 /* PLB priority 2 */ 136 1.1 kiyohara #define MAL0_CFG_PLBP_3 0x00c00000 /* PLB priority 3 */ 137 1.1 kiyohara #define MAL0_CFG_GA 0x00200000 /* Guarded Active */ 138 1.1 kiyohara #define MAL0_CFG_OA 0x00100000 /* Ordered Active */ 139 1.1 kiyohara #define MAL0_CFG_PLBLE 0x00080000 /* PLB Lock Error */ 140 1.1 kiyohara #define MAL0_CFG_PLBLT 0x00078000 /* PLB Latency Timer */ 141 1.1 kiyohara #define MAL0_CFG_PLBLTSHIFT 15 /* PLB Latency Timer shift */ 142 1.1 kiyohara #define MAL0_CFG_PLBB 0x00004000 /* PLB Burst */ 143 1.1 kiyohara #define MAL0_CFG_OPBBL 0x00000080 /* OPB Bus Lock */ 144 1.1 kiyohara #define MAL0_CFG_EOPIE 0x00000004 /* End Of Packet Interrupt Enable */ 145 1.1 kiyohara #define MAL0_CFG_LEA 0x00000002 /* Locked Error Active */ 146 1.1 kiyohara #define MAL0_CFG_SD 0x00000001 /* MAL Scroll Descriptor */ 147 1.1 kiyohara 148 1.1 kiyohara #define MAL0_CFG_RPP_MASK 0x00c00000 /* Read priority mask */ 149 1.1 kiyohara #define MAL0_CFG_RPP_0 0x00000000 /* Lowest */ 150 1.1 kiyohara #define MAL0_CFG_RPP_1 0x00400000 151 1.1 kiyohara #define MAL0_CFG_RPP_2 0x00800000 152 1.1 kiyohara #define MAL0_CFG_RPP_3 0x00c00000 /* Highest */ 153 1.1 kiyohara #define MAL0_CFG_RMBS_MASK 0x00300000 /* Read Max Burst Size */ 154 1.1 kiyohara #define MAL0_CFG_RMBS_4 0x00000000 /* Max burst size of 4 */ 155 1.1 kiyohara #define MAL0_CFG_RMBS_8 0x00100000 /* Max burst size of 8 */ 156 1.1 kiyohara #define MAL0_CFG_RMBS_16 0x00200000 /* Max burst size of 16 */ 157 1.1 kiyohara #define MAL0_CFG_RMBS_32 0x00300000 /* Max burst size of 32 */ 158 1.1 kiyohara #define MAL0_CFG_WPP_MASK 0x000c0000 /* Write PLB Priority */ 159 1.1 kiyohara #define MAL0_CFG_WPP_0 0x00000000 /* Lowest */ 160 1.1 kiyohara #define MAL0_CFG_WPP_1 0x00040000 161 1.1 kiyohara #define MAL0_CFG_WPP_2 0x00080000 162 1.1 kiyohara #define MAL0_CFG_WPP_3 0x000c0000 /* Highest */ 163 1.1 kiyohara #define MAL0_CFG_WMBS_MASK 0x00030000 /* Write Max Burst Size */ 164 1.1 kiyohara #define MAL0_CFG_WMBS_4 0x00000000 /* Max burst size of 4 */ 165 1.1 kiyohara #define MAL0_CFG_WMBS_8 0x00010000 /* Max burst size of 8 */ 166 1.1 kiyohara #define MAL0_CFG_WMBS_16 0x00020000 /* Max burst size of 16 */ 167 1.1 kiyohara #define MAL0_CFG_WMBS_32 0x00030000 /* Max burst size of 32 */ 168 1.1 kiyohara #define MAL0_CFG_PLBLE__EX 0x00008000 /* PLB Lock Error */ 169 1.1 kiyohara 170 1.1 kiyohara #define DCR_MAL0_ESR 0x181 /* Error Status Register */ 171 1.1 kiyohara #define MAL0_ESR_EVB 0x80000000 /* Error Valid Bit */ 172 1.1 kiyohara #define MAL0_ESR_CID_RX 0x40000000 /* Receive Channel */ 173 1.1 kiyohara #define MAL0_ESR_CID_MASK 0x3e000000 /* Channel ID */ 174 1.1 kiyohara #define MAL0_ESR_CID_SHIFT 25 175 1.1 kiyohara #define MAL0_ESR_PTE 0x00800000 /* PLB Timeout Error */ 176 1.1 kiyohara #define MAL0_ESR_PRE 0x00400000 /* PLB Read Error */ 177 1.1 kiyohara #define MAL0_ESR_PWE 0x00200000 /* PLB Write Error */ 178 1.1 kiyohara #define MAL0_ESR_DE 0x00100000 /* Descriptor Error */ 179 1.1 kiyohara #define MAL0_ESR_ONE 0x00080000 /* OPB Non-fullword Error */ 180 1.1 kiyohara #define MAL0_ESR_OTE 0x00040000 /* OPB Timeout Error */ 181 1.1 kiyohara #define MAL0_ESR_OSE 0x00020000 /* OPB Slave Error */ 182 1.1 kiyohara #define MAL0_ESR_PEIN 0x00010000 /* PLB Bus Error Indication */ 183 1.1 kiyohara #define MAL0_ESR_PTEI 0x00000080 /* PLB Timeout Error Interrupt */ 184 1.1 kiyohara #define MAL0_ESR_PREI 0x00000040 /* PLB Read Error Interrupt */ 185 1.1 kiyohara #define MAL0_ESR_PWEI 0x00000020 /* PLB Write Error Interrupt */ 186 1.1 kiyohara #define MAL0_ESR_DEI 0x00000010 /* Descriptor Error Interrupt */ 187 1.1 kiyohara #define MAL0_ESR_ONEI 0x00000008 /* OPB Non-fullword Error Interrupt */ 188 1.1 kiyohara #define MAL0_ESR_OTEI 0x00000004 /* OPB Timeout Error Interrupt */ 189 1.1 kiyohara #define MAL0_ESR_OSEI 0x00000002 /* OPB Slave Error Interrupt */ 190 1.1 kiyohara #define MAL0_ESR_PBEI 0x00000001 /* PLB Bus Error Interrupt */ 191 1.1 kiyohara #define DCR_MAL0_IER 0x182 /* Interrupt Enable Register */ 192 1.1 kiyohara #define MAL0_IER_PT 0x00000080 /* PLB Timeout Interrupt */ 193 1.1 kiyohara #define MAL0_IER_PRE 0x00000040 /* PLB Read Interrupt */ 194 1.1 kiyohara #define MAL0_IER_PWE 0x00000020 /* PLB Write Interrupt */ 195 1.1 kiyohara #define MAL0_IER_DE 0x00000010 /* Descriptor Error Interrupt */ 196 1.1 kiyohara #define MAL0_IER_NWE 0x00000008 /* Non-Word Transfer Error Interrupt */ 197 1.1 kiyohara #define MAL0_IER_TO 0x00000004 /* Time Out Error Interrupt */ 198 1.1 kiyohara #define MAL0_IER_OPB 0x00000002 /* OPB Error Interrupt */ 199 1.1 kiyohara #define MAL0_IER_PLB 0x00000001 /* PLB Error Interrupt */ 200 1.1 kiyohara #define DCR_MALDBR 0x183 /* MAL Debug register */ 201 1.1 kiyohara #define DCR_MAL0_TXCASR 0x184 /* Tx Channel Active Register (Set) */ 202 1.1 kiyohara #define DCR_MAL0_TXCARR 0x185 /* Tx Channel Active Register (Reset) */ 203 1.1 kiyohara #define DCR_MAL0_TXEOBISR 0x186 /* Tx End of Buffer Interrupt Status Register */ 204 1.1 kiyohara #define DCR_MAL0_TXDEIR 0x187 /* Tx Descriptor Error Interrupt Register */ 205 1.1 kiyohara #define DCR_MAL0_RXCASR 0x190 /* Rx Channel Active Register (Set) */ 206 1.1 kiyohara #define DCR_MAL0_RXCARR 0x191 /* Rx Channel Active Register (Reset) */ 207 1.1 kiyohara #define DCR_MAL0_RXEOBISR 0x192 /* Rx End of Buffer Interrupt Status Register */ 208 1.1 kiyohara #define DCR_MAL0_RXDEIR 0x193 /* Rx Descriptor Error Interrupt Register */ 209 1.1 kiyohara #define MAL0__XCAR_CHAN(c) (0x80000000 >> (c)) 210 1.1 kiyohara #define DCR_MAL0_TXCTP0R 0x1a0 /* Channel Tx 0 Channel Table Pointer Register */ 211 1.1 kiyohara #define DCR_MAL0_TXCTP1R 0x1a1 /* Channel Tx 1 Channel Table Pointer Register */ 212 1.1 kiyohara #define DCR_MAL0_TXCTP2R 0x1a2 /* Channel Tx 2 Channel Table Pointer Register */ 213 1.1 kiyohara #define DCR_MAL0_TXCTP3R 0x1a3 /* Channel Tx 3 Channel Table Pointer Register */ 214 1.1 kiyohara #define DCR_MAL0_RXCTP0R 0x1c0 /* Channel Rx 0 Channel Table Pointer Register */ 215 1.1 kiyohara #define DCR_MAL0_RXCTP1R 0x1c1 /* Channel Rx 1 Channel Table Pointer Register */ 216 1.1 kiyohara #define DCR_MAL0_RXCTP2R 0x1c2 /* Channel Rx 2 Channel Table Pointer Register */ 217 1.1 kiyohara #define DCR_MAL0_RXCTP3R 0x1c3 /* Channel Rx 3 Channel Table Pointer Register */ 218 1.1 kiyohara #define DCR_MAL0_RCBS0 0x1e0 /* Channel Rx 0 Channel Buffer Size Register */ 219 1.1 kiyohara #define DCR_MAL0_RCBS1 0x1e1 /* Channel Rx 1 Channel Buffer Size Register */ 220 1.1 kiyohara #define DCR_MAL0_RCBS2 0x1e2 /* Channel Rx 2 Channel Buffer Size Register */ 221 1.1 kiyohara #define DCR_MAL0_RCBS3 0x1e3 /* Channel Rx 3 Channel Buffer Size Register */ 222 1.1 kiyohara 223 1.1 kiyohara 224 1.1 kiyohara /* Indirectly accessed Clocking Controller DCRs */ 225 1.1 kiyohara 226 1.1 kiyohara #define DCR_CPR0_CLKUPD 0x020 /* Clocking Update Register */ 227 1.1 kiyohara #define DCR_CPR0_PLLC 0x040 /* SYS_PLL Control Register */ 228 1.1 kiyohara #define DCR_CPR0_PLLD 0x060 /* SYS_PLL Divider Register */ 229 1.1 kiyohara #define DCR_CPR0_CPUD 0x080 /* CPU Clock Divider Register */ 230 1.1 kiyohara #define DCR_CPR0_PLBD 0x0a0 /* PLB Clock Divider Register */ 231 1.1 kiyohara #define CPR0_PLBDV0(x) \ 232 1.1 kiyohara ((((x) & 0x07000000) >> 24) == 0 ? 8 : (((x) & 0x07000000) >> 24)) 233 1.1 kiyohara #define DCR_CPR0_OPBD 0x0c0 /* OPB Clock Divider Register */ 234 1.1 kiyohara #define CPR0_OPBDV0(x) \ 235 1.1 kiyohara ((((x) & 0x03000000) >> 24) == 0 ? 4 : (((x) & 0x03000000) >> 24)) 236 1.1 kiyohara #define DCR_CPR0_PERD 0x0e0 /* Peripheral Clock Divider Register */ 237 1.1 kiyohara #define DCR_CPR0_AHBD 0x100 /* AHB Clock Divider Register */ 238 1.1 kiyohara #define DCR_CPR0_ICFG 0x140 /* Initial Configuration Register */ 239 1.1 kiyohara 240 1.1 kiyohara /* Indirectly accessed Clocking Controller DCRs */ 241 1.1 kiyohara 242 1.3 kiyohara #define DCR_SDR0_SRST0 0x0200 /* Soft Reset */ 243 1.3 kiyohara #define SDR0_SRST0_BGO (1 << 31) /* PLB4 to OPB bridge */ 244 1.3 kiyohara #define SDR0_SRST0_PLB4 (1 << 30) /* PLB4 arbiter */ 245 1.3 kiyohara #define SDR0_SRST0_EBC (1 << 29) /* External bus controller */ 246 1.3 kiyohara #define SDR0_SRST0_OPB (1 << 28) /* OPB arbiter */ 247 1.3 kiyohara #define SDR0_SRST0_UART0 (1 << 27) /* Universal asynchronous receiver/transmitter 0 */ 248 1.3 kiyohara #define SDR0_SRST0_UART1 (1 << 26) /* Universal asynchronous receiver/transmitter 1 */ 249 1.3 kiyohara #define SDR0_SRST0_IIC0 (1 << 25) /* Inter integrated circuit 0 */ 250 1.3 kiyohara #define SDR0_SRST0_BGI (1 << 24) /* OPB to PLB bridge */ 251 1.3 kiyohara #define SDR0_SRST0_GPIO (1 << 23) /* General purpose I/O */ 252 1.3 kiyohara #define SDR0_SRST0_GPT (1 << 22) /* General purpose timer */ 253 1.3 kiyohara #define SDR0_SRST0_DMC (1 << 21) /* DDR1/2 SDRAM memory controller */ 254 1.3 kiyohara #define SDR0_SRST0_RGMII (1 << 20) /* RGMII bridge */ 255 1.3 kiyohara #define SDR0_SRST0_EMAC0 (1 << 19) /* Ethernet media access controller 0 */ 256 1.3 kiyohara #define SDR0_SRST0_EMAC1 (1 << 18) /* Ethernet media access controller 1 */ 257 1.3 kiyohara #define SDR0_SRST0_CPM (1 << 17) /* Clock and power management */ 258 1.3 kiyohara #define SDR0_SRST0_EPLL (1 << 16) /* Ethernet PLL */ 259 1.3 kiyohara #define SDR0_SRST0_UIC (1 << 15) /* UIC0, UIC1, UIC2 */ 260 1.3 kiyohara #define SDR0_SRST0_UPRST (1 << 14) /* USB PRST */ 261 1.3 kiyohara #define SDR0_SRST0_IIC1 (1 << 13) /* Inter integrated circuit 1 */ 262 1.3 kiyohara #define SDR0_SRST0_SCP (1 << 12) /* Serial communications port */ 263 1.3 kiyohara #define SDR0_SRST0_UHRST (1 << 11) /* USB HRESET (AHB) */ 264 1.3 kiyohara #define SDR0_SRST0_DMA (1 << 10) /* Direct memory access controller */ 265 1.3 kiyohara #define SDR0_SRST0_DMAC (1 << 9) /* DMA channel */ 266 1.3 kiyohara #define SDR0_SRST0_MAL (1 << 8) /* Media access layer */ 267 1.3 kiyohara #define SDR0_SRST0_EBM (1 << 7) /* External bus master */ 268 1.3 kiyohara #define SDR0_SRST0_GPTR (1 << 6) /* General purpose timer */ 269 1.3 kiyohara #define SDR0_SRST0_PE0 (1 << 5) /* PCI Express 0 */ 270 1.3 kiyohara #define SDR0_SRST0_PE1 (1 << 4) /* PCI Express 1 */ 271 1.3 kiyohara #define SDR0_SRST0_CRYP (1 << 3) /* Security */ 272 1.3 kiyohara #define SDR0_SRST0_PKP (1 << 2) /* Public Key Accelerator and TRNG1 */ 273 1.3 kiyohara #define SDR0_SRST0_AHB (1 << 1) /* AHB to PLB bridge */ 274 1.3 kiyohara #define SDR0_SRST0_NDFC (1 << 0) /* NAND Flash controller */ 275 1.3 kiyohara #define DCR_SDR0_PFC1 0x4101 /* Pin Function Control Register 1 */ 276 1.3 kiyohara #define SDR0_PFC1_U1ME (1 << 25) /* UART1 Mode Enable */ 277 1.3 kiyohara #define SDR0_PFC1_U0ME (1 << 19) /* UART0 Mode Enable */ 278 1.3 kiyohara #define SDR0_PFC1_U0IM (1 << 18) /* UART0 Interface Mode */ 279 1.3 kiyohara #define SDR0_PFC1_SIS (1 << 17) /* SPI/IIC 1 Selection */ 280 1.3 kiyohara #define SDR0_PFC1_DMAAEN (1 << 16) /* DMA Channel A Enable */ 281 1.3 kiyohara #define SDR0_PFC1_DMADEN (1 << 15) /* DMA Channel D Enable */ 282 1.3 kiyohara #define SDR0_PFC1_USBEN (1 << 14) /* USB OTG Enable */ 283 1.3 kiyohara #define SDR0_PFC1_AHBSWAP (1 << 5) /* AHB Data Swap Enable */ 284 1.3 kiyohara #define SDR0_PFC1_USBBIGEN (1 << 4) /* USB OTG - AHB Interface Endian Mode */ 285 1.3 kiyohara #define SDR0_PFC1_GPTFREQ(x) ((x) & 0xf) /* GPT Variable Frequency Generator */ 286 1.1 kiyohara #define DCR_SDR0_MFR 0x4300 /* Miscellaneous Function Register */ 287 1.1 kiyohara #define SDR0_MFR_ECS(n) (1 << (27 - (n))) /* Ethernet n Clock Selection */ 288 1.1 kiyohara #define SDR0_MFR_ETXFL(n) (1 << (15 - ((n) << 2))) /* Force Parity Error EMACn Tx FIFO Bits 0:63 */ 289 1.1 kiyohara #define SDR0_MFR_ETXFH(n) (1 << (14 - ((n) << 2))) /* Force Parity Error EMACn Tx FIFO Bits 64:127 */ 290 1.1 kiyohara #define SDR0_MFR_ERXFL(n) (1 << (13 - ((n) << 2))) /* Force Parity Error EMACn Rx FIFO Bits 0:63 */ 291 1.1 kiyohara #define SDR0_MFR_ERXFH(n) (1 << (12 - ((n) << 2))) /* Force Parity Error EMACn Rx FIFO Bits 64:127 */ 292 1.1 kiyohara 293 1.1 kiyohara /* Indirectly accessed SDRAM Controller DCRs */ 294 1.1 kiyohara 295 1.1 kiyohara #define DCR_SDRAM0_BESR0 0x00 296 1.1 kiyohara #define DCR_SDRAM0_BESR1 0x08 297 1.1 kiyohara #define DCR_SDRAM0_BEAR 0x10 298 1.1 kiyohara #define DCR_SDRAM0_CFG 0x20 299 1.1 kiyohara #define DCR_SDRAM0_STATUS 0x24 300 1.1 kiyohara #define DCR_SDRAM0_RTR 0x30 301 1.1 kiyohara #define DCR_SDRAM0_PMIT 0x34 302 1.1 kiyohara #define DCR_SDRAM0_B0CR 0x40 303 1.1 kiyohara #define DCR_SDRAM0_B1CR 0x44 304 1.1 kiyohara #define DCR_SDRAM0_B2CR 0x48 305 1.1 kiyohara #define DCR_SDRAM0_B3CR 0x4c 306 1.4 rin #define SDRAM0_BnCR_EN 0x00000001 307 1.4 rin #define SDRAM0_BnCR_SZ(n) (1 << ((((n) >> 17) & 7) + 22)) 308 1.1 kiyohara #define DCR_SDRAM0_TR 0x80 309 1.1 kiyohara #define DCR_SDRAM0_ECCCFG 0x94 310 1.1 kiyohara #define DCR_SDRAM0_ECCESR 0x98 311 1.1 kiyohara #define SDRAM0_ECCESR_BLCE 0xf0000000 312 1.1 kiyohara #define SDRAM0_ECCESR_CBE 0x00c00000 313 1.1 kiyohara #define SDRAM0_ECCESR_CE 0x00200000 314 1.1 kiyohara #define SDRAM0_ECCESR_UE 0x00100000 315 1.1 kiyohara #define SDRAM0_ECCESR_BKE 0x0000f000 316 1.1 kiyohara 317 1.1 kiyohara #define SDRAM0_ECCESR_BLCEN(n) (0x80000000 >> (n)) 318 1.1 kiyohara #define SDRAM0_ECCESR_BKEN(n) (0x00008000 >> (n)) 319 1.1 kiyohara #define SDRAM0_ECCESR_CBEN(n) (0x00800000 >> (n)) 320 1.1 kiyohara 321 1.2 uebayasi /* Indirectly accessed External Bus Controller (EBC) DCRs */ 322 1.2 uebayasi 323 1.2 uebayasi #define DCR_EBC0_B0CR 0x00 324 1.2 uebayasi #define DCR_EBC0_B1CR 0x01 325 1.2 uebayasi #define DCR_EBC0_B2CR 0x02 326 1.2 uebayasi #define DCR_EBC0_B3CR 0x03 327 1.2 uebayasi #define DCR_EBC0_B4CR 0x04 328 1.2 uebayasi #define DCR_EBC0_B5CR 0x05 329 1.2 uebayasi #define DCR_EBC0_B6CR 0x06 330 1.2 uebayasi #define DCR_EBC0_B7CR 0x07 331 1.2 uebayasi #define DCR_EBC0_B0AP 0x10 332 1.2 uebayasi #define DCR_EBC0_B1AP 0x11 333 1.2 uebayasi #define DCR_EBC0_B2AP 0x12 334 1.2 uebayasi #define DCR_EBC0_B3AP 0x13 335 1.2 uebayasi #define DCR_EBC0_B4AP 0x14 336 1.2 uebayasi #define DCR_EBC0_B5AP 0x15 337 1.2 uebayasi #define DCR_EBC0_B6AP 0x16 338 1.2 uebayasi #define DCR_EBC0_B7AP 0x17 339 1.2 uebayasi #define DCR_EBC0_BEAR 0x20 340 1.2 uebayasi #define DCR_EBC0_BESR0 0x21 341 1.2 uebayasi #define DCR_EBC0_BESR1 0x22 342 1.2 uebayasi #define DCR_EBC0_CFG 0x23 343 1.2 uebayasi 344 1.2 uebayasi /* Indirectly accessed Decompression Controller DCRs */ 345 1.2 uebayasi 346 1.2 uebayasi #define DCR_DCP0_ITOR0 0x00 347 1.2 uebayasi #define DCR_DCP0_ITOR1 0x01 348 1.2 uebayasi #define DCR_DCP0_ITOR2 0x02 349 1.2 uebayasi #define DCR_DCP0_ITOR3 0x03 350 1.2 uebayasi #define DCR_DCP0_ADDR0 0x04 351 1.2 uebayasi #define DCR_DCP0_ADDR1 0x05 352 1.2 uebayasi #define DCR_DCP0_CFG 0x40 353 1.2 uebayasi #define DCR_DCP0_ID 0x41 354 1.2 uebayasi #define DCR_DCP0_VER 0x42 355 1.2 uebayasi #define DCR_DCP0_PLBBEAR 0x50 356 1.2 uebayasi #define DCR_DCP0_MEMBEAR 0x51 357 1.2 uebayasi #define DCR_DCP0_ESR 0x52 358 1.2 uebayasi #define DCR_DCP0_RAM0 0x400 359 1.2 uebayasi 360 1.1 kiyohara #endif /* _DCR405GP_H_ */ 361