ptp: ocp: Expose various resources on the timecard.
PATCH v2 1/1 ptp: ocp: Expose various resources on the timecard.
The OpenCompute timecard driver has additional functionality besides a clock. Make the following resources available:
- The external timestamp channels (ts0/ts1)
- devlink support for flashing and health reporting
- GPS and MAC serial ports
- board serial number (obtained from i2c device)
Also add watchdog functionality for when GNSS goes into holdover.
The resources are collected under a driver procfs directory:
[jlemon@timecard ~]$ ls -g /proc/driver/ocp1
total 0
-rw-r--r--. 1 root 0 Jul 30 12:37 clock_source -r--r--r--. 1 root 0 Jul 30 12:37 gps_state
lrwxrwxrwx. 1 root 26 Jul 30 12:37 i2c -> /sys/bus/i2c/devices/i2c-2/
lrwxrwxrwx. 1 root 9 Jul 30 12:37 pps -> /dev/pps1 lrwxrwxrwx. 1 root 9 Jul 30 12:37 ptp -> /dev/ptp2 -r--r--r--. 1 root 0 Jul 30 12:37 serial
lrwxrwxrwx. 1 root 10 Jul 30 12:37 ttyGPS -> /dev/ttyS7 lrwxrwxrwx. 1 root 10 Jul 30 12:37 ttyMAC -> /dev/ttyS8
---
v2: fix warnings.
--- drivers/ptp/Kconfig | 7 + drivers/ptp/ptp_ocp.c | 1311 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 1271 insertions(+), 47 deletions(-)
drivers/ptp/Kconfig +7 -0
@@ -157,6 +157,13 @@ config PTP_1588_CLOCK_OCP tristate "OpenCompute TimeCard as PTP clock" depends on PTP_1588_CLOCK depends on HAS_IOMEM && PCI + depends on SPI && I2C && MTD + imply SPI_MEM + imply SPI_XILINX + imply MTD_SPI_NOR + imply I2C_XILINX + select SERIAL_8250 + default n help This driver adds support for an OpenCompute time card.
drivers/ptp/ptp_ocp.c +1264 -47
1,462 lines not on this page · raw message
Signature · 1 line
2.31.1