/* Copyright 2004-2010 Broadcom Corp. All Rights Reserved. <:label-BRCM:2011:DUAL/GPL:standard Unless you and Broadcom execute a separate written software license agreement governing use of this software, this software is licensed to you under the terms of the GNU General Public License version 2 (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php, with the following added to such license: As a special exception, the copyright holders of this software give you permission to link this software with independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from this software. The special exception does not apply to any modifications of the software. Not withstanding the above, under no circumstances may you combine this software in any way with any other Broadcom software provided under a license other than the GPL, without Broadcom's express prior written consent. :> */ #ifndef _BCMMII_XTN_H_ #define _BCMMII_XTN_H_ #if defined(CONFIG_BCM963158) #define PBMAP_P7_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<