| /Linux-v6.1/Documentation/devicetree/bindings/net/ |
| D | intel,ixp46x-ptp-timer.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 4 --- 5 $id: "http://devicetree.org/schemas/net/intel,ixp46x-ptp-timer.yaml#" 6 $schema: "http://devicetree.org/meta-schemas/core.yaml#" 8 title: Intel IXP46x PTP Timer (TSYNC) 11 - Linus Walleij <linus.walleij@linaro.org> 14 The Intel IXP46x PTP timer is known in the manual as IEEE1588 Hardware 15 Assist and Time Synchronization Hardware Assist TSYNC provides a PTP 16 timer. It exists in the Intel IXP45x and IXP46x XScale SoCs. 20 const: intel,ixp46x-ptp-timer [all …]
|
| D | fsl,fman-dtsec.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/net/fsl,fman-dtsec.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Madalin Bucur <madalin.bucur@nxp.com> 15 10/100/1000 MBit/s speeds, and the 10-Gigabit Ethernet Media Access Controller 22 - fsl,fman-dtsec 23 - fsl,fman-xgec 24 - fsl,fman-memac 26 cell-index: [all …]
|
| /Linux-v6.1/include/linux/fsl/ |
| D | ptp_qoriq.h | 1 // SPDX-License-Identifier: GPL-2.0 14 * qoriq ptp registers 17 u32 tmr_ctrl; /* Timer control register */ 19 u32 tmr_temask; /* Timer event mask register */ 21 u32 tmr_pemask; /* Timer event mask register */ 23 u32 tmr_cnt_h; /* Timer counter high register */ 24 u32 tmr_cnt_l; /* Timer counter low register */ 25 u32 tmr_add; /* Timer drift compensation addend register */ 26 u32 tmr_acc; /* Timer accumulator register */ 27 u32 tmr_prsc; /* Timer prescale */ [all …]
|
| /Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| D | clock.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 36 #include <rdma/mlx5-abi.h> 94 return -EOPNOTSUPP; in mlx5_set_mtutc() 106 timer_h = ioread32be(real_time ? &dev->iseg->real_time_h : in mlx5_read_time() 107 &dev->iseg->internal_timer_h); in mlx5_read_time() 109 timer_l = ioread32be(real_time ? &dev->iseg->real_time_l : in mlx5_read_time() 110 &dev->iseg->internal_timer_l); in mlx5_read_time() 112 timer_h1 = ioread32be(real_time ? &dev->iseg->real_time_h : in mlx5_read_time() 113 &dev->iseg->internal_timer_h); in mlx5_read_time() [all …]
|
| D | clock.h | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 62 return mdev->clock.ptp ? ptp_clock_index(mdev->clock.ptp) : -1; in mlx5_clock_get_ptp_index() 68 struct mlx5_timer *timer = &clock->timer; in mlx5_timecounter_cyc2time() local 73 seq = read_seqbegin(&clock->lock); in mlx5_timecounter_cyc2time() 74 nsec = timecounter_cyc2time(&timer->tc, timestamp); in mlx5_timecounter_cyc2time() 75 } while (read_seqretry(&clock->lock, seq)); in mlx5_timecounter_cyc2time() 94 return -1; in mlx5_clock_get_ptp_index()
|
| /Linux-v6.1/Documentation/devicetree/bindings/ptp/ |
| D | ptp-qoriq.txt | 1 * Freescale QorIQ 1588 timer based PTP clock 5 - compatible Should be "fsl,etsec-ptp" for eTSEC 6 Should be "fsl,fman-ptp-timer" for DPAA FMan 7 Should be "fsl,dpaa2-ptp" for DPAA2 8 Should be "fsl,enetc-ptp" for ENETC 9 - reg Offset and length of the register set for the device 10 - interrupts There should be at least two interrupts. Some devices 11 have as many as four PTP related interrupts. 15 - fsl,cksel Timer reference clock source. 16 - fsl,tclk-period Timer reference clock period in nanoseconds. [all …]
|
| /Linux-v6.1/drivers/net/ethernet/freescale/ |
| D | fec_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Fast Ethernet Controller (ENET) PTP driver for MX6x. 96 * This function enble the PPS ouput on the timer channel. 105 if (fep->pps_enable == enable) in fec_ptp_enable_pps() 108 fep->pps_channel = DEFAULT_PPS_CHANNEL; in fec_ptp_enable_pps() 109 fep->reload_period = PPS_OUPUT_RELOAD_PERIOD; in fec_ptp_enable_pps() 111 spin_lock_irqsave(&fep->tmreg_lock, flags); in fec_ptp_enable_pps() 116 writel(FEC_T_TF_MASK, fep->hwp + FEC_TCSR(fep->pps_channel)); in fec_ptp_enable_pps() 122 val = readl(fep->hwp + FEC_TCSR(fep->pps_channel)); in fec_ptp_enable_pps() 125 writel(val, fep->hwp + FEC_TCSR(fep->pps_channel)); in fec_ptp_enable_pps() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/stmicro/stmmac/ |
| D | stmmac_ptp.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 3 PTP Header file 18 /* IEEE 1588 PTP register offsets */ 20 #define PTP_SSIR 0x04 /* Sub-Second Increment Reg */ 27 #define PTP_ATNR 0x48 /* Auxiliary Timestamp - Nanoseconds Reg */ 28 #define PTP_ATSR 0x4c /* Auxiliary Timestamp - Seconds Reg */ 31 #define PTP_DIGITAL_ROLLOVER_MODE 0x3B9ACA00 /* 10e9-1 ns */ 34 /* PTP Timestamp control register defines */ 43 /* Enable PTP packet Processing for Version 2 Format */ 45 /* Enable Processing of PTP over Ethernet Frames */ [all …]
|
| /Linux-v6.1/drivers/ptp/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 # PTP clock support configuration 6 menu "PTP clock support" 9 tristate "PTP clock support" 17 standard defines a Precision Time Protocol (PTP), which can 23 This driver adds support for PTP clocks as character 24 devices. If you want to use a PTP clock, then you should 28 will be called ptp. 37 into vmlinux while the PTP support itself is in a loadable 39 If PTP support is disabled, this dependency will still be [all …]
|
| D | ptp_qoriq.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * PTP 1588 clock for Freescale QorIQ 1588 timer 26 /* Caller must hold ptp_qoriq->lock. */ 29 struct ptp_qoriq_registers *regs = &ptp_qoriq->regs; in tmr_cnt_read() 33 lo = ptp_qoriq->read(®s->ctrl_regs->tmr_cnt_l); in tmr_cnt_read() 34 hi = ptp_qoriq->read(®s->ctrl_regs->tmr_cnt_h); in tmr_cnt_read() 40 /* Caller must hold ptp_qoriq->lock. */ 43 struct ptp_qoriq_registers *regs = &ptp_qoriq->regs; in tmr_cnt_write() 47 ptp_qoriq->write(®s->ctrl_regs->tmr_cnt_l, lo); in tmr_cnt_write() 48 ptp_qoriq->write(®s->ctrl_regs->tmr_cnt_h, hi); in tmr_cnt_write() [all …]
|
| D | ptp_pch.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * PTP 1588 clock using the EG20T PCH 6 * Copyright (C) 2011-2012 LAPIS SEMICONDUCTOR Co., LTD. 15 #include <linux/io-64-nonatomic-lo-hi.h> 16 #include <linux/io-64-nonatomic-hi-lo.h> 43 * struct pch_ts_regs - IEEE 1588 registers 109 * struct pch_dev - Driver private data 124 * struct pch_params - 1588 module parameter 142 val = ioread32(&chip->regs->ts_sel) | (PCH_ECS_ETH); in pch_eth_enable_set() 143 iowrite32(val, (&chip->regs->ts_sel)); in pch_eth_enable_set() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/mellanox/mlx4/ |
| D | en_clock.c | 14 * - Redistributions of source code must retain the above 18 * - Redistributions in binary form must reproduce the above 39 /* mlx4_en_read_clock - read raw cycle counter (to be used by time counter) 45 struct mlx4_dev *dev = mdev->dev; in mlx4_en_read_clock() 47 return mlx4_read_clock(dev) & tc->mask; in mlx4_en_read_clock() 55 lo = (u64)be16_to_cpu(ts_cqe->timestamp_lo); in mlx4_en_get_cqe_ts() 56 hi = ((u64)be32_to_cpu(ts_cqe->timestamp_hi) + !lo) << 16; in mlx4_en_get_cqe_ts() 69 seq = read_seqbegin(&mdev->clock_lock); in mlx4_en_fill_hwtstamps() 70 nsec = timecounter_cyc2time(&mdev->clock, timestamp); in mlx4_en_fill_hwtstamps() 71 } while (read_seqretry(&mdev->clock_lock, seq)); in mlx4_en_fill_hwtstamps() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/xscale/ |
| D | ptp_ixp46x.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * PTP 1588 clock using the IXP46X 46 lo = __raw_readl(®s->systime_lo); in ixp_systime_read() 47 hi = __raw_readl(®s->systime_hi); in ixp_systime_read() 64 __raw_writel(lo, ®s->systime_lo); in ixp_systime_write() 65 __raw_writel(hi, ®s->systime_hi); in ixp_systime_write() 75 struct ixp46x_ts_regs *regs = ixp_clock->regs; in isr() 79 val = __raw_readl(®s->event); in isr() 83 if (ixp_clock->exts0_enabled) { in isr() 84 hi = __raw_readl(®s->asms_hi); in isr() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/cadence/ |
| D | macb_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * 1588 PTP support for Cadence GEM device. 5 * Copyright (C) 2017 Cadence Design Systems - https://www.cadence.com 26 #define GEM_PTP_TIMER_NAME "gem-ptp-timer" 31 if (bp->hw_dma_cap == HW_DMA_CAP_PTP) in macb_ptp_desc() 34 if (bp->hw_dma_cap == HW_DMA_CAP_64B_PTP) in macb_ptp_desc() 41 static int gem_tsu_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts, in gem_tsu_get_time() argument 44 struct macb *bp = container_of(ptp, struct macb, ptp_clock_info); in gem_tsu_get_time() 49 spin_lock_irqsave(&bp->tsu_clk_lock, flags); in gem_tsu_get_time() 59 /* if so, use later read & re-read seconds in gem_tsu_get_time() [all …]
|
| D | macb.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (C) 2004-2006 Atmel Corporation 98 #define GEM_EFTSH 0x00e8 /* PTP Event Frame Transmitted Seconds Register 47:32 */ 99 #define GEM_EFRSH 0x00ec /* PTP Event Frame Received Seconds Register 47:32 */ 100 #define GEM_PEFTSH 0x00f0 /* PTP Peer Event Frame Transmitted Seconds Register 47:32 */ 101 #define GEM_PEFRSH 0x00f4 /* PTP Peer Event Frame Received Seconds Register 47:32 */ 110 #define GEM_TX65CNT 0x011c /* 65-127 byte Frames TX counter */ 111 #define GEM_TX128CNT 0x0120 /* 128-255 byte Frames TX counter */ 112 #define GEM_TX256CNT 0x0124 /* 256-511 byte Frames TX counter */ 113 #define GEM_TX512CNT 0x0128 /* 512-1023 byte Frames TX counter */ [all …]
|
| /Linux-v6.1/drivers/net/ethernet/chelsio/cxgb4/ |
| D | cxgb4_ptp.c | 2 * cxgb4_ptp.c:Chelsio PTP support for T5/T6 4 * Copyright (c) 2003-2017 Chelsio Communications, Inc. All rights reserved. 16 * - Redistributions of source code must retain the above 20 * - Redistributions in binary form must reproduce the above 54 * cxgb4_ptp_is_ptp_tx - determine whether TX packet is PTP or not 55 * @skb: skb of outgoing ptp request 63 return skb->len >= PTP_MIN_LENGTH && in cxgb4_ptp_is_ptp_tx() 64 skb->len <= PTP_IN_TRANSMIT_PACKET_MAXNUM && in cxgb4_ptp_is_ptp_tx() 65 likely(skb->protocol == htons(ETH_P_IP)) && in cxgb4_ptp_is_ptp_tx() 66 ip_hdr(skb)->protocol == IPPROTO_UDP && in cxgb4_ptp_is_ptp_tx() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/intel/e1000e/ |
| D | ptp.c | 1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright(c) 1999 - 2018 Intel Corporation. */ 4 /* PTP 1588 Hardware Clock (PHC) 5 * Derived from PTP Hardware Clock driver for Intel 82576 and 82580 (igb) 18 * e1000e_phc_adjfine - adjust the frequency of the hardware clock 19 * @ptp: ptp clock structure 27 static int e1000e_phc_adjfine(struct ptp_clock_info *ptp, long delta) in e1000e_phc_adjfine() argument 29 struct e1000_adapter *adapter = container_of(ptp, struct e1000_adapter, in e1000e_phc_adjfine() 31 struct e1000_hw *hw = &adapter->hw; in e1000e_phc_adjfine() 40 delta = -delta; in e1000e_phc_adjfine() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/freescale/enetc/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0 15 If compiled as module (M), the module name is fsl-enetc. 27 If compiled as module (M), the module name is fsl-enetc-vf. 35 If compiled as module (M), the module name is fsl-enetc-ierb. 44 If compiled as module (M), the module name is fsl-enetc-mdio. 47 tristate "ENETC PTP clock driver" 51 This driver adds support for using the ENETC 1588 timer 52 as a PTP clock. This clock is only useful if your PTP 53 programs are getting hardware time stamps on the PTP Ethernet 56 If compiled as module (M), the module name is fsl-enetc-ptp. [all …]
|
| /Linux-v6.1/drivers/net/ethernet/intel/igc/ |
| D | igc_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0 26 struct igc_hw *hw = &adapter->hw; in igc_ptp_read() 33 ts->tv_sec = sec; in igc_ptp_read() 34 ts->tv_nsec = nsec; in igc_ptp_read() 40 struct igc_hw *hw = &adapter->hw; in igc_ptp_write_i225() 42 wr32(IGC_SYSTIML, ts->tv_nsec); in igc_ptp_write_i225() 43 wr32(IGC_SYSTIMH, ts->tv_sec); in igc_ptp_write_i225() 46 static int igc_ptp_adjfine_i225(struct ptp_clock_info *ptp, long scaled_ppm) in igc_ptp_adjfine_i225() argument 48 struct igc_adapter *igc = container_of(ptp, struct igc_adapter, in igc_ptp_adjfine_i225() 50 struct igc_hw *hw = &igc->hw; in igc_ptp_adjfine_i225() [all …]
|
| /Linux-v6.1/drivers/net/ethernet/intel/ice/ |
| D | ice_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0 116 return -EINVAL; in ice_ptp_set_sma_config_e810t() 121 return -EINVAL; in ice_ptp_set_sma_config_e810t() 181 * @info: the driver's PTP info structure 193 struct ice_hw *hw = &pf->hw; in ice_ptp_set_sma_e810t() 197 return -EOPNOTSUPP; in ice_ptp_set_sma_e810t() 222 * @info: the driver's PTP info structure 237 return -EOPNOTSUPP; in ice_verify_pin_e810t() 245 return -EOPNOTSUPP; in ice_verify_pin_e810t() 249 return -EOPNOTSUPP; in ice_verify_pin_e810t() [all …]
|
| D | ice_ptp_hw.c | 1 // SPDX-License-Identifier: GPL-2.0 16 * +---------------+ +---------------+ +---------------+ 18 * +---------------+ +---------------+ +---------------+ 24 * +---------------+ +---------------+ 26 * +---------------+ +---------------+ 37 * - 823.4375 MHz 38 * - 783.36 MHz 39 * - 796.875 MHz 40 * - 816 MHz 41 * - 830.078125 MHz [all …]
|
| /Linux-v6.1/arch/arm/boot/dts/ |
| D | intel-ixp45x-ixp46x.dtsi | 1 // SPDX-License-Identifier: ISC 8 #include "intel-ixp4xx.dtsi" 13 compatible = "intel,ixp46x-expansion-bus-controller", "syscon"; 19 compatible = "intel,ixp46x-rng"; 23 interrupt-controller@c8003000 { 24 compatible = "intel,ixp43x-interrupt"; 32 compatible = "intel,ixp4xx-udc"; 39 compatible = "intel,ixp4xx-i2c"; 47 compatible = "intel,ixp4xx-ethernet"; 52 queue-rx = <&qmgr 0>; [all …]
|
| /Linux-v6.1/drivers/net/ethernet/freescale/dpaa2/ |
| D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 21 Enable Priority-Based Flow Control (PFC) support for DPAA2 Ethernet 26 tristate "Freescale DPAA2 PTP Clock" 30 This driver adds support for using the DPAA2 1588 timer module 31 as a PTP clock.
|
| /Linux-v6.1/drivers/net/ethernet/renesas/ |
| D | ravb_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /* PTP 1588 clock using the Renesas Ethernet AVB 4 * Copyright (C) 2013-2015 Renesas Electronics Corporation 6 * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com> 13 struct net_device *ndev = priv->ndev; in ravb_ptp_tcr_request() 27 struct net_device *ndev = priv->ndev; in ravb_ptp_time_read() 34 ts->tv_nsec = ravb_read(ndev, GCT0); in ravb_ptp_time_read() 35 ts->tv_sec = ravb_read(ndev, GCT1) | in ravb_ptp_time_read() 45 struct net_device *ndev = priv->ndev; in ravb_ptp_time_write() 55 return -EBUSY; in ravb_ptp_time_write() [all …]
|
| /Linux-v6.1/arch/arm64/boot/dts/freescale/ |
| D | qoriq-fman3-0.dtsi | 1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 5 * Copyright 2012-2015 Freescale Semiconductor Inc. 9 #include <dt-bindings/clock/fsl,qoriq-clockgen.h> 12 #address-cells = <1>; 13 #size-cells = <1>; 14 cell-index = <0>; 21 clock-names = "fmanclk"; 22 fsl,qman-channel-range = <0x800 0x10>; 23 ptimer-handle = <&ptp_timer0>; 24 dma-coherent; [all …]
|