nvethernet: update UPHY GBE mode with DT/sysfs

Bug 3288030

Change-Id: Id700c2b074c3fd8968ac632e84d7cdc0d75d1e32
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2531233
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
This commit is contained in:
Bhadram Varka
2021-05-03 22:36:28 +05:30
committed by Revanth Kumar Uppala
parent 38e18d40ec
commit af92743699
2 changed files with 79 additions and 0 deletions

View File

@@ -5028,6 +5028,14 @@ static int ether_parse_dt(struct ether_priv_data *pdata)
return -EINVAL;
}
ret = of_property_read_u32(np, "nvidia,uphy-gbe-mode",
&osi_core->uphy_gbe_mode);
if (ret < 0) {
dev_info(dev,
"failed to read UPHY GBE mode - default to 10G\n");
osi_core->uphy_gbe_mode = OSI_ENABLE;
}
/* Enable VLAN strip by default */
osi_core->strip_vlan_tag = OSI_ENABLE;