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 47a7696fb2SKrzysztof 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 62a7696fb2SKrzysztof 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 70f3164840SWei Fang 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 81*854ac5fdSXuanqiang Luo select PHY_PACKAGE 82a7f7f624SMasahiro Yamada help 83cb646e2bSRichard Cochran Supports the DP83640 PHYTER with IEEE 1588 features. 84cb646e2bSRichard Cochran 85cb646e2bSRichard Cochran This driver adds support for using the DP83640 as a PTP 86cb646e2bSRichard Cochran clock. This clock is only useful if your PTP programs are 87cb646e2bSRichard Cochran getting hardware time stamps on the PTP Ethernet packets 88cb646e2bSRichard Cochran using the SO_TIMESTAMPING API. 89cb646e2bSRichard Cochran 90cb646e2bSRichard Cochran In order for this to work, your MAC driver must also 916b2aac42SMasanari Iida implement the skb_tx_timestamp() function. 92cb646e2bSRichard Cochran 93bad1eaa6SRichard Cochranconfig PTP_1588_CLOCK_INES 94bad1eaa6SRichard Cochran tristate "ZHAW InES PTP time stamping IP core" 95bad1eaa6SRichard Cochran depends on NETWORK_PHY_TIMESTAMPING 961f685e6aSRandy Dunlap depends on HAS_IOMEM 97bad1eaa6SRichard Cochran depends on PHYLIB 98bad1eaa6SRichard Cochran depends on PTP_1588_CLOCK 99bad1eaa6SRichard Cochran help 100bad1eaa6SRichard Cochran This driver adds support for using the ZHAW InES 1588 IP 101bad1eaa6SRichard Cochran core. This clock is only useful if the MII bus of your MAC 102bad1eaa6SRichard Cochran is wired up to the core. 103bad1eaa6SRichard Cochran 104863d08ecSTakahiro Shimizuconfig PTP_1588_CLOCK_PCH 105863d08ecSTakahiro Shimizu tristate "Intel PCH EG20T as PTP clock" 106c8cc2ae2SJiaxun Yang depends on MIPS_GENERIC || X86_32 || COMPILE_TEST 10755c8fca1SAndy Shevchenko depends on HAS_IOMEM && PCI 10855c8fca1SAndy Shevchenko depends on NET 109e5f31552SArnd Bergmann depends on PTP_1588_CLOCK 110863d08ecSTakahiro Shimizu help 111863d08ecSTakahiro Shimizu This driver adds support for using the PCH EG20T as a PTP 112358dfb6dSTakahiro Shimizu clock. The hardware supports time stamping of PTP packets 113503c9addSAntonio Borneo when using the end-to-end delay (E2E) mechanism. The peer 114503c9addSAntonio Borneo delay mechanism (P2P) is not supported. 115358dfb6dSTakahiro Shimizu 116358dfb6dSTakahiro Shimizu This clock is only useful if your PTP programs are getting 117358dfb6dSTakahiro Shimizu hardware time stamps on the PTP Ethernet packets using the 118358dfb6dSTakahiro Shimizu SO_TIMESTAMPING API. 119863d08ecSTakahiro Shimizu 120863d08ecSTakahiro Shimizu To compile this driver as a module, choose M here: the module 121863d08ecSTakahiro Shimizu will be called ptp_pch. 122863d08ecSTakahiro Shimizu 123a0e136d4SMarcelo Tosatticonfig PTP_1588_CLOCK_KVM 124a0e136d4SMarcelo Tosatti tristate "KVM virtual PTP clock" 125a0e136d4SMarcelo Tosatti depends on PTP_1588_CLOCK 126300bb1feSJianyong Wu depends on (KVM_GUEST && X86) || (HAVE_ARM_SMCCC_DISCOVERY && ARM_ARCH_TIMER) 127a0e136d4SMarcelo Tosatti default y 128a0e136d4SMarcelo Tosatti help 129a0e136d4SMarcelo Tosatti This driver adds support for using kvm infrastructure as a PTP 130a0e136d4SMarcelo Tosatti clock. This clock is only useful if you are using KVM guests. 131a0e136d4SMarcelo Tosatti 132a0e136d4SMarcelo Tosatti To compile this driver as a module, choose M here: the module 133a0e136d4SMarcelo Tosatti will be called ptp_kvm. 134a0e136d4SMarcelo Tosatti 13520503272SDavid Woodhouseconfig PTP_1588_CLOCK_VMCLOCK 13620503272SDavid Woodhouse tristate "Virtual machine PTP clock" 13720503272SDavid Woodhouse depends on X86_TSC || ARM_ARCH_TIMER 138ac1e7404SDavid Woodhouse depends on PTP_1588_CLOCK && ARCH_SUPPORTS_INT128 13918ec5491SDavid Woodhouse default PTP_1588_CLOCK_KVM 14020503272SDavid Woodhouse help 14120503272SDavid Woodhouse This driver adds support for using a virtual precision clock 14220503272SDavid Woodhouse advertised by the hypervisor. This clock is only useful in virtual 14320503272SDavid Woodhouse machines where such a device is present. 14420503272SDavid Woodhouse 14518ec5491SDavid Woodhouse Unlike the KVM virtual PTP clock, the VMCLOCK device offers support 14618ec5491SDavid Woodhouse for reliable timekeeping even across live migration. So this driver 14718ec5491SDavid Woodhouse is enabled by default whenever the KVM PTP clock is. 14818ec5491SDavid Woodhouse 14920503272SDavid Woodhouse To compile this driver as a module, choose M here: the module 15020503272SDavid Woodhouse will be called ptp_vmclock. 15120503272SDavid Woodhouse 15257a10d8cSMin Liconfig PTP_1588_CLOCK_IDT82P33 15357a10d8cSMin Li tristate "IDT 82P33xxx PTP clock" 15457a10d8cSMin Li depends on PTP_1588_CLOCK && I2C 15557a10d8cSMin Li default n 15657a10d8cSMin Li help 15757a10d8cSMin Li This driver adds support for using the IDT 82P33xxx as a PTP 15857a10d8cSMin Li clock. This clock is only useful if your time stamping MAC 15957a10d8cSMin Li is connected to the IDT chip. 16057a10d8cSMin Li 16157a10d8cSMin Li To compile this driver as a module, choose M here: the module 16257a10d8cSMin Li will be called ptp_idt82p33. 16357a10d8cSMin Li 1643a6ba7dcSVincent Chengconfig PTP_1588_CLOCK_IDTCM 1653a6ba7dcSVincent Cheng tristate "IDT CLOCKMATRIX as PTP clock" 16603b06e3fSArnd Bergmann depends on PTP_1588_CLOCK && I2C 1673a6ba7dcSVincent Cheng default n 1683a6ba7dcSVincent Cheng help 1693a6ba7dcSVincent Cheng This driver adds support for using IDT CLOCKMATRIX(TM) as a PTP 1703a6ba7dcSVincent Cheng clock. This clock is only useful if your time stamping MAC 1713a6ba7dcSVincent Cheng is connected to the IDT chip. 1723a6ba7dcSVincent Cheng 1733a6ba7dcSVincent Cheng To compile this driver as a module, choose M here: the module 1743a6ba7dcSVincent Cheng will be called ptp_clockmatrix. 1753a6ba7dcSVincent Cheng 1761ddfecafSMin Liconfig PTP_1588_CLOCK_FC3W 1771ddfecafSMin Li tristate "RENESAS FemtoClock3 Wireless as PTP clock" 1781ddfecafSMin Li depends on PTP_1588_CLOCK && I2C 1791ddfecafSMin Li default n 1801ddfecafSMin Li help 1811ddfecafSMin Li This driver adds support for using Renesas FemtoClock3 Wireless 1821ddfecafSMin Li as a PTP clock. This clock is only useful if your time stamping 1831ddfecafSMin Li MAC is connected to the RENESAS chip. 1841ddfecafSMin Li 1851ddfecafSMin Li To compile this driver as a module, choose M here: the module 1861ddfecafSMin Li will be called ptp_fc3. 1871ddfecafSMin Li 18840b0425fSVladimir Olteanconfig PTP_1588_CLOCK_MOCK 18940b0425fSVladimir Oltean tristate "Mock-up PTP clock" 19040b0425fSVladimir Oltean depends on PTP_1588_CLOCK 19140b0425fSVladimir Oltean help 19240b0425fSVladimir Oltean This driver offers a set of PTP clock manipulation operations over 19340b0425fSVladimir Oltean the system monotonic time. It can be used by virtual network device 19440b0425fSVladimir Oltean drivers to emulate PTP capabilities. 19540b0425fSVladimir Oltean 19640b0425fSVladimir Oltean To compile this driver as a module, choose M here: the module 19740b0425fSVladimir Oltean will be called ptp_mock. 19840b0425fSVladimir Oltean 1997d10001eSVivek Thampiconfig PTP_1588_CLOCK_VMW 2007d10001eSVivek Thampi tristate "VMware virtual PTP clock" 2017d10001eSVivek Thampi depends on ACPI && HYPERVISOR_GUEST && X86 2027d10001eSVivek Thampi depends on PTP_1588_CLOCK 2037d10001eSVivek Thampi help 2047d10001eSVivek Thampi This driver adds support for using VMware virtual precision 2057d10001eSVivek Thampi clock device as a PTP clock. This is only useful in virtual 2067d10001eSVivek Thampi machines running on VMware virtual infrastructure. 2077d10001eSVivek Thampi 2087d10001eSVivek Thampi To compile this driver as a module, choose M here: the module 2097d10001eSVivek Thampi will be called ptp_vmw. 2107d10001eSVivek Thampi 211a7e1abadSJonathan Lemonconfig PTP_1588_CLOCK_OCP 212a7e1abadSJonathan Lemon tristate "OpenCompute TimeCard as PTP clock" 213a7e1abadSJonathan Lemon depends on PTP_1588_CLOCK 214a7e1abadSJonathan Lemon depends on HAS_IOMEM && PCI 215bc8e05d6SJonathan Lemon depends on I2C && MTD 216bc8e05d6SJonathan Lemon depends on SERIAL_8250 217944f5101SRandy Dunlap depends on !S390 21842a99a0bSArnd Bergmann depends on COMMON_CLK 219d79500e6SJonathan Lemon select NET_DEVLINK 2200c104556SJonathan Lemon select CRC16 22109eeb3aeSVadim Fedorenko select DPLL 222a7e1abadSJonathan Lemon help 223a7e1abadSJonathan Lemon This driver adds support for an OpenCompute time card. 224a7e1abadSJonathan Lemon 225a7e1abadSJonathan Lemon The OpenCompute time card is an atomic clock along with 226a7e1abadSJonathan Lemon a GPS receiver that provides a Grandmaster clock source 227a7e1abadSJonathan Lemon for a PTP enabled network. 228a7e1abadSJonathan Lemon 229a7e1abadSJonathan Lemon More information is available at http://www.timingcard.com/ 230a7e1abadSJonathan Lemon 231615927f1STianfei Zhangconfig PTP_DFL_TOD 232615927f1STianfei Zhang tristate "FPGA DFL ToD Driver" 233615927f1STianfei Zhang depends on FPGA_DFL 234615927f1STianfei Zhang depends on PTP_1588_CLOCK 235615927f1STianfei Zhang help 236615927f1STianfei Zhang The DFL (Device Feature List) device driver for the Intel ToD 237615927f1STianfei Zhang (Time-of-Day) device in FPGA card. The ToD IP within the FPGA 238615927f1STianfei Zhang is exposed as PTP Hardware Clock (PHC) device to the Linux PTP 239615927f1STianfei Zhang stack to synchronize the system clock to its ToD information 240615927f1STianfei Zhang using phc2sys utility of the Linux PTP stack. 241615927f1STianfei Zhang 242615927f1STianfei Zhang To compile this driver as a module, choose M here: the module 243615927f1STianfei Zhang will be called ptp_dfl_tod. 244615927f1STianfei Zhang 2452d7de7a3SSven Schnelleconfig PTP_S390 2462d7de7a3SSven Schnelle tristate "S390 PTP driver" 2472d7de7a3SSven Schnelle depends on PTP_1588_CLOCK 2482d7de7a3SSven Schnelle depends on S390 2492d7de7a3SSven Schnelle help 2502d7de7a3SSven Schnelle This driver adds support for S390 time steering via the PtP 2512d7de7a3SSven Schnelle interface. This works by adding a in-kernel clock delta value, 2522d7de7a3SSven Schnelle which is always added to time values used in the kernel. The PtP 2532d7de7a3SSven Schnelle driver provides the raw clock value without the delta to 2542d7de7a3SSven Schnelle userspace. That way userspace programs like chrony could steer 2552d7de7a3SSven Schnelle the kernel clock. 25687a201d5SWei Fang 25787a201d5SWei Fangconfig PTP_NETC_V4_TIMER 25887a201d5SWei Fang tristate "NXP NETC V4 Timer PTP Driver" 25987a201d5SWei Fang depends on PTP_1588_CLOCK 26087a201d5SWei Fang depends on PCI_MSI 26187a201d5SWei Fang help 26287a201d5SWei Fang This driver adds support for using the NXP NETC V4 Timer as a PTP 26387a201d5SWei Fang clock, the clock is used by ENETC V4 or NETC V4 Switch for PTP time 26487a201d5SWei Fang synchronization. It also supports periodic output signal (e.g. PPS) 26587a201d5SWei Fang and external trigger timestamping. 26687a201d5SWei Fang 267d94ba80eSRichard Cochranendmenu 268