LSDK v2.0: Linux Ethernet Independent Mode

cancel
Showing results for 
Search instead for 
Did you mean: 

LSDK v2.0: Linux Ethernet Independent Mode

162 Views
ckloecker
Contributor II

We use LSDK v2.0 17.03 and 20.04 on an LS1046A based platform. We would like to enable Ethernet "Independent Mode" (IM) which is supported according to LSDKUG_Rev20.04_290520. There is also some source code pointing to IM support in the Linux kernel, e.g. drivers/net/ethernet/freescale/sdk_fman/Peripherals/FM/Port/fm_port_im.c.

However, we do not see any way to enable this mode (e.g. via device tree). We also have no idea how to obtain the source code for the mentioned "dpaa_eth_im.ko" kernel module.

How can we enable the Ethernet Independent Mode in Linux and/or where can the "dpaa_eth_im.ko" source code be found?

Labels (1)
5 Replies

132 Views
ckloecker
Contributor II

Thank you very much!

Is it also compatible to LSDK 17.03?

0 Kudos

130 Views
yipingwang
NXP TechSupport
NXP TechSupport

It is not compatible with SDK 2.0 1703.

0 Kudos

127 Views
ckloecker
Contributor II

Is Independent Mode supported in LSDK v2.0 1703? If so, how can it be enabled?

0 Kudos

138 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the step by step user manual in section "8.2.5.2.8.2.3.3 Independent-Mode" in LSDKUG_Rev20.04.pdf.

Please refer to the attachment for "dpaa_eth_im.ko" source code.

0 Kudos

102 Views
ckloecker
Contributor II

The source code is not compatible to Linux kernel 5.4.3 used in LSDK 20.04. I needed the following changes for compilation:

--- a/dpaa_eth_im.c
+++ b/dpaa_eth_im.c
@@ -753,6 +753,7 @@ static int init_phy(struct net_device *dev)
 {
     struct fm_im_private* priv = netdev_priv(dev);
     u32 supported;
+    u32 tmp_mask_legacy;
 
     priv->oldlink = 0;
     priv->oldspeed = 0;
@@ -774,8 +775,14 @@ static int init_phy(struct net_device *dev)
     }
 
     /* Remove any features not supported by the controller */
-    priv->phydev->supported &= supported;
-    priv->phydev->advertising = priv->phydev->supported;
+    ethtool_convert_link_mode_to_legacy_u32(&tmp_mask_legacy,
+                                            priv->phydev->supported);
+    tmp_mask_legacy &= supported;
+    ethtool_convert_legacy_u32_to_link_mode(priv->phydev->supported,
+                                            tmp_mask_legacy);
+
+    ethtool_convert_legacy_u32_to_link_mode(priv->phydev->advertising,
+                                            supported);
 
     return 0;
 }

Haven't tested it yet.

Are you sure that the module is compatible with LSDK 20.04? Git metadata suggests that it was written for LSDK 19.06.

0 Kudos