@@ -849,6 +849,38 @@ static void stmmac_validate(struct phylink_config *config,
849
849
phylink_set (mac_supported , 10000b aseKX4_Full );
850
850
phylink_set (mac_supported , 10000b aseKR_Full );
851
851
}
852
+ if (!max_speed || (max_speed >= 25000 )) {
853
+ phylink_set (mac_supported , 25000b aseCR_Full );
854
+ phylink_set (mac_supported , 25000b aseKR_Full );
855
+ phylink_set (mac_supported , 25000b aseSR_Full );
856
+ }
857
+ if (!max_speed || (max_speed >= 40000 )) {
858
+ phylink_set (mac_supported , 40000b aseKR4_Full );
859
+ phylink_set (mac_supported , 40000b aseCR4_Full );
860
+ phylink_set (mac_supported , 40000b aseSR4_Full );
861
+ phylink_set (mac_supported , 40000b aseLR4_Full );
862
+ }
863
+ if (!max_speed || (max_speed >= 50000 )) {
864
+ phylink_set (mac_supported , 50000b aseCR2_Full );
865
+ phylink_set (mac_supported , 50000b aseKR2_Full );
866
+ phylink_set (mac_supported , 50000b aseSR2_Full );
867
+ phylink_set (mac_supported , 50000b aseKR_Full );
868
+ phylink_set (mac_supported , 50000b aseSR_Full );
869
+ phylink_set (mac_supported , 50000b aseCR_Full );
870
+ phylink_set (mac_supported , 50000b aseLR_ER_FR_Full );
871
+ phylink_set (mac_supported , 50000b aseDR_Full );
872
+ }
873
+ if (!max_speed || (max_speed >= 100000 )) {
874
+ phylink_set (mac_supported , 100000b aseKR4_Full );
875
+ phylink_set (mac_supported , 100000b aseSR4_Full );
876
+ phylink_set (mac_supported , 100000b aseCR4_Full );
877
+ phylink_set (mac_supported , 100000b aseLR4_ER4_Full );
878
+ phylink_set (mac_supported , 100000b aseKR2_Full );
879
+ phylink_set (mac_supported , 100000b aseSR2_Full );
880
+ phylink_set (mac_supported , 100000b aseCR2_Full );
881
+ phylink_set (mac_supported , 100000b aseLR2_ER2_FR2_Full );
882
+ phylink_set (mac_supported , 100000b aseDR2_Full );
883
+ }
852
884
}
853
885
854
886
/* Half-Duplex can only work with single queue */
@@ -929,6 +961,32 @@ static void stmmac_mac_link_up(struct phylink_config *config,
929
961
default :
930
962
return ;
931
963
}
964
+ } else if (interface == PHY_INTERFACE_MODE_XLGMII ) {
965
+ switch (speed ) {
966
+ case SPEED_100000 :
967
+ ctrl |= priv -> hw -> link .xlgmii .speed100000 ;
968
+ break ;
969
+ case SPEED_50000 :
970
+ ctrl |= priv -> hw -> link .xlgmii .speed50000 ;
971
+ break ;
972
+ case SPEED_40000 :
973
+ ctrl |= priv -> hw -> link .xlgmii .speed40000 ;
974
+ break ;
975
+ case SPEED_25000 :
976
+ ctrl |= priv -> hw -> link .xlgmii .speed25000 ;
977
+ break ;
978
+ case SPEED_10000 :
979
+ ctrl |= priv -> hw -> link .xgmii .speed10000 ;
980
+ break ;
981
+ case SPEED_2500 :
982
+ ctrl |= priv -> hw -> link .speed2500 ;
983
+ break ;
984
+ case SPEED_1000 :
985
+ ctrl |= priv -> hw -> link .speed1000 ;
986
+ break ;
987
+ default :
988
+ return ;
989
+ }
932
990
} else {
933
991
switch (speed ) {
934
992
case SPEED_2500 :
0 commit comments