]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: mscc: timestamping and PHC support
authorAntoine Tenart <antoine.tenart@bootlin.com>
Tue, 23 Jun 2020 14:30:12 +0000 (16:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 21:33:16 +0000 (14:33 -0700)
commitcc18c9fbfca386d1c23dcc56d5cd0a874db428e2
tree9587e7bca668ff947b929ce8af98f347e6c733eb
parent91b2815660dbcbe4d16358d9b80d744926c6a7cf
net: phy: mscc: timestamping and PHC support

This patch adds support for PHC and timestamping operations for the MSCC
PHY. PTP 1-step and 2-step modes are supported, over Ethernet and UDP.

To get and set the PHC time, a GPIO has to be used and changes are only
retrieved or committed when on a rising edge. The same GPIO is shared by
all PHYs, so the granularity of the lock protecting it has to be
different from the ones protecting the 1588 registers (the VSC8584 PHY
has 2 1588 blocks, and a single load/save pin).

Co-developed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mscc/mscc.h
drivers/net/phy/mscc/mscc_main.c
drivers/net/phy/mscc/mscc_ptp.c