net: dsa: sja1105: add a translation table for port speeds
In order to support the new speed of 2500Mbps, the SJA1110 has achieved the great performance of changing the encoding in the MAC Configuration Table for the port speeds of 10, 100, 1000 compared to SJA1105. Because this is a common driver, we need a layer of indirection in order to program the hardware with the right values irrespective of switch generation. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
91a050782c
commit
41fed17fdb
@@ -482,6 +482,13 @@ const struct sja1105_info sja1105e_info = {
|
||||
.ptp_cmd_packing = sja1105et_ptp_cmd_packing,
|
||||
.clocking_setup = sja1105_clocking_setup,
|
||||
.regs = &sja1105et_regs,
|
||||
.port_speed = {
|
||||
[SJA1105_SPEED_AUTO] = 0,
|
||||
[SJA1105_SPEED_10MBPS] = 3,
|
||||
[SJA1105_SPEED_100MBPS] = 2,
|
||||
[SJA1105_SPEED_1000MBPS] = 1,
|
||||
[SJA1105_SPEED_2500MBPS] = 0, /* Not supported */
|
||||
},
|
||||
.supports_mii = {true, true, true, true, true},
|
||||
.supports_rmii = {true, true, true, true, true},
|
||||
.supports_rgmii = {true, true, true, true, true},
|
||||
@@ -505,6 +512,13 @@ const struct sja1105_info sja1105t_info = {
|
||||
.ptp_cmd_packing = sja1105et_ptp_cmd_packing,
|
||||
.clocking_setup = sja1105_clocking_setup,
|
||||
.regs = &sja1105et_regs,
|
||||
.port_speed = {
|
||||
[SJA1105_SPEED_AUTO] = 0,
|
||||
[SJA1105_SPEED_10MBPS] = 3,
|
||||
[SJA1105_SPEED_100MBPS] = 2,
|
||||
[SJA1105_SPEED_1000MBPS] = 1,
|
||||
[SJA1105_SPEED_2500MBPS] = 0, /* Not supported */
|
||||
},
|
||||
.supports_mii = {true, true, true, true, true},
|
||||
.supports_rmii = {true, true, true, true, true},
|
||||
.supports_rgmii = {true, true, true, true, true},
|
||||
@@ -529,6 +543,13 @@ const struct sja1105_info sja1105p_info = {
|
||||
.ptp_cmd_packing = sja1105pqrs_ptp_cmd_packing,
|
||||
.clocking_setup = sja1105_clocking_setup,
|
||||
.regs = &sja1105pqrs_regs,
|
||||
.port_speed = {
|
||||
[SJA1105_SPEED_AUTO] = 0,
|
||||
[SJA1105_SPEED_10MBPS] = 3,
|
||||
[SJA1105_SPEED_100MBPS] = 2,
|
||||
[SJA1105_SPEED_1000MBPS] = 1,
|
||||
[SJA1105_SPEED_2500MBPS] = 0, /* Not supported */
|
||||
},
|
||||
.supports_mii = {true, true, true, true, true},
|
||||
.supports_rmii = {true, true, true, true, true},
|
||||
.supports_rgmii = {true, true, true, true, true},
|
||||
@@ -553,6 +574,13 @@ const struct sja1105_info sja1105q_info = {
|
||||
.ptp_cmd_packing = sja1105pqrs_ptp_cmd_packing,
|
||||
.clocking_setup = sja1105_clocking_setup,
|
||||
.regs = &sja1105pqrs_regs,
|
||||
.port_speed = {
|
||||
[SJA1105_SPEED_AUTO] = 0,
|
||||
[SJA1105_SPEED_10MBPS] = 3,
|
||||
[SJA1105_SPEED_100MBPS] = 2,
|
||||
[SJA1105_SPEED_1000MBPS] = 1,
|
||||
[SJA1105_SPEED_2500MBPS] = 0, /* Not supported */
|
||||
},
|
||||
.supports_mii = {true, true, true, true, true},
|
||||
.supports_rmii = {true, true, true, true, true},
|
||||
.supports_rgmii = {true, true, true, true, true},
|
||||
@@ -577,6 +605,13 @@ const struct sja1105_info sja1105r_info = {
|
||||
.ptp_cmd_packing = sja1105pqrs_ptp_cmd_packing,
|
||||
.clocking_setup = sja1105_clocking_setup,
|
||||
.regs = &sja1105pqrs_regs,
|
||||
.port_speed = {
|
||||
[SJA1105_SPEED_AUTO] = 0,
|
||||
[SJA1105_SPEED_10MBPS] = 3,
|
||||
[SJA1105_SPEED_100MBPS] = 2,
|
||||
[SJA1105_SPEED_1000MBPS] = 1,
|
||||
[SJA1105_SPEED_2500MBPS] = 0, /* Not supported */
|
||||
},
|
||||
.supports_mii = {true, true, true, true, true},
|
||||
.supports_rmii = {true, true, true, true, true},
|
||||
.supports_rgmii = {true, true, true, true, true},
|
||||
@@ -602,6 +637,13 @@ const struct sja1105_info sja1105s_info = {
|
||||
.fdb_del_cmd = sja1105pqrs_fdb_del,
|
||||
.ptp_cmd_packing = sja1105pqrs_ptp_cmd_packing,
|
||||
.clocking_setup = sja1105_clocking_setup,
|
||||
.port_speed = {
|
||||
[SJA1105_SPEED_AUTO] = 0,
|
||||
[SJA1105_SPEED_10MBPS] = 3,
|
||||
[SJA1105_SPEED_100MBPS] = 2,
|
||||
[SJA1105_SPEED_1000MBPS] = 1,
|
||||
[SJA1105_SPEED_2500MBPS] = 0, /* Not supported */
|
||||
},
|
||||
.supports_mii = {true, true, true, true, true},
|
||||
.supports_rmii = {true, true, true, true, true},
|
||||
.supports_rgmii = {true, true, true, true, true},
|
||||
|
||||
Reference in New Issue
Block a user