mbox series

[v2,0/8] Hirschmann Hellcreek DSA driver

Message ID 20200723081714.16005-1-kurt@linutronix.de
Headers show
Series Hirschmann Hellcreek DSA driver | expand

Message

Kurt Kanzenbach July 23, 2020, 8:17 a.m. UTC
Hi,

this series adds a DSA driver for the Hirschmann Hellcreek TSN switch
IP. Characteristics of that IP:

 * Full duplex Ethernet interface at 100/1000 Mbps on three ports
 * IEEE 802.1Q-compliant Ethernet Switch
 * IEEE 802.1Qbv Time-Aware scheduling support
 * IEEE 1588 and IEEE 802.1AS support

That IP is used e.g. in

 https://www.arrow.com/en/campaigns/arrow-kairos

Due to the hardware setup the switch driver is implemented using DSA. A special
tagging protocol is leveraged. Furthermore, this driver supports PTP, hardware
timestamping and TAPRIO offloading.

This work is part of the AccessTSN project: https://www.accesstsn.com/

The previous versions can be found here:

 * https://lkml.kernel.org/netdev/20200618064029.32168-1-kurt@linutronix.de/
 * https://lkml.kernel.org/netdev/20200710113611.3398-1-kurt@linutronix.de/

This series depends on:

 * https://lkml.kernel.org/netdev/20200723074946.14253-1-kurt@linutronix.de/

Changes since v1:

 * Code simplifications (Florian Fainelli, Vladimir Oltean)
 * Fix issues with hellcreek.yaml bindings (Florian Fainelli)
 * Clear reserved field in ptp v2 event messages (Richard Cochran)
 * Make use of generic ptp parsing function (Richard Cochran, Vladimir Oltean)
 * Fix Kconfig (Florian Fainelli)
 * Add tags (Florian Fainelli, Rob Herring, Richard Cochran) 

I didn't change the bridge/tagging setup, as I didn't find a better way to do it.

Kamil Alkhouri (2):
  net: dsa: hellcreek: Add PTP clock support
  net: dsa: hellcreek: Add support for hardware timestamping

Kurt Kanzenbach (6):
  net: dsa: Add tag handling for Hirschmann Hellcreek switches
  net: dsa: Add DSA driver for Hirschmann Hellcreek switches
  net: dsa: hellcreek: Add TAPRIO offloading support
  net: dsa: hellcreek: Add PTP status LEDs
  dt-bindings: Add vendor prefix for Hirschmann
  dt-bindings: net: dsa: Add documentation for Hellcreek switches

 .../bindings/net/dsa/hellcreek.yaml           |  126 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |    2 +
 drivers/net/dsa/Kconfig                       |    2 +
 drivers/net/dsa/Makefile                      |    1 +
 drivers/net/dsa/hirschmann/Kconfig            |   10 +
 drivers/net/dsa/hirschmann/Makefile           |    5 +
 drivers/net/dsa/hirschmann/hellcreek.c        | 1551 +++++++++++++++++
 drivers/net/dsa/hirschmann/hellcreek.h        |  301 ++++
 .../net/dsa/hirschmann/hellcreek_hwtstamp.c   |  479 +++++
 .../net/dsa/hirschmann/hellcreek_hwtstamp.h   |   58 +
 drivers/net/dsa/hirschmann/hellcreek_ptp.c    |  452 +++++
 drivers/net/dsa/hirschmann/hellcreek_ptp.h    |   76 +
 include/net/dsa.h                             |    2 +
 net/dsa/Kconfig                               |    6 +
 net/dsa/Makefile                              |    1 +
 net/dsa/tag_hellcreek.c                       |  101 ++
 16 files changed, 3173 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/dsa/hellcreek.yaml
 create mode 100644 drivers/net/dsa/hirschmann/Kconfig
 create mode 100644 drivers/net/dsa/hirschmann/Makefile
 create mode 100644 drivers/net/dsa/hirschmann/hellcreek.c
 create mode 100644 drivers/net/dsa/hirschmann/hellcreek.h
 create mode 100644 drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c
 create mode 100644 drivers/net/dsa/hirschmann/hellcreek_hwtstamp.h
 create mode 100644 drivers/net/dsa/hirschmann/hellcreek_ptp.c
 create mode 100644 drivers/net/dsa/hirschmann/hellcreek_ptp.h
 create mode 100644 net/dsa/tag_hellcreek.c

Comments

Jakub Kicinski July 23, 2020, 4:33 p.m. UTC | #1
On Thu, 23 Jul 2020 10:17:06 +0200 Kurt Kanzenbach wrote:
> Hi,
> 
> this series adds a DSA driver for the Hirschmann Hellcreek TSN switch
> IP. Characteristics of that IP:
> 
>  * Full duplex Ethernet interface at 100/1000 Mbps on three ports
>  * IEEE 802.1Q-compliant Ethernet Switch
>  * IEEE 802.1Qbv Time-Aware scheduling support
>  * IEEE 1588 and IEEE 802.1AS support
> 
> That IP is used e.g. in
> 
>  https://www.arrow.com/en/campaigns/arrow-kairos
> 
> Due to the hardware setup the switch driver is implemented using DSA. A special
> tagging protocol is leveraged. Furthermore, this driver supports PTP, hardware
> timestamping and TAPRIO offloading.
> 
> This work is part of the AccessTSN project: https://www.accesstsn.com/
> 
> The previous versions can be found here:
> 
>  * https://lkml.kernel.org/netdev/20200618064029.32168-1-kurt@linutronix.de/
>  * https://lkml.kernel.org/netdev/20200710113611.3398-1-kurt@linutronix.de/
> 
> This series depends on:
> 
>  * https://lkml.kernel.org/netdev/20200723074946.14253-1-kurt@linutronix.de/
> 
> Changes since v1:
> 
>  * Code simplifications (Florian Fainelli, Vladimir Oltean)
>  * Fix issues with hellcreek.yaml bindings (Florian Fainelli)
>  * Clear reserved field in ptp v2 event messages (Richard Cochran)
>  * Make use of generic ptp parsing function (Richard Cochran, Vladimir Oltean)
>  * Fix Kconfig (Florian Fainelli)
>  * Add tags (Florian Fainelli, Rob Herring, Richard Cochran) 
> 
> I didn't change the bridge/tagging setup, as I didn't find a better way to do it.

Appears not to build:

drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c: In function ‘hellcreek_get_reserved_field’:
drivers/net/dsa/hirschmann/hellcreek_hwtstamp.c:177:24: error: invalid use of undefined type ‘const struct ptp_header’
  177 |  return be32_to_cpu(hdr->reserved2);
      |                        ^~
Kurt Kanzenbach July 24, 2020, 6:04 a.m. UTC | #2
On Thu Jul 23 2020, Jakub Kicinski wrote:
> Appears not to build:
>

Yeah, i know. This patch series depends on two other ones:

 * https://lkml.kernel.org/netdev/20200723074946.14253-1-kurt@linutronix.de/
 * https://lkml.kernel.org/netdev/20200720124939.4359-1-kurt@linutronix.de/

One of them has been merged, the other is being discussed. That series
includes the 'ptp_header' and the corresponding functions. So, for
compile testing you'll have to apply that series as well.

Thanks,
Kurt
David Miller July 24, 2020, 11:47 p.m. UTC | #3
From: Kurt Kanzenbach <kurt@linutronix.de>
Date: Fri, 24 Jul 2020 08:04:10 +0200

> On Thu Jul 23 2020, Jakub Kicinski wrote:
>> Appears not to build:
>>
> 
> Yeah, i know. This patch series depends on two other ones:
> 
>  * https://lkml.kernel.org/netdev/20200723074946.14253-1-kurt@linutronix.de/
>  * https://lkml.kernel.org/netdev/20200720124939.4359-1-kurt@linutronix.de/
> 
> One of them has been merged, the other is being discussed. That series
> includes the 'ptp_header' and the corresponding functions. So, for
> compile testing you'll have to apply that series as well.

Please never submit patches for serious review when the dependencies
haven't landed in the target tree yet.

That makes so much wasted work for us and other reviewers.

Thank you.
Kurt Kanzenbach July 25, 2020, 7:02 a.m. UTC | #4
On Fri Jul 24 2020, David Miller wrote:
> Please never submit patches for serious review when the dependencies
> haven't landed in the target tree yet.
>
> That makes so much wasted work for us and other reviewers.
>
> Thank you.
>

OK, noted. Sorry for that.

Thanks,
Kurt