xref: /openbmc/linux/drivers/ptp/Kconfig (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
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
478a56aa10SArun Parameswaran	default y
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
62a24006edSBen Hutchings	default y
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
13457a10d8cSMin Liconfig PTP_1588_CLOCK_IDT82P33
13557a10d8cSMin Li	tristate "IDT 82P33xxx PTP clock"
13657a10d8cSMin Li	depends on PTP_1588_CLOCK && I2C
13757a10d8cSMin Li	default n
13857a10d8cSMin Li	help
13957a10d8cSMin Li	  This driver adds support for using the IDT 82P33xxx as a PTP
14057a10d8cSMin Li	  clock. This clock is only useful if your time stamping MAC
14157a10d8cSMin Li	  is connected to the IDT chip.
14257a10d8cSMin Li
14357a10d8cSMin Li	  To compile this driver as a module, choose M here: the module
14457a10d8cSMin Li	  will be called ptp_idt82p33.
14557a10d8cSMin Li
1463a6ba7dcSVincent Chengconfig PTP_1588_CLOCK_IDTCM
1473a6ba7dcSVincent Cheng	tristate "IDT CLOCKMATRIX as PTP clock"
14803b06e3fSArnd Bergmann	depends on PTP_1588_CLOCK && I2C
1493a6ba7dcSVincent Cheng	default n
1503a6ba7dcSVincent Cheng	help
1513a6ba7dcSVincent Cheng	  This driver adds support for using IDT CLOCKMATRIX(TM) as a PTP
1523a6ba7dcSVincent Cheng	  clock. This clock is only useful if your time stamping MAC
1533a6ba7dcSVincent Cheng	  is connected to the IDT chip.
1543a6ba7dcSVincent Cheng
1553a6ba7dcSVincent Cheng	  To compile this driver as a module, choose M here: the module
1563a6ba7dcSVincent Cheng	  will be called ptp_clockmatrix.
1573a6ba7dcSVincent Cheng
158*40b0425fSVladimir Olteanconfig PTP_1588_CLOCK_MOCK
159*40b0425fSVladimir Oltean	tristate "Mock-up PTP clock"
160*40b0425fSVladimir Oltean	depends on PTP_1588_CLOCK
161*40b0425fSVladimir Oltean	help
162*40b0425fSVladimir Oltean	  This driver offers a set of PTP clock manipulation operations over
163*40b0425fSVladimir Oltean	  the system monotonic time. It can be used by virtual network device
164*40b0425fSVladimir Oltean	  drivers to emulate PTP capabilities.
165*40b0425fSVladimir Oltean
166*40b0425fSVladimir Oltean	  To compile this driver as a module, choose M here: the module
167*40b0425fSVladimir Oltean	  will be called ptp_mock.
168*40b0425fSVladimir Oltean
1697d10001eSVivek Thampiconfig PTP_1588_CLOCK_VMW
1707d10001eSVivek Thampi	tristate "VMware virtual PTP clock"
1717d10001eSVivek Thampi	depends on ACPI && HYPERVISOR_GUEST && X86
1727d10001eSVivek Thampi	depends on PTP_1588_CLOCK
1737d10001eSVivek Thampi	help
1747d10001eSVivek Thampi	  This driver adds support for using VMware virtual precision
1757d10001eSVivek Thampi	  clock device as a PTP clock. This is only useful in virtual
1767d10001eSVivek Thampi	  machines running on VMware virtual infrastructure.
1777d10001eSVivek Thampi
1787d10001eSVivek Thampi	  To compile this driver as a module, choose M here: the module
1797d10001eSVivek Thampi	  will be called ptp_vmw.
1807d10001eSVivek Thampi
181a7e1abadSJonathan Lemonconfig PTP_1588_CLOCK_OCP
182a7e1abadSJonathan Lemon	tristate "OpenCompute TimeCard as PTP clock"
183a7e1abadSJonathan Lemon	depends on PTP_1588_CLOCK
184a7e1abadSJonathan Lemon	depends on HAS_IOMEM && PCI
185bc8e05d6SJonathan Lemon	depends on I2C && MTD
186bc8e05d6SJonathan Lemon	depends on SERIAL_8250
187944f5101SRandy Dunlap	depends on !S390
18842a99a0bSArnd Bergmann	depends on COMMON_CLK
189d79500e6SJonathan Lemon	select NET_DEVLINK
1900c104556SJonathan Lemon	select CRC16
191a7e1abadSJonathan Lemon	help
192a7e1abadSJonathan Lemon	  This driver adds support for an OpenCompute time card.
193a7e1abadSJonathan Lemon
194a7e1abadSJonathan Lemon	  The OpenCompute time card is an atomic clock along with
195a7e1abadSJonathan Lemon	  a GPS receiver that provides a Grandmaster clock source
196a7e1abadSJonathan Lemon	  for a PTP enabled network.
197a7e1abadSJonathan Lemon
198a7e1abadSJonathan Lemon	  More information is available at http://www.timingcard.com/
199a7e1abadSJonathan Lemon
200615927f1STianfei Zhangconfig PTP_DFL_TOD
201615927f1STianfei Zhang	tristate "FPGA DFL ToD Driver"
202615927f1STianfei Zhang	depends on FPGA_DFL
203615927f1STianfei Zhang	depends on PTP_1588_CLOCK
204615927f1STianfei Zhang	help
205615927f1STianfei Zhang	  The DFL (Device Feature List) device driver for the Intel ToD
206615927f1STianfei Zhang	  (Time-of-Day) device in FPGA card. The ToD IP within the FPGA
207615927f1STianfei Zhang	  is exposed as PTP Hardware Clock (PHC) device to the Linux PTP
208615927f1STianfei Zhang	  stack to synchronize the system clock to its ToD information
209615927f1STianfei Zhang	  using phc2sys utility of the Linux PTP stack.
210615927f1STianfei Zhang
211615927f1STianfei Zhang	  To compile this driver as a module, choose M here: the module
212615927f1STianfei Zhang	  will be called ptp_dfl_tod.
213615927f1STianfei Zhang
214d94ba80eSRichard Cochranendmenu
215