Skip to content

Commit 514957f

Browse files
committed
stmmac: intel: Update PCH PTP clock rate from 200MHz to 204.8MHz
Author: "Tan, Tee Min" <tee.min.tan@intel.com> Current Intel platform has an output of ~976ms interval when probed on 1 Pulse-per-Second(PPS) hardware pin. The correct PTP clock frequency for PCH GbE should be 204.8MHz instead of 200MHz. PSE GbE PTP clock rate remains at 200MHz. Fixes: 58da0cf ("net: stmmac: create dwmac-intel.c to contain all Intel platform") Signed-off-by: Ling Pei Lee <pei.lee.ling@intel.com> Signed-off-by: Tan, Tee Min <tee.min.tan@intel.com> Signed-off-by: Voon Weifeng <weifeng.voon@intel.com> Signed-off-by: Gan Yi Fang <yi.fang.gan@intel.com> Link: https://lore.kernel.org/r/20221108020811.12919-1-yi.fang.gan@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> (cherry picked from commit dcea1a8) Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2100606 Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
1 parent 84301f9 commit 514957f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,6 @@ static int ehl_common_data(struct pci_dev *pdev,
629629
{
630630
plat->rx_queues_to_use = 8;
631631
plat->tx_queues_to_use = 8;
632-
plat->clk_ptp_rate = 200000000;
633632
plat->use_phy_wol = 1;
634633

635634
plat->safety_feat_cfg->tsoee = 1;
@@ -654,6 +653,8 @@ static int ehl_sgmii_data(struct pci_dev *pdev,
654653
plat->serdes_powerup = intel_serdes_powerup;
655654
plat->serdes_powerdown = intel_serdes_powerdown;
656655

656+
plat->clk_ptp_rate = 204800000;
657+
657658
return ehl_common_data(pdev, plat);
658659
}
659660

@@ -667,6 +668,8 @@ static int ehl_rgmii_data(struct pci_dev *pdev,
667668
plat->bus_id = 1;
668669
plat->phy_interface = PHY_INTERFACE_MODE_RGMII;
669670

671+
plat->clk_ptp_rate = 204800000;
672+
670673
return ehl_common_data(pdev, plat);
671674
}
672675

@@ -683,6 +686,8 @@ static int ehl_pse0_common_data(struct pci_dev *pdev,
683686
plat->bus_id = 2;
684687
plat->addr64 = 32;
685688

689+
plat->clk_ptp_rate = 200000000;
690+
686691
intel_mgbe_pse_crossts_adj(intel_priv, EHL_PSE_ART_MHZ);
687692

688693
return ehl_common_data(pdev, plat);
@@ -722,6 +727,8 @@ static int ehl_pse1_common_data(struct pci_dev *pdev,
722727
plat->bus_id = 3;
723728
plat->addr64 = 32;
724729

730+
plat->clk_ptp_rate = 200000000;
731+
725732
intel_mgbe_pse_crossts_adj(intel_priv, EHL_PSE_ART_MHZ);
726733

727734
return ehl_common_data(pdev, plat);
@@ -757,7 +764,7 @@ static int tgl_common_data(struct pci_dev *pdev,
757764
{
758765
plat->rx_queues_to_use = 6;
759766
plat->tx_queues_to_use = 4;
760-
plat->clk_ptp_rate = 200000000;
767+
plat->clk_ptp_rate = 204800000;
761768
plat->speed_mode_2500 = intel_speed_mode_2500;
762769

763770
plat->safety_feat_cfg->tsoee = 1;

0 commit comments

Comments
 (0)