mbox series

[v6,0/5] Introduce IEP driver and packet timestamping support

Message ID 20230823113254.292603-1-danishanwar@ti.com
Headers show
Series Introduce IEP driver and packet timestamping support | expand

Message

MD Danish Anwar Aug. 23, 2023, 11:32 a.m. UTC
This series introduces Industrial Ethernet Peripheral (IEP) driver to
support timestamping of ethernet packets and thus support PTP and PPS
for PRU ICSSG ethernet ports.

This series also adds 10M full duplex support for ICSSG ethernet driver.

There are two IEP instances. IEP0 is used for packet timestamping while IEP1
is used for 10M full duplex support.

This is v6 of the series [v1]. It addresses comments made on [v5].
This series is based on linux-next(#next-20230821).

Changes from v5 to v6:
*) Added description of IEP in commit messages of patch 2 as asked by Rob.
*) Described the items constraints properly for iep property in patch 2 as
   asked by Rob. 

Changes from v4 to v5:
*) Added comments on why we are using readl / writel instead of regmap_read()
   / write() in icss_iep_gettime() / settime() APIs as asked by Roger.

Change from v3 to v4:
*) Changed compatible in iep dt bindings. Now each SoC has their own compatible
   in the binding with "ti,am654-icss-iep" as a fallback as asked by Conor.
*) Addressed Andew's comments and removed helper APIs icss_iep_readl() / 
   writel(). Now the settime/gettime APIs directly use readl() / writel().
*) Moved selecting TI_ICSS_IEP in Kconfig from patch 3 to patch 4.
*) Removed forward declaration of icss_iep_of_match in patch 3.
*) Replaced use of of_device_get_match_data() to device_get_match_data() in
   patch 3.
*) Removed of_match_ptr() from patch 3 as it is not needed.

Changes from v2 to v3:
*) Addressed Roger's comment and moved IEP1 related changes in patch 5.
*) Addressed Roger's comment and moved icss_iep.c / .h changes from patch 4
   to patch 3.
*) Added support for multiple timestamping in patch 4 as asked by Roger.
*) Addressed Andrew's comment and added comment in case SPEED_10 in
   icssg_config_ipg() API.
*) Kept compatible as "ti,am654-icss-iep" for all TI K3 SoCs

Changes from v1 to v2:
*) Addressed Simon's comment to fix reverse xmas tree declaration. Some APIs
   in patch 3 and 4 were not following reverse xmas tree variable declaration.
   Fixed it in this version.
*) Addressed Conor's comments and removed unsupported SoCs from compatible
   comment in patch 1. 
*) Addded patch 2 which was not part of v1. Patch 2, adds IEP node to dt
   bindings for ICSSG.

[v1] https://lore.kernel.org/all/20230803110153.3309577-1-danishanwar@ti.com/
[v2] https://lore.kernel.org/all/20230807110048.2611456-1-danishanwar@ti.com/
[v3] https://lore.kernel.org/all/20230809114906.21866-1-danishanwar@ti.com/
[v4] https://lore.kernel.org/all/20230814100847.3531480-1-danishanwar@ti.com/
[v5] https://lore.kernel.org/all/20230817114527.1585631-1-danishanwar@ti.com/

Thanks and Regards,
Md Danish Anwar

Grygorii Strashko (1):
  net: ti: icssg-prueth: am65x SR2.0 add 10M full duplex support

MD Danish Anwar (2):
  dt-bindings: net: Add ICSS IEP
  dt-bindings: net: Add IEP property in ICSSG

Roger Quadros (2):
  net: ti: icss-iep: Add IEP driver
  net: ti: icssg-prueth: add packet timestamping and ptp support

 .../devicetree/bindings/net/ti,icss-iep.yaml  |  61 ++
 .../bindings/net/ti,icssg-prueth.yaml         |   9 +
 drivers/net/ethernet/ti/Kconfig               |  12 +
 drivers/net/ethernet/ti/Makefile              |   1 +
 drivers/net/ethernet/ti/icssg/icss_iep.c      | 965 ++++++++++++++++++
 drivers/net/ethernet/ti/icssg/icss_iep.h      |  41 +
 drivers/net/ethernet/ti/icssg/icssg_config.c  |   7 +
 drivers/net/ethernet/ti/icssg/icssg_ethtool.c |  21 +
 drivers/net/ethernet/ti/icssg/icssg_prueth.c  | 451 +++++++-
 drivers/net/ethernet/ti/icssg/icssg_prueth.h  |  28 +-
 10 files changed, 1588 insertions(+), 8 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/ti,icss-iep.yaml
 create mode 100644 drivers/net/ethernet/ti/icssg/icss_iep.c
 create mode 100644 drivers/net/ethernet/ti/icssg/icss_iep.h

Comments

Krzysztof Kozlowski Aug. 24, 2023, 6:45 a.m. UTC | #1
On 23/08/2023 13:32, MD Danish Anwar wrote:
> Add IEP property in ICSSG hardware DT binding document.
> ICSSG uses IEP (Industrial Ethernet Peripheral) to support timestamping
> of ethernet packets, PTP and PPS.
> 
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Where? Please provide link.

> Reviewed-by: Roger Quadros <rogerq@kernel.org>

Where? Please provide link.

> Reviewed-by: Simon Horman <horms@kernel.org>

Where? Please provide link.

Otherwise all of them look like fake ways to sneak patches into the
kernel. Our work here depends a lot on the trust. Trust once lost, is
tricky to get back.

> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
> ---


Best regards,
Krzysztof
Anwar, Md Danish Aug. 24, 2023, 6:51 a.m. UTC | #2
On 24/08/23 12:15 pm, Krzysztof Kozlowski wrote:
> On 23/08/2023 13:32, MD Danish Anwar wrote:
>> Add IEP property in ICSSG hardware DT binding document.
>> ICSSG uses IEP (Industrial Ethernet Peripheral) to support timestamping
>> of ethernet packets, PTP and PPS.
>>
>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> 
> Where? Please provide link.
> 

https://lore.kernel.org/all/20230814-quarters-cahoots-1fbd583baad9@spud/

>> Reviewed-by: Roger Quadros <rogerq@kernel.org>
> 
> Where? Please provide link.

https://lore.kernel.org/all/5d077342-435f-2829-ba2a-cdf763b6b8e1@kernel.org/

> 
>> Reviewed-by: Simon Horman <horms@kernel.org>
> 
> Where? Please provide link.

https://lore.kernel.org/all/ZN9aSTUOT+SKESQS@vergenet.net/

> 
> Otherwise all of them look like fake ways to sneak patches into the
> kernel. Our work here depends a lot on the trust. Trust once lost, is
> tricky to get back.
> 

It's not fake. They provided they RB tags, after that while preparing next
revision I use b4 to get all the tags and apply to applicable patches. I know
trust is important and I won't do such things like faking tags. They gave their
tags in v4 and v5, you must have missed those probably.

>> Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
>> ---
> 
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski Aug. 24, 2023, 6:52 a.m. UTC | #3
On 24/08/2023 08:51, Md Danish Anwar wrote:
> On 24/08/23 12:15 pm, Krzysztof Kozlowski wrote:
>> On 23/08/2023 13:32, MD Danish Anwar wrote:
>>> Add IEP property in ICSSG hardware DT binding document.
>>> ICSSG uses IEP (Industrial Ethernet Peripheral) to support timestamping
>>> of ethernet packets, PTP and PPS.
>>>
>>> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
>>
>> Where? Please provide link.
>>
> 
> https://lore.kernel.org/all/20230814-quarters-cahoots-1fbd583baad9@spud/
> 
>>> Reviewed-by: Roger Quadros <rogerq@kernel.org>
>>
>> Where? Please provide link.
> 
> https://lore.kernel.org/all/5d077342-435f-2829-ba2a-cdf763b6b8e1@kernel.org/
> 
>>
>>> Reviewed-by: Simon Horman <horms@kernel.org>
>>
>> Where? Please provide link.
> 
> https://lore.kernel.org/all/ZN9aSTUOT+SKESQS@vergenet.net/
> 
>>
>> Otherwise all of them look like fake ways to sneak patches into the
>> kernel. Our work here depends a lot on the trust. Trust once lost, is
>> tricky to get back.
>>
> 
> It's not fake. They provided they RB tags, after that while preparing next
> revision I use b4 to get all the tags and apply to applicable patches. I know
> trust is important and I won't do such things like faking tags. They gave their
> tags in v4 and v5, you must have missed those probably.
> 

Yes, I missed that while searching. Sorry for the noise and questions.
Thank you for providing the links.

Best regards,
Krzysztof