mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
Add PTP clock support for the ZL3073x DPLL driver. A PTP clock device is registered for each DPLL channel regardless of the initial channel state, providing gettimex64, settime64, adjtime, adjfine, adjphase and getmaxphase callbacks. Callback availability depends on the current channel state: - adjfine: when NCO pin is connected (returns -EOPNOTSUPP otherwise) - adjphase: available when tracking a reference, uses TIE write - adjtime: always available and uses * phase step for sub-second deltas when NCO pin is connected * TIE write when tracking a reference * plain ToD read-modify-write otherwise - gettime/settime: always available The adjtime callback splits multi-second adjustments into a ToD read-modify-write for the seconds part and a sub-second mechanism (phase step or TIE write) for the remainder. On partial failure where seconds were already committed, success is returned to prevent the PTP servo from retrying and applying seconds again. All PTP callbacks are serialized by the existing per-DPLL zldpll->lock mutex, which is also used by DPLL pin and device callbacks. Reviewed-by: Petr Oros <poros@redhat.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Tested-by: Chris du Quesnay <Chris.duQuesnay@microchip.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Link: https://patch.msgid.link/20260814082656.306534-4-ivecera@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
config ZL3073X
|
|
tristate "Microchip Azurite DPLL/PTP/SyncE devices" if COMPILE_TEST
|
|
depends on NET && PTP_1588_CLOCK
|
|
select DPLL
|
|
select NET_DEVLINK
|
|
select REGMAP
|
|
help
|
|
This driver supports Microchip Azurite family DPLL/PTP/SyncE
|
|
devices that support up to 5 independent DPLL channels,
|
|
10 input pins and up to 20 output pins.
|
|
|
|
To compile this driver as a module, choose M here. The module
|
|
will be called zl3073x.
|
|
|
|
config ZL3073X_I2C
|
|
tristate "I2C bus implementation for Microchip Azurite devices"
|
|
depends on I2C && NET && PTP_1588_CLOCK
|
|
select REGMAP_I2C
|
|
select ZL3073X
|
|
help
|
|
This is I2C bus implementation for Microchip Azurite DPLL/PTP/SyncE
|
|
devices.
|
|
|
|
To compile this driver as a module, choose M here: the module will
|
|
be called zl3073x_i2c.
|
|
|
|
config ZL3073X_SPI
|
|
tristate "SPI bus implementation for Microchip Azurite devices"
|
|
depends on NET && SPI && PTP_1588_CLOCK
|
|
select REGMAP_SPI
|
|
select ZL3073X
|
|
help
|
|
This is SPI bus implementation for Microchip Azurite DPLL/PTP/SyncE
|
|
devices.
|
|
|
|
To compile this driver as a module, choose M here: the module will
|
|
be called zl3073x_spi.
|