ath12k: WCN7850: PTP hardware clock and time stamping - which timer and offset registers may the driver use?

Johannes Schneider johannes.schneider at leica-geosystems.com
Wed Oct 21 23:07:41 PDT 2026


Hoi Jeff, all,


we have hardware time stamping and a PTP hardware clock working on
WCN7850 (hw2.0, firmware WLAN.HMT.1.1.c7-00108) with mainline ath12k
(v6.16), so linuxptp and chrony can synchronize the system clock over
Wi-Fi. Between two WCN7850 M.2 cards on i.MX8M Mini EVKs, one AP and
one STA, the client PHC stays within 0.95 us SD (p99 3.45 us) of the
master over 6 h, measured against an independent Ethernet PTP
reference.

Before posting the series as an RFC, we would like to know whether
the pieces it relies on are acceptable in ath12k, or whether there is
a supported alternative.

What the series uses:

- PHC: the free-running Qtimer, read at MHI_TIME (0xa28/0xa2c),
  19.2 MHz.
- TX stamp: the TSF in the TX completion (rate_stats.tsf).
- RX stamp: the RXPCU_PPDU_END_INFO TSF minus rx_duration, from the RX
  monitor status ring running beside the STA/AP vdev (no monitor
  vdev), matched to the frame by phy_ppdu_id; MPDU_START (retry bit,
  sequence number, addr2) to detect retransmissions.
- Both stamps are mapped onto the Qtimer with the PMM global offset
  (0xb500fc/0xb50100), read under the UMAC awake handshake (write
  0x3004 = 1, poll 0x1e04040 for 0x2), as qca-wifi-host-cmn does for
  Kiwi (hal/wifi3.0/kiwi/hal_kiwi.c, hif/src/pcie/if_pci.h, public on
  CodeLinaro, branch wlan-cmn.driver.lnx.2.0).
- mac80211: a driver op to report the time stamping capabilities
  (get_ts_info), so ethtool -T and ptp4l see them.

Questions:

1. The Qtimer at MHI_TIME and the PMM offsets: stable across WCN7850
   firmware releases and chip revisions, and acceptable for the
   driver to read? Does the same hold for the other ath12k chips?
2. The UMAC awake handshake: is it the right way to make the PMM read
   safe from the driver (without it the firmware crashes), and is
   releasing it (0x3004 = 0) safe?
3. WMI_VDEV_TSF_TSTAMP_ACTION with a Qtimer capture request: the TSF
   report returns a global TSF of 0 on WCN7850, in AP and STA mode.
   Should it carry the global time? That would replace the PMM read.
4. The RX monitor status ring beside a STA/AP vdev, without a monitor
   vdev: a supported configuration? Is there a lighter way to get the
   PPDU TSF of a received frame? rx_msdu_end.ppdu_start_timestamp is
   empty on WCN7850.
5. Which instant do the TX completion TSF and the RXPCU_PPDU_END TSF
   mark? We see a constant ~16 us TX/RX asymmetry, and the mean offset
   moves by up to ~2.6 us between associations with the same spread.
6. Multicast and broadcast frames sent by an AP get no TX completion
   stamp. Is there a way to get one?
7. Would a series along these lines be welcome in ath12k, and is
   anyone already working on PTP for ath12k?


thanks and 'Gruß',
Johannes Schneider



More information about the ath12k mailing list