/* Copyright 2004-2010 Broadcom Corp. All Rights Reserved. <:label-BRCM:2011:DUAL/GPL:standard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation (the "GPL"). This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GPL is available at http://www.broadcom.com/licenses/GPLv2.php, or by writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. :> */ #ifndef _BCMMII_XTN_H_ #define _BCMMII_XTN_H_ #define SF2_MDIO_MASTER 0x01 #define SF2_P8_2_5G_EN (1<<5) #if defined(CONFIG_BCM_ENET_MULTI_IMP_SUPPORT) /* Note : PBMAP_P4/P5_IMP is only defined when multiple IMP ports are in use * Should not be used as a replacement for PBMAP_P4/P5 */ #define PBMAP_P5_IMP (1<4 bytes */ enum { SF2_P5 = 5, SF2_P7 = 7, SF2_P11 = 11, SF2_P12 = 12, SF2_INEXISTANT_PORT = 6, }; #define PAGE_SWITCH_EXTEND_REG 0x100 #if defined(CONFIG_BCM94908) #define SF2_P11_RGMII_CTRL_REGS 0x53UL #define SF2_P11_RGMII_RX_CLK_DELAY_CTRL 0x55UL #else // SF2 P5 RGMII Control Register #define SF2_P5_RGMII_CTRL_REGS 0x1cUL #define SF2_P5_RGMII_RX_CLK_DELAY_CTRL 0x1eUL // SF2 P7 RGMII Control Register #define SF2_P7_RGMII_CTRL_REGS 0x1fUL #define SF2_P7_RGMII_RX_CLK_DELAY_CTRL 0x21UL // SF2 P11 RGMII Control Register #define SF2_P11_RGMII_CTRL_REGS 0x32UL #define SF2_P11_RGMII_RX_CLK_DELAY_CTRL 0x34UL // SF2 P12 RGMII Control Register #define SF2_P12_RGMII_CTRL_REGS 0x35UL #define SF2_P12_RGMII_RX_CLK_DELAY_CTRL 0x37UL #endif /* !4908 */ #define SF2_QUAD_PHY_BASE_REG 0x40024UL // default quad phy adr base = 1 #define SF2_QUAD_PHY_SYSTEM_RESET 0x100 #define SF2_QUAD_PHY_PHYAD_SHIFT 12 #define SF2_ENABLE_PORT_RGMII_INTF 0x01 #define SF2_TX_ID_DIS 0x02 #define SF2_RGMII_PORT_MODE_M 0x1C #define SF2_RGMII_PORT_MODE_S 0x2 #define SF2_RGMII_PORT_MODE_INT_EPHY_MII 0x0 /* Internal EPHY (MII) */ #define SF2_RGMII_PORT_MODE_INT_GPHY_GMII 0x1 /* Internal GPHY (GMII/MII) */ #define SF2_RGMII_PORT_MODE_EXT_EPHY_MII 0x2 /* External EPHY (MII) */ #define SF2_RGMII_PORT_MODE_EXT_GPHY_RGMII 0x3 /* External GPHY (RGMII) */ #define SF2_RGMII_PORT_MODE_EXT_RvMII 0x4 /* External RvMII */ #define SF2_RGMII_RX_CLK_IDDQ 0x10 #define SF2_RX_ID_BYPASS 0x20 #define SF2_MISC_MII_PAD_CTL (MISC_BASE + 0x28) #if defined(CONFIG_5x3_CROSSBAR_SUPPORT) /* 63138B0 onwards 5x3 crossbar */ #define CB_PHY_PORT_MASK 0x7 #define CB_PHY_PORT_SHIFT 0x3 #define CB_WAN_LNK_STATUS_SHIFT 9 #define CB_WAN_LNK_STATUS_MASK (1<