@ -30,7 +30,7 @@
/* COMPHY speed macro */
# define COMPHY_SPEED_1_25G 0 /* SGMII 1G */
# define COMPHY_SPEED_2_5G 1
# define COMPHY_SPEED_3_125G 2 /* SGMII 2.5G */
# define COMPHY_SPEED_3_125G 2 /* 2500Base-X */
# define COMPHY_SPEED_5G 3
# define COMPHY_SPEED_5_15625G 4 /* XFI 5G */
# define COMPHY_SPEED_6G 5
@ -191,7 +191,7 @@ static void mvebu_cp110_comphy_set_phy_selector(uint64_t comphy_base,
case ( 3 ) :
/* For comphy 3:
* 0x1 = RXAUI_Lane1
* 0x2 = SGMII / HS - SGMII Port1
* 0x2 = SGMII / Base - X Port1
*/
if ( mode = = COMPHY_RXAUI_MODE )
reg | = COMMON_SELECTOR_COMPHY3_RXAUI < <
@ -202,20 +202,20 @@ static void mvebu_cp110_comphy_set_phy_selector(uint64_t comphy_base,
break ;
case ( 4 ) :
/* For comphy 4:
* 0x1 = SGMII / HS - SGMII Port1 , XFI1 / SFI1
* 0x2 = SGMII / HS - SGMII Port0 : XFI0 / SFI0 , RXAUI_Lane0
* 0x1 = SGMII / Base - X Port1 , XFI1 / SFI1
* 0x2 = SGMII / Base - X Port0 : XFI0 / SFI0 , RXAUI_Lane0
*
* We want to check if SGMII1 / HS_SGMII1 is the
* We want to check if SGMII1 is the
* requested mode in order to determine which value
* should be set ( all other modes use the same value )
* so we need to strip the mode , and check the ID
* because we might handle SGMII0 / HS_SGMII0 too .
* because we might handle SGMII0 too .
*/
/* TODO: need to distinguish between CP110 and CP115
* as SFI1 / XFI1 available only for CP115 .
*/
if ( ( mode = = COMPHY_SGMII_MODE | |
mode = = COMPHY_HS_SGMII _MODE | |
mode = = COMPHY_2500BASEX _MODE | |
mode = = COMPHY_SFI_MODE | |
mode = = COMPHY_XFI_MODE | |
mode = = COMPHY_AP_MODE )
@ -228,7 +228,7 @@ static void mvebu_cp110_comphy_set_phy_selector(uint64_t comphy_base,
break ;
case ( 5 ) :
/* For comphy 5:
* 0x1 = SGMII / HS - SGMII Port2
* 0x1 = SGMII / Base - X Port2
* 0x2 = RXAUI Lane1
*/
if ( mode = = COMPHY_RXAUI_MODE )
@ -713,7 +713,7 @@ static int mvebu_cp110_comphy_sgmii_power_on(uint64_t comphy_base,
data | = 0x6 < < SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET ;
data | = 0x6 < < SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET ;
} else if ( sgmii_speed = = COMPHY_SPEED_3_125G ) {
/* HS SGMII (2.5G) , SerDes speed 3.125G */
/* 2500Base-X , SerDes speed 3.125G */
data | = 0x8 < < SD_EXTERNAL_CONFIG0_SD_PHY_GEN_RX_OFFSET ;
data | = 0x8 < < SD_EXTERNAL_CONFIG0_SD_PHY_GEN_TX_OFFSET ;
} else {
@ -2343,7 +2343,7 @@ int mvebu_cp110_comphy_digital_reset(uint64_t comphy_base,
switch ( mode ) {
case ( COMPHY_SGMII_MODE ) :
case ( COMPHY_HS_SGMII _MODE ) :
case ( COMPHY_2500BASEX _MODE ) :
case ( COMPHY_XFI_MODE ) :
case ( COMPHY_SFI_MODE ) :
case ( COMPHY_RXAUI_MODE ) :
@ -2378,7 +2378,7 @@ int mvebu_cp110_comphy_power_on(uint64_t comphy_base,
comphy_mode ) ;
break ;
case ( COMPHY_SGMII_MODE ) :
case ( COMPHY_HS_SGMII _MODE ) :
case ( COMPHY_2500BASEX _MODE ) :
err = mvebu_cp110_comphy_sgmii_power_on ( comphy_base ,
comphy_index ,
comphy_mode ) ;