Skip to content

Commit 06c5c91

Browse files
grygoriySdavem330
authored andcommitted
net: ethernet: ti: ale: add support for multi port k3 cpsw versions
The TI J721E (CPSW9g) ALE version is similar, in general, to Sitara AM3/4/5 CPSW ALE, but has more extended functions and different ALE VLAN entry format. This patch adds support for for multi port TI J721E (CPSW9g) ALE variant. Signed-off-by: Grygorii Strashko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aa61296 commit 06c5c91

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/net/ethernet/ti/cpsw_ale.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ static const struct ale_entry_fld vlan_entry_nu[ALE_ENT_VID_LAST] = {
191191
ALE_ENTRY_FLD(ALE_ENT_VID_REG_MCAST_IDX, 44, 3),
192192
};
193193

194+
/* K3 j721e/j7200 cpsw9g/5g, am64x cpsw3g */
195+
static const struct ale_entry_fld vlan_entry_k3_cpswxg[] = {
196+
ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_MEMBER_LIST, 0),
197+
ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_UNREG_MCAST_MSK, 12),
198+
ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_FORCE_UNTAGGED_MSK, 24),
199+
ALE_ENTRY_FLD_DYN_MSK_SIZE(ALE_ENT_VID_REG_MCAST_MSK, 36),
200+
};
201+
194202
DEFINE_ALE_FIELD(entry_type, 60, 2)
195203
DEFINE_ALE_FIELD(vlan_id, 48, 12)
196204
DEFINE_ALE_FIELD(mcast_state, 62, 2)
@@ -1213,6 +1221,12 @@ static const struct cpsw_ale_dev_id cpsw_ale_id_match[] = {
12131221
.nu_switch_ale = true,
12141222
.vlan_entry_tbl = vlan_entry_nu,
12151223
},
1224+
{
1225+
.dev_id = "j721e-cpswxg",
1226+
.features = CPSW_ALE_F_STATUS_REG | CPSW_ALE_F_HW_AUTOAGING,
1227+
.major_ver_mask = 0x7,
1228+
.vlan_entry_tbl = vlan_entry_k3_cpswxg,
1229+
},
12161230
{ },
12171231
};
12181232

0 commit comments

Comments
 (0)