|
|
@@ -14,8 +14,8 @@ Signed-off-by: Lei Wei <[email protected]>
|
|
|
Alex G: use regmap to read/write registers
|
|
|
Signed-off-by: Alexandru Gagniuc <[email protected]>
|
|
|
---
|
|
|
- drivers/net/pcs/pcs-qcom-ipq9574.c | 94 ++++++++++++++++++++++++++++++
|
|
|
- 1 file changed, 94 insertions(+)
|
|
|
+ drivers/net/pcs/pcs-qcom-ipq9574.c | 95 ++++++++++++++++++++++++++++++
|
|
|
+ 1 file changed, 95 insertions(+)
|
|
|
|
|
|
--- a/drivers/net/pcs/pcs-qcom-ipq9574.c
|
|
|
+++ b/drivers/net/pcs/pcs-qcom-ipq9574.c
|
|
|
@@ -150,9 +150,9 @@ Signed-off-by: Alexandru Gagniuc <[email protected]>
|
|
|
static int ipq_pcs_link_up_config_usxgmii(struct ipq_pcs *qpcs, int speed)
|
|
|
{
|
|
|
unsigned int val;
|
|
|
-@@ -575,6 +657,10 @@ static int ipq_pcs_validate(struct phyli
|
|
|
- case PHY_INTERFACE_MODE_SGMII:
|
|
|
+@@ -576,6 +658,10 @@ static int ipq_pcs_validate(struct phyli
|
|
|
case PHY_INTERFACE_MODE_QSGMII:
|
|
|
+ case PHY_INTERFACE_MODE_10GBASER:
|
|
|
return 0;
|
|
|
+ case PHY_INTERFACE_MODE_2500BASEX:
|
|
|
+ /* In-band autoneg is not supported for 2500BASEX */
|
|
|
@@ -161,7 +161,7 @@ Signed-off-by: Alexandru Gagniuc <[email protected]>
|
|
|
case PHY_INTERFACE_MODE_USXGMII:
|
|
|
/* USXGMII only supports full duplex mode */
|
|
|
phylink_clear(supported, 100baseT_Half);
|
|
|
-@@ -645,6 +731,9 @@ static void ipq_pcs_get_state(struct phy
|
|
|
+@@ -647,6 +733,9 @@ static void ipq_pcs_get_state(struct phy
|
|
|
case PHY_INTERFACE_MODE_PSGMII:
|
|
|
ipq_pcs_get_state_sgmii(qpcs, index, state);
|
|
|
break;
|
|
|
@@ -171,7 +171,7 @@ Signed-off-by: Alexandru Gagniuc <[email protected]>
|
|
|
case PHY_INTERFACE_MODE_USXGMII:
|
|
|
ipq_pcs_get_state_usxgmii(qpcs, state);
|
|
|
break;
|
|
|
-@@ -678,6 +767,8 @@ static int ipq_pcs_config(struct phylink
|
|
|
+@@ -680,6 +769,8 @@ static int ipq_pcs_config(struct phylink
|
|
|
case PHY_INTERFACE_MODE_QSGMII:
|
|
|
case PHY_INTERFACE_MODE_PSGMII:
|
|
|
return ipq_pcs_config_sgmii(qpcs, index, neg_mode, interface);
|
|
|
@@ -180,7 +180,7 @@ Signed-off-by: Alexandru Gagniuc <[email protected]>
|
|
|
case PHY_INTERFACE_MODE_USXGMII:
|
|
|
return ipq_pcs_config_usxgmii(qpcs);
|
|
|
case PHY_INTERFACE_MODE_10GBASER:
|
|
|
-@@ -710,6 +801,9 @@ static void ipq_pcs_link_up(struct phyli
|
|
|
+@@ -712,6 +803,9 @@ static void ipq_pcs_link_up(struct phyli
|
|
|
ret = ipq_pcs_link_up_config_sgmii(qpcs, index,
|
|
|
neg_mode, speed);
|
|
|
break;
|
|
|
@@ -190,3 +190,11 @@ Signed-off-by: Alexandru Gagniuc <[email protected]>
|
|
|
case PHY_INTERFACE_MODE_USXGMII:
|
|
|
ret = ipq_pcs_link_up_config_usxgmii(qpcs, speed);
|
|
|
break;
|
|
|
+@@ -785,6 +879,7 @@ static int ipq_pcs_create_miis(struct ip
|
|
|
+ static unsigned long ipq_pcs_clk_rate_get(struct ipq_pcs *qpcs)
|
|
|
+ {
|
|
|
+ switch (qpcs->interface) {
|
|
|
++ case PHY_INTERFACE_MODE_2500BASEX:
|
|
|
+ case PHY_INTERFACE_MODE_USXGMII:
|
|
|
+ case PHY_INTERFACE_MODE_10GBASER:
|
|
|
+ return 312500000;
|