1*33ff1f69Sjoerg /* $NetBSD: gtmpscreg.h,v 1.5 2016/01/15 12:09:15 joerg Exp $ */ 2ff2281b4Smatt 3ff2281b4Smatt /* 4ff2281b4Smatt * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. 5ff2281b4Smatt * All rights reserved. 6ff2281b4Smatt * 7ff2281b4Smatt * Redistribution and use in source and binary forms, with or without 8ff2281b4Smatt * modification, are permitted provided that the following conditions 9ff2281b4Smatt * are met: 10ff2281b4Smatt * 1. Redistributions of source code must retain the above copyright 11ff2281b4Smatt * notice, this list of conditions and the following disclaimer. 12ff2281b4Smatt * 2. Redistributions in binary form must reproduce the above copyright 13ff2281b4Smatt * notice, this list of conditions and the following disclaimer in the 14ff2281b4Smatt * documentation and/or other materials provided with the distribution. 15ff2281b4Smatt * 3. All advertising materials mentioning features or use of this software 16ff2281b4Smatt * must display the following acknowledgement: 17ff2281b4Smatt * This product includes software developed for the NetBSD Project by 18ff2281b4Smatt * Allegro Networks, Inc., and Wasabi Systems, Inc. 19ff2281b4Smatt * 4. The name of Allegro Networks, Inc. may not be used to endorse 20ff2281b4Smatt * or promote products derived from this software without specific prior 21ff2281b4Smatt * written permission. 22ff2281b4Smatt * 5. The name of Wasabi Systems, Inc. may not be used to endorse 23ff2281b4Smatt * or promote products derived from this software without specific prior 24ff2281b4Smatt * written permission. 25ff2281b4Smatt * 26ff2281b4Smatt * THIS SOFTWARE IS PROVIDED BY ALLEGRO NETWORKS, INC. AND 27ff2281b4Smatt * WASABI SYSTEMS, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 28ff2281b4Smatt * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 29ff2281b4Smatt * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 30ff2281b4Smatt * IN NO EVENT SHALL EITHER ALLEGRO NETWORKS, INC. OR WASABI SYSTEMS, INC. 31ff2281b4Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 32ff2281b4Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 33ff2281b4Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 34ff2281b4Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 35ff2281b4Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 36ff2281b4Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 37ff2281b4Smatt * POSSIBILITY OF SUCH DAMAGE. 38ff2281b4Smatt */ 39ff2281b4Smatt 40ff2281b4Smatt /* 41ff2281b4Smatt * gtmpscreg.h - register defines for GT-64260 MPSC 42ff2281b4Smatt * 43ff2281b4Smatt * creation Sun Apr 8 11:49:57 PDT 2001 cliff 44ff2281b4Smatt */ 45ff2281b4Smatt 46ff2281b4Smatt #ifndef _GTMPSCREG_H 47ff2281b4Smatt #define _GTMPSCREG_H 48ff2281b4Smatt 49a748aedcSkiyohara #define GTMPSC_BASE(u) (MPSC0_BASE + ((u) << 12)) 50a748aedcSkiyohara #define GTMPSC_SIZE 0x1000 51a748aedcSkiyohara 52ff2281b4Smatt #define GTMPSC_NCHAN 2 /* Number of MPSC channels */ 53ff2281b4Smatt 54ff2281b4Smatt /******************************************************************************* 55ff2281b4Smatt * 56ff2281b4Smatt * MPSC register address offsets relative to the base mapping 57ff2281b4Smatt */ 58a748aedcSkiyohara #define GTMPSC_MMCR_LO 0x000 /* MPSC Main Config Register Low */ 59a748aedcSkiyohara #define GTMPSC_MMCR_HI 0x004 /* MPSC Main Config Register High */ 60a748aedcSkiyohara #define GTMPSC_MPCR 0x008 /* MPSC Protocol Config Register */ 61a748aedcSkiyohara #define GTMPSC_CHR_BASE 0x008 /* MPSC Channel Register Base */ 62a748aedcSkiyohara #define GTMPSC_CHRN(n) (GTMPSC_CHR_BASE + ((n) << 2)) 63a748aedcSkiyohara #define GTMPSC_NCHR 11 /* CHR 1-11? */ 64a748aedcSkiyohara 65ff2281b4Smatt #define GTMPSC_MRR 0xb400 /* MPSC Routing Register */ 66ff2281b4Smatt #define GTMPSC_RCRR 0xb404 /* MPSC RX Clock Routing Register */ 67ff2281b4Smatt #define GTMPSC_TCRR 0xb408 /* MPSC TX Clock Routing Register */ 68ff2281b4Smatt 69ff2281b4Smatt 70ff2281b4Smatt /******************************************************************************* 71ff2281b4Smatt * 72ff2281b4Smatt * MPSC register values & bit defines 73ff2281b4Smatt * 74ff2281b4Smatt * values are provided for UART mode only 75ff2281b4Smatt */ 76ff2281b4Smatt /* 77ff2281b4Smatt * MPSC Routing Register bits 78ff2281b4Smatt */ 79ff2281b4Smatt #define GTMPSC_MRR_PORT0 0 /* serial port #0 */ 80ff2281b4Smatt #define GTMPSC_MRR_NONE 7 /* unconnected */ 81ff2281b4Smatt /* all other "routes" resvd. */ 82*33ff1f69Sjoerg #define GTMPSC_MRR_MR0_MASK __BITS(2,0) /* routing mask for MPSC0 */ 83*33ff1f69Sjoerg #define GTMPSC_MRR_RESa __BITS(5,3) 84*33ff1f69Sjoerg #define GTMPSC_MRR_MR1_MASK __BITS(8,6) /* routing mask for MPSC1 */ 85*33ff1f69Sjoerg #define GTMPSC_MRR_RESb __BITS(30,9) 86*33ff1f69Sjoerg #define GTMPSC_MRRE_DSC __BIT(31) /* "Don't Stop Clock" */ 87ff2281b4Smatt #define GTMPSC_MRR_RES (GTMPSC_MRR_RESa|GTMPSC_MRR_RESb) 88ff2281b4Smatt /* 89ff2281b4Smatt * MPSC Clock Routing Register bits 90ff2281b4Smatt * the bitfields and route definitions are common for RCRR and TCRR 91ff2281b4Smatt * except for MPSC_TCRR_TSCLK0 92ff2281b4Smatt */ 93ff2281b4Smatt #define GTMPSC_CRR_BRG0 0x0 /* Baud Rate Generator #0 */ 94ff2281b4Smatt #define GTMPSC_CRR_BRG1 0x1 /* Baud Rate Generator #1 */ 95ff2281b4Smatt #define GTMPSC_CRR_BRG2 0x2 /* Baud Rate Generator #2 */ 96ff2281b4Smatt #define GTMPSC_CRR_SCLK0 0x8 /* SCLK0 */ 97ff2281b4Smatt #define GTMPSC_TCRR_TSCLK0 0x9 /* TSCLK0 (for TCRR only) */ 98ff2281b4Smatt /* all other values resvd. */ 99a748aedcSkiyohara #define GTMPSC_CRR(u, v) ((v) << GTMPSC_CRR_SHIFT(u)) 100a748aedcSkiyohara #define GTMPSC_CRR_SHIFT(u) ((u) * 8) 101a748aedcSkiyohara #define GTMPSC_CRR_MASK 0xf 102*33ff1f69Sjoerg #define GTMPSC_CRR_RESa __BITS(7,4) 103*33ff1f69Sjoerg #define GTMPSC_CRR_RESb __BITS(31,12) 104ff2281b4Smatt #define GTMPSC_CRR_RES (GTMPSC_CRR_RESa|GTMPSC_CRR_RESb) 105ff2281b4Smatt /* 106ff2281b4Smatt * MPSC Main Configuration Register LO bits 107ff2281b4Smatt */ 108*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_MODE_MASK __BITS(2,0) 109ff2281b4Smatt #define GTMPSC_MMCR_LO_MODE_UART (0x4 << 0) /* UART mode */ 110*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_TTX __BIT(3) /* Transparent TX */ 111*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_TRX __BIT(4) /* Transparent RX */ 112*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RESa __BIT(5) 113*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_ET __BIT(6) /* Enable TX */ 114*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_ER __BIT(7) /* Enable RX */ 115*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_LPBK_MASK __BITS(9,8) /* Loop Back */ 116ff2281b4Smatt #define GTMPSC_MMCR_LO_LPBK_NONE (0 << 8) /* Normal (non-loop) */ 117ff2281b4Smatt #define GTMPSC_MMCR_LO_LPBK_LOOP (1 << 8) /* Loop Back */ 118ff2281b4Smatt #define GTMPSC_MMCR_LO_LPBK_ECHO (2 << 8) /* Echo */ 119ff2281b4Smatt #define GTMPSC_MMCR_LO_LPBK_LBE (3 << 8) /* Loop Back and Echo */ 120*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_NLM __BIT(10) /* Null Modem */ 121*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RESb __BIT(11) 122*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_TSYN __BIT(12) /* Transmitter sync to Rcvr. */ 123*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RESc __BIT(13) 124*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_TSNS_MASK __BITS(15,14) /* Transmit Sense */ 125ff2281b4Smatt #define GTMPSC_MMCR_LO_TSNS_INF (0 << 14) /* Infinite */ 126*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_TIDL __BIT(16) /* TX Idles */ 127*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RTSM __BIT(17) /* RTS Mode */ 128*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RESd __BIT(18) 129*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_CTSS __BIT(19) /* CTS Sampling mode */ 130*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_CDS __BIT(20) /* CD Sampling mode */ 131*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_CTSM __BIT(21) /* CTS operating Mode */ 132*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_CDM __BIT(22) /* CD operating Mode */ 133*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_CRCM_MASK __BITS(25,23) /* CRC Mode */ 134ff2281b4Smatt #define GTMPSC_MMCR_LO_CRCM_NONE (0 << 23) /* CRC Mode */ 135*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RESe __BITS(27,26) 136*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_TRVD __BIT(28) /* Transmit Reverse Data */ 137*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RRVD __BIT(29) /* Receive Reverse Data */ 138*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_RESf __BIT(30) 139*33ff1f69Sjoerg #define GTMPSC_MMCR_LO_GDE __BIT(31) /* Glitch Detect Enable */ 140ff2281b4Smatt #define GTMPSC_MMCR_LO_RES \ 141ff2281b4Smatt (GTMPSC_MMCR_LO_RESa|GTMPSC_MMCR_LO_RESb|GTMPSC_MMCR_LO_RESc \ 142ff2281b4Smatt |GTMPSC_MMCR_LO_RESd|GTMPSC_MMCR_LO_RESe|GTMPSC_MMCR_LO_RESf) 143ff2281b4Smatt /* 144ff2281b4Smatt * MPSC Main Configuration Register HI bits 145ff2281b4Smatt */ 146*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_TCI __BIT(0) /* TX Clock Invert */ 147*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_TINV __BIT(1) /* TX Bitstream Inversion */ 148*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_TPL __BITS(4,2) /* TX Preable Length */ 149ff2281b4Smatt #define GTMPSC_MMCR_HI_TPL_NONE 0 /* no TX Preable (default) */ 150ff2281b4Smatt #define GTMPSC_MMCR_HI_TPL_16 (6 << 2) /* 16 byte preamble */ 151*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_TPPT_MASK __BITS(8,5) /* TX Preable Pattern */ 152ff2281b4Smatt #define GTMPSC_MMCR_HI_TPPT_NONE (0 << 5) /* TX Preable Pattern */ 153*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_TCDV_MASK __BITS(10,9) /* TX Clock Divide */ 154ff2281b4Smatt #define GTMPSC_MMCR_HI_TCDV_1X (0 << 9) /* 1x clock mode */ 155ff2281b4Smatt #define GTMPSC_MMCR_HI_TCDV_8X (1 << 9) /* 8x clock mode */ 156ff2281b4Smatt #define GTMPSC_MMCR_HI_TCDV_16X (2 << 9) /* 16x clock mode */ 157ff2281b4Smatt #define GTMPSC_MMCR_HI_TCDV_32X (3 << 9) /* 32x clock mode */ 158*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_TDEC_MASK __BITS(13,11) /* TX Encoder */ 159ff2281b4Smatt #define GTMPSC_MMCR_HI_TDEC_NRZ (0 << 9) /* NRZ (default) */ 160ff2281b4Smatt #define GTMPSC_MMCR_HI_TDEC_NRZI (1 << 9) /* NRZI (mark) */ 161ff2281b4Smatt #define GTMPSC_MMCR_HI_TDEC_FM0 (2 << 9) /* FM0 */ 162ff2281b4Smatt #define GTMPSC_MMCR_HI_TDEC_MAN (4 << 9) /* Manchester */ 163ff2281b4Smatt #define GTMPSC_MMCR_HI_TDEC_DMAN (6 << 9) /* Differential Manchester */ 164ff2281b4Smatt /* all other values rsvd. */ 165*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_RESa __BITS(15,14) 166*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_RINV __BIT(16) /* RX Bitstream Inversion */ 167*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_GDW __BITS(20,17) /* Clock Glitch Width */ 168*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_RESb __BIT(21) 169*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_RDW __BIT(22) /* Reveive Data Width */ 170*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_RSYL_MASK __BITS(24,23) /* Reveive Sync Width */ 171ff2281b4Smatt #define GTMPSC_MMCR_HI_RSYL_EXT (0 << 23) /* External sync */ 172ff2281b4Smatt #define GTMPSC_MMCR_HI_RSYL_4BIT (1 << 23) /* 4-bit sync */ 173ff2281b4Smatt #define GTMPSC_MMCR_HI_RSYL_8BIT (2 << 23) /* 8-bit sync */ 174ff2281b4Smatt #define GTMPSC_MMCR_HI_RSYL_16BIT (3 << 23) /* 16-bit sync */ 175*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_RCDV_MASK __BITS(26,25) /* Receive Clock Divider */ 176ff2281b4Smatt #define GTMPSC_MMCR_HI_RCDV_1X (0 << 25) /* 1x clock mode (default) */ 177ff2281b4Smatt #define GTMPSC_MMCR_HI_RCDV_8X (1 << 25) /* 8x clock mode (default) */ 178ff2281b4Smatt #define GTMPSC_MMCR_HI_RCDV_16X (2 << 25) /* 16x clock mode (default) */ 179ff2281b4Smatt #define GTMPSC_MMCR_HI_RCDV_32X (3 << 25) /* 16x clock mode (default) */ 180*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_RENC_MASK __BITS(29,27) /* Receive Encoder */ 181ff2281b4Smatt #define GTMPSC_MMCR_HI_RENC_NRZ (0 << 27) /* NRZ (default) */ 182ff2281b4Smatt #define GTMPSC_MMCR_HI_RENC_NRZI (1 << 27) /* NRZI */ 183ff2281b4Smatt #define GTMPSC_MMCR_HI_RENC_FM0 (2 << 27) /* FM0 */ 184ff2281b4Smatt #define GTMPSC_MMCR_HI_RENC_MAN (4 << 27) /* Manchester */ 185ff2281b4Smatt #define GTMPSC_MMCR_HI_RENC_DMAN (6 << 27) /* Differential Manchester */ 186ff2281b4Smatt /* all other values rsvd. */ 187*33ff1f69Sjoerg #define GTMPSC_MMCR_HI_SEDG_MASK __BITS(31,30) /* Sync Clock Edge */ 188ff2281b4Smatt #define GTMPSC_MMCR_HI_SEDG_BOTH (0 << 30) /* rising and falling (dflt) */ 189ff2281b4Smatt #define GTMPSC_MMCR_HI_SEDG_RISE (1 << 30) /* rising edge */ 190ff2281b4Smatt #define GTMPSC_MMCR_HI_SEDG_FALL (2 << 30) /* falling edge */ 191ff2281b4Smatt #define GTMPSC_MMCR_HI_SEDG_NONE (3 << 30) /* no adjustment */ 192ff2281b4Smatt /* 193ff2281b4Smatt * SDMAx Command/Status Register bits for UART Mode, RX 194ff2281b4Smatt * 195ff2281b4Smatt * XXX these belong in sdmareg.h ? 196ff2281b4Smatt */ 197*33ff1f69Sjoerg #define SDMA_CSR_RX_PE __BIT(0) /* Parity Error */ 198*33ff1f69Sjoerg #define SDMA_CSR_RX_CDL __BIT(1) /* Carrier Detect Loss */ 199*33ff1f69Sjoerg #define SDMA_CSR_RX_RESa __BIT(2) 200*33ff1f69Sjoerg #define SDMA_CSR_RX_FR __BIT(3) /* Framing Error */ 201*33ff1f69Sjoerg #define SDMA_CSR_RX_RESb __BITS(5,4) 202*33ff1f69Sjoerg #define SDMA_CSR_RX_OR __BIT(6) /* Data Overrun */ 203*33ff1f69Sjoerg #define SDMA_CSR_RX_RESc __BITS(8,7) 204*33ff1f69Sjoerg #define SDMA_CSR_RX_BR __BIT(9) /* Break Received */ 205*33ff1f69Sjoerg #define SDMA_CSR_RX_MI __BIT(10) /* Max Idle */ 206*33ff1f69Sjoerg #define SDMA_CSR_RX_ADDR __BIT(11) /* Address */ 207*33ff1f69Sjoerg #define SDMA_CSR_RX_AMATCH __BIT(12) /* Address match */ 208*33ff1f69Sjoerg #define SDMA_CSR_RX_CT __BIT(13) /* Transparency Control char */ 209*33ff1f69Sjoerg #define SDMA_CSR_RX_C __BIT(14) /* Control char */ 210*33ff1f69Sjoerg #define SDMA_CSR_RX_ES __BIT(15) /* Error Summary */ 211*33ff1f69Sjoerg #define SDMA_CSR_RX_L __BIT(16) /* Last */ 212*33ff1f69Sjoerg #define SDMA_CSR_RX_F __BIT(17) /* First */ 213*33ff1f69Sjoerg #define SDMA_CSR_RX_RESd __BITS(22,18) 214*33ff1f69Sjoerg #define SDMA_CSR_RX_EI __BIT(23) /* Enable Interrupt */ 215*33ff1f69Sjoerg #define SDMA_CSR_RX_RESe __BITS(29,24) 216*33ff1f69Sjoerg #define SDMA_CSR_RX_AUTO __BIT(30) /* Auto Mode */ 217*33ff1f69Sjoerg #define SDMA_CSR_RX_OWN __BIT(31) /* Owner */ 218ff2281b4Smatt #define SDMA_CSR_RX_RES (SDMA_CSR_RX_RESa|SDMA_CSR_RX_RESb|SDMA_CSR_RX_RESc \ 219ff2281b4Smatt |SDMA_CSR_RX_RESd|SDMA_CSR_RX_RESe) 220ff2281b4Smatt /* 221ff2281b4Smatt * SDMAx Command/Status Register bits for UART Mode, TX 222ff2281b4Smatt */ 223*33ff1f69Sjoerg #define SDMA_CSR_TX_RESa __BIT(0) 224*33ff1f69Sjoerg #define SDMA_CSR_TX_CTSL __BIT(1) /* CTS Loss */ 225*33ff1f69Sjoerg #define SDMA_CSR_TX_RESb __BITS(14,2) 226*33ff1f69Sjoerg #define SDMA_CSR_TX_ES __BIT(15) /* Error Summary */ 227*33ff1f69Sjoerg #define SDMA_CSR_TX_L __BIT(16) /* Last */ 228*33ff1f69Sjoerg #define SDMA_CSR_TX_F __BIT(17) /* First */ 229*33ff1f69Sjoerg #define SDMA_CSR_TX_P __BIT(18) /* Preamble */ 230*33ff1f69Sjoerg #define SDMA_CSR_TX_ADDR __BIT(19) /* Address */ 231*33ff1f69Sjoerg #define SDMA_CSR_TX_NS __BIT(20) /* No Stop Bit */ 232*33ff1f69Sjoerg #define SDMA_CSR_TX_RESc __BITS(22,21) 233*33ff1f69Sjoerg #define SDMA_CSR_TX_EI __BIT(23) /* Enable Interrupt */ 234*33ff1f69Sjoerg #define SDMA_CSR_TX_RESd __BITS(29,24) 235*33ff1f69Sjoerg #define SDMA_CSR_TX_AUTO __BIT(30) /* Auto Mode */ 236*33ff1f69Sjoerg #define SDMA_CSR_TX_OWN __BIT(31) /* Owner */ 237ff2281b4Smatt #define SDMA_CSR_TX_RES \ 238ff2281b4Smatt (SDMA_CSR_TX_RESa|SDMA_CSR_TX_RESb|SDMA_CSR_TX_RESc|SDMA_CSR_TX_RESd) 239ff2281b4Smatt /* 240ff2281b4Smatt * MPSCx Protocol Configuration Register for UART Mode 241ff2281b4Smatt */ 242*33ff1f69Sjoerg #define GTMPSC_MPCR_RESa __BITS(5,0) 243*33ff1f69Sjoerg #define GTMPSC_MPCR_DRT __BIT(6) /* Disable Rx on Tx */ 244*33ff1f69Sjoerg #define GTMPSC_MPCR_ISO __BIT(7) /* Isochronous Mode */ 245*33ff1f69Sjoerg #define GTMPSC_MPCR_RZS __BIT(8) /* Rx Zero Stop Bit(s) */ 246*33ff1f69Sjoerg #define GTMPSC_MPCR_FRZ __BIT(9) /* Freeze Tx */ 247*33ff1f69Sjoerg #define GTMPSC_MPCR_UM_MASK __BITS(11,10) /* UART Mode mask */ 248ff2281b4Smatt #define GTMPSC_MPCR_UM_NORM (0 << 10) /* Normal UART Mode */ 249ff2281b4Smatt #define GTMPSC_MPCR_UM_MDROP (1 << 10) /* Multi-Drop UART Mode */ 250ff2281b4Smatt /* other values are resvd. */ 251*33ff1f69Sjoerg #define GTMPSC_MPCR_CLMASK __BITS(13,12) /* Character Length mask */ 252ff2281b4Smatt #define GTMPSC_MPCR_CL_5 (0 << 12) /* 5 data bits */ 253ff2281b4Smatt #define GTMPSC_MPCR_CL_6 (1 << 12) /* 6 data bits */ 254ff2281b4Smatt #define GTMPSC_MPCR_CL_7 (2 << 12) /* 7 data bits */ 255ff2281b4Smatt #define GTMPSC_MPCR_CL_8 (3 << 12) /* 8 data bits */ 256a748aedcSkiyohara #define GTMPSC_MPCR_SBL_1 (0 << 14) /* 1 stop bit */ 257a748aedcSkiyohara #define GTMPSC_MPCR_SBL_2 (1 << 14) /* 2 stop bits */ 258ff2281b4Smatt #define GTMPSC_MPCR_FLC_NORM 0x0 /* Normal Flow Ctl mode */ 259*33ff1f69Sjoerg #define GTMPSC_MPCR_FLC_ASYNC __BIT(15) /* Asynchronous Flow Ctl mode */ 260*33ff1f69Sjoerg #define GTMPSC_MPCR_RESb __BITS(31,16) 261ff2281b4Smatt #define GTMPSC_MPCR_RES (GTMPSC_MPCR_RESa|GTMPSC_MPCR_RESb) 262ff2281b4Smatt /* 263ff2281b4Smatt * MPSC Channel Register 1 for UART Mode "Break/Stuff" 264ff2281b4Smatt */ 265*33ff1f69Sjoerg #define GTMPSC_CHR1_TCS __BITS(7,0) /* Constrol Stuff Character */ 266*33ff1f69Sjoerg #define GTMPSC_CHR1_BRK __BITS(23,16) /* Break Count */ 267*33ff1f69Sjoerg #define GTMPSC_CHR1_RES __BITS(15,8)|__BITS(31,24) 268ff2281b4Smatt /* 269ff2281b4Smatt * MPSC Channel Register 2 for UART Mode "Command" 270ff2281b4Smatt */ 271*33ff1f69Sjoerg #define GTMPSC_CHR2_RESa __BIT(0) 272*33ff1f69Sjoerg #define GTMPSC_CHR2_TEV __BIT(1) /* Tx Enb. Vert. Redundancy */ 273*33ff1f69Sjoerg #define GTMPSC_CHR2_TPM_MASK __BITS(3,2) /* Tx Parity Mode mask */ 274ff2281b4Smatt #define GTMPSC_CHR2_TPM_ODD (0 << 2) /* Odd Tx Parity */ 275ff2281b4Smatt #define GTMPSC_CHR2_TPM_LOW (1 << 2) /* Low (always 0) Tx Parity */ 276ff2281b4Smatt #define GTMPSC_CHR2_TPM_EVEN (2 << 2) /* Even Tx Parity */ 277ff2281b4Smatt #define GTMPSC_CHR2_TPM_HIGH (3 << 2) /* High (always 1) Tx Parity */ 278*33ff1f69Sjoerg #define GTMPSC_CHR2_RESb __BITS(6,4) 279*33ff1f69Sjoerg #define GTMPSC_CHR2_TXABORT __BIT(7) /* Tx Abort */ 280*33ff1f69Sjoerg #define GTMPSC_CHR2_RESc __BIT(8) 281*33ff1f69Sjoerg #define GTMPSC_CHR2_TCS __BIT(9) /* Tx TCS Char */ 282*33ff1f69Sjoerg #define GTMPSC_CHR2_RESd __BITS(16,10) 283*33ff1f69Sjoerg #define GTMPSC_CHR2_REC __BIT(17) /* Rx Enb. Vert. Redundancy */ 284*33ff1f69Sjoerg #define GTMPSC_CHR2_RPM_MASK __BITS(19,18) /* Rx Parity Mode mask */ 285ff2281b4Smatt #define GTMPSC_CHR2_RPM_ODD (0 << 18) /* Odd Rx Parity */ 286ff2281b4Smatt #define GTMPSC_CHR2_RPM_LOW (1 << 18) /* Low (always 0) Rx Parity */ 287ff2281b4Smatt #define GTMPSC_CHR2_RPM_EVEN (2 << 18) /* Even Rx Parity */ 288ff2281b4Smatt #define GTMPSC_CHR2_RPM_HIGH (3 << 18) /* High (always 1) Rx Parity */ 289*33ff1f69Sjoerg #define GTMPSC_CHR2_RESe __BITS(22,20) 290*33ff1f69Sjoerg #define GTMPSC_CHR2_RXABORT __BIT(23) /* Rx Abort */ 291*33ff1f69Sjoerg #define GTMPSC_CHR2_RESf __BIT(24) 292*33ff1f69Sjoerg #define GTMPSC_CHR2_CRD __BIT(25) /* Close RX Descriptor */ 293*33ff1f69Sjoerg #define GTMPSC_CHR2_RESg __BITS(30,26) 294*33ff1f69Sjoerg #define GTMPSC_CHR2_EH __BIT(31) /* Enter Hunt */ 295ff2281b4Smatt #define GTMPSC_CHR2_RES \ 296ff2281b4Smatt (GTMPSC_CHR2_RESa|GTMPSC_CHR2_RESb|GTMPSC_CHR2_RESc| \ 297ff2281b4Smatt GTMPSC_CHR2_RESd|GTMPSC_CHR2_RESe|GTMPSC_CHR2_RESf| \ 298ff2281b4Smatt GTMPSC_CHR2_RESg) 299ff2281b4Smatt /* 300ff2281b4Smatt * MPSC Channel Register 3 for UART Mode "Max Idle" 301ff2281b4Smatt */ 302*33ff1f69Sjoerg #define GTMPSC_CHR3_MIR __BITS(15,0) /* Max Idle Char count */ 303*33ff1f69Sjoerg #define GTMPSC_CHR3_RES __BITS(31,16) 304ff2281b4Smatt /* 305ff2281b4Smatt * MPSC Channel Register 4 for UART Mode "Control Filtering" 306ff2281b4Smatt */ 307*33ff1f69Sjoerg #define GTMPSC_CHR4_CFR __BITS(7,0) /* Control bit compare enable */ 308*33ff1f69Sjoerg #define GTMPSC_CHR4_RES __BITS(31,8) 309ff2281b4Smatt /* 310ff2281b4Smatt * MPSC Channel Registers 5..8 for UART Mode "UART Control Character" 311ff2281b4Smatt * 312ff2281b4Smatt * NOTE: two 16 bit CHRCC fields exist in each of Channel Registers 5..8 313ff2281b4Smatt */ 314ff2281b4Smatt #define GTMPSC_CHRCC_SHIFT 16 315*33ff1f69Sjoerg #define GTMPSC_CHRCC_CHAR __BITS(7,0) /* the control character */ 316*33ff1f69Sjoerg #define GTMPSC_CHRCC_RES __BITS(11,8) 317*33ff1f69Sjoerg #define GTMPSC_CHRCC_INT __BIT(12) /* Interrupt */ 318*33ff1f69Sjoerg #define GTMPSC_CHRCC_CO __BIT(13) /* ISO 3309 Control Octet */ 319*33ff1f69Sjoerg #define GTMPSC_CHRCC_R __BIT(14) /* Reject */ 320*33ff1f69Sjoerg #define GTMPSC_CHRCC_V __BIT(15) /* Valid */ 321ff2281b4Smatt /* 322ff2281b4Smatt * MPSC Channel Register 9 for UART Mode "Address" (for multidrop operation) 323ff2281b4Smatt */ 324*33ff1f69Sjoerg #define GTMPSC_CHR9_AD1 __BITS(7,0) /* address #1 */ 325*33ff1f69Sjoerg #define GTMPSC_CHR9_RESa __BITS(14,8) 326*33ff1f69Sjoerg #define GTMPSC_CHR9_MODE1 __BIT(15) /* mode #1 */ 327*33ff1f69Sjoerg #define GTMPSC_CHR9_AD2 __BITS(23,16) /* address #2 */ 328*33ff1f69Sjoerg #define GTMPSC_CHR9_RESb __BITS(30,24) 329*33ff1f69Sjoerg #define GTMPSC_CHR9_MODE2 __BIT(31) /* mode #2 */ 330ff2281b4Smatt #define GTMPSC_CHR9_RES (GTMPSC_CHR9_RESa|GTMPSC_CHR9_RESb) 331ff2281b4Smatt /* 332ff2281b4Smatt * MPSC Channel Register 10 for UART Mode "Event Status" 333ff2281b4Smatt */ 334*33ff1f69Sjoerg #define GTMPSC_CHR10_CTS __BIT(0) /* Clear To Send */ 335*33ff1f69Sjoerg #define GTMPSC_CHR10_CD __BIT(1) /* Carrier Detect */ 336*33ff1f69Sjoerg #define GTMPSC_CHR10_RESa __BIT(2) 337*33ff1f69Sjoerg #define GTMPSC_CHR10_TIDLE __BIT(3) /* Tx in Idle State */ 338*33ff1f69Sjoerg #define GTMPSC_CHR10_RESb __BIT(4) 339*33ff1f69Sjoerg #define GTMPSC_CHR10_RHS __BIT(5) /* Rx in HUNT State */ 340*33ff1f69Sjoerg #define GTMPSC_CHR10_RESc __BIT(6) 341*33ff1f69Sjoerg #define GTMPSC_CHR10_RLS __BIT(7) /* Rx Line STatus */ 342*33ff1f69Sjoerg #define GTMPSC_CHR10_RESd __BITS(10,8) 343*33ff1f69Sjoerg #define GTMPSC_CHR10_RLIDL __BIT(11) /* Rx IDLE Line */ 344*33ff1f69Sjoerg #define GTMPSC_CHR10_RESe __BITS(15,12) 345*33ff1f69Sjoerg #define GTMPSC_CHR10_RCRn __BITS(23,16) /* Received Control Char # */ 346*33ff1f69Sjoerg #define GTMPSC_CHR10_RESf __BITS(31,24) 347ff2281b4Smatt #define GTMPSC_CHR10_RES \ 348ff2281b4Smatt (GTMPSC_CHR10_RESa|GTMPSC_CHR10_RESb|GTMPSC_CHR10_RESc \ 349ff2281b4Smatt |GTMPSC_CHR10_RESd|GTMPSC_CHR10_RESe|GTMPSC_CHR10_RESf) 350ff2281b4Smatt 351ff2281b4Smatt 352ff2281b4Smatt #endif /* _GTMPSCREG_H */ 353