From 89b94d851d683308e731e3ceae1a12f616d1f2f7 Mon Sep 17 00:00:00 2001 From: Shaohui Xie Date: Thu, 13 Nov 2014 11:26:19 +0800 Subject: powerpc/b4860qds: add xfi support We need following changes to make xfi work on B4: 1. set cross-point switch VSC3308 to use sfp config when running xfi; 2. add 10G interface check for xfi; 3. set phy address for xfi so the 10G ports can be registered by mdio; Signed-off-by: Shaohui Xie Reviewed-by: York Sun --- board/freescale/b4860qds/b4860qds.c | 40 ++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'board/freescale/b4860qds/b4860qds.c') diff --git a/board/freescale/b4860qds/b4860qds.c b/board/freescale/b4860qds/b4860qds.c index b3a1e753f1..87dcc10f1a 100644 --- a/board/freescale/b4860qds/b4860qds.c +++ b/board/freescale/b4860qds/b4860qds.c @@ -490,6 +490,9 @@ int configure_vsc3316_3308(void) return -1; } + num_vsc08_con = NUM_CON_VSC3308; + /* Configure VSC3308 crossbar switch */ + ret = select_i2c_ch_pca(I2C_CH_VSC3308); switch (serdes2_prtcl) { #ifdef CONFIG_PPC_B4420 case 0x9d: @@ -497,18 +500,11 @@ int configure_vsc3316_3308(void) case 0x9E: case 0x9A: case 0x98: - case 0xb1: - case 0xb2: case 0x48: case 0x49: case 0x4E: - case 0x8C: - case 0x8D: case 0x79: case 0x7A: - num_vsc08_con = NUM_CON_VSC3308; - /* Configure VSC3308 crossbar switch */ - ret = select_i2c_ch_pca(I2C_CH_VSC3308); if (!ret) { ret = vsc3308_config(VSC3308_TX_ADDRESS, vsc08_tx_amc, num_vsc08_con); @@ -522,6 +518,36 @@ int configure_vsc3316_3308(void) return ret; } break; + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8a: + case 0x8b: + case 0x8c: + case 0x8d: + case 0x8e: + case 0xb1: + case 0xb2: + if (!ret) { + ret = vsc3308_config(VSC3308_TX_ADDRESS, + vsc08_tx_sfp, num_vsc08_con); + if (ret) + return ret; + ret = vsc3308_config(VSC3308_RX_ADDRESS, + vsc08_rx_sfp, num_vsc08_con); + if (ret) + return ret; + } else { + return ret; + } + break; default: printf("WARNING:VSC crossbars programming not supported for: %x" " SerDes2 Protocol.\n", serdes2_prtcl); -- cgit