Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: ptp: add NETC Timer PTP clock

NXP NETC (Ethernet Controller) is a multi-function PCIe Root Complex
Integrated Endpoint (RCiEP), the Timer is one of its functions which
provides current time with nanosecond resolution, precise periodic
pulse, pulse on timeout (alarm), and time capture on external pulse
support. And also supports time synchronization as required for IEEE
1588 and IEEE 802.1AS-2020. So add device tree binding doc for the PTP
clock based on NETC Timer.

NETC Timer has three reference clock sources, but the clock mux is inside
the IP. Therefore, the driver will parse the clock name to select the
desired clock source. If the clocks property is not present, NETC Timer
will use the system clock of NETC IP as its reference clock. Because the
Timer is a PCIe function of NETC IP, the system clock of NETC is always
available to the Timer.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20250829050615.1247468-2-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Wei Fang and committed by
Paolo Abeni
d6900b8b 2fd4161d

+63
+63
Documentation/devicetree/bindings/ptp/nxp,ptp-netc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/ptp/nxp,ptp-netc.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NXP NETC V4 Timer PTP clock 8 + 9 + description: 10 + NETC V4 Timer provides current time with nanosecond resolution, precise 11 + periodic pulse, pulse on timeout (alarm), and time capture on external 12 + pulse support. And it supports time synchronization as required for 13 + IEEE 1588 and IEEE 802.1AS-2020. 14 + 15 + maintainers: 16 + - Wei Fang <wei.fang@nxp.com> 17 + - Clark Wang <xiaoning.wang@nxp.com> 18 + 19 + properties: 20 + compatible: 21 + enum: 22 + - pci1131,ee02 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + clocks: 28 + maxItems: 1 29 + description: 30 + The reference clock of NETC Timer, can be selected between 3 different 31 + clock sources using an integrated hardware mux TMR_CTRL[CK_SEL]. 32 + The "ccm" means the reference clock comes from CCM of SoC. 33 + The "ext" means the reference clock comes from external IO pins. 34 + If not present, indicates that the system clock of NETC IP is selected 35 + as the reference clock. 36 + 37 + clock-names: 38 + enum: 39 + - ccm 40 + - ext 41 + 42 + required: 43 + - compatible 44 + - reg 45 + 46 + allOf: 47 + - $ref: /schemas/pci/pci-device.yaml 48 + 49 + unevaluatedProperties: false 50 + 51 + examples: 52 + - | 53 + pcie { 54 + #address-cells = <3>; 55 + #size-cells = <2>; 56 + 57 + ptp-timer@18,0 { 58 + compatible = "pci1131,ee02"; 59 + reg = <0x00c000 0 0 0 0>; 60 + clocks = <&scmi_clk 18>; 61 + clock-names = "ccm"; 62 + }; 63 + };