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)
commit7d272e63e0979d38a6256108adbe462d621c26c5
tree9587e7bca668ff947b929ce8af98f347e6c733eb
parentab2bf933935710ac545f94e49d16b5eab01f846f
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