net: phy: Add support for 1PPS out and external timestamps
authorJonathan Lemon <jonathan.lemon@gmail.com>
Wed, 22 Jun 2022 05:04:54 +0000 (22:04 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 24 Jun 2022 03:49:02 +0000 (20:49 -0700)
commit7bfe91efd525a4608ccf4f78f9ec1dba748c5b37
tree8049614b1fe4fa0bc4b0bcb5bbc5f1c3c3e82e28
parent39db6be781cd7dfd44ea259acecaf23f8685550b
net: phy: Add support for 1PPS out and external timestamps

The perout function is used to generate a 1PPS signal, synchronized
to the PHC.  This is accomplished by a using the hardware oneshot
functionality, which is reset by a timer.

The external timestamp function is set up for a 1PPS input pulse,
and uses a timer to poll for temestamps.

Both functions use the SYNC_OUT/SYNC_IN1 pin, so cannot run
simultaneously.

Co-developed-by: Lasse Johnsen <l@ssejohnsen.me>
Signed-off-by: Lasse Johnsen <l@ssejohnsen.me>
Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/bcm-phy-ptp.c