Support LAN743x PTP periodic output on any GPIO
authorJohn Efstathiades <john.efstathiades@pebblebay.com>
Thu, 7 Nov 2019 17:08:33 +0000 (17:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Nov 2019 20:46:56 +0000 (12:46 -0800)
commit228200179213bfc9b4d6097e1c26de30bd18c1e6
tree59d362f459b376fc9315f4f4bef87e5ea341919a
parent26285f1359695e94751e01a4755d322af0e74145
Support LAN743x PTP periodic output on any GPIO

The LAN743x Ethernet controller provides two independent PTP event
channels. Each one can be used to generate a periodic output from
the PTP clock. The output can be routed to any one of the available
GPIO pins on the device.

The PTP clock API can now be used to:
- select any LAN743x GPIO pin to function as a periodic output
- select either LAN743x PTP event channel to generate the output

The LAN7430 has 4 GPIO pins that are multiplexed with its internal
PHY LED control signals. A pin assigned to the LED control function
will be assigned to the GPIO function if selected for PTP periodic
output.

Signed-off-by: John Efstathiades <john.efstathiades@pebblebay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan743x_ptp.c
drivers/net/ethernet/microchip/lan743x_ptp.h