Re: [PATCH net-next v5 11/11] net: ti: prueth: Adds PTP OC Support for AM335x and AM437x

Simon Horman
2025-04-15T20:16:01Z

On Mon, Apr 14, 2025 at 07:37:51PM +0530, Parvathi Pudi wrote:
> From: Roger Quadros <rogerq@ti.com>
>
> PRU-ICSS IEP module, which is capable of timestamping RX and
> TX packets at HW level, is used for time synchronization by PTP4L.
>
> This change includes interaction between firmware/driver and user
> application (ptp4l) with required packet timestamps.
>
> RX SOF timestamp comes along with packet and firmware will rise
> interrupt with TX SOF timestamp after pushing the packet on to the wire.
>
> IEP driver available in upstream linux as part of ICSSG assumes 64-bit
> timestamp value from firmware.
>
> Enhanced the IEP driver to support the legacy 32-bit timestamp
> conversion to 64-bit timestamp by using 2 fields as below:
> - 32-bit HW timestamp from SOF event in ns
> - Seconds value maintained in driver.
>
> Currently ordinary clock (OC) configuration has been validated with
> Linux ptp4l.
>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Andrew F. Davis <afd@ti.com>
> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>

...

> diff --git a/drivers/net/ethernet/ti/icssg/icss_iep.h b/drivers/net/ethernet/ti/icssg/icss_iep.h
> index 0bdca0155abd..437153350197 100644
> --- a/drivers/net/ethernet/ti/icssg/icss_iep.h
> +++ b/drivers/net/ethernet/ti/icssg/icss_iep.h
> @@ -47,6 +47,11 @@ enum {
> ICSS_IEP_MAX_REGS,
> };
>
> +enum iep_revision {
> + IEP_REV_V1_0 = 0,
> + IEP_REV_V2_1
> +};
> +
> /**
> * struct icss_iep_plat_data - Plat data to handle SoC variants
> * @config: Regmap configuration data
> @@ -57,11 +62,13 @@ struct icss_iep_plat_data {
> const struct regmap_config *config;
> u32 reg_offs[ICSS_IEP_MAX_REGS];
> u32 flags;
> + enum iep_revision iep_rev;
> };

Please add iep_rev to the Kernel doc for struct icss_iep_plat_data.

Flagged by ./scripts/kernel-doc -none

...

> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.h b/drivers/net/ethernet/ti/icssm/icssm_prueth.h

...

> @@ -337,6 +343,7 @@ enum pruss_device {
> struct prueth_private_data {
> enum pruss_device driver_data;
> const struct prueth_firmware fw_pru[PRUSS_NUM_PRUS];
> + enum fw_revision fw_rev;
> bool support_lre;
> bool support_switch;
> };

And, likewise, please add fw_rev to the Kernel doc for struct
prueth_private_data.

...