|
23 | 23 |
|
24 | 24 | --- a/drivers/net/dsa/mt7530.c
|
25 | 25 | +++ b/drivers/net/dsa/mt7530.c
|
26 |
| -@@ -2660,6 +2660,32 @@ mt7531_setup(struct dsa_switch *ds) |
| 26 | +@@ -2687,6 +2687,32 @@ mt7531_setup(struct dsa_switch *ds) |
27 | 27 | return 0;
|
28 | 28 | }
|
29 | 29 |
|
|
56 | 56 | static bool
|
57 | 57 | mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
|
58 | 58 | const struct phylink_link_state *state)
|
59 |
| -@@ -2696,6 +2722,37 @@ static bool mt7531_is_rgmii_port(struct |
| 59 | +@@ -2723,6 +2749,37 @@ static bool mt7531_is_rgmii_port(struct |
60 | 60 | return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
|
61 | 61 | }
|
62 | 62 |
|
|
94 | 94 | static bool
|
95 | 95 | mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
|
96 | 96 | const struct phylink_link_state *state)
|
97 |
| -@@ -3172,6 +3229,18 @@ mt7531_cpu_port_config(struct dsa_switch |
| 97 | +@@ -3199,6 +3256,18 @@ mt7531_cpu_port_config(struct dsa_switch |
98 | 98 | return 0;
|
99 | 99 | }
|
100 | 100 |
|
|
113 | 113 | static void
|
114 | 114 | mt7530_mac_port_validate(struct dsa_switch *ds, int port,
|
115 | 115 | unsigned long *supported)
|
116 |
| -@@ -3407,6 +3476,7 @@ static const struct dsa_switch_ops mt753 |
| 116 | +@@ -3435,6 +3504,7 @@ static const struct dsa_switch_ops mt753 |
117 | 117 | .port_vlan_del = mt7530_port_vlan_del,
|
118 | 118 | .port_mirror_add = mt753x_port_mirror_add,
|
119 | 119 | .port_mirror_del = mt753x_port_mirror_del,
|
120 | 120 | + .phylink_get_caps = mt753x_phylink_get_caps,
|
121 | 121 | .phylink_validate = mt753x_phylink_validate,
|
122 | 122 | .phylink_mac_link_state = mt753x_phylink_mac_link_state,
|
123 | 123 | .phylink_mac_config = mt753x_phylink_mac_config,
|
124 |
| -@@ -3424,6 +3494,7 @@ static const struct mt753x_info mt753x_t |
| 124 | +@@ -3452,6 +3522,7 @@ static const struct mt753x_info mt753x_t |
125 | 125 | .phy_read = mt7530_phy_read,
|
126 | 126 | .phy_write = mt7530_phy_write,
|
127 | 127 | .pad_setup = mt7530_pad_clk_setup,
|
128 | 128 | + .mac_port_get_caps = mt7530_mac_port_get_caps,
|
129 | 129 | .phy_mode_supported = mt7530_phy_mode_supported,
|
130 | 130 | .mac_port_validate = mt7530_mac_port_validate,
|
131 | 131 | .mac_port_get_state = mt7530_phylink_mac_link_state,
|
132 |
| -@@ -3435,6 +3506,7 @@ static const struct mt753x_info mt753x_t |
| 132 | +@@ -3463,6 +3534,7 @@ static const struct mt753x_info mt753x_t |
133 | 133 | .phy_read = mt7530_phy_read,
|
134 | 134 | .phy_write = mt7530_phy_write,
|
135 | 135 | .pad_setup = mt7530_pad_clk_setup,
|
136 | 136 | + .mac_port_get_caps = mt7530_mac_port_get_caps,
|
137 | 137 | .phy_mode_supported = mt7530_phy_mode_supported,
|
138 | 138 | .mac_port_validate = mt7530_mac_port_validate,
|
139 | 139 | .mac_port_get_state = mt7530_phylink_mac_link_state,
|
140 |
| -@@ -3447,6 +3519,7 @@ static const struct mt753x_info mt753x_t |
| 140 | +@@ -3475,6 +3547,7 @@ static const struct mt753x_info mt753x_t |
141 | 141 | .phy_write = mt7531_ind_phy_write,
|
142 | 142 | .pad_setup = mt7531_pad_setup,
|
143 | 143 | .cpu_port_config = mt7531_cpu_port_config,
|
144 | 144 | + .mac_port_get_caps = mt7531_mac_port_get_caps,
|
145 | 145 | .phy_mode_supported = mt7531_phy_mode_supported,
|
146 | 146 | .mac_port_validate = mt7531_mac_port_validate,
|
147 | 147 | .mac_port_get_state = mt7531_phylink_mac_link_state,
|
148 |
| -@@ -3509,6 +3582,7 @@ mt7530_probe(struct mdio_device *mdiodev |
| 148 | +@@ -3537,6 +3610,7 @@ mt7530_probe(struct mdio_device *mdiodev |
149 | 149 | */
|
150 | 150 | if (!priv->info->sw_setup || !priv->info->pad_setup ||
|
151 | 151 | !priv->info->phy_read || !priv->info->phy_write ||
|
|
155 | 155 | !priv->info->mac_port_get_state || !priv->info->mac_port_config)
|
156 | 156 | --- a/drivers/net/dsa/mt7530.h
|
157 | 157 | +++ b/drivers/net/dsa/mt7530.h
|
158 |
| -@@ -801,6 +801,8 @@ struct mt753x_info { |
| 158 | +@@ -807,6 +807,8 @@ struct mt753x_info { |
159 | 159 | int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
|
160 | 160 | int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
|
161 | 161 | int (*cpu_port_config)(struct dsa_switch *ds, int port);
|
|
0 commit comments