[RFC PATCH 6/8] dt-bindings: net: Add PTP interrupt support
Srinivas Neeli
srinivas.neeli at amd.com
Wed Feb 18 21:49:09 PST 2026
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 at 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 at 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 at 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
More information about the linux-arm-kernel
mailing list