Logo of The Linux Kernel

The Linux Kernel

next-20261013

Quick search

Contents

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
      • 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

This Page

  • Show 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
©The kernel development community. | Powered by Sphinx 7.4.7 & Alabaster 0.7.16 | Page source