ethernet: add cali_val item [1/1]

PD#SWPL-120093

Problem:
add cali_val item

Solution:
add cali_val item

Verify:
S928X-AX201-REF(V2+)#327

Change-Id: I253812eeaf114da113299fd5e8787d6951183c8a
Signed-off-by: xiangyang.yan <xiangyang.yan@amlogic.com>
This commit is contained in:
xiangyang.yan
2023-04-19 14:54:21 +08:00
committed by Dongjin Kim
parent 90e1199937
commit 14aafb259d

View File

@@ -436,6 +436,7 @@ static int aml_custom_setting(struct platform_device *pdev, struct meson8b_dwmac
struct device_node *np = pdev->dev.of_node;
struct net_device *ndev = platform_get_drvdata(pdev);
unsigned int mc_val = 0;
unsigned int cali_val = 0;
pr_info("aml_cust_setting\n");
@@ -453,6 +454,13 @@ static int aml_custom_setting(struct platform_device *pdev, struct meson8b_dwmac
pr_info("feature mac_wol\n");
#endif
/*internal_phy 1:inphy;2:exphy; 0 as default*/
if (internal_phy == 2) {
if (of_property_read_u32(np, "cali_val", &cali_val) != 0)
pr_err("set default cali_val as 0\n");
writel(cali_val, dwmac->regs + PRG_ETH1);
}
return 0;
}
#endif