2012-10-08 07:44:19 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2012 Freescale Semiconductor, Inc.
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2012-10-08 07:44:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
|
|
|
#include <asm/fsl_serdes.h>
|
|
|
|
#include <asm/processor.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
#include "fsl_corenet2_serdes.h"
|
|
|
|
|
|
|
|
struct serdes_config {
|
|
|
|
u32 protocol;
|
|
|
|
u8 lanes[SRDS_MAX_LANES];
|
|
|
|
};
|
|
|
|
|
2013-03-25 07:33:29 +00:00
|
|
|
#ifdef CONFIG_PPC_T4240
|
2013-03-25 07:33:28 +00:00
|
|
|
static const struct serdes_config serdes1_cfg_tbl[] = {
|
2012-10-08 07:44:19 +00:00
|
|
|
/* SerDes 1 */
|
|
|
|
{1, {XAUI_FM1_MAC9, XAUI_FM1_MAC9,
|
|
|
|
XAUI_FM1_MAC9, XAUI_FM1_MAC9,
|
|
|
|
XAUI_FM1_MAC10, XAUI_FM1_MAC10,
|
|
|
|
XAUI_FM1_MAC10, XAUI_FM1_MAC10}},
|
|
|
|
{2, {HIGIG_FM1_MAC9, HIGIG_FM1_MAC9,
|
|
|
|
HIGIG_FM1_MAC9, HIGIG_FM1_MAC9,
|
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10,
|
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10}},
|
|
|
|
{4, {HIGIG_FM1_MAC9, HIGIG_FM1_MAC9,
|
|
|
|
HIGIG_FM1_MAC9, HIGIG_FM1_MAC9,
|
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10,
|
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{27, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{28, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{35, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{36, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{37, {NONE, NONE, QSGMII_FM1_B, NONE,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{38, {NONE, NONE, QSGMII_FM1_B, NONE,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{39, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{40, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{45, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{46, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{47, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{48, {SGMII_FM1_DTSEC5, SGMII_FM1_DTSEC6,
|
|
|
|
SGMII_FM1_DTSEC10, SGMII_FM1_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE}},
|
|
|
|
{}
|
|
|
|
};
|
2013-03-25 07:33:28 +00:00
|
|
|
static const struct serdes_config serdes2_cfg_tbl[] = {
|
2012-10-08 07:44:19 +00:00
|
|
|
/* SerDes 2 */
|
|
|
|
{1, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC10, XAUI_FM2_MAC10,
|
|
|
|
XAUI_FM2_MAC10, XAUI_FM2_MAC10}},
|
|
|
|
{2, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC10, HIGIG_FM2_MAC10,
|
|
|
|
HIGIG_FM2_MAC10, HIGIG_FM2_MAC10}},
|
|
|
|
{4, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC10, HIGIG_FM2_MAC10,
|
|
|
|
HIGIG_FM2_MAC10, HIGIG_FM2_MAC10}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{6, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{7, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{12, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{13, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
|
|
|
{14, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{15, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{16, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{21, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{22, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
|
|
|
{23, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{24, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{25, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
|
|
|
{26, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{27, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{28, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{35, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{36, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{37, {NONE, NONE, QSGMII_FM2_B, NONE,
|
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{38, {NONE, NONE, QSGMII_FM2_B, NONE,
|
2013-08-19 10:58:52 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{39, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{40, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2013-08-19 10:58:52 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{45, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{46, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2013-08-19 10:58:52 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{47, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{48, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2013-08-19 10:58:52 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{49, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{50, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
2013-08-19 10:58:52 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{51, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{52, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
2013-08-19 10:58:52 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{53, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{54, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
2013-08-19 10:58:52 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{55, {XFI_FM1_MAC9, XFI_FM1_MAC10,
|
|
|
|
XFI_FM2_MAC10, XFI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{56, {XFI_FM1_MAC9, XFI_FM1_MAC10,
|
|
|
|
XFI_FM2_MAC10, XFI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
|
|
|
{57, {XFI_FM1_MAC9, XFI_FM1_MAC10,
|
|
|
|
XFI_FM2_MAC10, XFI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4}},
|
|
|
|
{}
|
|
|
|
};
|
2013-03-25 07:33:28 +00:00
|
|
|
static const struct serdes_config serdes3_cfg_tbl[] = {
|
2012-10-08 07:44:19 +00:00
|
|
|
/* SerDes 3 */
|
2014-05-16 02:52:33 +00:00
|
|
|
{1, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{2, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{3, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{4, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{5, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{6, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1}},
|
2015-07-29 03:28:36 +00:00
|
|
|
{7, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1} },
|
|
|
|
{8, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{9, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN}},
|
|
|
|
{10, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{11, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{12, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{13, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{14, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{15, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{16, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1}},
|
|
|
|
{17, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{18, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{19, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1}},
|
|
|
|
{20, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1}},
|
|
|
|
{}
|
|
|
|
};
|
2013-03-25 07:33:28 +00:00
|
|
|
static const struct serdes_config serdes4_cfg_tbl[] = {
|
2012-10-08 07:44:19 +00:00
|
|
|
/* SerDes 4 */
|
2014-05-16 02:52:33 +00:00
|
|
|
{1, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{2, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3, PCIE3}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{3, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, PCIE4, PCIE4} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{4, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, PCIE4, PCIE4}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{5, {PCIE3, PCIE3, PCIE3, PCIE3, SRIO2, SRIO2, SRIO2, SRIO2} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{6, {PCIE3, PCIE3, PCIE3, PCIE3, SRIO2, SRIO2, SRIO2, SRIO2}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{7, {PCIE3, PCIE3, PCIE3, PCIE3, SRIO2, SRIO2, SRIO2, SRIO2} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{8, {PCIE3, PCIE3, PCIE3, PCIE3, SRIO2, SRIO2, SRIO2, SRIO2}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{9, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, SATA1, SATA2} },
|
2013-03-25 07:33:18 +00:00
|
|
|
{10, {PCIE3, PCIE3, PCIE3, PCIE3, PCIE4, PCIE4, SATA1, SATA2} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{11, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, SATA1, SATA2} },
|
2013-03-25 07:33:18 +00:00
|
|
|
{12, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, SATA1, SATA2} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{13, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, SRIO2, SRIO2} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{14, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, SRIO2, SRIO2}},
|
2014-05-16 02:52:33 +00:00
|
|
|
{15, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, SRIO2, SRIO2} },
|
2012-10-08 07:44:19 +00:00
|
|
|
{16, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, SRIO2, SRIO2}},
|
|
|
|
{18, {PCIE3, PCIE3, PCIE3, PCIE3, AURORA, AURORA, AURORA, AURORA}},
|
|
|
|
{}
|
|
|
|
};
|
2016-11-21 21:31:34 +00:00
|
|
|
#elif defined(CONFIG_ARCH_T4160) || defined(CONFIG_PPC_T4080)
|
2013-03-25 07:33:29 +00:00
|
|
|
static const struct serdes_config serdes1_cfg_tbl[] = {
|
|
|
|
/* SerDes 1 */
|
2015-07-29 03:28:36 +00:00
|
|
|
{1, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
XAUI_FM1_MAC10, XAUI_FM1_MAC10,
|
|
|
|
XAUI_FM1_MAC10, XAUI_FM1_MAC10} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{2, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10,
|
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{4, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10,
|
|
|
|
HIGIG_FM1_MAC10, HIGIG_FM1_MAC10} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{27, {NONE, NONE, NONE, NONE,
|
2014-05-16 02:52:33 +00:00
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{28, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{35, {NONE, NONE, NONE, NONE,
|
2014-05-16 02:52:33 +00:00
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{36, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
SGMII_FM1_DTSEC1, SGMII_FM1_DTSEC2,
|
|
|
|
SGMII_FM1_DTSEC3, SGMII_FM1_DTSEC4} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{37, {NONE, NONE, NONE, NONE,
|
2014-05-16 02:52:33 +00:00
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{38, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
NONE, NONE, QSGMII_FM1_A, NONE} },
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
static const struct serdes_config serdes2_cfg_tbl[] = {
|
|
|
|
/* SerDes 2 */
|
2014-05-16 02:52:33 +00:00
|
|
|
{6, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{7, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{12, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{13, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{15, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{16, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{21, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{22, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{24, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{25, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
|
|
|
{26, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
NONE, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{27, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{28, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{35, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{36, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{37, {NONE, NONE, QSGMII_FM2_B, NONE,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{38, {NONE, NONE, QSGMII_FM2_B, NONE,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{39, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{40, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{45, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{46, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{47, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{48, {SGMII_FM2_DTSEC5, SGMII_FM2_DTSEC6,
|
|
|
|
SGMII_FM2_DTSEC10, SGMII_FM2_DTSEC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{49, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{50, {XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
|
|
|
XAUI_FM2_MAC9, XAUI_FM2_MAC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{51, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{52, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{53, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{54, {HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
|
|
|
HIGIG_FM2_MAC9, HIGIG_FM2_MAC9,
|
2015-07-29 03:28:36 +00:00
|
|
|
NONE, NONE, QSGMII_FM2_A, NONE} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{55, {NONE, XFI_FM1_MAC10,
|
|
|
|
XFI_FM2_MAC10, NONE,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{56, {NONE, XFI_FM1_MAC10,
|
|
|
|
XFI_FM2_MAC10, NONE,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
SGMII_FM2_DTSEC3, SGMII_FM2_DTSEC4} },
|
|
|
|
{57, {NONE, XFI_FM1_MAC10,
|
|
|
|
XFI_FM2_MAC10, NONE,
|
|
|
|
SGMII_FM2_DTSEC1, SGMII_FM2_DTSEC2,
|
|
|
|
NONE, NONE} },
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
static const struct serdes_config serdes3_cfg_tbl[] = {
|
|
|
|
/* SerDes 3 */
|
2014-05-16 02:52:33 +00:00
|
|
|
{1, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{2, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1, PCIE1} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{3, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{4, {PCIE1, PCIE1, PCIE1, PCIE1, PCIE2, PCIE2, PCIE2, PCIE2} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{5, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{6, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{7, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1} },
|
|
|
|
{8, {PCIE1, PCIE1, PCIE1, PCIE1, SRIO1, SRIO1, SRIO1, SRIO1} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{9, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN} },
|
|
|
|
{10, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{11, {NONE, NONE, NONE, NONE,
|
2014-05-16 02:52:33 +00:00
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{12, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{13, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{14, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
PCIE2, PCIE2, PCIE2, PCIE2} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{15, {NONE, NONE, NONE, NONE,
|
2014-05-16 02:52:33 +00:00
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{16, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
2015-07-29 03:28:36 +00:00
|
|
|
{17, {NONE, NONE, NONE, NONE,
|
2013-03-25 07:33:29 +00:00
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
2014-05-16 02:52:33 +00:00
|
|
|
{18, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{19, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
|
|
|
{20, {INTERLAKEN, INTERLAKEN, INTERLAKEN, INTERLAKEN,
|
2015-07-29 03:28:36 +00:00
|
|
|
SRIO1, SRIO1, SRIO1, SRIO1} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{}
|
|
|
|
};
|
|
|
|
static const struct serdes_config serdes4_cfg_tbl[] = {
|
|
|
|
/* SerDes 4 */
|
2015-07-29 03:28:36 +00:00
|
|
|
{3, {NONE, NONE, NONE, NONE, PCIE4, PCIE4, PCIE4, PCIE4} },
|
|
|
|
{4, {NONE, NONE, NONE, NONE, PCIE4, PCIE4, PCIE4, PCIE4} },
|
|
|
|
{5, {NONE, NONE, NONE, NONE, SRIO2, SRIO2, SRIO2, SRIO2} },
|
|
|
|
{6, {NONE, NONE, NONE, NONE, SRIO2, SRIO2, SRIO2, SRIO2} },
|
|
|
|
{7, {NONE, NONE, NONE, NONE, SRIO2, SRIO2, SRIO2, SRIO2} },
|
|
|
|
{8, {NONE, NONE, NONE, NONE, SRIO2, SRIO2, SRIO2, SRIO2} },
|
|
|
|
{9, {NONE, NONE, NONE, NONE, PCIE4, PCIE4, SATA1, SATA2} },
|
|
|
|
{10, {NONE, NONE, NONE, NONE, PCIE4, PCIE4, SATA1, SATA2} },
|
|
|
|
{11, {NONE, NONE, NONE, NONE, AURORA, AURORA, SATA1, SATA2} },
|
|
|
|
{12, {NONE, NONE, NONE, NONE, AURORA, AURORA, SATA1, SATA2} },
|
|
|
|
{13, {NONE, NONE, NONE, NONE, AURORA, AURORA, SRIO2, SRIO2} },
|
|
|
|
{14, {NONE, NONE, NONE, NONE, AURORA, AURORA, SRIO2, SRIO2} },
|
|
|
|
{15, {NONE, NONE, NONE, NONE, AURORA, AURORA, SRIO2, SRIO2} },
|
|
|
|
{16, {NONE, NONE, NONE, NONE, AURORA, AURORA, SRIO2, SRIO2} },
|
|
|
|
{18, {NONE, NONE, NONE, NONE, AURORA, AURORA, AURORA, AURORA} },
|
2013-03-25 07:33:29 +00:00
|
|
|
{}
|
|
|
|
}
|
|
|
|
;
|
|
|
|
#else
|
|
|
|
#error "Need to define SerDes protocol"
|
|
|
|
#endif
|
2013-03-25 07:33:28 +00:00
|
|
|
static const struct serdes_config *serdes_cfg_tbl[] = {
|
2012-10-08 07:44:19 +00:00
|
|
|
serdes1_cfg_tbl,
|
|
|
|
serdes2_cfg_tbl,
|
|
|
|
serdes3_cfg_tbl,
|
|
|
|
serdes4_cfg_tbl,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum srds_prtcl serdes_get_prtcl(int serdes, int cfg, int lane)
|
|
|
|
{
|
2013-03-25 07:33:28 +00:00
|
|
|
const struct serdes_config *ptr;
|
2012-10-08 07:44:19 +00:00
|
|
|
|
|
|
|
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
ptr = serdes_cfg_tbl[serdes];
|
|
|
|
while (ptr->protocol) {
|
|
|
|
if (ptr->protocol == cfg)
|
|
|
|
return ptr->lanes[lane];
|
|
|
|
ptr++;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int is_serdes_prtcl_valid(int serdes, u32 prtcl)
|
|
|
|
{
|
|
|
|
int i;
|
2013-03-25 07:33:28 +00:00
|
|
|
const struct serdes_config *ptr;
|
2012-10-08 07:44:19 +00:00
|
|
|
|
|
|
|
if (serdes >= ARRAY_SIZE(serdes_cfg_tbl))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
ptr = serdes_cfg_tbl[serdes];
|
|
|
|
while (ptr->protocol) {
|
|
|
|
if (ptr->protocol == prtcl)
|
|
|
|
break;
|
|
|
|
ptr++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ptr->protocol)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
for (i = 0; i < SRDS_MAX_LANES; i++) {
|
|
|
|
if (ptr->lanes[i] != NONE)
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|