|
@@ -79,7 +79,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
|
|
static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs)
|
|
|
{
|
|
{
|
|
|
return container_of(pcs, struct mtk_pcs_lynxi, pcs);
|
|
return container_of(pcs, struct mtk_pcs_lynxi, pcs);
|
|
|
-@@ -118,6 +140,17 @@ static void mtk_pcs_lynxi_get_state(stru
|
|
|
|
|
|
|
+@@ -117,6 +139,17 @@ static void mtk_pcs_lynxi_get_state(stru
|
|
|
FIELD_GET(SGMII_LPA, adv));
|
|
FIELD_GET(SGMII_LPA, adv));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -97,7 +97,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
static int mtk_pcs_lynxi_config(struct phylink_pcs *pcs, unsigned int neg_mode,
|
|
static int mtk_pcs_lynxi_config(struct phylink_pcs *pcs, unsigned int neg_mode,
|
|
|
phy_interface_t interface,
|
|
phy_interface_t interface,
|
|
|
const unsigned long *advertising,
|
|
const unsigned long *advertising,
|
|
|
-@@ -163,6 +196,7 @@ static int mtk_pcs_lynxi_config(struct p
|
|
|
|
|
|
|
+@@ -162,6 +195,7 @@ static int mtk_pcs_lynxi_config(struct p
|
|
|
SGMII_PHYA_PWD);
|
|
SGMII_PHYA_PWD);
|
|
|
|
|
|
|
|
/* Reset SGMII PCS state */
|
|
/* Reset SGMII PCS state */
|
|
@@ -105,7 +105,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
regmap_set_bits(mpcs->regmap, SGMSYS_RESERVED_0,
|
|
regmap_set_bits(mpcs->regmap, SGMSYS_RESERVED_0,
|
|
|
SGMII_SW_RESET);
|
|
SGMII_SW_RESET);
|
|
|
|
|
|
|
|
-@@ -249,10 +283,29 @@ static void mtk_pcs_lynxi_link_up(struct
|
|
|
|
|
|
|
+@@ -248,10 +282,29 @@ static void mtk_pcs_lynxi_link_up(struct
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -135,7 +135,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
mpcs->interface = PHY_INTERFACE_MODE_NA;
|
|
mpcs->interface = PHY_INTERFACE_MODE_NA;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-@@ -263,11 +316,12 @@ static const struct phylink_pcs_ops mtk_
|
|
|
|
|
|
|
+@@ -262,11 +315,12 @@ static const struct phylink_pcs_ops mtk_
|
|
|
.pcs_an_restart = mtk_pcs_lynxi_restart_an,
|
|
.pcs_an_restart = mtk_pcs_lynxi_restart_an,
|
|
|
.pcs_link_up = mtk_pcs_lynxi_link_up,
|
|
.pcs_link_up = mtk_pcs_lynxi_link_up,
|
|
|
.pcs_disable = mtk_pcs_lynxi_disable,
|
|
.pcs_disable = mtk_pcs_lynxi_disable,
|
|
@@ -151,7 +151,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
{
|
|
{
|
|
|
struct mtk_pcs_lynxi *mpcs;
|
|
struct mtk_pcs_lynxi *mpcs;
|
|
|
u32 id, ver;
|
|
u32 id, ver;
|
|
|
-@@ -275,29 +329,33 @@ struct phylink_pcs *mtk_pcs_lynxi_create
|
|
|
|
|
|
|
+@@ -274,29 +328,33 @@ struct phylink_pcs *mtk_pcs_lynxi_create
|
|
|
|
|
|
|
|
ret = regmap_read(regmap, SGMSYS_PCS_DEVICE_ID, &id);
|
|
ret = regmap_read(regmap, SGMSYS_PCS_DEVICE_ID, &id);
|
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
@@ -192,7 +192,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
|
|
|
|
|
mpcs->ana_rgc3 = ana_rgc3;
|
|
mpcs->ana_rgc3 = ana_rgc3;
|
|
|
mpcs->regmap = regmap;
|
|
mpcs->regmap = regmap;
|
|
|
-@@ -308,6 +366,13 @@ struct phylink_pcs *mtk_pcs_lynxi_create
|
|
|
|
|
|
|
+@@ -307,6 +365,13 @@ struct phylink_pcs *mtk_pcs_lynxi_create
|
|
|
mpcs->interface = PHY_INTERFACE_MODE_NA;
|
|
mpcs->interface = PHY_INTERFACE_MODE_NA;
|
|
|
|
|
|
|
|
return &mpcs->pcs;
|
|
return &mpcs->pcs;
|
|
@@ -206,7 +206,7 @@ Signed-off-by: Daniel Golle <[email protected]>
|
|
|
}
|
|
}
|
|
|
EXPORT_SYMBOL(mtk_pcs_lynxi_create);
|
|
EXPORT_SYMBOL(mtk_pcs_lynxi_create);
|
|
|
|
|
|
|
|
-@@ -320,5 +385,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
|
|
|
|
|
|
|
+@@ -319,5 +384,142 @@ void mtk_pcs_lynxi_destroy(struct phylin
|
|
|
}
|
|
}
|
|
|
EXPORT_SYMBOL(mtk_pcs_lynxi_destroy);
|
|
EXPORT_SYMBOL(mtk_pcs_lynxi_destroy);
|
|
|
|
|
|