All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next V2] dt-bindings: net: ethernet-controller: Add ptp-hardware-clock
@ 2022-10-21  5:41 Sarath Babu Naidu Gaddam
  2022-10-21 12:50 ` Richard Cochran
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Sarath Babu Naidu Gaddam @ 2022-10-21  5:41 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, robh+dt, richardcochran
  Cc: krzysztof.kozlowski+dt, netdev, devicetree, linux-kernel,
	yangbo.lu, radhey.shyam.pandey, anirudha.sarangi, harini.katakam,
	sarath.babu.naidu.gaddam, git

There is currently no standard property to pass PTP device index
information to ethernet driver when they are independent.

ptp-hardware-clock property will contain phandle to PTP clock node.

Freescale driver currently has this implementation but it will be
good to agree on a generic (optional) property name to link to PTP
phandle to Ethernet node. In future or any current ethernet driver
wants to use this method of reading the PHC index,they can simply use
this generic name and point their own PTP clock node, instead of
creating separate property names in each ethernet driver DT node.

axiethernet driver uses this method when PTP support is integrated.

Example:
	fman0: fman@1a00000 {
		ptp-hardware-clock = <&ptp_timer0>;
	}

	ptp_timer0: ptp-timer@1afe000 {
		compatible = "fsl,fman-ptp-timer";
		reg = <0x0 0x1afe000 0x0 0x1000>;
	}

Signed-off-by: Sarath Babu Naidu Gaddam <sarath.babu.naidu.gaddam@amd.com>
---
We want binding to be reviewed/accepted and then make changes in freescale
binding documentation to use this generic binding.

DT information:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
tree/arch/arm64/boot/dts/freescale/qoriq-fman3-0.dtsi#n23

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
tree/Documentation/devicetree/bindings/net/fsl-fman.txt#n320

Freescale driver:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
tree/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c#n467

Changes in V2:
1) Changed the ptimer-handle to ptp-hardware-clock based on
   Richard Cochran's comment.
2) Updated commit description.
---
 .../devicetree/bindings/net/ethernet-controller.yaml         | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
index 3aef506fa158..d2863c1dd585 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -161,6 +161,11 @@ properties:
       - auto
       - in-band-status
 
+  ptp-hardware-clock:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Specifies a reference to a node representing a IEEE1588 timer.
+
   fixed-link:
     oneOf:
       - $ref: /schemas/types.yaml#/definitions/uint32-array
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-01-19 10:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  5:41 [PATCH net-next V2] dt-bindings: net: ethernet-controller: Add ptp-hardware-clock Sarath Babu Naidu Gaddam
2022-10-21 12:50 ` Richard Cochran
2022-10-23 15:41 ` Krzysztof Kozlowski
2022-11-10  9:57   ` Gaddam, Sarath Babu Naidu
2022-11-10 14:05     ` Krzysztof Kozlowski
2023-01-19 10:53       ` Gaddam, Sarath Babu Naidu
2022-10-24 16:57 ` Rob Herring
2022-10-25 21:46   ` Richard Cochran
2022-10-25 22:02     ` Richard Cochran
2022-10-25 22:27   ` Richard Cochran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.