xref: /linux/drivers/ptp/Kconfig (revision ab93e0dd72c37d378dd936f031ffb83ff2bd87ce)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
2d94ba80eSRichard Cochran#
3d94ba80eSRichard Cochran# PTP clock support configuration
4d94ba80eSRichard Cochran#
5d94ba80eSRichard Cochran
6d94ba80eSRichard Cochranmenu "PTP clock support"
7d94ba80eSRichard Cochran
8d94ba80eSRichard Cochranconfig PTP_1588_CLOCK
9d94ba80eSRichard Cochran	tristate "PTP clock support"
10baa73d9eSNicolas Pitre	depends on NET && POSIX_TIMERS
11e5f31552SArnd Bergmann	default ETHERNET
1242a7ccefSBen Hutchings	select PPS
13408eccceSDaniel Borkmann	select NET_PTP_CLASSIFY
14d94ba80eSRichard Cochran	help
15d94ba80eSRichard Cochran	  The IEEE 1588 standard defines a method to precisely
16d94ba80eSRichard Cochran	  synchronize distributed clocks over Ethernet networks. The
17d94ba80eSRichard Cochran	  standard defines a Precision Time Protocol (PTP), which can
18d94ba80eSRichard Cochran	  be used to achieve synchronization within a few dozen
19d94ba80eSRichard Cochran	  microseconds. In addition, with the help of special hardware
20d94ba80eSRichard Cochran	  time stamping units, it can be possible to achieve
21d94ba80eSRichard Cochran	  synchronization to within a few hundred nanoseconds.
22d94ba80eSRichard Cochran
23d94ba80eSRichard Cochran	  This driver adds support for PTP clocks as character
24d94ba80eSRichard Cochran	  devices. If you want to use a PTP clock, then you should
25d94ba80eSRichard Cochran	  also enable at least one clock driver as well.
26d94ba80eSRichard Cochran
27d94ba80eSRichard Cochran	  To compile this driver as a module, choose M here: the module
28d94ba80eSRichard Cochran	  will be called ptp.
29d94ba80eSRichard Cochran
30e5f31552SArnd Bergmannconfig PTP_1588_CLOCK_OPTIONAL
31e5f31552SArnd Bergmann	tristate
32e5f31552SArnd Bergmann	default y if PTP_1588_CLOCK=n
33e5f31552SArnd Bergmann	default PTP_1588_CLOCK
34e5f31552SArnd Bergmann	help
35e5f31552SArnd Bergmann	  Drivers that can optionally use the PTP_1588_CLOCK framework
36e5f31552SArnd Bergmann	  should depend on this symbol to prevent them from being built
37e5f31552SArnd Bergmann	  into vmlinux while the PTP support itself is in a loadable
38e5f31552SArnd Bergmann	  module.
39e5f31552SArnd Bergmann	  If PTP support is disabled, this dependency will still be
40e5f31552SArnd Bergmann	  met, and drivers refer to dummy helpers.
41e5f31552SArnd Bergmann
428a56aa10SArun Parameswaranconfig PTP_1588_CLOCK_DTE
438a56aa10SArun Parameswaran	tristate "Broadcom DTE as PTP clock"
448a56aa10SArun Parameswaran	depends on PTP_1588_CLOCK
458a56aa10SArun Parameswaran	depends on NET && HAS_IOMEM
468a56aa10SArun Parameswaran	depends on ARCH_BCM_MOBILE || (ARCH_BCM_IPROC && !(ARCH_BCM_NSP || ARCH_BCM_5301X)) || COMPILE_TEST
47*a7696fb2SKrzysztof Kozlowski	default y if ARCH_BCM_MOBILE || ARCH_BCM_IPROC
488a56aa10SArun Parameswaran	help
498a56aa10SArun Parameswaran	  This driver adds support for using the Digital timing engine
508a56aa10SArun Parameswaran	  (DTE) in the Broadcom SoC's as a PTP clock.
518a56aa10SArun Parameswaran
528a56aa10SArun Parameswaran	  The clock can be used in both wired and wireless networks
538a56aa10SArun Parameswaran	  for PTP purposes.
548a56aa10SArun Parameswaran
558a56aa10SArun Parameswaran	  To compile this driver as a module, choose M here: the module
568a56aa10SArun Parameswaran	  will be called ptp_dte.
578a56aa10SArun Parameswaran
58ceefc71dSYangbo Luconfig PTP_1588_CLOCK_QORIQ
59ceefc71dSYangbo Lu	tristate "Freescale QorIQ 1588 timer as PTP clock"
608099d7caSYangbo Lu	depends on GIANFAR || FSL_DPAA_ETH || FSL_DPAA2_ETH || FSL_ENETC || FSL_ENETC_VF || COMPILE_TEST
61d1cbfd77SNicolas Pitre	depends on PTP_1588_CLOCK
62*a7696fb2SKrzysztof Kozlowski	default y if GIANFAR || FSL_DPAA_ETH || FSL_DPAA2_ETH || FSL_ENETC || FSL_ENETC_VF
63c78275f3SRichard Cochran	help
64ceefc71dSYangbo Lu	  This driver adds support for using the Freescale QorIQ 1588
65ceefc71dSYangbo Lu	  timer as a PTP clock. This clock is only useful if your PTP
66ceefc71dSYangbo Lu	  programs are getting hardware time stamps on the PTP Ethernet
67ceefc71dSYangbo Lu	  packets using the SO_TIMESTAMPING API.
68c78275f3SRichard Cochran
69c78275f3SRichard Cochran	  To compile this driver as a module, choose M here: the module
7019df7510SYangbo Lu	  will be called ptp-qoriq.
71c78275f3SRichard Cochran
72cb646e2bSRichard Cochrancomment "Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks."
73a24006edSBen Hutchings	depends on PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n
74cb646e2bSRichard Cochran
75cb646e2bSRichard Cochranconfig DP83640_PHY
76cb646e2bSRichard Cochran	tristate "Driver for the National Semiconductor DP83640 PHYTER"
77cb646e2bSRichard Cochran	depends on NETWORK_PHY_TIMESTAMPING
78cb646e2bSRichard Cochran	depends on PHYLIB
79d1cbfd77SNicolas Pitre	depends on PTP_1588_CLOCK
80f9d6f941SArnd Bergmann	select CRC32
81a7f7f624SMasahiro Yamada	help
82cb646e2bSRichard Cochran	  Supports the DP83640 PHYTER with IEEE 1588 features.
83cb646e2bSRichard Cochran
84cb646e2bSRichard Cochran	  This driver adds support for using the DP83640 as a PTP
85cb646e2bSRichard Cochran	  clock. This clock is only useful if your PTP programs are
86cb646e2bSRichard Cochran	  getting hardware time stamps on the PTP Ethernet packets
87cb646e2bSRichard Cochran	  using the SO_TIMESTAMPING API.
88cb646e2bSRichard Cochran
89cb646e2bSRichard Cochran	  In order for this to work, your MAC driver must also
906b2aac42SMasanari Iida	  implement the skb_tx_timestamp() function.
91cb646e2bSRichard Cochran
92bad1eaa6SRichard Cochranconfig PTP_1588_CLOCK_INES
93bad1eaa6SRichard Cochran	tristate "ZHAW InES PTP time stamping IP core"
94bad1eaa6SRichard Cochran	depends on NETWORK_PHY_TIMESTAMPING
951f685e6aSRandy Dunlap	depends on HAS_IOMEM
96bad1eaa6SRichard Cochran	depends on PHYLIB
97bad1eaa6SRichard Cochran	depends on PTP_1588_CLOCK
98bad1eaa6SRichard Cochran	help
99bad1eaa6SRichard Cochran	  This driver adds support for using the ZHAW InES 1588 IP
100bad1eaa6SRichard Cochran	  core.  This clock is only useful if the MII bus of your MAC
101bad1eaa6SRichard Cochran	  is wired up to the core.
102bad1eaa6SRichard Cochran
103863d08ecSTakahiro Shimizuconfig PTP_1588_CLOCK_PCH
104863d08ecSTakahiro Shimizu	tristate "Intel PCH EG20T as PTP clock"
105c8cc2ae2SJiaxun Yang	depends on MIPS_GENERIC || X86_32 || COMPILE_TEST
10655c8fca1SAndy Shevchenko	depends on HAS_IOMEM && PCI
10755c8fca1SAndy Shevchenko	depends on NET
108e5f31552SArnd Bergmann	depends on PTP_1588_CLOCK
109863d08ecSTakahiro Shimizu	help
110863d08ecSTakahiro Shimizu	  This driver adds support for using the PCH EG20T as a PTP
111358dfb6dSTakahiro Shimizu	  clock. The hardware supports time stamping of PTP packets
112503c9addSAntonio Borneo	  when using the end-to-end delay (E2E) mechanism. The peer
113503c9addSAntonio Borneo	  delay mechanism (P2P) is not supported.
114358dfb6dSTakahiro Shimizu
115358dfb6dSTakahiro Shimizu	  This clock is only useful if your PTP programs are getting
116358dfb6dSTakahiro Shimizu	  hardware time stamps on the PTP Ethernet packets using the
117358dfb6dSTakahiro Shimizu	  SO_TIMESTAMPING API.
118863d08ecSTakahiro Shimizu
119863d08ecSTakahiro Shimizu	  To compile this driver as a module, choose M here: the module
120863d08ecSTakahiro Shimizu	  will be called ptp_pch.
121863d08ecSTakahiro Shimizu
122a0e136d4SMarcelo Tosatticonfig PTP_1588_CLOCK_KVM
123a0e136d4SMarcelo Tosatti	tristate "KVM virtual PTP clock"
124a0e136d4SMarcelo Tosatti	depends on PTP_1588_CLOCK
125300bb1feSJianyong Wu	depends on (KVM_GUEST && X86) || (HAVE_ARM_SMCCC_DISCOVERY && ARM_ARCH_TIMER)
126a0e136d4SMarcelo Tosatti	default y
127a0e136d4SMarcelo Tosatti	help
128a0e136d4SMarcelo Tosatti	  This driver adds support for using kvm infrastructure as a PTP
129a0e136d4SMarcelo Tosatti	  clock. This clock is only useful if you are using KVM guests.
130a0e136d4SMarcelo Tosatti
131a0e136d4SMarcelo Tosatti	  To compile this driver as a module, choose M here: the module
132a0e136d4SMarcelo Tosatti	  will be called ptp_kvm.
133a0e136d4SMarcelo Tosatti
13420503272SDavid Woodhouseconfig PTP_1588_CLOCK_VMCLOCK
13520503272SDavid Woodhouse	tristate "Virtual machine PTP clock"
13620503272SDavid Woodhouse	depends on X86_TSC || ARM_ARCH_TIMER
13720503272SDavid Woodhouse	depends on PTP_1588_CLOCK && ACPI && ARCH_SUPPORTS_INT128
13818ec5491SDavid Woodhouse	default PTP_1588_CLOCK_KVM
13920503272SDavid Woodhouse	help
14020503272SDavid Woodhouse	  This driver adds support for using a virtual precision clock
14120503272SDavid Woodhouse	  advertised by the hypervisor. This clock is only useful in virtual
14220503272SDavid Woodhouse	  machines where such a device is present.
14320503272SDavid Woodhouse
14418ec5491SDavid Woodhouse	  Unlike the KVM virtual PTP clock, the VMCLOCK device offers support
14518ec5491SDavid Woodhouse	  for reliable timekeeping even across live migration. So this driver
14618ec5491SDavid Woodhouse	  is enabled by default whenever the KVM PTP clock is.
14718ec5491SDavid Woodhouse
14820503272SDavid Woodhouse	  To compile this driver as a module, choose M here: the module
14920503272SDavid Woodhouse	  will be called ptp_vmclock.
15020503272SDavid Woodhouse
15157a10d8cSMin Liconfig PTP_1588_CLOCK_IDT82P33
15257a10d8cSMin Li	tristate "IDT 82P33xxx PTP clock"
15357a10d8cSMin Li	depends on PTP_1588_CLOCK && I2C
15457a10d8cSMin Li	default n
15557a10d8cSMin Li	help
15657a10d8cSMin Li	  This driver adds support for using the IDT 82P33xxx as a PTP
15757a10d8cSMin Li	  clock. This clock is only useful if your time stamping MAC
15857a10d8cSMin Li	  is connected to the IDT chip.
15957a10d8cSMin Li
16057a10d8cSMin Li	  To compile this driver as a module, choose M here: the module
16157a10d8cSMin Li	  will be called ptp_idt82p33.
16257a10d8cSMin Li
1633a6ba7dcSVincent Chengconfig PTP_1588_CLOCK_IDTCM
1643a6ba7dcSVincent Cheng	tristate "IDT CLOCKMATRIX as PTP clock"
16503b06e3fSArnd Bergmann	depends on PTP_1588_CLOCK && I2C
1663a6ba7dcSVincent Cheng	default n
1673a6ba7dcSVincent Cheng	help
1683a6ba7dcSVincent Cheng	  This driver adds support for using IDT CLOCKMATRIX(TM) as a PTP
1693a6ba7dcSVincent Cheng	  clock. This clock is only useful if your time stamping MAC
1703a6ba7dcSVincent Cheng	  is connected to the IDT chip.
1713a6ba7dcSVincent Cheng
1723a6ba7dcSVincent Cheng	  To compile this driver as a module, choose M here: the module
1733a6ba7dcSVincent Cheng	  will be called ptp_clockmatrix.
1743a6ba7dcSVincent Cheng
1751ddfecafSMin Liconfig PTP_1588_CLOCK_FC3W
1761ddfecafSMin Li	tristate "RENESAS FemtoClock3 Wireless as PTP clock"
1771ddfecafSMin Li	depends on PTP_1588_CLOCK && I2C
1781ddfecafSMin Li	default n
1791ddfecafSMin Li	help
1801ddfecafSMin Li	  This driver adds support for using Renesas FemtoClock3 Wireless
1811ddfecafSMin Li	  as a PTP clock. This clock is only useful if your time stamping
1821ddfecafSMin Li	  MAC is connected to the RENESAS chip.
1831ddfecafSMin Li
1841ddfecafSMin Li	  To compile this driver as a module, choose M here: the module
1851ddfecafSMin Li	  will be called ptp_fc3.
1861ddfecafSMin Li
18740b0425fSVladimir Olteanconfig PTP_1588_CLOCK_MOCK
18840b0425fSVladimir Oltean	tristate "Mock-up PTP clock"
18940b0425fSVladimir Oltean	depends on PTP_1588_CLOCK
19040b0425fSVladimir Oltean	help
19140b0425fSVladimir Oltean	  This driver offers a set of PTP clock manipulation operations over
19240b0425fSVladimir Oltean	  the system monotonic time. It can be used by virtual network device
19340b0425fSVladimir Oltean	  drivers to emulate PTP capabilities.
19440b0425fSVladimir Oltean
19540b0425fSVladimir Oltean	  To compile this driver as a module, choose M here: the module
19640b0425fSVladimir Oltean	  will be called ptp_mock.
19740b0425fSVladimir Oltean
1987d10001eSVivek Thampiconfig PTP_1588_CLOCK_VMW
1997d10001eSVivek Thampi	tristate "VMware virtual PTP clock"
2007d10001eSVivek Thampi	depends on ACPI && HYPERVISOR_GUEST && X86
2017d10001eSVivek Thampi	depends on PTP_1588_CLOCK
2027d10001eSVivek Thampi	help
2037d10001eSVivek Thampi	  This driver adds support for using VMware virtual precision
2047d10001eSVivek Thampi	  clock device as a PTP clock. This is only useful in virtual
2057d10001eSVivek Thampi	  machines running on VMware virtual infrastructure.
2067d10001eSVivek Thampi
2077d10001eSVivek Thampi	  To compile this driver as a module, choose M here: the module
2087d10001eSVivek Thampi	  will be called ptp_vmw.
2097d10001eSVivek Thampi
210a7e1abadSJonathan Lemonconfig PTP_1588_CLOCK_OCP
211a7e1abadSJonathan Lemon	tristate "OpenCompute TimeCard as PTP clock"
212a7e1abadSJonathan Lemon	depends on PTP_1588_CLOCK
213a7e1abadSJonathan Lemon	depends on HAS_IOMEM && PCI
214bc8e05d6SJonathan Lemon	depends on I2C && MTD
215bc8e05d6SJonathan Lemon	depends on SERIAL_8250
216944f5101SRandy Dunlap	depends on !S390
21742a99a0bSArnd Bergmann	depends on COMMON_CLK
218d79500e6SJonathan Lemon	select NET_DEVLINK
2190c104556SJonathan Lemon	select CRC16
22009eeb3aeSVadim Fedorenko	select DPLL
221a7e1abadSJonathan Lemon	help
222a7e1abadSJonathan Lemon	  This driver adds support for an OpenCompute time card.
223a7e1abadSJonathan Lemon
224a7e1abadSJonathan Lemon	  The OpenCompute time card is an atomic clock along with
225a7e1abadSJonathan Lemon	  a GPS receiver that provides a Grandmaster clock source
226a7e1abadSJonathan Lemon	  for a PTP enabled network.
227a7e1abadSJonathan Lemon
228a7e1abadSJonathan Lemon	  More information is available at http://www.timingcard.com/
229a7e1abadSJonathan Lemon
230615927f1STianfei Zhangconfig PTP_DFL_TOD
231615927f1STianfei Zhang	tristate "FPGA DFL ToD Driver"
232615927f1STianfei Zhang	depends on FPGA_DFL
233615927f1STianfei Zhang	depends on PTP_1588_CLOCK
234615927f1STianfei Zhang	help
235615927f1STianfei Zhang	  The DFL (Device Feature List) device driver for the Intel ToD
236615927f1STianfei Zhang	  (Time-of-Day) device in FPGA card. The ToD IP within the FPGA
237615927f1STianfei Zhang	  is exposed as PTP Hardware Clock (PHC) device to the Linux PTP
238615927f1STianfei Zhang	  stack to synchronize the system clock to its ToD information
239615927f1STianfei Zhang	  using phc2sys utility of the Linux PTP stack.
240615927f1STianfei Zhang
241615927f1STianfei Zhang	  To compile this driver as a module, choose M here: the module
242615927f1STianfei Zhang	  will be called ptp_dfl_tod.
243615927f1STianfei Zhang
2442d7de7a3SSven Schnelleconfig PTP_S390
2452d7de7a3SSven Schnelle	tristate "S390 PTP driver"
2462d7de7a3SSven Schnelle	depends on PTP_1588_CLOCK
2472d7de7a3SSven Schnelle	depends on S390
2482d7de7a3SSven Schnelle	help
2492d7de7a3SSven Schnelle	  This driver adds support for S390 time steering via the PtP
2502d7de7a3SSven Schnelle	  interface. This works by adding a in-kernel clock delta value,
2512d7de7a3SSven Schnelle	  which is always added to time values used in the kernel. The PtP
2522d7de7a3SSven Schnelle	  driver provides the raw clock value without the delta to
2532d7de7a3SSven Schnelle	  userspace. That way userspace programs like chrony could steer
2542d7de7a3SSven Schnelle	  the kernel clock.
255d94ba80eSRichard Cochranendmenu
256