public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Neeli <srinivas.neeli@amd.com>
To: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<michal.simek@amd.com>, <robh@kernel.org>, <krzk+dt@kernel.org>,
	<conor+dt@kernel.org>, <richardcochran@gmail.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <git@amd.com>,
	<srinivas.neeli@amd.com>
Subject: [RFC PATCH 6/8] dt-bindings: net: Add PTP interrupt support
Date: Thu, 19 Feb 2026 11:19:09 +0530	[thread overview]
Message-ID: <20260219054911.2017362-7-srinivas.neeli@amd.com> (raw)
In-Reply-To: <20260219054911.2017362-1-srinivas.neeli@amd.com>

Add device tree bindings for PTP (Precision Time Protocol) interrupt
configuration in Xilinx TSN Endpoint Ethernet MAC IP. The MAC instances
within the TSN IP have asymmetric PTP capabilities based on their
hardware configuration.

MAC 1 (xlnx,mac-id = 1) provides complete PTP hardware support including
a dedicated PTP timer, requiring four interrupt lines:
  - interrupt_ptp_rx: PTP receive packet interrupt
  - interrupt_ptp_tx: PTP transmit packet interrupt
  - mac_irq: General MAC interrupt
  - interrupt_ptp_timer: PTP hardware timer interrupt

MAC 2 (xlnx,mac-id = 2) supports PTP packet processing but lacks the
hardware timer block, requiring only three interrupt lines:
  - interrupt_ptp_rx: PTP receive packet interrupt
  - interrupt_ptp_tx: PTP transmit packet interrupt
  - mac_irq: General MAC interrupt

Signed-off-by: Srinivas Neeli <srinivas.neeli@amd.com>
---
 .../net/xlnx,tsn-endpoint-ethernet-mac.yaml   | 79 ++++++++++++++++++-
 1 file changed, 77 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml b/Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml
index 0d61a911e1d1..b1b0f4a03d11 100644
--- a/Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml
+++ b/Documentation/devicetree/bindings/net/xlnx,tsn-endpoint-ethernet-mac.yaml
@@ -113,6 +113,34 @@ patternProperties:
       reg:
         maxItems: 1
 
+      xlnx,mac-id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [1, 2]
+        description:
+          MAC instance identifier. MAC ID 1 supports PTP timer functionality,
+          while MAC ID 2 does not have PTP timer support.
+
+      interrupts:
+        minItems: 1
+        maxItems: 4
+        description:
+          Interrupt specifiers for MAC interrupts. MAC 1 (with PTP support)
+          requires 4 interrupts (ptp_rx, ptp_tx, mac_irq, ptp_timer).
+          MAC 2 (without PTP support) requires 3 interrupts (ptp_rx, ptp_tx, mac_irq).
+
+      interrupt-names:
+        minItems: 1
+        maxItems: 4
+        items:
+          enum:
+            - interrupt_ptp_rx
+            - interrupt_ptp_tx
+            - mac_irq
+            - interrupt_ptp_timer
+        description:
+          Names for the interrupts. MAC 1 includes "interrupt_ptp_timer" for
+          PTP hardware timer, which is not present in MAC 2.
+
       phy-mode:
         enum:
           - gmii
@@ -124,6 +152,44 @@ patternProperties:
 
       mdio:
         type: object
+
+    allOf:
+      - if:
+          properties:
+            xlnx,mac-id:
+              const: 1
+        then:
+          properties:
+            interrupts:
+              minItems: 4
+              maxItems: 4
+            interrupt-names:
+              items:
+                - const: interrupt_ptp_rx
+                - const: interrupt_ptp_tx
+                - const: mac_irq
+                - const: interrupt_ptp_timer
+          required:
+            - interrupts
+            - interrupt-names
+      - if:
+          properties:
+            xlnx,mac-id:
+              const: 2
+        then:
+          properties:
+            interrupts:
+              minItems: 3
+              maxItems: 3
+            interrupt-names:
+              items:
+                - const: interrupt_ptp_rx
+                - const: interrupt_ptp_tx
+                - const: mac_irq
+          required:
+            - interrupts
+            - interrupt-names
+
     additionalProperties: false
 
   "^ep-mac@":
@@ -225,9 +291,14 @@ examples:
                  xlnx,dma-channel-num = <0x0>;
             };
         };
-        // MAC 1 Node
+        // MAC 1 Node (with PTP timer support)
         mac1: ethernet-mac@0 {
             reg = <0x0 0x14000>;
+            xlnx,mac-id = <1>;
+            interrupt-parent = <&intc>;
+            interrupt-names = "interrupt_ptp_rx", "interrupt_ptp_tx",
+                              "mac_irq", "interrupt_ptp_timer";
+            interrupts = <0 2>, <2 2>, <4 2>, <6 2>;
             phy-mode = "rgmii-id";
             phy-handle = <&phy0>;
             mdio {
@@ -240,9 +311,13 @@ examples:
             };
         };
 
-        // MAC 2 Node
+        // MAC 2 Node (without PTP timer support)
         mac2: ethernet-mac@20000 {
             reg = <0x20000 0x14000>;
+            xlnx,mac-id = <2>;
+            interrupt-parent = <&intc>;
+            interrupt-names = "interrupt_ptp_rx", "interrupt_ptp_tx", "mac_irq";
+            interrupts = <1 2>, <3 2>, <5 2>;
             phy-mode = "rgmii-id";
             phy-handle = <&phy1>;
             mdio {
-- 
2.25.1


  parent reply	other threads:[~2026-02-19  5:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19  5:49 [RFC PATCH 0/8] xilinx: tsn: Add TSN Endpoint Ethernet MAC driver support Srinivas Neeli
2026-02-19  5:49 ` [RFC PATCH 1/8] dt-bindings: net: Add TSN Endpoint Ethernet MAC support Srinivas Neeli
2026-02-19 16:53   ` Andrew Lunn
2026-02-20 13:03     ` Neeli, Srinivas
2026-02-20 13:39       ` Andrew Lunn
2026-02-24 11:08         ` Neeli, Srinivas
2026-02-19  5:49 ` [RFC PATCH 2/8] net: xilinx: tsn: Introduce TSN core driver skeleton Srinivas Neeli
2026-02-19  7:32   ` Krzysztof Kozlowski
2026-02-19  5:49 ` [RFC PATCH 3/8] net: xilinx: tsn: Add TSN endpoint and MCDMA support Srinivas Neeli
2026-02-19  5:49 ` [RFC PATCH 4/8] xilinx: tsn: Add Ethernet MAC (EMAC) and MDIO support to the TSN driver Srinivas Neeli
2026-02-19 17:05   ` Andrew Lunn
2026-02-20 13:08     ` Neeli, Srinivas
2026-02-20 15:03       ` Andrew Lunn
2026-02-24 11:11         ` Neeli, Srinivas
2026-02-20 15:12   ` Andrew Lunn
2026-02-24 11:15     ` Neeli, Srinivas
2026-02-19  5:49 ` [RFC PATCH 5/8] net: xilinx: tsn: Add TSN switch support with port state and frame filter control Srinivas Neeli
2026-02-19  5:49 ` Srinivas Neeli [this message]
2026-02-20 15:17   ` [RFC PATCH 6/8] dt-bindings: net: Add PTP interrupt support Andrew Lunn
2026-02-19  5:49 ` [RFC PATCH 7/8] net: xilinx: tsn: Add PTP hardware clock (PHC) and timer support Srinivas Neeli
2026-02-19  5:49 ` [RFC PATCH 8/8] net: xilinx: tsn: Add PTP packet transmission support Srinivas Neeli
2026-02-19  7:34 ` [RFC PATCH 0/8] xilinx: tsn: Add TSN Endpoint Ethernet MAC driver support Krzysztof Kozlowski
2026-02-19 16:42 ` Andrew Lunn
2026-02-20 12:59   ` Neeli, Srinivas
2026-02-20 13:36     ` Andrew Lunn
2026-03-05 11:46       ` Neeli, Srinivas
2026-03-26 10:11         ` Neeli, Srinivas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260219054911.2017362-7-srinivas.neeli@amd.com \
    --to=srinivas.neeli@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=git@amd.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox