Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * B53 register definitions
0003  *
0004  * Copyright (C) 2004 Broadcom Corporation
0005  * Copyright (C) 2011-2013 Jonas Gorski <jogo@openwrt.org>
0006  *
0007  * Permission to use, copy, modify, and/or distribute this software for any
0008  * purpose with or without fee is hereby granted, provided that the above
0009  * copyright notice and this permission notice appear in all copies.
0010  *
0011  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0012  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0013  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
0014  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0015  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
0016  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
0017  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0018  */
0019 
0020 #ifndef __B53_REGS_H
0021 #define __B53_REGS_H
0022 
0023 /* Management Port (SMP) Page offsets */
0024 #define B53_CTRL_PAGE           0x00 /* Control */
0025 #define B53_STAT_PAGE           0x01 /* Status */
0026 #define B53_MGMT_PAGE           0x02 /* Management Mode */
0027 #define B53_MIB_AC_PAGE         0x03 /* MIB Autocast */
0028 #define B53_ARLCTRL_PAGE        0x04 /* ARL Control */
0029 #define B53_ARLIO_PAGE          0x05 /* ARL Access */
0030 #define B53_FRAMEBUF_PAGE       0x06 /* Management frame access */
0031 #define B53_MEM_ACCESS_PAGE     0x08 /* Memory access */
0032 
0033 /* PHY Registers */
0034 #define B53_PORT_MII_PAGE(i)        (0x10 + (i)) /* Port i MII Registers */
0035 #define B53_IM_PORT_PAGE        0x18 /* Inverse MII Port (to EMAC) */
0036 #define B53_ALL_PORT_PAGE       0x19 /* All ports MII (broadcast) */
0037 
0038 /* MIB registers */
0039 #define B53_MIB_PAGE(i)         (0x20 + (i))
0040 
0041 /* Quality of Service (QoS) Registers */
0042 #define B53_QOS_PAGE            0x30
0043 
0044 /* Port VLAN Page */
0045 #define B53_PVLAN_PAGE          0x31
0046 
0047 /* VLAN Registers */
0048 #define B53_VLAN_PAGE           0x34
0049 
0050 /* Jumbo Frame Registers */
0051 #define B53_JUMBO_PAGE          0x40
0052 
0053 /* EEE Control Registers Page */
0054 #define B53_EEE_PAGE            0x92
0055 
0056 /* CFP Configuration Registers Page */
0057 #define B53_CFP_PAGE            0xa1
0058 
0059 /*************************************************************************
0060  * Control Page registers
0061  *************************************************************************/
0062 
0063 /* Port Control Register (8 bit) */
0064 #define B53_PORT_CTRL(i)        (0x00 + (i))
0065 #define   PORT_CTRL_RX_DISABLE      BIT(0)
0066 #define   PORT_CTRL_TX_DISABLE      BIT(1)
0067 #define   PORT_CTRL_RX_BCST_EN      BIT(2) /* Broadcast RX (P8 only) */
0068 #define   PORT_CTRL_RX_MCST_EN      BIT(3) /* Multicast RX (P8 only) */
0069 #define   PORT_CTRL_RX_UCST_EN      BIT(4) /* Unicast RX (P8 only) */
0070 #define   PORT_CTRL_STP_STATE_S     5
0071 #define   PORT_CTRL_NO_STP      (0 << PORT_CTRL_STP_STATE_S)
0072 #define   PORT_CTRL_DIS_STATE       (1 << PORT_CTRL_STP_STATE_S)
0073 #define   PORT_CTRL_BLOCK_STATE     (2 << PORT_CTRL_STP_STATE_S)
0074 #define   PORT_CTRL_LISTEN_STATE    (3 << PORT_CTRL_STP_STATE_S)
0075 #define   PORT_CTRL_LEARN_STATE     (4 << PORT_CTRL_STP_STATE_S)
0076 #define   PORT_CTRL_FWD_STATE       (5 << PORT_CTRL_STP_STATE_S)
0077 #define   PORT_CTRL_STP_STATE_MASK  (0x7 << PORT_CTRL_STP_STATE_S)
0078 
0079 /* SMP Control Register (8 bit) */
0080 #define B53_SMP_CTRL            0x0a
0081 
0082 /* Switch Mode Control Register (8 bit) */
0083 #define B53_SWITCH_MODE         0x0b
0084 #define   SM_SW_FWD_MODE        BIT(0)  /* 1 = Managed Mode */
0085 #define   SM_SW_FWD_EN          BIT(1)  /* Forwarding Enable */
0086 
0087 /* IMP Port state override register (8 bit) */
0088 #define B53_PORT_OVERRIDE_CTRL      0x0e
0089 #define   PORT_OVERRIDE_LINK        BIT(0)
0090 #define   PORT_OVERRIDE_FULL_DUPLEX BIT(1) /* 0 = Half Duplex */
0091 #define   PORT_OVERRIDE_SPEED_S     2
0092 #define   PORT_OVERRIDE_SPEED_10M   (0 << PORT_OVERRIDE_SPEED_S)
0093 #define   PORT_OVERRIDE_SPEED_100M  (1 << PORT_OVERRIDE_SPEED_S)
0094 #define   PORT_OVERRIDE_SPEED_1000M (2 << PORT_OVERRIDE_SPEED_S)
0095 #define   PORT_OVERRIDE_RV_MII_25   BIT(4) /* BCM5325 only */
0096 #define   PORT_OVERRIDE_RX_FLOW     BIT(4)
0097 #define   PORT_OVERRIDE_TX_FLOW     BIT(5)
0098 #define   PORT_OVERRIDE_SPEED_2000M BIT(6) /* BCM5301X only, requires setting 1000M */
0099 #define   PORT_OVERRIDE_EN      BIT(7) /* Use the register contents */
0100 
0101 /* Power-down mode control */
0102 #define B53_PD_MODE_CTRL_25     0x0f
0103 
0104 /* IP Multicast control (8 bit) */
0105 #define B53_IP_MULTICAST_CTRL       0x21
0106 #define  B53_IPMC_FWD_EN        BIT(1)
0107 #define  B53_UC_FWD_EN          BIT(6)
0108 #define  B53_MC_FWD_EN          BIT(7)
0109 
0110 /* Switch control (8 bit) */
0111 #define B53_SWITCH_CTRL         0x22
0112 #define  B53_MII_DUMB_FWDG_EN       BIT(6)
0113 
0114 /* (16 bit) */
0115 #define B53_UC_FLOOD_MASK       0x32
0116 #define B53_MC_FLOOD_MASK       0x34
0117 #define B53_IPMC_FLOOD_MASK     0x36
0118 #define B53_DIS_LEARNING        0x3c
0119 
0120 /*
0121  * Override Ports 0-7 State on devices with xMII interfaces (8 bit)
0122  *
0123  * For port 8 still use B53_PORT_OVERRIDE_CTRL
0124  * Please note that not all ports are available on every hardware, e.g. BCM5301X
0125  * don't include overriding port 6, BCM63xx also have some limitations.
0126  */
0127 #define B53_GMII_PORT_OVERRIDE_CTRL(i)  (0x58 + (i))
0128 #define   GMII_PO_LINK          BIT(0)
0129 #define   GMII_PO_FULL_DUPLEX       BIT(1) /* 0 = Half Duplex */
0130 #define   GMII_PO_SPEED_S       2
0131 #define   GMII_PO_SPEED_10M     (0 << GMII_PO_SPEED_S)
0132 #define   GMII_PO_SPEED_100M        (1 << GMII_PO_SPEED_S)
0133 #define   GMII_PO_SPEED_1000M       (2 << GMII_PO_SPEED_S)
0134 #define   GMII_PO_RX_FLOW       BIT(4)
0135 #define   GMII_PO_TX_FLOW       BIT(5)
0136 #define   GMII_PO_EN            BIT(6) /* Use the register contents */
0137 #define   GMII_PO_SPEED_2000M       BIT(7) /* BCM5301X only, requires setting 1000M */
0138 
0139 #define B53_RGMII_CTRL_IMP      0x60
0140 #define   RGMII_CTRL_ENABLE_GMII    BIT(7)
0141 #define   RGMII_CTRL_TIMING_SEL     BIT(2)
0142 #define   RGMII_CTRL_DLL_RXC        BIT(1)
0143 #define   RGMII_CTRL_DLL_TXC        BIT(0)
0144 
0145 #define B53_RGMII_CTRL_P(i)     (B53_RGMII_CTRL_IMP + (i))
0146 
0147 /* Software reset register (8 bit) */
0148 #define B53_SOFTRESET           0x79
0149 #define   SW_RST            BIT(7)
0150 #define   EN_CH_RST         BIT(6)
0151 #define   EN_SW_RST         BIT(4)
0152 
0153 /* Fast Aging Control register (8 bit) */
0154 #define B53_FAST_AGE_CTRL       0x88
0155 #define   FAST_AGE_STATIC       BIT(0)
0156 #define   FAST_AGE_DYNAMIC      BIT(1)
0157 #define   FAST_AGE_PORT         BIT(2)
0158 #define   FAST_AGE_VLAN         BIT(3)
0159 #define   FAST_AGE_STP          BIT(4)
0160 #define   FAST_AGE_MC           BIT(5)
0161 #define   FAST_AGE_DONE         BIT(7)
0162 
0163 /* Fast Aging Port Control register (8 bit) */
0164 #define B53_FAST_AGE_PORT_CTRL      0x89
0165 
0166 /* Fast Aging VID Control register (16 bit) */
0167 #define B53_FAST_AGE_VID_CTRL       0x8a
0168 
0169 /*************************************************************************
0170  * Status Page registers
0171  *************************************************************************/
0172 
0173 /* Link Status Summary Register (16bit) */
0174 #define B53_LINK_STAT           0x00
0175 
0176 /* Link Status Change Register (16 bit) */
0177 #define B53_LINK_STAT_CHANGE        0x02
0178 
0179 /* Port Speed Summary Register (16 bit for FE, 32 bit for GE) */
0180 #define B53_SPEED_STAT          0x04
0181 #define  SPEED_PORT_FE(reg, port)   (((reg) >> (port)) & 1)
0182 #define  SPEED_PORT_GE(reg, port)   (((reg) >> 2 * (port)) & 3)
0183 #define  SPEED_STAT_10M         0
0184 #define  SPEED_STAT_100M        1
0185 #define  SPEED_STAT_1000M       2
0186 
0187 /* Duplex Status Summary (16 bit) */
0188 #define B53_DUPLEX_STAT_FE      0x06
0189 #define B53_DUPLEX_STAT_GE      0x08
0190 #define B53_DUPLEX_STAT_63XX        0x0c
0191 
0192 /* Revision ID register for BCM5325 */
0193 #define B53_REV_ID_25           0x50
0194 
0195 /* Strap Value (48 bit) */
0196 #define B53_STRAP_VALUE         0x70
0197 #define   SV_GMII_CTRL_115      BIT(27)
0198 
0199 /*************************************************************************
0200  * Management Mode Page Registers
0201  *************************************************************************/
0202 
0203 /* Global Management Config Register (8 bit) */
0204 #define B53_GLOBAL_CONFIG       0x00
0205 #define   GC_RESET_MIB          0x01
0206 #define   GC_RX_BPDU_EN         0x02
0207 #define   GC_MIB_AC_HDR_EN      0x10
0208 #define   GC_MIB_AC_EN          0x20
0209 #define   GC_FRM_MGMT_PORT_M        0xC0
0210 #define   GC_FRM_MGMT_PORT_04       0x00
0211 #define   GC_FRM_MGMT_PORT_MII      0x80
0212 
0213 /* Broadcom Header control register (8 bit) */
0214 #define B53_BRCM_HDR            0x03
0215 #define   BRCM_HDR_P8_EN        BIT(0) /* Enable tagging on port 8 */
0216 #define   BRCM_HDR_P5_EN        BIT(1) /* Enable tagging on port 5 */
0217 #define   BRCM_HDR_P7_EN        BIT(2) /* Enable tagging on port 7 */
0218 
0219 /* Mirror capture control register (16 bit) */
0220 #define B53_MIR_CAP_CTL         0x10
0221 #define  CAP_PORT_MASK          0xf
0222 #define  BLK_NOT_MIR            BIT(14)
0223 #define  MIRROR_EN          BIT(15)
0224 
0225 /* Ingress mirror control register (16 bit) */
0226 #define B53_IG_MIR_CTL          0x12
0227 #define  MIRROR_MASK            0x1ff
0228 #define  DIV_EN             BIT(13)
0229 #define  MIRROR_FILTER_MASK     0x3
0230 #define  MIRROR_FILTER_SHIFT        14
0231 #define  MIRROR_ALL         0
0232 #define  MIRROR_DA          1
0233 #define  MIRROR_SA          2
0234 
0235 /* Ingress mirror divider register (16 bit) */
0236 #define B53_IG_MIR_DIV          0x14
0237 #define  IN_MIRROR_DIV_MASK     0x3ff
0238 
0239 /* Ingress mirror MAC address register (48 bit) */
0240 #define B53_IG_MIR_MAC          0x16
0241 
0242 /* Egress mirror control register (16 bit) */
0243 #define B53_EG_MIR_CTL          0x1C
0244 
0245 /* Egress mirror divider register (16 bit) */
0246 #define B53_EG_MIR_DIV          0x1E
0247 
0248 /* Egress mirror MAC address register (48 bit) */
0249 #define B53_EG_MIR_MAC          0x20
0250 
0251 /* Device ID register (8 or 32 bit) */
0252 #define B53_DEVICE_ID           0x30
0253 
0254 /* Revision ID register (8 bit) */
0255 #define B53_REV_ID          0x40
0256 
0257 /* Broadcom header RX control (16 bit) */
0258 #define B53_BRCM_HDR_RX_DIS     0x60
0259 
0260 /* Broadcom header TX control (16 bit)  */
0261 #define B53_BRCM_HDR_TX_DIS     0x62
0262 
0263 /*************************************************************************
0264  * ARL Access Page Registers
0265  *************************************************************************/
0266 
0267 /* VLAN Table Access Register (8 bit) */
0268 #define B53_VT_ACCESS           0x80
0269 #define B53_VT_ACCESS_9798      0x60 /* for BCM5397/BCM5398 */
0270 #define B53_VT_ACCESS_63XX      0x60 /* for BCM6328/62/68 */
0271 #define   VTA_CMD_WRITE         0
0272 #define   VTA_CMD_READ          1
0273 #define   VTA_CMD_CLEAR         2
0274 #define   VTA_START_CMD         BIT(7)
0275 
0276 /* VLAN Table Index Register (16 bit) */
0277 #define B53_VT_INDEX            0x81
0278 #define B53_VT_INDEX_9798       0x61
0279 #define B53_VT_INDEX_63XX       0x62
0280 
0281 /* VLAN Table Entry Register (32 bit) */
0282 #define B53_VT_ENTRY            0x83
0283 #define B53_VT_ENTRY_9798       0x63
0284 #define B53_VT_ENTRY_63XX       0x64
0285 #define   VTE_MEMBERS           0x1ff
0286 #define   VTE_UNTAG_S           9
0287 #define   VTE_UNTAG         (0x1ff << 9)
0288 
0289 /*************************************************************************
0290  * ARL I/O Registers
0291  *************************************************************************/
0292 
0293 /* ARL Table Read/Write Register (8 bit) */
0294 #define B53_ARLTBL_RW_CTRL      0x00
0295 #define    ARLTBL_RW            BIT(0)
0296 #define    ARLTBL_IVL_SVL_SELECT    BIT(6)
0297 #define    ARLTBL_START_DONE        BIT(7)
0298 
0299 /* MAC Address Index Register (48 bit) */
0300 #define B53_MAC_ADDR_IDX        0x02
0301 
0302 /* VLAN ID Index Register (16 bit) */
0303 #define B53_VLAN_ID_IDX         0x08
0304 
0305 /* ARL Table MAC/VID Entry N Registers (64 bit)
0306  *
0307  * BCM5325 and BCM5365 share most definitions below
0308  */
0309 #define B53_ARLTBL_MAC_VID_ENTRY(n) ((0x10 * (n)) + 0x10)
0310 #define   ARLTBL_MAC_MASK       0xffffffffffffULL
0311 #define   ARLTBL_VID_S          48
0312 #define   ARLTBL_VID_MASK_25        0xff
0313 #define   ARLTBL_VID_MASK       0xfff
0314 #define   ARLTBL_DATA_PORT_ID_S_25  48
0315 #define   ARLTBL_DATA_PORT_ID_MASK_25   0xf
0316 #define   ARLTBL_AGE_25         BIT(61)
0317 #define   ARLTBL_STATIC_25      BIT(62)
0318 #define   ARLTBL_VALID_25       BIT(63)
0319 
0320 /* ARL Table Data Entry N Registers (32 bit) */
0321 #define B53_ARLTBL_DATA_ENTRY(n)    ((0x10 * (n)) + 0x18)
0322 #define   ARLTBL_DATA_PORT_ID_MASK  0x1ff
0323 #define   ARLTBL_TC(tc)         ((3 & tc) << 11)
0324 #define   ARLTBL_AGE            BIT(14)
0325 #define   ARLTBL_STATIC         BIT(15)
0326 #define   ARLTBL_VALID          BIT(16)
0327 
0328 /* Maximum number of bin entries in the ARL for all switches */
0329 #define B53_ARLTBL_MAX_BIN_ENTRIES  4
0330 
0331 /* ARL Search Control Register (8 bit) */
0332 #define B53_ARL_SRCH_CTL        0x50
0333 #define B53_ARL_SRCH_CTL_25     0x20
0334 #define   ARL_SRCH_VLID         BIT(0)
0335 #define   ARL_SRCH_STDN         BIT(7)
0336 
0337 /* ARL Search Address Register (16 bit) */
0338 #define B53_ARL_SRCH_ADDR       0x51
0339 #define B53_ARL_SRCH_ADDR_25        0x22
0340 #define B53_ARL_SRCH_ADDR_65        0x24
0341 #define  ARL_ADDR_MASK          GENMASK(14, 0)
0342 
0343 /* ARL Search MAC/VID Result (64 bit) */
0344 #define B53_ARL_SRCH_RSTL_0_MACVID  0x60
0345 
0346 /* Single register search result on 5325 */
0347 #define B53_ARL_SRCH_RSTL_0_MACVID_25   0x24
0348 /* Single register search result on 5365 */
0349 #define B53_ARL_SRCH_RSTL_0_MACVID_65   0x30
0350 
0351 /* ARL Search Data Result (32 bit) */
0352 #define B53_ARL_SRCH_RSTL_0     0x68
0353 
0354 #define B53_ARL_SRCH_RSTL_MACVID(x) (B53_ARL_SRCH_RSTL_0_MACVID + ((x) * 0x10))
0355 #define B53_ARL_SRCH_RSTL(x)        (B53_ARL_SRCH_RSTL_0 + ((x) * 0x10))
0356 
0357 /*************************************************************************
0358  * Port VLAN Registers
0359  *************************************************************************/
0360 
0361 /* Port VLAN mask (16 bit) IMP port is always 8, also on 5325 & co */
0362 #define B53_PVLAN_PORT_MASK(i)      ((i) * 2)
0363 
0364 /* Join all VLANs register (16 bit) */
0365 #define B53_JOIN_ALL_VLAN_EN        0x50
0366 
0367 /*************************************************************************
0368  * 802.1Q Page Registers
0369  *************************************************************************/
0370 
0371 /* Global QoS Control (8 bit) */
0372 #define B53_QOS_GLOBAL_CTL      0x00
0373 
0374 /* Enable 802.1Q for individual Ports (16 bit) */
0375 #define B53_802_1P_EN           0x04
0376 
0377 /*************************************************************************
0378  * VLAN Page Registers
0379  *************************************************************************/
0380 
0381 /* VLAN Control 0 (8 bit) */
0382 #define B53_VLAN_CTRL0          0x00
0383 #define   VC0_8021PF_CTRL_MASK      0x3
0384 #define   VC0_8021PF_CTRL_NONE      0x0
0385 #define   VC0_8021PF_CTRL_CHANGE_PRI    0x1
0386 #define   VC0_8021PF_CTRL_CHANGE_VID    0x2
0387 #define   VC0_8021PF_CTRL_CHANGE_BOTH   0x3
0388 #define   VC0_8021QF_CTRL_MASK      0xc
0389 #define   VC0_8021QF_CTRL_CHANGE_PRI    0x1
0390 #define   VC0_8021QF_CTRL_CHANGE_VID    0x2
0391 #define   VC0_8021QF_CTRL_CHANGE_BOTH   0x3
0392 #define   VC0_RESERVED_1        BIT(1)
0393 #define   VC0_DROP_VID_MISS     BIT(4)
0394 #define   VC0_VID_HASH_VID      BIT(5)
0395 #define   VC0_VID_CHK_EN        BIT(6)  /* Use VID,DA or VID,SA */
0396 #define   VC0_VLAN_EN           BIT(7)  /* 802.1Q VLAN Enabled */
0397 
0398 /* VLAN Control 1 (8 bit) */
0399 #define B53_VLAN_CTRL1          0x01
0400 #define   VC1_RX_MCST_TAG_EN        BIT(1)
0401 #define   VC1_RX_MCST_FWD_EN        BIT(2)
0402 #define   VC1_RX_MCST_UNTAG_EN      BIT(3)
0403 
0404 /* VLAN Control 2 (8 bit) */
0405 #define B53_VLAN_CTRL2          0x02
0406 
0407 /* VLAN Control 3 (8 bit when BCM5325, 16 bit else) */
0408 #define B53_VLAN_CTRL3          0x03
0409 #define B53_VLAN_CTRL3_63XX     0x04
0410 #define   VC3_MAXSIZE_1532      BIT(6) /* 5325 only */
0411 #define   VC3_HIGH_8BIT_EN      BIT(7) /* 5325 only */
0412 
0413 /* VLAN Control 4 (8 bit) */
0414 #define B53_VLAN_CTRL4          0x05
0415 #define B53_VLAN_CTRL4_25       0x04
0416 #define B53_VLAN_CTRL4_63XX     0x06
0417 #define   VC4_ING_VID_CHECK_S       6
0418 #define   VC4_ING_VID_CHECK_MASK    (0x3 << VC4_ING_VID_CHECK_S)
0419 #define   VC4_ING_VID_VIO_FWD       0 /* forward, but do not learn */
0420 #define   VC4_ING_VID_VIO_DROP      1 /* drop VID violations */
0421 #define   VC4_NO_ING_VID_CHK        2 /* do not check */
0422 #define   VC4_ING_VID_VIO_TO_IMP    3 /* redirect to MII port */
0423 
0424 /* VLAN Control 5 (8 bit) */
0425 #define B53_VLAN_CTRL5          0x06
0426 #define B53_VLAN_CTRL5_25       0x05
0427 #define B53_VLAN_CTRL5_63XX     0x07
0428 #define   VC5_VID_FFF_EN        BIT(2)
0429 #define   VC5_DROP_VTABLE_MISS      BIT(3)
0430 
0431 /* VLAN Control 6 (8 bit) */
0432 #define B53_VLAN_CTRL6          0x07
0433 #define B53_VLAN_CTRL6_63XX     0x08
0434 
0435 /* VLAN Table Access Register (16 bit) */
0436 #define B53_VLAN_TABLE_ACCESS_25    0x06    /* BCM5325E/5350 */
0437 #define B53_VLAN_TABLE_ACCESS_65    0x08    /* BCM5365 */
0438 #define   VTA_VID_LOW_MASK_25       0xf
0439 #define   VTA_VID_LOW_MASK_65       0xff
0440 #define   VTA_VID_HIGH_S_25     4
0441 #define   VTA_VID_HIGH_S_65     8
0442 #define   VTA_VID_HIGH_MASK_25      (0xff << VTA_VID_HIGH_S_25E)
0443 #define   VTA_VID_HIGH_MASK_65      (0xf << VTA_VID_HIGH_S_65)
0444 #define   VTA_RW_STATE          BIT(12)
0445 #define   VTA_RW_STATE_RD       0
0446 #define   VTA_RW_STATE_WR       BIT(12)
0447 #define   VTA_RW_OP_EN          BIT(13)
0448 
0449 /* VLAN Read/Write Registers for (16/32 bit) */
0450 #define B53_VLAN_WRITE_25       0x08
0451 #define B53_VLAN_WRITE_65       0x0a
0452 #define B53_VLAN_READ           0x0c
0453 #define   VA_MEMBER_MASK        0x3f
0454 #define   VA_UNTAG_S_25         6
0455 #define   VA_UNTAG_MASK_25      0x3f
0456 #define   VA_UNTAG_S_65         7
0457 #define   VA_UNTAG_MASK_65      0x1f
0458 #define   VA_VID_HIGH_S         12
0459 #define   VA_VID_HIGH_MASK      (0xffff << VA_VID_HIGH_S)
0460 #define   VA_VALID_25           BIT(20)
0461 #define   VA_VALID_25_R4        BIT(24)
0462 #define   VA_VALID_65           BIT(14)
0463 
0464 /* VLAN Port Default Tag (16 bit) */
0465 #define B53_VLAN_PORT_DEF_TAG(i)    (0x10 + 2 * (i))
0466 
0467 /*************************************************************************
0468  * Jumbo Frame Page Registers
0469  *************************************************************************/
0470 
0471 /* Jumbo Enable Port Mask (bit i == port i enabled) (32 bit) */
0472 #define B53_JUMBO_PORT_MASK     0x01
0473 #define B53_JUMBO_PORT_MASK_63XX    0x04
0474 #define   JPM_10_100_JUMBO_EN       BIT(24) /* GigE always enabled */
0475 
0476 /* Good Frame Max Size without 802.1Q TAG (16 bit) */
0477 #define B53_JUMBO_MAX_SIZE      0x05
0478 #define B53_JUMBO_MAX_SIZE_63XX     0x08
0479 #define   JMS_MIN_SIZE          1518
0480 #define   JMS_MAX_SIZE          9724
0481 
0482 /*************************************************************************
0483  * EEE Configuration Page Registers
0484  *************************************************************************/
0485 
0486 /* EEE Enable control register (16 bit) */
0487 #define B53_EEE_EN_CTRL         0x00
0488 
0489 /* EEE LPI assert status register (16 bit) */
0490 #define B53_EEE_LPI_ASSERT_STS      0x02
0491 
0492 /* EEE LPI indicate status register (16 bit) */
0493 #define B53_EEE_LPI_INDICATE        0x4
0494 
0495 /* EEE Receiving idle symbols status register (16 bit) */
0496 #define B53_EEE_RX_IDLE_SYM_STS     0x6
0497 
0498 /* EEE Pipeline timer register (32 bit) */
0499 #define B53_EEE_PIP_TIMER       0xC
0500 
0501 /* EEE Sleep timer Gig register (32 bit) */
0502 #define B53_EEE_SLEEP_TIMER_GIG(i)  (0x10 + 4 * (i))
0503 
0504 /* EEE Sleep timer FE register (32 bit) */
0505 #define B53_EEE_SLEEP_TIMER_FE(i)   (0x34 + 4 * (i))
0506 
0507 /* EEE Minimum LP timer Gig register (32 bit) */
0508 #define B53_EEE_MIN_LP_TIMER_GIG(i) (0x58 + 4 * (i))
0509 
0510 /* EEE Minimum LP timer FE register (32 bit) */
0511 #define B53_EEE_MIN_LP_TIMER_FE(i)  (0x7c + 4 * (i))
0512 
0513 /* EEE Wake timer Gig register (16 bit) */
0514 #define B53_EEE_WAKE_TIMER_GIG(i)   (0xa0 + 2 * (i))
0515 
0516 /* EEE Wake timer FE register (16 bit) */
0517 #define B53_EEE_WAKE_TIMER_FE(i)    (0xb2 + 2 * (i))
0518 
0519 
0520 /*************************************************************************
0521  * CFP Configuration Page Registers
0522  *************************************************************************/
0523 
0524 /* CFP Control Register with ports map (8 bit) */
0525 #define B53_CFP_CTRL            0x00
0526 
0527 #endif /* !__B53_REGS_H */