summaryrefslogtreecommitdiff
path: root/drivers/net/fm/t4240.c
diff options
context:
space:
mode:
authorShaohui Xie <Shaohui.Xie@freescale.com>2013-08-19 18:58:52 +0800
committerYork Sun <yorksun@freescale.com>2013-08-20 10:46:48 -0700
commit1c68d01eea92137482b980318e2a7f7c0ebef2d4 (patch)
treec8626489bd3dce8596d7d49f9d33a2386806eca2 /drivers/net/fm/t4240.c
parentae3dcd04880ba5b21ffd62e91713c14b4fd92ec5 (diff)
downloadu-boot-imx-1c68d01eea92137482b980318e2a7f7c0ebef2d4.zip
u-boot-imx-1c68d01eea92137482b980318e2a7f7c0ebef2d4.tar.gz
u-boot-imx-1c68d01eea92137482b980318e2a7f7c0ebef2d4.tar.bz2
powerpc/t4240: add QSGMII interface support
Also some fix for QSGMII. 1. fix QSGMII configure of Serdes2. 2. fix PHY address of QSGMII MAC9 & MAC10 for each FMAN. 3. fix dtb for QSGMII interface. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'drivers/net/fm/t4240.c')
-rw-r--r--drivers/net/fm/t4240.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/drivers/net/fm/t4240.c b/drivers/net/fm/t4240.c
index 10c141f..6253f22 100644
--- a/drivers/net/fm/t4240.c
+++ b/drivers/net/fm/t4240.c
@@ -114,7 +114,45 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
return PHY_INTERFACE_MODE_SGMII;
break;
default:
- return PHY_INTERFACE_MODE_NONE;
+ break;
+ }
+
+ /* handle QSGMII */
+ switch (port) {
+ case FM1_DTSEC1:
+ case FM1_DTSEC2:
+ case FM1_DTSEC3:
+ case FM1_DTSEC4:
+ /* check lane G on SerDes1 */
+ if (is_serdes_configured(QSGMII_FM1_A))
+ return PHY_INTERFACE_MODE_QSGMII;
+ break;
+ case FM1_DTSEC5:
+ case FM1_DTSEC6:
+ case FM1_DTSEC9:
+ case FM1_DTSEC10:
+ /* check lane C on SerDes1 */
+ if (is_serdes_configured(QSGMII_FM1_B))
+ return PHY_INTERFACE_MODE_QSGMII;
+ break;
+ case FM2_DTSEC1:
+ case FM2_DTSEC2:
+ case FM2_DTSEC3:
+ case FM2_DTSEC4:
+ /* check lane G on SerDes2 */
+ if (is_serdes_configured(QSGMII_FM2_A))
+ return PHY_INTERFACE_MODE_QSGMII;
+ break;
+ case FM2_DTSEC5:
+ case FM2_DTSEC6:
+ case FM2_DTSEC9:
+ case FM2_DTSEC10:
+ /* check lane C on SerDes2 */
+ if (is_serdes_configured(QSGMII_FM2_B))
+ return PHY_INTERFACE_MODE_QSGMII;
+ break;
+ default:
+ break;
}
return PHY_INTERFACE_MODE_NONE;