The Linux Kernel Logo

Working with the development community

  • Development process
  • Submitting patches
  • Code of conduct
  • Maintainer handbook
  • All development-process docs

Internal API manuals

  • Core API
  • Driver APIs
  • Subsystems
    • Core subsystems
    • Human interfaces
    • Networking interfaces
      • Networking
        • AF_XDP
        • Bare UDP Tunnelling Module Documentation
        • batman-adv
        • SocketCAN - Controller Area Network
        • The UCAN Protocol
        • Hardware Device Drivers
        • Networking Diagnostics
        • Distributed Switch Architecture
        • Linux Devlink Documentation
          • Locking
          • Nested instances
          • Interface documentation
          • Driver-specific documentation
            • am65-cpsw-nuss devlink support
            • bnxt devlink support
            • etas_es58x devlink support
            • hns3 devlink support
            • i40e devlink support
            • ice devlink support
            • ionic devlink support
            • iosm devlink support
            • ixd devlink support
            • ixgbe devlink support
            • kvaser_pciefd devlink support
            • kvaser_usb devlink support
            • mlx4 devlink support
            • mlx5 devlink support
            • mlxsw devlink support
            • mv88e6xxx devlink support
            • netdevsim devlink support
            • nfp devlink support
            • octeontx2 devlink support
            • prestera devlink support
            • ptp_ocp devlink support
              • Info versions
              • Flash update
            • qed devlink support
            • sfc devlink support
            • stmmac (synopsys dwmac) devlink support
            • ti-cpsw-switch devlink support
            • zl3073x devlink support
        • Netlink interface for ethtool
        • IEEE 802.15.4 Developer’s Guide
        • ISO 15765-2 (ISO-TP)
        • J1939 Documentation
        • Linux Networking and Network Devices APIs
        • MSG_ZEROCOPY
        • FAILOVER
        • Net DIM - Generic Network Dynamic Interrupt Moderation
        • NET_FAILOVER
        • Page Pool API
        • PHY Abstraction Layer
        • phylink
        • IP-Aliasing
        • Ethernet Bridging
        • SNMP counter
        • Checksum Offloads
        • Segmentation Offloads
        • Scaling in the Linux Networking Stack
        • Kernel TLS
        • Kernel TLS offload
        • In-Kernel TLS Handshake
        • Linux NFC subsystem
        • Netdev private dataroom for 6lowpan interfaces
        • ARCnet Hardware
        • ARCnet
        • ATM
        • Linux Ethernet Bonding Driver HOWTO
        • cdc_mbim - Driver for CDC MBIM Mobile Broadband modems
        • DCTCP (DataCenter TCP)
        • Device Memory TCP
        • DNS Resolver Module
        • Softnet Driver Issues
        • EQL Driver: Serial IP Load Balancing HOWTO
        • LC-trie implementation notes
        • Linux Socket Filtering aka Berkeley Packet Filter (BPF)
        • Generic HDLC layer
        • Generic Netlink
        • Netlink Family Specifications
        • Generic networking statistics for netlink users
        • The Linux kernel GTP tunneling module
        • Identifier Locator Addressing (ILA)
        • IOAM6 Sysfs variables
        • io_uring zero copy Rx
        • IP dynamic address hack-port v0.03
        • IPsec
        • IP Sysctl
        • IPv6
        • IPVLAN Driver HOWTO
        • IPvs-sysctl
        • Kernel Connection Multiplexor
        • L2TP
        • The Linux LAPB Module Interface
        • How to use packet injection with mac80211
        • Management Component Transport Protocol (MCTP)
        • MPLS Sysfs variables
        • Multipath TCP (MPTCP)
        • MPTCP Sysfs variables
        • HOWTO for multiqueue network device support
        • Multi-PF Netdev
        • NAPI
        • Common Networking Struct Cachelines
        • Netconsole
        • Netdev features mess and how to get out from it alive
        • Network Devices, the Kernel, and You!
        • Netfilter Sysfs variables
        • NETIF Msg Level
        • Netmem Support for Network Drivers
        • Resilient Next-hop Groups
        • Netfilter Conntrack Sysfs variables
        • Netfilter’s flowtable infrastructure
        • OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface (TC6) Framework Support
        • Open vSwitch datapath developer documentation
        • Operational States
        • Packet MMAP
        • Linux Phonet protocol family
        • PHY link topology
        • Ethernet ports
        • HOWTO for the linux packet generator
        • PLIP: The Parallel Line Internet Protocol Device
        • PPP Generic Driver and Channel Interface
        • The proc/net/tcp and proc/net/tcp6 variables
        • Power Sourcing Equipment (PSE) Documentation
        • PSP Security Protocol
        • How to use radiotap headers
        • RDS
        • Linux wireless regulatory documentation
        • Network Function Representors
        • RxRPC Network Protocol
        • Linux Kernel SCTP
        • LSM/SeLinux secid
        • Seg6 Sysfs variables
        • struct sk_buff
        • SMC Sysctl
        • NIC SR-IOV APIs
        • Interface statistics
        • Stream Parser (strparser)
        • Ethernet switch device driver model (switchdev)
        • Sysfs tagging
        • TC Actions - Environmental Rules
        • TC queue based filtering
        • TCP Authentication Option Linux implementation (RFC5925)
        • Thin-streams and TCP
        • Team
        • Timestamping
        • Linux Kernel TIPC
        • Transparent proxy support
        • Universal TUN/TAP device driver
        • The UDP-Lite protocol (RFC 3828)
        • Virtual Routing and Forwarding (VRF)
        • Virtual eXtensible Local Area Networking documentation
        • Linux X.25 Project
        • X.25 Device Driver Interface
        • XFRM Framework
        • XDP RX Metadata
        • AF_XDP TX Metadata
      • NetLabel
      • InfiniBand
      • MHI
    • Storage interfaces
    • Other subsystems
  • Locking

Development tools and processes

  • Licensing rules
  • Writing documentation
  • Development tools
  • Testing guide
  • Hacking guide
  • Tracing
  • Fault injection
  • Livepatching
  • Rust

User-oriented documentation

  • Administration
  • Build system
  • Reporting issues
  • Userspace tools
  • Userspace API

Firmware-related documentation

  • Firmware
  • Firmware and Devicetree

Architecture-specific documentation

  • CPU architectures

Other documentation

  • Unsorted documentation

Translations

  • Translations
The Linux Kernel
  • Kernel subsystem documentation
  • Networking
  • Linux Devlink Documentation
  • ptp_ocp devlink support
  • View page source

ptp_ocp devlink support¶

This document describes the devlink features implemented by the ptp_ocp device driver: the info versions it reports and its flash update support.

Info versions¶

The ptp_ocp driver reports the following versions

devlink info versions implemented¶

Name

Type

Description

fw

running

Version of the firmware running on the card. Reported as loader instead when the card is running the firmware loader.

board.id

fixed

Board identifier, read from the on-card EEPROM.

cpld.id

fixed

Lattice device ID (IDCODE) of the TAP CPLD, formatted as 0x%08x. Only present on ADVA TimeCard X1 boards, which are the only ones carrying that CPLD. Reading it claims the shared I2C bus and reprograms the on-card mux, so the driver does that from its own worker and reports the cached value here; the version is omitted until that read has succeeded. The read is made once per binding and again after a successful CPLD update.

fw.cpld

running

USERCODE of the image programmed into the TAP CPLD, formatted as 0x%08x. Read together with cpld.id and reported the same way. This is the component name to pass to devlink dev flash to update the CPLD.

Flash update¶

The driver implements devlink dev flash for two separate targets, selected with the component name.

Flash components¶

Component

Description

(none)

The card’s own flash, written through the SPI controller the driver exposes. The card runs the new image after its next reset.

fw.cpld

The configuration flash of the TAP CPLD on ADVA TimeCard X1 boards, programmed over I2C with the MachXO3 in-system programming commands and activated with a REFRESH, so the new image runs immediately. The image is the raw configuration bitstream. The only check the driver makes is that its length is a non-zero multiple of the 16-byte page size, so a container such as .jed has to be converted first rather than passed through - one whose length happens to be a multiple of 16 would be programmed as if it were a bitstream.

Programming the CPLD claims the shared I2C bus for the whole cycle, so reads of the card’s EEPROM block until it completes. Progress is reported with the standard devlink status notifications.

Example:

$ devlink dev flash pci/0000:02:00.0 file adva-cpld.bin component fw.cpld
Previous Next

© Copyright The kernel development community.

Built with Sphinx using a theme provided by Read the Docs.