[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aKx+h+WEyjE23UwO@lizhi-Precision-Tower-5810>
Date: Mon, 25 Aug 2025 11:17:27 -0400
From: Frank Li <Frank.li@....com>
To: Wei Fang <wei.fang@....com>
Cc: robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
richardcochran@...il.com, claudiu.manoil@....com,
vladimir.oltean@....com, xiaoning.wang@....com,
andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, vadim.fedorenko@...ux.dev,
shawnguo@...nel.org, s.hauer@...gutronix.de, festevam@...il.com,
fushi.peng@....com, devicetree@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
imx@...ts.linux.dev, kernel@...gutronix.de
Subject: Re: [PATCH v5 net-next 13/15] net: enetc: add PTP synchronization
support for ENETC v4
On Mon, Aug 25, 2025 at 12:15:30PM +0800, Wei Fang wrote:
> Regarding PTP, ENETC v4 has some changes compared to ENETC v1 (LS1028A),
> mainly as follows.
>
> 1. ENETC v4 uses a different PTP driver, so the way to get phc_index is
> different from LS1028A. Therefore, enetc_get_ts_info() has been modified
> appropriately to be compatible with ENETC v1 and v4.
>
> 2. Move sync packet content modification before dma_map_single() to
> follow correct DMA usage process, even though the previous sequence
> worked due to hardware DMA-coherence support (LS1028A). But For i.MX95
> (ENETC v4), it does not support "dma-coherent", so this step is very
> necessary. Otherwise, the originTimestamp and correction fields of the
> sent packets will still be the values before the modification.
>
I think it is wonth to create seperate patch for it, put it before this
patch.
> 3. The PMa_SINGLE_STEP register has changed in ENETC v4, not only the
> register offset, but also some register fields. Therefore, two helper
> functions are added, enetc_set_one_step_ts() for ENETC v1 and
> enetc4_set_one_step_ts() for ENETC v4.
>
> 4. Since the generic helper functions from ptp_clock are used to get
> the PHC index of the PTP clock, so FSL_ENETC_CORE depends on Kconfig
> symbol "PTP_1588_CLOCK_OPTIONAL". But FSL_ENETC_CORE can only be
> selected, so add the dependency to FSL_ENETC, FSL_ENETC_VF and
> NXP_ENETC4. Perhaps the best approach would be to change FSL_ENETC_CORE
> to a visible menu entry. Then make FSL_ENETC, FSL_ENETC_VF, and
> NXP_ENETC4 depend on it, but this is not the goal of this patch, so this
> may be changed in the future.
select PTP_1588_CLOCK_OPTIONAL in kconfig will simple this?
Frank
>
> Signed-off-by: Wei Fang <wei.fang@....com>
>
> ---
> v5 changes:
> Fix the typo in commit message, 'sysbol' -> 'symbol'
> v4 changes:
> 1. Remove enetc4_get_timer_pdev() and enetc4_get_default_timer_pdev(),
> and add enetc4_get_phc_index_by_pdev() and enetc4_get_phc_index().
> 2. Add "PTP_1588_CLOCK_OPTIONAL" dependency, and add the description
> of this modification to the commit message.
> v3 changes:
> 1. Change CONFIG_PTP_1588_CLOCK_NETC to CONFIG_PTP_NETC_V4_TIMER
> 2. Change "nxp,netc-timer" to "ptp-timer"
> v2 changes:
> 1. Move the definition of enetc_ptp_clock_is_enabled() to resolve build
> errors.
> 2. Add parsing of "nxp,netc-timer" property to get PCIe device of NETC
> Timer.
> ---
...
> --
> 2.34.1
>
Powered by blists - more mailing lists